[alsa-devel] [PATCH 3/4] ASoC: wm5110: Use async writes

Mark Brown broonie at kernel.org
Thu Dec 12 12:07:40 CET 2013

From: Mark Brown <broonie at linaro.org>

When writing the patch write to the device asynchronously, allowing better
performance when used with a bus like SPI which supports this by
minimising the need to context switch back to the driver to get the
next bit of data.

Signed-off-by: Mark Brown <broonie at linaro.org>
 sound/soc/codecs/wm5110.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 9eb8517470a3..a8f779f56df3 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -105,8 +105,8 @@ static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w,
 		if (patch)
 			for (i = 0; i < patch_size; i++)
-				regmap_write(regmap, patch[i].reg,
-					     patch[i].def);
+				regmap_write_async(regmap, patch[i].reg,
+						   patch[i].def);

More information about the Alsa-devel mailing list