[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Persistent names for audio devices.



	Hi.

On Sun, Oct 20, 2019 at 10:28:37AM -0700, peter@easthope.ca wrote:
> > AUDIODEV=dmix:CARD=PCH,DEV=0 play MY/m85.WAV
> 
> Good.
> 
> Meanwhile,
> peter@joule:/home/peter$ aplay -L | grep dmix:CARD=L
> dmix:CARD=Live,DEV=0
> dmix:CARD=Live,DEV=1
> dmix:CARD=Live,DEV=2

So, does it work?


> Try the second DEV,
> AUDIODEV=dmix:CARD=Set,DEV=1 play MY/m85.WAV
> ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
> play FAIL sox: Sorry, there is no default audio device configured

Try hw:CARD=Set,DEV=1. The reason why dmix fails you escapes me
currently. Certain software (like pulseaudio) can hold the sound card
exclusively, could be the case.


> No option to list _configured_ devices?

aplay(1):

   -L, --list-pcms
		  List all PCMs defined

What you've got are the configured devices.


> Maybe refer to /proc/asound/Device/.

aplay -l


> > The way I see it, there's no need for these "predictable audio devices
> > names", they are here already.
> 
> "dmix:CARD=PCH,DEV=0" could be a name in a hardware manual
> published in 1970.

Yet they are predictable the same way udev makes NICs predictable.
Whenever it's aesthetic is in the eye of the beholder.


> I'd still prefer to call a USB headset "USBheadset". 

They give you pulseaudio for that.


> > A viable alternative is to install and use pulseaudio, of course.
> 
> Installed it but don't see how it facilitates a text 
> command to play a WAV.

sox <infile> -t pulseaudio

And, since you're talking WAV - paplay <infile> .

Reco


Reply to: