diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-04 15:07:03 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-05 12:44:19 -0400 |
commit | 9498822d753d241fc93fbeebc17e668cf3023cf7 (patch) | |
tree | e7b81a4299f5851edced7d9761a15f3882faa008 /sound | |
parent | c013b27a174e8a83d3c8df799aa37c897842efcb (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.c | 30 |
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); | |||
275 | ARIZONA_MIXER_ENUMS(AIF3TX1, ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE); | 275 | ARIZONA_MIXER_ENUMS(AIF3TX1, ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE); |
276 | ARIZONA_MIXER_ENUMS(AIF3TX2, ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE); | 276 | ARIZONA_MIXER_ENUMS(AIF3TX2, ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE); |
277 | 277 | ||
278 | ARIZONA_MIXER_ENUMS(ASRC1L, ARIZONA_ASRC1LMIX_INPUT_1_SOURCE); | ||
279 | ARIZONA_MIXER_ENUMS(ASRC1R, ARIZONA_ASRC1RMIX_INPUT_1_SOURCE); | ||
280 | ARIZONA_MIXER_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE); | ||
281 | ARIZONA_MIXER_ENUMS(ASRC2R, ARIZONA_ASRC2RMIX_INPUT_1_SOURCE); | ||
282 | |||
278 | static const struct snd_soc_dapm_widget wm5102_dapm_widgets[] = { | 283 | static const struct snd_soc_dapm_widget wm5102_dapm_widgets[] = { |
279 | SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, | 284 | SND_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, | |||
363 | SND_SOC_DAPM_PGA("PWM2 Driver", ARIZONA_PWM_DRIVE_1, ARIZONA_PWM2_ENA_SHIFT, | 368 | SND_SOC_DAPM_PGA("PWM2 Driver", ARIZONA_PWM_DRIVE_1, ARIZONA_PWM2_ENA_SHIFT, |
364 | 0, NULL, 0), | 369 | 0, NULL, 0), |
365 | 370 | ||
371 | SND_SOC_DAPM_PGA("ASRC1L", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC1L_ENA_SHIFT, 0, | ||
372 | NULL, 0), | ||
373 | SND_SOC_DAPM_PGA("ASRC1R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC1R_ENA_SHIFT, 0, | ||
374 | NULL, 0), | ||
375 | SND_SOC_DAPM_PGA("ASRC2L", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2L_ENA_SHIFT, 0, | ||
376 | NULL, 0), | ||
377 | SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2R_ENA_SHIFT, 0, | ||
378 | NULL, 0), | ||
379 | |||
366 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, | 380 | SND_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), |
368 | SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL, 0, | 382 | SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL, 0, |
@@ -491,6 +505,11 @@ ARIZONA_MIXER_WIDGETS(AIF2TX2, "AIF2TX2"), | |||
491 | ARIZONA_MIXER_WIDGETS(AIF3TX1, "AIF3TX1"), | 505 | ARIZONA_MIXER_WIDGETS(AIF3TX1, "AIF3TX1"), |
492 | ARIZONA_MIXER_WIDGETS(AIF3TX2, "AIF3TX2"), | 506 | ARIZONA_MIXER_WIDGETS(AIF3TX2, "AIF3TX2"), |
493 | 507 | ||
508 | ARIZONA_MIXER_WIDGETS(ASRC1L, "ASRC1L"), | ||
509 | ARIZONA_MIXER_WIDGETS(ASRC1R, "ASRC1R"), | ||
510 | ARIZONA_MIXER_WIDGETS(ASRC2L, "ASRC2L"), | ||
511 | ARIZONA_MIXER_WIDGETS(ASRC2R, "ASRC2R"), | ||
512 | |||
494 | SND_SOC_DAPM_OUTPUT("HPOUT1L"), | 513 | SND_SOC_DAPM_OUTPUT("HPOUT1L"), |
495 | SND_SOC_DAPM_OUTPUT("HPOUT1R"), | 514 | SND_SOC_DAPM_OUTPUT("HPOUT1R"), |
496 | SND_SOC_DAPM_OUTPUT("HPOUT2L"), | 515 | SND_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 | ||
544 | static const struct snd_soc_dapm_route wm5102_dapm_routes[] = { | 567 | static 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 | ||