diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-01 15:41:57 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-03 13:41:53 -0400 |
commit | c3753707991218aa2c18449a921847877533aa09 (patch) | |
tree | 10fcca7891e8885fe1fe5913bdac56f0c51567a1 | |
parent | 3f58fd84b0c0bd482151259ee0d2921974e1fe4c (diff) |
ASoC: Push snd_soc_write() and snd_soc_read() into the source file
Facilitating adding trace type stuff. For a first pass add some dev_dbg()
statements into them.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r-- | include/sound/soc.h | 14 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 19 |
2 files changed, 22 insertions, 11 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 5c3bce83f28a..aaf34d7cd95e 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -639,17 +639,9 @@ struct soc_enum { | |||
639 | }; | 639 | }; |
640 | 640 | ||
641 | /* codec IO */ | 641 | /* codec IO */ |
642 | static inline unsigned int snd_soc_read(struct snd_soc_codec *codec, | 642 | unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); |
643 | unsigned int reg) | 643 | unsigned int snd_soc_write(struct snd_soc_codec *codec, |
644 | { | 644 | unsigned int reg, unsigned int val); |
645 | return codec->driver->read(codec, reg); | ||
646 | } | ||
647 | |||
648 | static inline unsigned int snd_soc_write(struct snd_soc_codec *codec, | ||
649 | unsigned int reg, unsigned int val) | ||
650 | { | ||
651 | return codec->driver->write(codec, reg, val); | ||
652 | } | ||
653 | 645 | ||
654 | /* device driver data */ | 646 | /* device driver data */ |
655 | 647 | ||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 614a8b30d87b..4360436ef035 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1877,6 +1877,25 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec) | |||
1877 | } | 1877 | } |
1878 | EXPORT_SYMBOL_GPL(snd_soc_free_ac97_codec); | 1878 | EXPORT_SYMBOL_GPL(snd_soc_free_ac97_codec); |
1879 | 1879 | ||
1880 | unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg) | ||
1881 | { | ||
1882 | unsigned int ret; | ||
1883 | |||
1884 | ret = codec->driver->read(codec, reg); | ||
1885 | dev_dbg(codec->dev, "read %x => %x\n", reg, ret); | ||
1886 | |||
1887 | return ret; | ||
1888 | } | ||
1889 | EXPORT_SYMBOL_GPL(snd_soc_read); | ||
1890 | |||
1891 | unsigned int snd_soc_write(struct snd_soc_codec *codec, | ||
1892 | unsigned int reg, unsigned int val) | ||
1893 | { | ||
1894 | dev_dbg(codec->dev, "write %x = %x\n", reg, val); | ||
1895 | return codec->driver->write(codec, reg, val); | ||
1896 | } | ||
1897 | EXPORT_SYMBOL_GPL(snd_soc_write); | ||
1898 | |||
1880 | /** | 1899 | /** |
1881 | * snd_soc_update_bits - update codec register bits | 1900 | * snd_soc_update_bits - update codec register bits |
1882 | * @codec: audio codec | 1901 | * @codec: audio codec |