Re: Unregister a card from userspace?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 9 Nov 2015, Felipe Ferreri Tonello wrote:

> > while insmodding it works fine, I can't rmmod it because once
> > snd_soc_register_card() has been called, it has a usage count of 2 and
> > thus cannot be rmmod:ed.
> 
> You have to unregister that card upon freeing your module.

But that is precisely the problem. The framework that manages the 
insertion and deletion of modules notes that my module has a usage count 
that is > 0 (in my case it is 2, which I'm convinced is because the card 
has been registered with ALSA), and refuses to free the module. So there 
is now way any unregister_card call can be made when my module is freed, 
as due to the usage count it would never even be attempted.

I suppose one way would be to have a specific call into the module which 
unregisters the card, and the module could then be freed as usual 
afterwards, but it seems like a bit of a hack.

/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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux