diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2011-05-05 09:18:11 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-05-08 09:38:31 -0400 |
commit | 64d27069755db41daa36e4770d88ebc57617559d (patch) | |
tree | 2508aa53ec47d377c9a83cf1b51a33a195abdf00 /sound/soc/soc-cache.c | |
parent | 77530150fba769d7b7e260b3f16ed2294c1737b6 (diff) |
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 <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-cache.c')
-rw-r--r-- | sound/soc/soc-cache.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index a217db256700..687beec56476 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c | |||
@@ -404,12 +404,13 @@ static int snd_soc_hw_bulk_write_raw(struct snd_soc_codec *codec, unsigned int r | |||
404 | { | 404 | { |
405 | int ret; | 405 | int ret; |
406 | 406 | ||
407 | /* Ensure that the base register is volatile. Subsequently | 407 | /* To ensure that we don't get out of sync with the cache, check |
408 | * any other register that is touched by this routine should be | 408 | * whether the base register is volatile or if we've directly asked |
409 | * volatile as well to ensure that we don't get out of sync with | 409 | * to bypass the cache. Out of bounds registers are considered |
410 | * the cache. | 410 | * volatile. |
411 | */ | 411 | */ |
412 | if (!snd_soc_codec_volatile_register(codec, reg) | 412 | if (!codec->cache_bypass |
413 | && !snd_soc_codec_volatile_register(codec, reg) | ||
413 | && reg < codec->driver->reg_cache_size) | 414 | && reg < codec->driver->reg_cache_size) |
414 | return -EINVAL; | 415 | return -EINVAL; |
415 | 416 | ||