[alsa-devel] Need help implementing an external PCM/control plugin pair

Dimitris Papavasiliou dpapavas at gmail.com
Tue Feb 20 11:06:39 CET 2018


I managed to implement the control aspect of the plugin using user 
control elements and it seems to work fine, including dB ranges and 
event metadata.  Thanks again for your pointers.  A couple further points:

1. I used an async ctl handler (snd_async_add_ctl_handler) to get 
notified about changes to the controls and it seems to work as intended. 
  Are there any caveats I'm missing?  Is there perhaps a more 
appropriate approach?

2. Is there some way to create a virtual ctl/mixer device, that'll 
inherit the card's controls and to which I can inject my own elements, 
without affecting the mixer of the card?  There are two reasons why this 
would be desirable.  From a practical aspect, it would make uninstalling 
the plugin easier, as right now, once the controls are added to the 
card's mixer and stored by alsactl, it is non-trivial to remove them 
again.  Apart from that, it would make the interface a bit more 
consistent, as it would allow the plugin to present a separate virtual 
card of sorts, with its own PCM and mixer, instead of hijacking the 
card's mixer and injecting controls which are irrelevant, when the card 
is used on its own.

D.


More information about the Alsa-devel mailing list