ASoC: wm5110: Add FSH for ISRCs
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thu, 19 Dec 2013 09:30:12 +0000 (09:30 +0000)
committerMark Brown <broonie@linaro.org>
Thu, 19 Dec 2013 10:20:31 +0000 (10:20 +0000)
Currently, the driver only supports configuration of the lower sample
rate (FSL) on the ISRCs. With the higher rate being fixed a SYSCLK, this
patch adds support for configuring the higher sample rate (FSH).

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/arizona.c
sound/soc/codecs/arizona.h
sound/soc/codecs/wm5110.c

index 6bfd8031c0c9286c662806352402c3705bd502c4..56d3ff570ad473959700014361e252b822a81e41 100644 (file)
@@ -498,6 +498,22 @@ const int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE] = {
 EXPORT_SYMBOL_GPL(arizona_rate_val);
 
 
+const struct soc_enum arizona_isrc_fsh[] = {
+       SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_1_CTRL_1,
+                             ARIZONA_ISRC1_FSH_SHIFT, 0xf,
+                             ARIZONA_RATE_ENUM_SIZE,
+                             arizona_rate_text, arizona_rate_val),
+       SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_2_CTRL_1,
+                             ARIZONA_ISRC2_FSH_SHIFT, 0xf,
+                             ARIZONA_RATE_ENUM_SIZE,
+                             arizona_rate_text, arizona_rate_val),
+       SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_3_CTRL_1,
+                             ARIZONA_ISRC3_FSH_SHIFT, 0xf,
+                             ARIZONA_RATE_ENUM_SIZE,
+                             arizona_rate_text, arizona_rate_val),
+};
+EXPORT_SYMBOL_GPL(arizona_isrc_fsh);
+
 const struct soc_enum arizona_isrc_fsl[] = {
        SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_1_CTRL_2,
                              ARIZONA_ISRC1_FSL_SHIFT, 0xf,
index 6641f3d641946d12629d2a4692bfaa7048d0a5d1..99a97c06d46a13b0bdbf7951e986e033b76aa31d 100644 (file)
@@ -186,6 +186,7 @@ extern const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE];
 extern const int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE];
 
 extern const struct soc_enum arizona_isrc_fsl[];
+extern const struct soc_enum arizona_isrc_fsh[];
 
 extern const struct soc_enum arizona_in_vi_ramp;
 extern const struct soc_enum arizona_in_vd_ramp;
index 3487ffa2e9502a56d7529b20749820480697a0af..57be82261c2fe113f6941e275b0b63177876c4f1 100644 (file)
@@ -280,6 +280,9 @@ SOC_ENUM("LHPF4 Mode", arizona_lhpf4_mode),
 SOC_VALUE_ENUM("ISRC1 FSL", arizona_isrc_fsl[0]),
 SOC_VALUE_ENUM("ISRC2 FSL", arizona_isrc_fsl[1]),
 SOC_VALUE_ENUM("ISRC3 FSL", arizona_isrc_fsl[2]),
+SOC_VALUE_ENUM("ISRC1 FSH", arizona_isrc_fsh[0]),
+SOC_VALUE_ENUM("ISRC2 FSH", arizona_isrc_fsh[1]),
+SOC_VALUE_ENUM("ISRC3 FSH", arizona_isrc_fsh[2]),
 
 ARIZONA_MIXER_CONTROLS("DSP1L", ARIZONA_DSP1LMIX_INPUT_1_SOURCE),
 ARIZONA_MIXER_CONTROLS("DSP1R", ARIZONA_DSP1RMIX_INPUT_1_SOURCE),