aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>2010-11-30 09:00:03 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-11-30 10:39:39 -0500
commit1bb5ec6a6a0e094c84cc4fa2ba4a6d7cf8e9e8c6 (patch)
tree790dccca5b8fda23ba6eb8c0e11afa4593723bed /sound/soc/codecs
parent8cc14e13d15ec558c880ce6eaaddf99c08f85ab6 (diff)
ASoC: tpa6130a2: Add stereo DAPM path
New DAPM widgets, and paths to enable both channels at the same time (for stereo output). With this path the switch time difference can be avoided between left and right channels. The original DAPM paths can be still used, if only one of TPA's output has been connected to a speaker, but for most of the cases, switching to the stereo path is better. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/tpa6130a2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index 4c77a82d9780..c97badfac540 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -354,20 +354,27 @@ static const struct snd_soc_dapm_widget tpa6130a2_dapm_widgets[] = {
354 SND_SOC_DAPM_PGA_E("TPA6130A2 Right", SND_SOC_NOPM, 354 SND_SOC_DAPM_PGA_E("TPA6130A2 Right", SND_SOC_NOPM,
355 TPA6130A2_HP_EN_R, 0, NULL, 0, tpa6130a2_pga_event, 355 TPA6130A2_HP_EN_R, 0, NULL, 0, tpa6130a2_pga_event,
356 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD), 356 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD),
357 SND_SOC_DAPM_PGA_E("TPA6130A2 Stereo", SND_SOC_NOPM,
358 TPA6130A2_HP_EN_L | TPA6130A2_HP_EN_R, 0, NULL, 0,
359 tpa6130a2_pga_event,
360 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD),
357 SND_SOC_DAPM_SUPPLY("TPA6130A2 Enable", SND_SOC_NOPM, 361 SND_SOC_DAPM_SUPPLY("TPA6130A2 Enable", SND_SOC_NOPM,
358 0, 0, tpa6130a2_supply_event, 362 0, 0, tpa6130a2_supply_event,
359 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD), 363 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD),
360 /* Outputs */ 364 /* Outputs */
361 SND_SOC_DAPM_OUTPUT("TPA6130A2 Headphone Left"), 365 SND_SOC_DAPM_OUTPUT("TPA6130A2 Headphone Left"),
362 SND_SOC_DAPM_OUTPUT("TPA6130A2 Headphone Right"), 366 SND_SOC_DAPM_OUTPUT("TPA6130A2 Headphone Right"),
367 SND_SOC_DAPM_OUTPUT("TPA6130A2 Headphone Stereo"),
363}; 368};
364 369
365static const struct snd_soc_dapm_route audio_map[] = { 370static const struct snd_soc_dapm_route audio_map[] = {
366 {"TPA6130A2 Headphone Left", NULL, "TPA6130A2 Left"}, 371 {"TPA6130A2 Headphone Left", NULL, "TPA6130A2 Left"},
367 {"TPA6130A2 Headphone Right", NULL, "TPA6130A2 Right"}, 372 {"TPA6130A2 Headphone Right", NULL, "TPA6130A2 Right"},
373 {"TPA6130A2 Headphone Stereo", NULL, "TPA6130A2 Stereo"},
368 374
369 {"TPA6130A2 Headphone Left", NULL, "TPA6130A2 Enable"}, 375 {"TPA6130A2 Headphone Left", NULL, "TPA6130A2 Enable"},
370 {"TPA6130A2 Headphone Right", NULL, "TPA6130A2 Enable"}, 376 {"TPA6130A2 Headphone Right", NULL, "TPA6130A2 Enable"},
377 {"TPA6130A2 Headphone Stereo", NULL, "TPA6130A2 Enable"},
371}; 378};
372 379
373int tpa6130a2_add_controls(struct snd_soc_codec *codec) 380int tpa6130a2_add_controls(struct snd_soc_codec *codec)