[mythtv-users] ALSA No Longer Sees Sound Card

Michael T. Dean mtdean at thirdcontact.com
Sun Mar 9 19:24:01 UTC 2008


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."

>  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.

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.

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.

Mike ("OC") Dean


More information about the mythtv-users mailing list