public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Fix DAPM sequence run for per-widget I/O methods
@ 2011-06-19 12:49 Mark Brown
  2011-06-20  5:33 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-06-19 12:49 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Previously we were using the DAPM context rather than a widget as the
argument for update_bits() so we didn't need to care that our list walk
of widgets left us one beyond the end of the list. Now we're using them
for the register update we need to make sure we're pointing at an actual
widget not the list_head.

Fix originally suggested by Liam on IM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/soc-dapm.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 605c225..ceb2ba4 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -918,6 +918,12 @@ static void dapm_seq_run_coalesced(struct snd_soc_dapm_context *dapm,
 	}
 
 	if (reg >= 0) {
+		/* Any widget will do, they should all be updating the
+		 * same register.
+		 */
+		w = list_first_entry(pending, struct snd_soc_dapm_widget,
+				     power_list);
+
 		pop_dbg(dapm->dev, card->pop_time,
 			"pop test : Applying 0x%x/0x%x to %x in %dms\n",
 			value, mask, reg, card->pop_time);
-- 
1.7.5.4

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

* Re: [PATCH] ASoC: Fix DAPM sequence run for per-widget I/O methods
  2011-06-19 12:49 [PATCH] ASoC: Fix DAPM sequence run for per-widget I/O methods Mark Brown
@ 2011-06-20  5:33 ` Liam Girdwood
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2011-06-20  5:33 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com

On 19/06/11 13:49, Mark Brown wrote:
> Previously we were using the DAPM context rather than a widget as the
> argument for update_bits() so we didn't need to care that our list walk
> of widgets left us one beyond the end of the list. Now we're using them
> for the register update we need to make sure we're pointing at an actual
> widget not the list_head.
> 
> Fix originally suggested by Liam on IM.
> 

Thanks, was planning to send this yesterday but ended up being delayed at several airports yesterday.

> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  sound/soc/soc-dapm.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index 605c225..ceb2ba4 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -918,6 +918,12 @@ static void dapm_seq_run_coalesced(struct snd_soc_dapm_context *dapm,
>  	}
>  
>  	if (reg >= 0) {
> +		/* Any widget will do, they should all be updating the
> +		 * same register.
> +		 */
> +		w = list_first_entry(pending, struct snd_soc_dapm_widget,
> +				     power_list);
> +
>  		pop_dbg(dapm->dev, card->pop_time,
>  			"pop test : Applying 0x%x/0x%x to %x in %dms\n",
>  			value, mask, reg, card->pop_time);

Acked-by: Liam Girdwood <lrg@ti.com>

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

end of thread, other threads:[~2011-06-20  5:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-19 12:49 [PATCH] ASoC: Fix DAPM sequence run for per-widget I/O methods Mark Brown
2011-06-20  5:33 ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox