public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jhnikula@gmail.com>
To: Stephen Warren <swarren@nvidia.com>
Cc: alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com,
	lrg@ti.com
Subject: Re: [PATCH] ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared
Date: Thu, 26 May 2011 21:02:47 +0300	[thread overview]
Message-ID: <20110526210247.5cd4265b.jhnikula@gmail.com> (raw)
In-Reply-To: <1306425453-20753-1-git-send-email-swarren@nvidia.com>

On Thu, 26 May 2011 09:57:33 -0600
Stephen Warren <swarren@nvidia.com> wrote:

> Commit af46800 ("ASoC: Implement mux control sharing") introduced
> function dapm_is_shared_kcontrol.
> 
> When this function returns true, the naming of DAPM controls is derived
> from the kcontrol_new. Otherwise, the name comes from the widget (and
> possibly a widget's naming prefix).
> 
> A bug in the implementation of dapm_is_shared_kcontrol made it return 1
> in all cases. Hence, that commit caused a change in control naming for
> all controls instead of just shared controls.
> 
> Specifically, a control is always considered shared because it is always
> compared against itself. Solve this by never comparing against the widget
> containing the control being created.
> 
> Equally, controls should never be shared between DAPM contexts; when the
> same codec is instantiated multiple times, the same kcontrol_new will be
> used. However, the control should no be shared between the multiple
> instances.
> 
> I tested that with the Tegra WM8903 driver:
> * Shared is now mostly 0 as expected, and sometimes 1.
> * The expected controls are still generated after this change.
> 
> However, I don't have any systems that have a widget/control naming
> prefix, so I can't test that aspect.
> 
> Thanks for Jarkko Nikula for pointing out how to fix this.
> 
> v2:
> * Don't share across DAPM contexts.
> * Changed to Tested-by tag below for Jarkko.
> 
> Reported-by: Liam Girdwood <lrg@ti.com>
> Tested-by: Jarkko Nikula <jhnikula@gmail.com>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
>  sound/soc/soc-dapm.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
Tested-by confirmation :-)

-- 
Jarkko

  reply	other threads:[~2011-05-26 18:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 15:57 [PATCH] ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared Stephen Warren
2011-05-26 18:02 ` Jarkko Nikula [this message]
2011-05-27  9:19 ` Liam Girdwood
2011-05-27 13:59 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2011-05-24 23:12 Stephen Warren
2011-05-25  7:01 ` Jarkko Nikula
2011-05-25 14:52   ` Jarkko Nikula
2011-05-25 15:24     ` Stephen Warren
2011-05-26  6:57       ` Jarkko Nikula
2011-05-26 15:38         ` Stephen Warren

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=20110526210247.5cd4265b.jhnikula@gmail.com \
    --to=jhnikula@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.com \
    --cc=swarren@nvidia.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