diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2011-03-24 09:45:17 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-26 13:45:16 -0400 |
commit | 8020454c9a1ec5ac5801805896b5f69d0c573e17 (patch) | |
tree | 60141172b88a90a0f31d9412d338d65c2d9c4f00 /include/sound/soc.h | |
parent | acd61451e55ea5848a6ab50d39a103e146fcf7ba (diff) |
ASoC: Add default snd_soc_default_writable_register() callback
By using struct snd_soc_reg_access for the read/write/vol attributes
of the registers, we provide callbacks that automatically determine whether
a given register is readable/writable or volatile.
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/soc.h')
-rw-r--r-- | include/sound/soc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 4a11795aaee3..e20835753c6b 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -292,6 +292,8 @@ int snd_soc_default_volatile_register(struct snd_soc_codec *codec, | |||
292 | unsigned int reg); | 292 | unsigned int reg); |
293 | int snd_soc_default_readable_register(struct snd_soc_codec *codec, | 293 | int snd_soc_default_readable_register(struct snd_soc_codec *codec, |
294 | unsigned int reg); | 294 | unsigned int reg); |
295 | int snd_soc_default_writable_register(struct snd_soc_codec *codec, | ||
296 | unsigned int reg); | ||
295 | 297 | ||
296 | /* Utility functions to get clock rates from various things */ | 298 | /* Utility functions to get clock rates from various things */ |
297 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); | 299 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); |
@@ -523,6 +525,7 @@ struct snd_soc_codec { | |||
523 | size_t reg_size; /* reg_cache_size * reg_word_size */ | 525 | size_t reg_size; /* reg_cache_size * reg_word_size */ |
524 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); | 526 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); |
525 | int (*readable_register)(struct snd_soc_codec *, unsigned int); | 527 | int (*readable_register)(struct snd_soc_codec *, unsigned int); |
528 | int (*writable_register)(struct snd_soc_codec *, unsigned int); | ||
526 | 529 | ||
527 | /* runtime */ | 530 | /* runtime */ |
528 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ | 531 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ |
@@ -589,6 +592,7 @@ struct snd_soc_codec_driver { | |||
589 | size_t, unsigned int); | 592 | size_t, unsigned int); |
590 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); | 593 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); |
591 | int (*readable_register)(struct snd_soc_codec *, unsigned int); | 594 | int (*readable_register)(struct snd_soc_codec *, unsigned int); |
595 | int (*writable_register)(struct snd_soc_codec *, unsigned int); | ||
592 | short reg_cache_size; | 596 | short reg_cache_size; |
593 | short reg_cache_step; | 597 | short reg_cache_step; |
594 | short reg_word_size; | 598 | short reg_word_size; |