* [PATCH] ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw()
@ 2011-05-05 13:18 Dimitris Papastamos
2011-05-07 17:43 ` Liam Girdwood
2011-05-08 13:38 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Dimitris Papastamos @ 2011-05-05 13:18 UTC (permalink / raw)
To: Mark Brown, lrg; +Cc: alsa-devel, patches, lrg
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>
---
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 a217db2..687beec 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
{
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;
--
1.7.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw()
2011-05-05 13:18 [PATCH] ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw() Dimitris Papastamos
@ 2011-05-07 17:43 ` Liam Girdwood
2011-05-08 13:38 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-05-07 17:43 UTC (permalink / raw)
To: Dimitris Papastamos; +Cc: alsa-devel, Mark Brown, lrg, patches
On Thu, 2011-05-05 at 14:18 +0100, Dimitris Papastamos wrote:
> 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>
> ---
> sound/soc/soc-cache.c | 11 ++++++-----
> 1 files changed, 6 insertions(+), 5 deletions(-)
>
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw()
2011-05-05 13:18 [PATCH] ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw() Dimitris Papastamos
2011-05-07 17:43 ` Liam Girdwood
@ 2011-05-08 13:38 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-05-08 13:38 UTC (permalink / raw)
To: Dimitris Papastamos; +Cc: alsa-devel, patches, lrg, lrg
On Thu, May 05, 2011 at 02:18:11PM +0100, Dimitris Papastamos wrote:
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-08 13:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-05 13:18 [PATCH] ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw() Dimitris Papastamos
2011-05-07 17:43 ` Liam Girdwood
2011-05-08 13:38 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.