[Pkg-alsa-devel] Bug#849203: libasound2: ALSA_PCM_DEVICE environment variable is ignored

Leszek Godlewski lg at inequation.org
Sat Nov 4 12:59:38 UTC 2017


Hi Elimar,

Apologies for taking so many months to reply, this is unfortunately how
long it took for the use case to arise again.

Unfortunately, your fix to asound.conf didn't help. I'm on up-to-date
Debian testing, and with the contents of asound.conf you suggested (I
simply copy/pasted the contents of your last email), ALSA apps now report
this in the console:

ALSA lib conf.c:1385:(parse_def) device is not a compound
ALSA lib conf.c:1852:(snd_config_load1) _toplevel_:4:21:Zły argument
ALSA lib conf.c:3615:(config_file_open) /etc/asound.conf may be old or
corrupted: consider to remove or fix it
ALSA lib conf.c:3537:(snd_config_hooks_call) function snd_config_hook_load
returned error: Zły argument
ALSA lib conf.c:3986:(snd_config_update_r) hooks failed, removing
configuration

Which means I'm back to my old hack of symlinking /dev/snd/PCMC1D0p to
/dev/snd/pcmC1D3p again.

Regards,

Leszek

śr., 11 sty 2017 o 19:31 użytkownik Elimar Riesebieter <riesebie at lxtec.de>
napisał:

> * Leszek Godlewski <lg at inequation.org> [2016-12-23 18:46 +0000]:
>
> > Hi Elimar,
> >
> > If that is the case, why does ALSA_PCM_CARD work without such
> preparation?
> > /usr/share/alsa/alsa.conf contains a similar block for the card, yet it
> > isn't needed in /etc/asound.conf.
> >
> > I will try it anyway and let you know if it worked, thanks!
>
> Any news?
>
> [...]
>
> > > As far as i understsnd the sources you must prepare your device to
> > > interpret ALSA_PCM_DEVICE. Try /etc/asound.conf as follows:
> > >
> > > defaults.pcm.card 0
> > > defaults.pcm.device 3
> > > defaults.pcm.device {
> > >     @func igetenv
> > >         vars [ ALSA_PCM_DEVICE ]
> > >         default 0
> > > }
> > >
> > > Now it should be possible to run
> > > $ ALSA_PCM_CARD=1 ALSA_PCM_DEVICE=0 mplayer test.mp3
>
> Elimar
>
> --
>     .~.
>     /V\   L   I   N   U   X
>    /( )\ >Phear the Penguin<
>    ^^-^^
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-alsa-devel/attachments/20171104/d47151ae/attachment.html>


More information about the Pkg-alsa-devel mailing list