diff options
| -rw-r--r-- | sound/soc/codecs/arizona.c | 25 | ||||
| -rw-r--r-- | sound/soc/codecs/arizona.h | 1 | ||||
| -rw-r--r-- | sound/soc/codecs/wm5110.c | 1 |
3 files changed, 27 insertions, 0 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index 29e198f57d4c..747c71e59c04 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c | |||
| @@ -243,6 +243,31 @@ int arizona_init_spk(struct snd_soc_codec *codec) | |||
| 243 | } | 243 | } |
| 244 | EXPORT_SYMBOL_GPL(arizona_init_spk); | 244 | EXPORT_SYMBOL_GPL(arizona_init_spk); |
| 245 | 245 | ||
| 246 | static const struct snd_soc_dapm_route arizona_mono_routes[] = { | ||
| 247 | { "OUT1R", NULL, "OUT1L" }, | ||
| 248 | { "OUT2R", NULL, "OUT2L" }, | ||
| 249 | { "OUT3R", NULL, "OUT3L" }, | ||
| 250 | { "OUT4R", NULL, "OUT4L" }, | ||
| 251 | { "OUT5R", NULL, "OUT5L" }, | ||
| 252 | { "OUT6R", NULL, "OUT6L" }, | ||
| 253 | }; | ||
| 254 | |||
| 255 | int arizona_init_mono(struct snd_soc_codec *codec) | ||
| 256 | { | ||
| 257 | struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); | ||
| 258 | struct arizona *arizona = priv->arizona; | ||
| 259 | int i; | ||
| 260 | |||
| 261 | for (i = 0; i < ARIZONA_MAX_OUTPUT; ++i) { | ||
| 262 | if (arizona->pdata.out_mono[i]) | ||
| 263 | snd_soc_dapm_add_routes(&codec->dapm, | ||
| 264 | &arizona_mono_routes[i], 1); | ||
| 265 | } | ||
| 266 | |||
| 267 | return 0; | ||
| 268 | } | ||
| 269 | EXPORT_SYMBOL_GPL(arizona_init_mono); | ||
| 270 | |||
| 246 | int arizona_init_gpio(struct snd_soc_codec *codec) | 271 | int arizona_init_gpio(struct snd_soc_codec *codec) |
| 247 | { | 272 | { |
| 248 | struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); | 273 | struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); |
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h index 05ae17f5bca3..942cfb197b6d 100644 --- a/sound/soc/codecs/arizona.h +++ b/sound/soc/codecs/arizona.h | |||
| @@ -249,6 +249,7 @@ extern int arizona_set_fll(struct arizona_fll *fll, int source, | |||
| 249 | 249 | ||
| 250 | extern int arizona_init_spk(struct snd_soc_codec *codec); | 250 | extern int arizona_init_spk(struct snd_soc_codec *codec); |
| 251 | extern int arizona_init_gpio(struct snd_soc_codec *codec); | 251 | extern int arizona_init_gpio(struct snd_soc_codec *codec); |
| 252 | extern int arizona_init_mono(struct snd_soc_codec *codec); | ||
| 252 | 253 | ||
| 253 | extern int arizona_init_dai(struct arizona_priv *priv, int dai); | 254 | extern int arizona_init_dai(struct arizona_priv *priv, int dai); |
| 254 | 255 | ||
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 2e5fcb559e90..62ef54456499 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
| @@ -1596,6 +1596,7 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec) | |||
| 1596 | 1596 | ||
| 1597 | arizona_init_spk(codec); | 1597 | arizona_init_spk(codec); |
| 1598 | arizona_init_gpio(codec); | 1598 | arizona_init_gpio(codec); |
| 1599 | arizona_init_mono(codec); | ||
| 1599 | 1600 | ||
| 1600 | ret = snd_soc_add_codec_controls(codec, wm_adsp2_fw_controls, 8); | 1601 | ret = snd_soc_add_codec_controls(codec, wm_adsp2_fw_controls, 8); |
| 1601 | if (ret != 0) | 1602 | if (ret != 0) |
