aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-06-04 10:13:51 -0400
committerMark Brown <broonie@kernel.org>2015-06-09 13:57:30 -0400
commit6876c7c884b9115111768f2824138533ad8490da (patch)
tree49550f0289350313790a0254cb88e03b80a77049
parent0574eab363ace70ef275d4caad6eadc458d33728 (diff)
ASoC: rx51: Automatically disconnect non-connected pins
According to the schematics the external speaker is differential, so the HPLCOM and HPRCOM pins of the CODEC should be connected to it. Otherwise the routing looks complete, so add the missing routes and set the fully_routed flag of the card instead of manually marking the unused inputs and outputs as not connected. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/omap/rx51.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c
index c2ddf0fbfa28..9df4e40b62b5 100644
--- a/sound/soc/omap/rx51.c
+++ b/sound/soc/omap/rx51.c
@@ -245,6 +245,8 @@ static const struct snd_soc_dapm_widget aic34_dapm_widgets[] = {
245static const struct snd_soc_dapm_route audio_map[] = { 245static const struct snd_soc_dapm_route audio_map[] = {
246 {"Ext Spk", NULL, "HPLOUT"}, 246 {"Ext Spk", NULL, "HPLOUT"},
247 {"Ext Spk", NULL, "HPROUT"}, 247 {"Ext Spk", NULL, "HPROUT"},
248 {"Ext Spk", NULL, "HPLCOM"},
249 {"Ext Spk", NULL, "HPRCOM"},
248 {"Headphone Jack", NULL, "LLOUT"}, 250 {"Headphone Jack", NULL, "LLOUT"},
249 {"Headphone Jack", NULL, "RLOUT"}, 251 {"Headphone Jack", NULL, "RLOUT"},
250 {"FM Transmitter", NULL, "LLOUT"}, 252 {"FM Transmitter", NULL, "LLOUT"},
@@ -288,15 +290,8 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd)
288 struct snd_soc_codec *codec = rtd->codec; 290 struct snd_soc_codec *codec = rtd->codec;
289 struct snd_soc_card *card = rtd->card; 291 struct snd_soc_card *card = rtd->card;
290 struct rx51_audio_pdata *pdata = snd_soc_card_get_drvdata(card); 292 struct rx51_audio_pdata *pdata = snd_soc_card_get_drvdata(card);
291
292 struct snd_soc_dapm_context *dapm = &codec->dapm;
293 int err; 293 int err;
294 294
295 /* Set up NC codec pins */
296 snd_soc_dapm_nc_pin(dapm, "MIC3L");
297 snd_soc_dapm_nc_pin(dapm, "MIC3R");
298 snd_soc_dapm_nc_pin(dapm, "LINE1R");
299
300 err = tpa6130a2_add_controls(codec); 295 err = tpa6130a2_add_controls(codec);
301 if (err < 0) { 296 if (err < 0) {
302 dev_err(card->dev, "Failed to add TPA6130A2 controls\n"); 297 dev_err(card->dev, "Failed to add TPA6130A2 controls\n");
@@ -383,6 +378,7 @@ static struct snd_soc_card rx51_sound_card = {
383 .num_aux_devs = ARRAY_SIZE(rx51_aux_dev), 378 .num_aux_devs = ARRAY_SIZE(rx51_aux_dev),
384 .codec_conf = rx51_codec_conf, 379 .codec_conf = rx51_codec_conf,
385 .num_configs = ARRAY_SIZE(rx51_codec_conf), 380 .num_configs = ARRAY_SIZE(rx51_codec_conf),
381 .fully_routed = true,
386 382
387 .controls = aic34_rx51_controls, 383 .controls = aic34_rx51_controls,
388 .num_controls = ARRAY_SIZE(aic34_rx51_controls), 384 .num_controls = ARRAY_SIZE(aic34_rx51_controls),