From d733dc0828cfb230171ae7420a6e8c344ec8473a Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Thu, 28 Nov 2013 16:37:51 +0000 Subject: ASoC: wm_adsp: Stop region iteration when the desired region is found When locating the memory region relating to a coefficient block written through a bin file we keep processing the list of regions even after we have found the region we require. This patch adds a break, so we don't process redundant list items. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm_adsp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/soc/codecs/wm_adsp.c') diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 46ec0e9744d4..b42f9af163c8 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1286,6 +1286,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp) reg = wm_adsp_region_to_reg(mem, reg); reg += offset; + break; } } -- cgit v1.2.1 From 1552c32547ca807f0df7d9abca54468033df8764 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 28 Nov 2013 18:11:38 +0000 Subject: 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: Mark Brown --- sound/soc/codecs/wm_adsp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sound/soc/codecs/wm_adsp.c') diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 46ec0e9744d4..6b1c01c66e64 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1468,8 +1468,8 @@ 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, - ADSP2_SYS_ENA, ADSP2_SYS_ENA); + ret = regmap_update_bits_async(dsp->regmap, dsp->base + ADSP2_CONTROL, + ADSP2_SYS_ENA, ADSP2_SYS_ENA); if (ret != 0) return ret; @@ -1521,9 +1521,9 @@ 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, - dsp->base + ADSP2_CLOCKING, - ADSP2_CLK_SEL_MASK, val); + ret = regmap_update_bits_async(dsp->regmap, + dsp->base + ADSP2_CLOCKING, + ADSP2_CLK_SEL_MASK, val); if (ret != 0) { adsp_err(dsp, "Failed to set clock rate: %d\n", ret); @@ -1586,10 +1586,10 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w, if (ret != 0) goto err; - ret = regmap_update_bits(dsp->regmap, - dsp->base + ADSP2_CONTROL, - ADSP2_CORE_ENA | ADSP2_START, - ADSP2_CORE_ENA | ADSP2_START); + ret = regmap_update_bits_async(dsp->regmap, + dsp->base + ADSP2_CONTROL, + ADSP2_CORE_ENA | ADSP2_START, + ADSP2_CORE_ENA | ADSP2_START); if (ret != 0) goto err; -- cgit v1.2.1 From 5095f55d7cc327026daaa3fa583aa4c1388ca556 Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Wed, 18 Dec 2013 09:25:48 +0000 Subject: ASoC: wm_adsp: Remove duplicate info message for DSP RAM ready Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm_adsp.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/soc/codecs/wm_adsp.c') diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 6b1c01c66e64..8f720ded27c4 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1488,7 +1488,6 @@ static int wm_adsp2_ena(struct wm_adsp *dsp) } adsp_dbg(dsp, "RAM ready after %d polls\n", count); - adsp_info(dsp, "RAM ready after %d polls\n", count); return 0; } -- cgit v1.2.1