Skip to contentSkip to conversation

ASoC: Fix DAPM sequence run for per-widget I/O methods

PATCH In review Mark Brown 2 participants 2 messages Jun 19, 2011 – Jun 20, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Fix DAPM sequence run for per-widget I/O methods

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.

---
 sound/soc/soc-dapm.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
sound/soc/soc-dapm.c +6 -0
index 605c225..ceb2ba4 100644
@@ -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);
Signature · 1 line
1.7.5.4
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · 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.

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

Quoted 12 lines
---
 sound/soc/soc-dapm.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
sound/soc/soc-dapm.c +0 -0
index 605c225..ceb2ba4 100644
@@ -918,6 +918,12 @@ static void dapm_seq_run_coalesced(struct snd_soc_dapm_context *dapm,
 	}
 

sound/soc/soc-dapm.c static void dapm_seq_run_coalesced(struct snd_soc_dapm_context *dapm, · line 929

Quoted 10 lines
sound/soc/soc-dapm.c +6 -0
 	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);