[alsa-devel] Unregister a card from userspace?

Ricard Wanderlof ricard.wanderlof at axis.com
Wed Nov 11 16:24:20 CET 2015


On Wed, 11 Nov 2015, Lars-Peter Clausen wrote:

> >> How is your architecture? If you use one card for each probe of module
> >> then each bind should create one device, right?
> > 
> > In this case, it is a device which is located on the SoC. There is only 
> > one instance of it. When the module is loaded, it loads a codec driver 
> > with its associated DAI driver, a PCM driver, snd-soc-dummy-dai, and then 
> > a machine driver to tie it all together, finally registering the card with 
> > ALSA.
> > 
> > Looking in /sys/bus/platform/devices, there seems to be one device created 
> > for the codec itself, and one for the machine driver. I don't know if 
> > that's right or wrong, the ALSA driver hierarchy works in the sense that I 
> > can capture audio from it anyway.
> 
> Which one is the module you can't unload? The module that contains the
> machine driver should only have its reference count increment when a
> playback or capture stream is active so you can't remove it when it is
> actively in use.

As it is currently I've got all drivers in the same module. Since there is 
only one possible choice for the PCM and DAI drivers when using this 
particular codec, it seemed pointless to several modules for the 
constituent parts.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30


More information about the Alsa-devel mailing list