[alsa-devel] Unregister a card from userspace?
Felipe Ferreri Tonello
eu at felipetonello.com
Wed Nov 11 11:34:53 CET 2015
Hi Richard,
On 10/11/15 07:55, Ricard Wanderlof wrote:
>
> 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.
Do you mean that unbind is never called? Well, the framework should call
bind/unbind for each user of your module.
How is your architecture? If you use one card for each probe of module
then each bind should create one device, right?
--
Felipe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x92698E6A.asc
Type: application/pgp-keys
Size: 4830 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20151111/35b69958/attachment.bin>
More information about the Alsa-devel
mailing list