[alsa-devel] Softvol only after device has opened

Takashi Iwai tiwai at suse.de
Tue Jun 9 16:38:07 CEST 2015


At Tue, 9 Jun 2015 16:32:35 +0200,
Ricard Wanderlof wrote:
> 
> 
> On Tue, 9 Jun 2015, Clemens Ladisch wrote:
> 
> > Ricard Wanderlof wrote:
> > > What I was getting at was that although I can't do:
> > >
> > > $ amixer sset Capture 192
> > >
> > > if Capture is defined by the softvol plugin, and I haven't opened the
> > > device prior to running amixer, however
> > >
> > > $ alsactl restore 0:
> > >
> > > works, assuming that I've saved the settings previously, even before the
> > > device is opened. I can understand that this is very useful and desired,
> > > but given that the underlying control does not yet exist, it puzzles me
> > > that it actually works.
> > 
> > Have a look at /var/lib/asound.state.  "alsactl store" marks any user-
> > space controls; when "alsactl restore" sees this flag, it will explicitly
> > recreate the control.
> 
> And there is no other way to recreate the control using an application 
> than to use alsactl then?

There is other way, of course.  It's no magic.  alsactl just creates a
user-space control element using the normal API.


Takashi


More information about the Alsa-devel mailing list