public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Pan, Harry" <harry.pan@intel.com>
To: "broonie@kernel.org" <broonie@kernel.org>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"gs0622@gmail.com" <gs0622@gmail.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"perex@perex.cz" <perex@perex.cz>
Subject: Re: [PATCH] ASoC: dapm: Do not traverse widget hooks to snd-soc-dummy
Date: Thu, 17 Mar 2016 10:38:36 +0000	[thread overview]
Message-ID: <1458211115.965.13.camel@intel.com> (raw)
In-Reply-To: <20160317095438.GD2566@sirena.org.uk>

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

  reply	other threads:[~2016-03-17 10:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 11:17 [PATCH] ASoC: dapm: Do not traverse widget hooks to snd-soc-dummy Harry Pan
2016-03-17  9:54 ` Mark Brown
2016-03-17 10:38   ` Pan, Harry [this message]
2016-03-17 11:25     ` Mark Brown
2016-03-17 12:37       ` Lars-Peter Clausen
2016-03-17 13:04         ` Pan, Harry
2016-03-17 15:42         ` Mark Brown
2016-03-18  5:17           ` [alsa-devel] " Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2016-03-16 10:43 Harry Pan

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=1458211115.965.13.camel@intel.com \
    --to=harry.pan@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gs0622@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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