diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2011-03-22 06:37:03 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-26 13:44:14 -0400 |
commit | 5fb609d435f0679ed322ddeb1fdafe6142463fdf (patch) | |
tree | c0da5a9fca23fab307305acf6be95272eb2e8c52 /include/sound | |
parent | f3594f5c5c489d159f6d487a889d9d68ca4c0123 (diff) |
ASoC: soc-cache: Introduce raw bulk write support
As it has become more common to have to write firmware or similar
large chunks of data to the hardware, add a function to perform
raw bulk writes that bypass the cache. This only handles volatile
registers as we should avoid getting out of sync with the actual
cache.
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 'include/sound')
-rw-r--r-- | include/sound/soc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index bfa4836ea107..2f2a51fe78e9 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -543,6 +543,7 @@ struct snd_soc_codec { | |||
543 | unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); | 543 | unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); |
544 | unsigned int (*read)(struct snd_soc_codec *, unsigned int); | 544 | unsigned int (*read)(struct snd_soc_codec *, unsigned int); |
545 | int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); | 545 | int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); |
546 | int (*bulk_write_raw)(struct snd_soc_codec *, unsigned int, const void *, size_t); | ||
546 | void *reg_cache; | 547 | void *reg_cache; |
547 | const void *reg_def_copy; | 548 | const void *reg_def_copy; |
548 | const struct snd_soc_cache_ops *cache_ops; | 549 | const struct snd_soc_cache_ops *cache_ops; |
@@ -814,6 +815,8 @@ struct soc_enum { | |||
814 | unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); | 815 | unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); |
815 | unsigned int snd_soc_write(struct snd_soc_codec *codec, | 816 | unsigned int snd_soc_write(struct snd_soc_codec *codec, |
816 | unsigned int reg, unsigned int val); | 817 | unsigned int reg, unsigned int val); |
818 | unsigned int snd_soc_bulk_write_raw(struct snd_soc_codec *codec, | ||
819 | unsigned int reg, const void *data, size_t len); | ||
817 | 820 | ||
818 | /* device driver data */ | 821 | /* device driver data */ |
819 | 822 | ||