ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw()
PATCH 1/1 ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw()
If we specifically want to write a block of data to the hw bypassing the cache, then allow this to happen inside snd_soc_hw_bulk_write_raw().
Signed-off-by Dimitris Papastamos <[email protected]>
--- sound/soc/soc-cache.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
sound/soc/soc-cache.c +6 -5
@@ -404,12 +404,13 @@ static int snd_soc_hw_bulk_write_raw(struct snd_soc_codec *codec, unsigned int r {int ret; -/* Ensure that the base register is volatile. Subsequently -* any other register that is touched by this routine should be -* volatile as well to ensure that we don't get out of sync with -* the cache. +/* To ensure that we don't get out of sync with the cache, check +* whether the base register is volatile or if we've directly asked +* to bypass the cache. Out of bounds registers are considered +* volatile. */ -if (!snd_soc_codec_volatile_register (codec, reg) +if (!codec->cache_bypass + && !snd_soc_codec_volatile_register (codec, reg) && reg < codec->driver->reg_cache_size)return -EINVAL ;
Signature · 1 line
1.7.5
Quoted 8 lines · Dimitris Papastamos
If we specifically want to write a block of data to the hw bypassing the cache, then allow this to happen inside
snd_soc_hw_bulk_write_raw().Signed-off-by Dimitris Papastamos <[email protected]>--- sound/soc/soc-cache.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
Acked-by Liam Girdwood <[email protected]>
Mark Brown
AppliedQuoted 4 lines · Dimitris Papastamos
If we specifically want to write a block of data to the hw bypassing the cache, then allow this to happen inside
snd_soc_hw_bulk_write_raw().Signed-off-by Dimitris Papastamos <[email protected]>
Applied, thanks.