diff options
author | Liam Girdwood <lrg@ti.com> | 2012-01-09 07:10:16 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-20 08:58:26 -0500 |
commit | 08656910bb80882aaad739faea6dac3a0818f71c (patch) | |
tree | e0fcaf1dd7b21086dbcb4aa0dc8bf4d16a4d2c91 /sound | |
parent | 9b85fc90634972634a229aaa1c94f8c9a50fddbc (diff) |
ASoC: twl6040 - add method to query HS DC offset step size in mV
Provide a method for mach drivers to query the HS DC offset step size in mV.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/twl6040.c | 13 | ||||
-rw-r--r-- | sound/soc/codecs/twl6040.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 5b9c79b6f65e..284dd2e99971 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -1052,6 +1052,19 @@ int twl6040_get_trim_value(struct snd_soc_codec *codec, enum twl6040_trim trim) | |||
1052 | } | 1052 | } |
1053 | EXPORT_SYMBOL_GPL(twl6040_get_trim_value); | 1053 | EXPORT_SYMBOL_GPL(twl6040_get_trim_value); |
1054 | 1054 | ||
1055 | int twl6040_get_hs_step_size(struct snd_soc_codec *codec) | ||
1056 | { | ||
1057 | struct twl6040 *twl6040 = codec->control_data; | ||
1058 | |||
1059 | if (twl6040_get_revid(twl6040) < TWL6040_REV_ES1_2) | ||
1060 | /* For ES under ES_1.3 HS step is 2 mV */ | ||
1061 | return 2; | ||
1062 | else | ||
1063 | /* For ES_1.3 HS step is 1 mV */ | ||
1064 | return 1; | ||
1065 | } | ||
1066 | EXPORT_SYMBOL_GPL(twl6040_get_hs_step_size); | ||
1067 | |||
1055 | static const struct snd_kcontrol_new twl6040_snd_controls[] = { | 1068 | static const struct snd_kcontrol_new twl6040_snd_controls[] = { |
1056 | /* Capture gains */ | 1069 | /* Capture gains */ |
1057 | SOC_DOUBLE_TLV("Capture Preamplifier Volume", | 1070 | SOC_DOUBLE_TLV("Capture Preamplifier Volume", |
diff --git a/sound/soc/codecs/twl6040.h b/sound/soc/codecs/twl6040.h index ef273f1fac2f..0611406ca7c0 100644 --- a/sound/soc/codecs/twl6040.h +++ b/sound/soc/codecs/twl6040.h | |||
@@ -39,5 +39,6 @@ void twl6040_hs_jack_detect(struct snd_soc_codec *codec, | |||
39 | struct snd_soc_jack *jack, int report); | 39 | struct snd_soc_jack *jack, int report); |
40 | int twl6040_get_clk_id(struct snd_soc_codec *codec); | 40 | int twl6040_get_clk_id(struct snd_soc_codec *codec); |
41 | int twl6040_get_trim_value(struct snd_soc_codec *codec, enum twl6040_trim trim); | 41 | int twl6040_get_trim_value(struct snd_soc_codec *codec, enum twl6040_trim trim); |
42 | int twl6040_get_hs_step_size(struct snd_soc_codec *codec); | ||
42 | 43 | ||
43 | #endif /* End of __TWL6040_H__ */ | 44 | #endif /* End of __TWL6040_H__ */ |