Monday, February 15, 2010

Linux sound problems

Original post date: Fri Sep 07 12:00:00 2007
Ok, just learned that having two sound cards in your system can lead to all kinds of trouble.
Some time ago I had bought some headphones from Altec Lansing that came with an USB adapter. Not expecting it to work in Linux I plugged it in, but lo and behold it actually worked and I had now two sound cards in my system according to Fedora's Soundcard Detection utility. So far so good.
Soon after I removed the USB module and just connected the headphones directly like I had always done and life was perfect.
Until quite some time later I had to reboot my machine and suddenly I was getting all these weird ALSA errors from all kinds of programs (see for example the image of the pop-up that appeared at KDE startup).


The strange thing was that the Soundcard Detection program reported everything okay, the right sound card was detected, I could hear the sample and on top of that several programs did actually produce sound. So what was going on here?
Finally today I got a hint trying to run alsamixer when it gave me the following error:
alsamixer: function snd_ctl_open failed for default: No such device
Now this was something I could google for. So I ended up with several leads of which two led to the final solution:
  • ALSA user list which didn't really have a direct solution for my problem, but it made me look at the modules where I foundsnd-usb-audio. So what was that doing there when I had removed that USB adapter ages ago? Of course/etc/modprobe.conf was the "culprit" here. Somehow plugging in the USB adapter had inserted some lines into the file but removing the adapter hadn't deleted them!
  • LinuxQuestions.org pointed me to some files I had never heard off: /etc/asound.state and /etc/asound.conf. The first didn't seem too interesting, but the second had things like card numbers which made me think that maybe they had gotten mixed up somehow because for a short time I had two sound cards in my system. So I removed both and restarted the Soundcard Detection program. And like I had imagined the numbers were different in the new asound.conf!
So everything seems to work again. Now to figure out why the microphone only picks up sounds very faintly.

No comments:

Post a Comment