[mythtv-users] ALSA No Longer Sees Sound Card

Mark Knecht markknecht at gmail.com
Sun Mar 9 19:45:32 UTC 2008


On Sun, Mar 9, 2008 at 12:24 PM, Michael T. Dean
<mtdean at thirdcontact.com> 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."
>
>  >  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

Well, I personally couldn't disagree more but hey, this is Linux so we
get to do things whatever way we want, right?

I have no real problem with having real-world names for devices but
going down that path negates the use of all the standard audio tools
and isn't going to be supported by many existing apps, if any at all.

Of course, I'm assuming your use of 'kernel numbers' is in reference
to a sound card number. If I'm incorrect about that I apologize. If so
these aren't, in my understanding, really kernel numbers but are Alsa
sound card numbers which, as I've said, are under the user's control
anyway in the module config process. It was incorrect of someone else
in this thread to imply that the kernel makes 'decisions' about the
order to load sound card modules. It doesn't unless the use makes NO
decision about what he/she wants.

There is no need to go one more leap away from how the system works,
unless of course someone really wants to in which case I guess anyone
is free to write udev rules.

- Mark


More information about the mythtv-users mailing list