Re: Question about struct snd_soc_dai() :: cpu_dai->codec

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

 



Hi Vinod

> > My current headache is ALSA SoC's each modules (= Card/Codec/CPU/Platform)
> > doesn't care about "unbind/rmmod".
> > For example, if someone unbinded/rmmoded "Codec", Card or other modules
> > doesn't know about it. Thus, user can continue to use this sound card,
> > and kernel will be Oops.
> 
> Are you sure about this? Have you tried removing a module?
>
> During card probe, asoc will hold a reference to the component. See the
> calls to try_module_get(). This will prevent from unloading under normal
> cases.

Very easy pseudo code is like this

	rtd->card	= card;
	rtd->cpu	= cpu;
	rtd->codec	= codec;
	rtd->platform	= platform

Here, card/cpu/codec/platform are SoC device/driver,
and "ALSA sound card" is using this rtd.
Now, I can unbind/rmmod each of them (for example codec).
But rtd (= ALSA sound card) doesn't know about it.
Thus, rtd will access to invalid pointer after unbind/rmmod.

_______________________________________________
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