From: Takashi Iwai <tiwai@suse.de>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Mark Brown <broonie@kernel.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Linux-ALSA <alsa-devel@alsa-project.org>,
Lars-Peter <lars@metafoo.de>, Simon <horms@verge.net.au>
Subject: Re: [alsa-devel] [RFC][PATCH] ASoC: soc-core: verify Sound Card normality
Date: Mon, 03 Apr 2017 10:37:42 +0200 [thread overview]
Message-ID: <s5h60il28fd.wl-tiwai@suse.de> (raw)
In-Reply-To: <87fuhpnbnu.wl%kuninori.morimoto.gx@renesas.com>
On Mon, 03 Apr 2017 10:26:05 +0200,
Kuninori Morimoto wrote:
>
>
> Hi Takashi-san
>
> > > So, we can call snd_soc_unregister_card() whenever CPU/Codec/Platform
> > > were unregsiterd.
> >
> > In theory yes, but you should be careful to do so, e.g. make sure that
> > it won't be called again by the removal/unbind of other components /
> > drivers.
> >
> > I suggested snd_card_disconnect() because it doesn't release resources
> > by itself, but it just disconnects from the further accesses. So,
> > double-free won't happen in this case. It makes the hotunplug safer
> > as long as the drivers manage the resource releases properly.
>
> I had checked many unbind/bind pattern/order on 2nd [RFC] patch which I posted.
> At first, I believe Oops on unbind/bind issue was solved on it.
> 2nd, if my understanding was correct, it doesn't have double-free issue,
> or something like that.
> But, I'm not 100% sure about 2nd, thus it has [RFC] on patch.
Ah, I see that snd_soc_unregister_card() has the check of
card->instantiated, so it should be fine to call multiple times.
thanks,
Takashi
next prev parent reply other threads:[~2017-04-03 8:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 2:45 [RFC][PATCH] ASoC: soc-core: verify Sound Card normality Kuninori Morimoto
2017-03-29 7:29 ` Geert Uytterhoeven
2017-03-29 8:47 ` Kuninori Morimoto
2017-03-30 21:53 ` Mark Brown
2017-03-31 0:30 ` Kuninori Morimoto
2017-03-31 7:48 ` [alsa-devel] " Takashi Iwai
2017-04-03 6:29 ` Kuninori Morimoto
2017-04-03 6:41 ` Takashi Iwai
2017-04-03 8:26 ` Kuninori Morimoto
2017-04-03 8:37 ` Takashi Iwai [this message]
2017-04-04 12:42 ` Mark Brown
2017-04-04 12:37 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5h60il28fd.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lars@metafoo.de \
--cc=linux-renesas-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox