[mythtv-users] ALSA No Longer Sees Sound Card

Roger Heflin rogerheflin at gmail.com
Sun Mar 9 19:06:26 UTC 2008


Michael T. Dean wrote:
> On 03/09/2008 08:59 AM, Roger Heflin wrote:
>> I had to rmmod the capture device before starting X so it would find the correct 
>> device, I also had to change myth to using /dev/dsp1 (I don't understand why 
>> /dev/dsp is not there), after that you can put the module for the capture device 
>> back.
>>
>> It does appear that the newer alsa are not quite smart enough to figure out that 
>> a capture device with only inputs should not be the default device,
> 
> ALSA doesn't really choose the default device (other than to say that 
> whatever card has number 0 is the default).  The kernel provides 
> numbers, so in effect, it chooses the default.

I am not sure ALSA should be trusting the kernel to load the audio modules in 
the proper order for ALSA's use.  ALSA should probably have a better way to pick 
the default device, their current scheme works perfectly fine when there were 
only a very few devices that looked like proper sound devices and it was fairly 
unlikely for someone to have more than one in a system, but given all of the new 
devices (usb camera, capture cards, ...) with kernel drivers that make them look 
like a proper sound device, a large number of users are going to run into this 
issue and be unable to figure it out.   Mine broke on a kernel upgrade because 
the camera driver got loaded before the sounds cards driver.

And it does not appear to be changeable after X is up from my messing with it, 
which makes it too difficult for all but the most experienced users to fix.

> 
>>  and I was 
>> unable to figure out a way to actually tell alsa what to use as the default 
>> device, no matter what you do it does not appear to stay set, even once I get it 
>> working correctly if the next time it finds the capture device, it messes up the 
>> same way.
>>   
> 
> However, one can affect the device numbering using udev (the right way), 
> kernel module options (often the easy way), or just by explicitly 
> loading modules in the desired order (a hack that works--to do so 
> prevent them from automatically loading, then load them in an init 
> script or something)
> 
>> I am using F8, but I had similar problems on F7 when I would start X up with a 
>> usb camera (with a microphone) already there, it gets found first and used 
>> instead on the MB audio.
> 
> udev has been around for quite some time, now...  
> http://reactivated.net/writing_udev_rules.html
> 
> Mike

And fairly difficult to explain to someone.  I got tired of exit X, and try 
again, and just added rmmod of the module that I was never going to use (the USB 
camera mic in my case) and went on.  It would have had to do a bit more if it 
had been a device I actually needed.

                              Roger



More information about the mythtv-users mailing list