Skip to contentSkip to conversation

ASoC: wm_adsp: Move core_ena to be co-located with start bit

PATCH Applied Charles Keepax 2 participants 2 messages Nov 18, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: wm_adsp: Move core_ena to be co-located with start bit

Many firmwares do not wait for the start bit before they begin processing audio, whilst this is a bug on the firmware side there are too many such firmwares in the wild to ignore the situation. This patch moves the core enable to happen at same time as the start, the firmware looses the ability to overlap its own startup with the audio path bring up but we ensure that all firmwares behave.

---
 sound/soc/codecs/wm_adsp.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
sound/soc/codecs/wm_adsp.c +2 -9
index e54d7b5..720d6e8 100644
@@ -1593,13 +1593,6 @@ static void wm_adsp2_boot_work(struct work_struct *work)
 	if (ret != 0)
 		goto err;
 
-	ret = regmap_update_bits_async(dsp->regmap,
-				       dsp->base + ADSP2_CONTROL,
-				       ADSP2_CORE_ENA,
-				       ADSP2_CORE_ENA);
-	if (ret != 0)
-		goto err;
-
 	dsp->running = true;
 
 	return;
@@ -1649,8 +1642,8 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w,
 
 		ret = regmap_update_bits(dsp->regmap,
 					 dsp->base + ADSP2_CONTROL,
-					 ADSP2_START,
-					 ADSP2_START);
+					 ADSP2_CORE_ENA | ADSP2_START,
+					 ADSP2_CORE_ENA | ADSP2_START);
 		if (ret != 0)
 			goto err;
 		break;
Signature · 1 line
1.7.2.5
maintainer Applied
#1 lore raw
Quoted 2 lines · Charles Keepax

Many firmwares do not wait for the start bit before they begin processing audio, whilst this is a bug on the firmware side there are

Applied, thanks.