[alsa-devel] How to redefine "default" to be equivalent to "sysdefault"?
Tanu Kaskinen
tanuk at iki.fi
Mon Jun 18 16:17:34 CEST 2012
On Mon, 2012-06-18 at 15:45 +0200, Takashi Iwai wrote:
> At Wed, 13 Jun 2012 10:57:34 +0300,
> Tanu Kaskinen wrote:
> >
> > Hi,
> >
> > I have a file with the following contents:
> >
> >
> >
> > # This file an alsa configuration file, used by pasuspender to make the
> > # "default" Alsa device work while PulseAudio is in suspended state.
> >
> > # Include the system configuration first. Is there any easier way to do this?
> > # 14 lines for including one file is a bit much...
> > @hooks [
> > {
> > func load
> > files [
> > {
> > @func concat
> > strings [
> > { @func datadir }
> > "/alsa.conf"
> > ]
> > }
> > ]
> > }
> > ]
> >
> > # Redefine "default" to be the same as "sysdefault". On most systems
> > # "sysdefault" is configured to use dmix.
> > pcm.!default sysdefault
> >
> >
> >
> > That doesn't do what I want it to do. When I run
> >
> > ALSA_CONFIG_PATH=/path/to/file.conf aplay -Ddefault ~/test.wav
>
> Doesn't ALSA_CONFIG_PATH=/path/to/file.conf:/usr/share/alsa/alsa.conf
> work?
I didn't know that I can give multiple files, so I haven't tried. One
minor problem with this approach is that the alsa.conf path would be
hardcoded, instead of using $(datadir)/alsa.conf.
> $ALSA_CONFIG_PATH overrides the whole default paths, so it
> doesn't include even sysdefault definition unless you specify multiple
> paths.
Yes, but did you miss the part entirely where I load alsa.conf in the
beginning of the custom configuration file? That should work too, right?
I know that alsa.conf is being loaded, because if I comment out the part
that loads alsa.conf, I indeed get an error saying that "sysdefault" is
not defined.
--
Tanu
More information about the Alsa-devel
mailing list