Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1552c325 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: adsp: Use async writes where possible



This will allow a marginal speed improvement when used with a bus that
supports async I/O by reducing the amount of context thrashing between
writes, allowing the bus to be more fully utilised.

Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 6ce4eac1
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1468,7 +1468,7 @@ static int wm_adsp2_ena(struct wm_adsp *dsp)
	unsigned int val;
	int ret, count;

	ret = regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL,
	ret = regmap_update_bits_async(dsp->regmap, dsp->base + ADSP2_CONTROL,
				       ADSP2_SYS_ENA, ADSP2_SYS_ENA);
	if (ret != 0)
		return ret;
@@ -1521,7 +1521,7 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w,
		val = (val & ARIZONA_SYSCLK_FREQ_MASK)
			>> ARIZONA_SYSCLK_FREQ_SHIFT;

		ret = regmap_update_bits(dsp->regmap,
		ret = regmap_update_bits_async(dsp->regmap,
					       dsp->base + ADSP2_CLOCKING,
					       ADSP2_CLK_SEL_MASK, val);
		if (ret != 0) {
@@ -1586,7 +1586,7 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w,
		if (ret != 0)
			goto err;

		ret = regmap_update_bits(dsp->regmap,
		ret = regmap_update_bits_async(dsp->regmap,
					       dsp->base + ADSP2_CONTROL,
					       ADSP2_CORE_ENA | ADSP2_START,
					       ADSP2_CORE_ENA | ADSP2_START);