[alsa-devel] [RFC PATCH 1/1] ASoC: soc-dapm: warn if no avaiable path found for widget kcontrol
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);
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.
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
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.
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
participants (2)
-
Dong Aisheng
-
Mark Brown