Re: [LAU] Alsa setup question

From: <hollundertee@email-addr-hidden>
Date: Sat May 02 2015 - 15:53:16 EEST

On Sat, 2 May 2015 14:37:48 +0200
Ralf Mardorf <ralf.mardorf@email-addr-hidden-dsl.net> wrote:

> On Sat, 2 May 2015 14:20:04 +0200, hollundertee@email-addr-hidden wrote:
> >It would be sufficient if the default interface was properly set on
> >boot or resume. It would probably not hurt if it was set whenever a
> >usb audio device gets plugged in. I'm not quite sure which mechanism
> >allows me to do that. ALSA alone? Udev?
>
> Default by default is hw:0 and you can ensure that hw:0 is always
> reserved for the same device.
>
> $ cat /etc/modprobe.d/alsa-base.conf
> # ALSA module ordering
> options snd slots=snd_hdspm,snd_ice1712,snd_ice1712
>
> You could add snd_usb_audio as first device, so hw:0 would be reserved
> for an USB device, even if it's not connected. For me hw:0 is reserved
> for a RME card and hw:1 and hw:2 are reserved for Envy24 cards, even
> if I e.g. remove the Envy24 driver, an additional connected device,
> e.g. an USB device, becomes hw:3 and not hw:1.
>
> Regards,
> Ralf

Thanks Ralf, I already have that:
$ cat /etc/modprobe.d/alsa-base.conf
options snd slots=snd_usb_audio,snd_hda_intel
options snd_usb_audio index=0
options snd_hda_intel index=1

This way, the interface index is static, the question is:
How do I get:
if USB_device_is_present then
        default := UA25
else
        default := PCH

The other, less important question is, what the fuck does this:
$ cat /etc/asound.conf
defaults.ctl.card 0
defaults.pcm.card 0
defaults.pcm.card 0
defaults.pcm.card 1
defaults.pcm.card 1

Something overwrites asound.conf with stuff like this. The order is
pretty much random. Not sure the number of lines is constant either.
The result is that it is unpredictable which device is the default.
Luckily there is ~/.asoundrc, but I'd still like to know what the hell
is going on.

Regards,
Philipp
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sat May 2 16:15:02 2015

This archive was generated by hypermail 2.1.8 : Sat May 02 2015 - 16:15:03 EEST