aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-04 15:07:03 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-05 12:44:19 -0400
commit9498822d753d241fc93fbeebc17e668cf3023cf7 (patch)
treee7b81a4299f5851edced7d9761a15f3882faa008 /sound
parentc013b27a174e8a83d3c8df799aa37c897842efcb (diff)
ASoC: wm5102: Allow routing through the ASRCs
This enables common telephony use cases. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm5102.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index be74a78e1aea..3827fa2af70a 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -275,6 +275,11 @@ ARIZONA_MIXER_ENUMS(AIF2TX2, ARIZONA_AIF2TX2MIX_INPUT_1_SOURCE);
275ARIZONA_MIXER_ENUMS(AIF3TX1, ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE); 275ARIZONA_MIXER_ENUMS(AIF3TX1, ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE);
276ARIZONA_MIXER_ENUMS(AIF3TX2, ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE); 276ARIZONA_MIXER_ENUMS(AIF3TX2, ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE);
277 277
278ARIZONA_MIXER_ENUMS(ASRC1L, ARIZONA_ASRC1LMIX_INPUT_1_SOURCE);
279ARIZONA_MIXER_ENUMS(ASRC1R, ARIZONA_ASRC1RMIX_INPUT_1_SOURCE);
280ARIZONA_MIXER_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE);
281ARIZONA_MIXER_ENUMS(ASRC2R, ARIZONA_ASRC2RMIX_INPUT_1_SOURCE);
282
278static const struct snd_soc_dapm_widget wm5102_dapm_widgets[] = { 283static const struct snd_soc_dapm_widget wm5102_dapm_widgets[] = {
279SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, 284SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT,
280 0, NULL, 0), 285 0, NULL, 0),
@@ -363,6 +368,15 @@ SND_SOC_DAPM_PGA("PWM1 Driver", ARIZONA_PWM_DRIVE_1, ARIZONA_PWM1_ENA_SHIFT,
363SND_SOC_DAPM_PGA("PWM2 Driver", ARIZONA_PWM_DRIVE_1, ARIZONA_PWM2_ENA_SHIFT, 368SND_SOC_DAPM_PGA("PWM2 Driver", ARIZONA_PWM_DRIVE_1, ARIZONA_PWM2_ENA_SHIFT,
364 0, NULL, 0), 369 0, NULL, 0),
365 370
371SND_SOC_DAPM_PGA("ASRC1L", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC1L_ENA_SHIFT, 0,
372 NULL, 0),
373SND_SOC_DAPM_PGA("ASRC1R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC1R_ENA_SHIFT, 0,
374 NULL, 0),
375SND_SOC_DAPM_PGA("ASRC2L", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2L_ENA_SHIFT, 0,
376 NULL, 0),
377SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2R_ENA_SHIFT, 0,
378 NULL, 0),
379
366SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, 380SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0,
367 ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), 381 ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0),
368SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL, 0, 382SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL, 0,
@@ -491,6 +505,11 @@ ARIZONA_MIXER_WIDGETS(AIF2TX2, "AIF2TX2"),
491ARIZONA_MIXER_WIDGETS(AIF3TX1, "AIF3TX1"), 505ARIZONA_MIXER_WIDGETS(AIF3TX1, "AIF3TX1"),
492ARIZONA_MIXER_WIDGETS(AIF3TX2, "AIF3TX2"), 506ARIZONA_MIXER_WIDGETS(AIF3TX2, "AIF3TX2"),
493 507
508ARIZONA_MIXER_WIDGETS(ASRC1L, "ASRC1L"),
509ARIZONA_MIXER_WIDGETS(ASRC1R, "ASRC1R"),
510ARIZONA_MIXER_WIDGETS(ASRC2L, "ASRC2L"),
511ARIZONA_MIXER_WIDGETS(ASRC2R, "ASRC2R"),
512
494SND_SOC_DAPM_OUTPUT("HPOUT1L"), 513SND_SOC_DAPM_OUTPUT("HPOUT1L"),
495SND_SOC_DAPM_OUTPUT("HPOUT1R"), 514SND_SOC_DAPM_OUTPUT("HPOUT1R"),
496SND_SOC_DAPM_OUTPUT("HPOUT2L"), 515SND_SOC_DAPM_OUTPUT("HPOUT2L"),
@@ -539,7 +558,11 @@ SND_SOC_DAPM_OUTPUT("SPKDAT1R"),
539 { name, "LHPF1", "LHPF1" }, \ 558 { name, "LHPF1", "LHPF1" }, \
540 { name, "LHPF2", "LHPF2" }, \ 559 { name, "LHPF2", "LHPF2" }, \
541 { name, "LHPF3", "LHPF3" }, \ 560 { name, "LHPF3", "LHPF3" }, \
542 { name, "LHPF4", "LHPF4" } 561 { name, "LHPF4", "LHPF4" }, \
562 { name, "ASRC1L", "ASRC1L" }, \
563 { name, "ASRC1R", "ASRC1R" }, \
564 { name, "ASRC2L", "ASRC2L" }, \
565 { name, "ASRC2R", "ASRC2R" }
543 566
544static const struct snd_soc_dapm_route wm5102_dapm_routes[] = { 567static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
545 { "AIF2 Capture", NULL, "DBVDD2" }, 568 { "AIF2 Capture", NULL, "DBVDD2" },
@@ -660,6 +683,11 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
660 ARIZONA_MIXER_ROUTES("LHPF3", "LHPF3"), 683 ARIZONA_MIXER_ROUTES("LHPF3", "LHPF3"),
661 ARIZONA_MIXER_ROUTES("LHPF4", "LHPF4"), 684 ARIZONA_MIXER_ROUTES("LHPF4", "LHPF4"),
662 685
686 ARIZONA_MIXER_ROUTES("ASRC1L", "ASRC1L"),
687 ARIZONA_MIXER_ROUTES("ASRC1R", "ASRC1R"),
688 ARIZONA_MIXER_ROUTES("ASRC2L", "ASRC2L"),
689 ARIZONA_MIXER_ROUTES("ASRC2R", "ASRC2R"),
690
663 { "HPOUT1L", NULL, "OUT1L" }, 691 { "HPOUT1L", NULL, "OUT1L" },
664 { "HPOUT1R", NULL, "OUT1R" }, 692 { "HPOUT1R", NULL, "OUT1R" },
665 693