[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1458211115.965.13.camel@intel.com>
Date: Thu, 17 Mar 2016 10:38:36 +0000
From: "Pan, Harry" <harry.pan@...el.com>
To: "broonie@...nel.org" <broonie@...nel.org>
CC: "lgirdwood@...il.com" <lgirdwood@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"gs0622@...il.com" <gs0622@...il.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"tiwai@...e.com" <tiwai@...e.com>,
"perex@...ex.cz" <perex@...ex.cz>
Subject: Re: [PATCH] ASoC: dapm: Do not traverse widget hooks to
snd-soc-dummy
On Thu, 2016-03-17 at 09:54 +0000, Mark Brown wrote:
> On Wed, Mar 16, 2016 at 07:17:51PM +0800, Harry Pan wrote:
>
> > Conflicts:
> > sound/soc/soc-dapm.c
>
> Don't include noise like this in upstream submissions.
>
I learned, thanks.
> > + if (!strcmp(cmpnt->name, "snd-soc-dummy"))
> > + return 0;
> > +
>
> This doesn't make much sense and is going to be very fragile. We
> should either make the dummy component look like other components or
> make the code cope with them as they stand, that way we don't have
> random undocumented special cases scattered through the code. Probably
> it's better to make the dummy component look like others.
I do agree, basically.
Allow me to explain more detail that I saw during debug; since the
commit 6e78108bda78 (ASoC: core: Don't probe the component which is
dummy), an exception has been made that dummy component won't be probed,
thus the 'card' passed into soc_probe_component() would not be assigned
to this component. In the other hand, the component struct is initially
created in snd_soc_register_platform() by kzalloc() of platform struct,
its 'card' pointer is remaining an NULL pointer even the widget node
being read.
Perhaps another option is to refine soc_probe_component(), which I have
not dive in.
Sincerely,
Harry
Powered by blists - more mailing lists