diff options
| -rw-r--r-- | sound/soc/codecs/max98090.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index 8d14a76c7249..ad5313f98f28 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c | |||
| @@ -857,6 +857,14 @@ static const struct soc_enum mic2_mux_enum = | |||
| 857 | static const struct snd_kcontrol_new max98090_mic2_mux = | 857 | static const struct snd_kcontrol_new max98090_mic2_mux = |
| 858 | SOC_DAPM_ENUM("MIC2 Mux", mic2_mux_enum); | 858 | SOC_DAPM_ENUM("MIC2 Mux", mic2_mux_enum); |
| 859 | 859 | ||
| 860 | static const char *dmic_mux_text[] = { "ADC", "DMIC" }; | ||
| 861 | |||
| 862 | static const struct soc_enum dmic_mux_enum = | ||
| 863 | SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(dmic_mux_text), dmic_mux_text); | ||
| 864 | |||
| 865 | static const struct snd_kcontrol_new max98090_dmic_mux = | ||
| 866 | SOC_DAPM_ENUM_VIRT("DMIC Mux", dmic_mux_enum); | ||
| 867 | |||
| 860 | static const char *max98090_micpre_text[] = { "Off", "On" }; | 868 | static const char *max98090_micpre_text[] = { "Off", "On" }; |
| 861 | 869 | ||
| 862 | static const struct soc_enum max98090_pa1en_enum = | 870 | static const struct soc_enum max98090_pa1en_enum = |
| @@ -1144,6 +1152,9 @@ static const struct snd_soc_dapm_widget max98090_dapm_widgets[] = { | |||
| 1144 | SND_SOC_DAPM_MUX("MIC2 Mux", SND_SOC_NOPM, | 1152 | SND_SOC_DAPM_MUX("MIC2 Mux", SND_SOC_NOPM, |
| 1145 | 0, 0, &max98090_mic2_mux), | 1153 | 0, 0, &max98090_mic2_mux), |
| 1146 | 1154 | ||
| 1155 | SND_SOC_DAPM_VIRT_MUX("DMIC Mux", SND_SOC_NOPM, | ||
| 1156 | 0, 0, &max98090_dmic_mux), | ||
| 1157 | |||
| 1147 | SND_SOC_DAPM_PGA_E("MIC1 Input", M98090_REG_MIC1_INPUT_LEVEL, | 1158 | SND_SOC_DAPM_PGA_E("MIC1 Input", M98090_REG_MIC1_INPUT_LEVEL, |
| 1148 | M98090_MIC_PA1EN_SHIFT, 0, NULL, 0, max98090_micinput_event, | 1159 | M98090_MIC_PA1EN_SHIFT, 0, NULL, 0, max98090_micinput_event, |
| 1149 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 1160 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
| @@ -1336,11 +1347,14 @@ static const struct snd_soc_dapm_route max98090_dapm_routes[] = { | |||
| 1336 | {"ADCL", NULL, "SHDN"}, | 1347 | {"ADCL", NULL, "SHDN"}, |
| 1337 | {"ADCR", NULL, "SHDN"}, | 1348 | {"ADCR", NULL, "SHDN"}, |
| 1338 | 1349 | ||
| 1339 | {"LBENL Mux", "Normal", "ADCL"}, | 1350 | {"DMIC Mux", "ADC", "ADCL"}, |
| 1340 | {"LBENL Mux", "Normal", "DMICL"}, | 1351 | {"DMIC Mux", "ADC", "ADCR"}, |
| 1352 | {"DMIC Mux", "DMIC", "DMICL"}, | ||
| 1353 | {"DMIC Mux", "DMIC", "DMICR"}, | ||
| 1354 | |||
| 1355 | {"LBENL Mux", "Normal", "DMIC Mux"}, | ||
| 1341 | {"LBENL Mux", "Loopback", "LTENL Mux"}, | 1356 | {"LBENL Mux", "Loopback", "LTENL Mux"}, |
| 1342 | {"LBENR Mux", "Normal", "ADCR"}, | 1357 | {"LBENR Mux", "Normal", "DMIC Mux"}, |
| 1343 | {"LBENR Mux", "Normal", "DMICR"}, | ||
| 1344 | {"LBENR Mux", "Loopback", "LTENR Mux"}, | 1358 | {"LBENR Mux", "Loopback", "LTENR Mux"}, |
| 1345 | 1359 | ||
| 1346 | {"AIFOUTL", NULL, "LBENL Mux"}, | 1360 | {"AIFOUTL", NULL, "LBENL Mux"}, |
| @@ -2336,6 +2350,7 @@ static int max98090_i2c_remove(struct i2c_client *client) | |||
| 2336 | return 0; | 2350 | return 0; |
| 2337 | } | 2351 | } |
| 2338 | 2352 | ||
| 2353 | #ifdef CONFIG_PM_RUNTIME | ||
| 2339 | static int max98090_runtime_resume(struct device *dev) | 2354 | static int max98090_runtime_resume(struct device *dev) |
| 2340 | { | 2355 | { |
| 2341 | struct max98090_priv *max98090 = dev_get_drvdata(dev); | 2356 | struct max98090_priv *max98090 = dev_get_drvdata(dev); |
| @@ -2355,6 +2370,7 @@ static int max98090_runtime_suspend(struct device *dev) | |||
| 2355 | 2370 | ||
| 2356 | return 0; | 2371 | return 0; |
| 2357 | } | 2372 | } |
| 2373 | #endif | ||
| 2358 | 2374 | ||
| 2359 | static const struct dev_pm_ops max98090_pm = { | 2375 | static const struct dev_pm_ops max98090_pm = { |
| 2360 | SET_RUNTIME_PM_OPS(max98090_runtime_suspend, | 2376 | SET_RUNTIME_PM_OPS(max98090_runtime_suspend, |
