linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 1/1] ASoC: soc-dapm: warn if no avaiable path found for widget kcontrol
@ 2012-07-27 11:19 Dong Aisheng
  2012-07-29 20:22 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Dong Aisheng @ 2012-07-27 11:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: Dong Aisheng <dong.aisheng@linaro.org>

This could help people know what's wrong going on if the required
path is not registered.

Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
---
 sound/soc/soc-dapm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 4d181df..b9b94c5 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1879,6 +1879,9 @@ static int soc_dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
 		}
 	}
 
+	WARN(!found, "did not find dapm widget path associated with kcontrol %s\n",
+		kcontrol->id.name);
+
 	if (found) {
 		dapm_mark_dirty(widget, "mux change");
 		dapm_power_widgets(widget->dapm, SND_SOC_DAPM_STREAM_NOP);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [RFC PATCH 1/1] ASoC: soc-dapm: warn if no avaiable path found for widget kcontrol
  2012-07-27 11:19 [RFC PATCH 1/1] ASoC: soc-dapm: warn if no avaiable path found for widget kcontrol Dong Aisheng
@ 2012-07-29 20:22 ` Mark Brown
  2012-08-01  7:49   ` Dong Aisheng
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2012-07-29 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 27, 2012 at 07:19:01PM +0800, Dong Aisheng wrote:
> From: Dong Aisheng <dong.aisheng@linaro.org>
> 
> This could help people know what's wrong going on if the required
> path is not registered.

This isn't a good idea, it's fairly common for widgets to have a "None"
option which isn't expected to have an input.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [RFC PATCH 1/1] ASoC: soc-dapm: warn if no avaiable path found for widget kcontrol
  2012-07-29 20:22 ` Mark Brown
@ 2012-08-01  7:49   ` Dong Aisheng
  2012-08-01 12:15     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Dong Aisheng @ 2012-08-01  7:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 30, 2012 at 04:22:19AM +0800, Mark Brown wrote:
> On Fri, Jul 27, 2012 at 07:19:01PM +0800, Dong Aisheng wrote:
> > From: Dong Aisheng <dong.aisheng@linaro.org>
> > 
> > This could help people know what's wrong going on if the required
> > path is not registered.
> 
> This isn't a good idea, it's fairly common for widgets to have a "None"
> option which isn't expected to have an input.
> 

What i changed is mux widgets, i'm wondering is it possible or correct
the mux widget has no input path?
If i understand correct, we may need set correct input path
for mux widget, or why we still need a mux?

Or can you help give an example that no input needed for mux widget?

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [RFC PATCH 1/1] ASoC: soc-dapm: warn if no avaiable path found for widget kcontrol
  2012-08-01  7:49   ` Dong Aisheng
@ 2012-08-01 12:15     ` Mark Brown
  2012-08-02  7:08       ` Dong Aisheng
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2012-08-01 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 01, 2012 at 03:49:53PM +0800, Dong Aisheng wrote:
> On Mon, Jul 30, 2012 at 04:22:19AM +0800, Mark Brown wrote:

> > This isn't a good idea, it's fairly common for widgets to have a "None"
> > option which isn't expected to have an input.

> What i changed is mux widgets, i'm wondering is it possible or correct
> the mux widget has no input path?
> If i understand correct, we may need set correct input path
> for mux widget, or why we still need a mux?

> Or can you help give an example that no input needed for mux widget?

The above is the most common example - one of the inputs to a mux being
a "no input" option which shouldn't be connected to anything.  A mux
with no inputs at all would be silly, but having one (or sometimes a
couple for various reasons) that isn't connected isn't unusual.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [RFC PATCH 1/1] ASoC: soc-dapm: warn if no avaiable path found for widget kcontrol
  2012-08-01 12:15     ` Mark Brown
@ 2012-08-02  7:08       ` Dong Aisheng
  0 siblings, 0 replies; 5+ messages in thread
From: Dong Aisheng @ 2012-08-02  7:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 01, 2012 at 08:15:16PM +0800, Mark Brown wrote:
> On Wed, Aug 01, 2012 at 03:49:53PM +0800, Dong Aisheng wrote:
> > On Mon, Jul 30, 2012 at 04:22:19AM +0800, Mark Brown wrote:
> 
> > > This isn't a good idea, it's fairly common for widgets to have a "None"
> > > option which isn't expected to have an input.
> 
> > What i changed is mux widgets, i'm wondering is it possible or correct
> > the mux widget has no input path?
> > If i understand correct, we may need set correct input path
> > for mux widget, or why we still need a mux?
> 
> > Or can you help give an example that no input needed for mux widget?
> 
> The above is the most common example - one of the inputs to a mux being
> a "no input" option which shouldn't be connected to anything.  A mux
> with no inputs at all would be silly, but having one (or sometimes a
> couple for various reasons) that isn't connected isn't unusual.
> 

Understand.
Thanks for the info.

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-02  7:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-27 11:19 [RFC PATCH 1/1] ASoC: soc-dapm: warn if no avaiable path found for widget kcontrol Dong Aisheng
2012-07-29 20:22 ` Mark Brown
2012-08-01  7:49   ` Dong Aisheng
2012-08-01 12:15     ` Mark Brown
2012-08-02  7:08       ` Dong Aisheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).