Re: [PATCH 9/9] ASoC: soc-core: call snd_soc_dapm_shutdown() at soc_cleanup_card_resources()

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

 



On Tue, Nov 5, 2019 at 6:40 PM Kuninori Morimoto <
kuninori.morimoto.gx@xxxxxxxxxxx> wrote:

>
> Hi Ranjani
>
> Thank you for your review
>
> >     It is easy to read code if it is cleanly using paired
> function/naming,
> >     like start <-> stop, register <-> unregister, etc, etc.
> >     But, current ALSA SoC code is very random, unbalance, not paired,
> etc.
> >     It is easy to create bug at the such code, and it will be difficult
> to
> >     debug.
> >
> >     snd_soc_bind_card() is calling snd_soc_dapm_init() for both
> >     card and component.
> >     Let's call paired snd_soc_dapm_shutdown() at paired
> >     soc_cleanup_card_resources().
> >
> >     Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> >     ---
> (snip)
> > You removed snd_soc_bind_card in one of the patches but then leaving
> snd_soc_unbind_card() will be unbalanced isnt it?
> >
> > Why not just have instantiate_card() and cleanup_card_resources()?
>
> Do you mean [7/9] patch ?
> It merges snd_soc_instantiate_card() and snd_soc_bind_card().
> Thus, snd_soc_bind_card() is still exist.
> Or am I misunderstanding ?
>
Oh yes, sorry I misread that. So why not remove cleanup_card_resources and
move everything to snd_soc_unbind_card()?

Thanks,
Ranjani

>
> Thank you for your help !!
> Best regards
> ---
> Kuninori Morimoto
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



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

  Powered by Linux