Problems with Alsa (I think) (14.1 x64, kernel 3.13.0)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Problems with Alsa (I think) (14.1 x64, kernel 3.13.0)
So I've been battling to get a functional XBMC server working, and I've hit my second roadblock with sound.
My sound doesn't work through HDMI by default. So I compiled kernel 3.13.0 to get that working and now my (minor) problem is that it's muted when my system starts. It seems that the ATI HDMI device lists a S/PDIF device, which can only either be muted (by default) or set to [00] (at which point sounds work). However, when I try to use programs to listen to music, they usually work but throw errors. Furthermore, on XBMC, I can watch certian movies, but others will cause my TV to pop up a message about incompatible PCM signals and then none of my sound will work again until I reboot.
I've been pulling my hair out, going through docs.slackware.org stuff and other things (mostly help stuff from Arch Linux, limited help from XBMC sources but nothing concrete) without success. Anyone have any tips for me?
Thanks.
EDIT: I dug up a pdf of the manual for my TV... turns out it basically supports nothing but PCM, so I fixed that in XBMC. How, errors I get while trying to play music (which doesn't play as of now) throw errors like ALSA error: : No suitable mixer element found, ALSA error: snd_mixer_find_selem failed, and ALSA error: snd_pcm_open failed: No such file or directory
Last edited by spudgunner; 01-27-2014 at 08:48 PM.
So I've been battling to get a functional XBMC server working, and I've hit my second roadblock with sound.
My sound doesn't work through HDMI by default. So I compiled kernel 3.13.0
Did you compile the drivers into the kernel or did you recompile them as modules?
It looks to me that you forgot to compile the sound modules for that card.
Please post the relivent portion of lspci -vv and cat /usr/src/linux/.config
Every time I need sound in the HDMI interface I have to activate a switch in xfce-mixer (IEC958).
After that I can redirect the sound through the HDMI interface.
If he Blacklists it, since he's using HDMI, it would Blacklist the snd-intel-hda module which would diable both sound cards. He needs to setup his device controls actually since he's using this method.
Correction on my last reply regarding which audio device to default to.
As far as a mixer issue. Alsa uses dmix, so you may need to check the alsa utilities packages that handle dmix.
Blacklisting the module definitely doesn't work, I've already tried that.
I haven't fooled around with it much since I got XBMC working correctly, but here's a couple more pieces of info that may be of use:
(1) At one point I tried editing /usr/share/alsa/alsa.conf, and I changed the line
Code:
defaults.pcm.device 0
to
Code:
defaults.pcm.device 3
(due to what running aplay -l tells me about my devices) and I was able to adjust the volume of the HDMI PCM device via alsamixer (whereas before, it's only set to MM or 00). However, this didn't appear to do anything for me, so I switched to back to try to keep as much as possible at default values to isolate my problems.
(2) I have tried defining a default device in /etc/asound.conf but then I cannot use alsamixer at all (but the sound does work), I'll confirm tonight with music players still give me error messages with this setting.
(3) When I boot my computer or restart ALSA, sometimes I get the following message:
Code:
/usr/sbin/alsactl: set_control:1452: control.7.value.2 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.3 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.4 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.5 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.6 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.7 is not specified
I know it comes up when I set the default device in /etc/asound.conf, and it may or may not come up if I make the change listed in (1). (I never did establish that pattern, but luckily I have time tonight to keep trying to diagnose the problems and work through them). I don't know what the above messages mean, but it almost looks to me as if it's trying to do something with multiple audio channels and failing.
Hopefully this info may be able to lead you guys in the right direction.
Greetings
It is my understanding and experience that blacklisting is only good if you never want to use a secondary card for a secondary purpose. I can't tell you exactly how you should do this on your system but I can give you an example of how I do it on mine.
I have 3 sound devices - an onboard Realtek ACL898 Codec, an Intel-hda-hdmi, and a discrete Esi Juli@ semi-pro recording quality card based on Ice1724. Since at this time I have no plans to use the HDMI output, it is blacklisted.
BUT
I prefer to use the onboard capture for network/speech usage, such as Skype, TeamSpeak, etc but never use it for music recording. To accomplish this I had to make a $HOME/.asoundrc shown here
Code:
pcm.!default { # declare the default PCM device
type asym # combine playback and capture devices
playback.pcm { ### Playback object ###
type plug # convert audio to mixer format
slave.pcm {
type dmix # mix multiple audio streams
ipc_key 6969 # shared memory key; must be unique
ipc_key_add_uid true # add UID to shared mem key
ipc_perm 0600 # shared mem file permissions
slave {
pcm {
type hw # define the playback hardware
card "Ice1724" # playback card name
device 0 # playback device on that card
}
format S16_LE # bits per sample format
rate 44100 # samples per second
channels 2 # number of audio channels
}
}
}
capture.pcm { ### Capture object ###
type plug # convert audio format from the hardware
slave {
pcm {
type hw # define the capture hardware
card "Intel" # capture card name
device 0 # capture device on that card
}
}
}
}
Presently, I load the Ice1724 capture for recording manually only because I rarely use "Microphone In" for music recording since usually I am inputting at Line Level from a standalone mixer. On the rare occasion that I use the "Mic In" I need to walk through a routine checklist so I KNOW it is on and onboard is off, not left to assume software did it properly. Psychological I suppose, but necessary nonetheless for me. Not a recommendation, just mentioned for clarity sake. This just works for me.
Wow, that situation is far more complicated than mine is. However, I will play around with some of the things you've presented here. Does they ipc_key have to be any particular number or is it just a random, made-up number? And I'm assuming you are able to adjust the volume on multiple audio channels via alsamixer with that configuration?
(1) At one point I tried editing /usr/share/alsa/alsa.conf, and I changed the line
Code:
defaults.pcm.device 0
to
Code:
defaults.pcm.device 3
(due to what running aplay -l tells me about my devices) and I was able to adjust the volume of the HDMI PCM device via alsamixer (whereas before, it's only set to MM or 00). However, this didn't appear to do anything for me, so I switched to back to try to keep as much as possible at default values to isolate my problems.
Try with card instead.
I have some issues with AMD audio too. When I run "aplay -l", I get :
Code:
bash-4.2$ aplay -l
**** Liste des Périphériques Matériels PLAYBACK ****
carte 0: Generic [HD-Audio Generic], périphérique 3: ID aa01 Digital [ID aa01 Digital]
Sous-périphériques: 1/1
Sous-périphérique #0: subdevice #0
carte 1: Generic_1 [HD-Audio Generic], périphérique 0: ALC887-VD Analog [ALC887-VD Analog]
Sous-périphériques: 0/1
Sous-périphérique #0: subdevice #0
bash-4.2$
Now I get sound in every application though I can't manage to have two applications accessing the audio device, while I could before.
Kmix is also not displaying the proper mixing channels, but that seems to be a bug in current kmix as the HDMI and Analog audio have the same name. alsamixer works fine though.
This is really quite a mess.
First off, sorry to revive a dead thread (and sorry for leaving you all hanging).
I had it somewhat working, as in I could hear audio but I had no volume control or no individual channel control in alsamixer. But it was working well enough for what I needed it for, so I gave up in trying to make it better because I was frustrated.
Fast forward to today: the power was cut to my machine and when I booted it back up audio was again not working. I can't remember my somewhat solution and I've tried lots of asound.conf stuff but nothing is working for me. So currently, I have a S/PDIF channel that defaults to mute and only goes to 00 if it's not muted. When I unmute and test with aplay -D, I get a static sound.
So (since I never had it working quite right to begin with anyways), please try to help me once again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.