aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sgtl5000.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/sgtl5000.c')
-rw-r--r--sound/soc/codecs/sgtl5000.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 0fcbe90f3ef2..d3ed1be5a186 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -187,8 +187,9 @@ static const char *adc_mux_text[] = {
187 "MIC_IN", "LINE_IN" 187 "MIC_IN", "LINE_IN"
188}; 188};
189 189
190static const struct soc_enum adc_enum = 190static SOC_ENUM_SINGLE_DECL(adc_enum,
191SOC_ENUM_SINGLE(SGTL5000_CHIP_ANA_CTRL, 2, 2, adc_mux_text); 191 SGTL5000_CHIP_ANA_CTRL, 2,
192 adc_mux_text);
192 193
193static const struct snd_kcontrol_new adc_mux = 194static const struct snd_kcontrol_new adc_mux =
194SOC_DAPM_ENUM("Capture Mux", adc_enum); 195SOC_DAPM_ENUM("Capture Mux", adc_enum);
@@ -198,8 +199,9 @@ static const char *dac_mux_text[] = {
198 "DAC", "LINE_IN" 199 "DAC", "LINE_IN"
199}; 200};
200 201
201static const struct soc_enum dac_enum = 202static SOC_ENUM_SINGLE_DECL(dac_enum,
202SOC_ENUM_SINGLE(SGTL5000_CHIP_ANA_CTRL, 6, 2, dac_mux_text); 203 SGTL5000_CHIP_ANA_CTRL, 6,
204 dac_mux_text);
203 205
204static const struct snd_kcontrol_new dac_mux = 206static const struct snd_kcontrol_new dac_mux =
205SOC_DAPM_ENUM("Headphone Mux", dac_enum); 207SOC_DAPM_ENUM("Headphone Mux", dac_enum);
@@ -1350,14 +1352,6 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
1350 int ret; 1352 int ret;
1351 struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec); 1353 struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
1352 1354
1353 /* setup i2c data ops */
1354 codec->control_data = sgtl5000->regmap;
1355 ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
1356 if (ret < 0) {
1357 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
1358 return ret;
1359 }
1360
1361 ret = sgtl5000_enable_regulators(codec); 1355 ret = sgtl5000_enable_regulators(codec);
1362 if (ret) 1356 if (ret)
1363 return ret; 1357 return ret;