[mythtv-users] ALSA No Longer Sees Sound Card

Roger Heflin rogerheflin at gmail.com
Sun Mar 9 19:59:49 UTC 2008


Michael T. Dean wrote:
> On 03/09/2008 02:57 PM, Mark Knecht wrote:
> 
>>  On Sun, Mar 9, 2008 at 11:15 AM, 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.
>>  No, not exactly. The kernel only chooses if the Alsa configuration
>>  files do not define them. It's under user control and udev is the
>>  wrong place for a user to try to do this stuff.
> 
> No, udev is the right place.  Whether the /user/ should do it is a whole 
> different question.  It should be handled by the whomever is in charge 
> of system configuration.  Since distributions try to make it easy to 
> configure the system (i.e. using fancy graphical tools), those tools are 
> the "whomever."

The whomever on F8 seems to not be up to the task, the graphical tools were 
unable to do anything about the ALSA setup.

> 
>>  In Gentoo I have a
>>  file to do this but if a user's distro doesn't have that sort of
>>  individual control then it all ends up in modules.conf in the end.
> 
> The use of kernel numbers itself is just plain wrong (but what most tend 
> to do because they're used to it from before Linux had an approach to 
> allow doing it right).  Users shouldn't have to even know that kernel 
> numbers exist, let alone know which one corresponds to which device, let 
> alone configure the drivers such that particular devices get a 
> particular number.  Instead, users should see understandable device 
> names (i.e. 'camera_audio', 'sound', 'work_drive', ...
> 
> udev is the approach (we now have that was) designed to allow for 
> persistent device naming of dynamically created device nodes.  So, udev 
> is the right way to ensure devices have the same name after every reboot.
> 
> However, because users didn't want to learn udev and because distros 
> didn't come up with tools that allow users to see the devices, test them 
> (i.e. play a sound on an audio device), then say, "Always call this 
> device, 'sound,'" the kernel module developers created a hack/workaround 
> that allowed users to just number their devices in whatever order they want.

That has always been a linux/unix weakness, a expert can configure some really 
really good configs, a novice has little or no chance with something weird, if 
we got the novices to have a better chance we would be getting someplace.

> 
> The users were happy--they didn't have to learn anything new.
> The distros were happy--no one had to create the tools that should 
> configure this.
> The kernel module developers were happy--they had a quick and easy (if 
> not correct) answer to give to users who complained about dynamic device 
> renaming.

I have two pvr 150's in a machine, and outside of the PCI slot they are in, 
there is really no way to tell them apart, lucky they have exactly the same 
input setup, so it really does not matter.

> 
> The OC were not so happy because they realized that GNU/Linux took one 
> step forward and two steps backwards.  And, they realize that having a 
> simple workaround means that we'll never get to the destination that was 
> originally envisioned.

I can agree with that.

It probably means that alsa should find the sounds cards it can, and if it sees 
only one use it, but if it is unclear which card should be used, then query the 
user and fix it to work correctly.   At least if alsa did this it would have a 
chance of being consistent from distro to distro, if it was done at the distro 
level, each is going to be different and still take a step back just because of 
the of the differences between the distros.

                               Roger




More information about the mythtv-users mailing list