aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm5110.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-17 08:29:05 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-20 12:27:59 -0400
commitd217f9055631fb910f4f2e09ccf6446d93ff6533 (patch)
treed020cba2b117f916ecf8587e13e58141a8188176 /sound/soc/codecs/wm5110.c
parent1804aff60d3bfe34223744ec8c301699bc0b0407 (diff)
ASoC: wm5110: Stub hookup for Slimbus interface
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm5110.c')
-rw-r--r--sound/soc/codecs/wm5110.c179
1 files changed, 179 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 731884e04776..f53062f8c42e 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -309,6 +309,15 @@ ARIZONA_MIXER_CONTROLS("AIF2TX2", ARIZONA_AIF2TX2MIX_INPUT_1_SOURCE),
309 309
310ARIZONA_MIXER_CONTROLS("AIF3TX1", ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE), 310ARIZONA_MIXER_CONTROLS("AIF3TX1", ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE),
311ARIZONA_MIXER_CONTROLS("AIF3TX2", ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE), 311ARIZONA_MIXER_CONTROLS("AIF3TX2", ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE),
312
313ARIZONA_MIXER_CONTROLS("SLIMTX1", ARIZONA_SLIMTX1MIX_INPUT_1_SOURCE),
314ARIZONA_MIXER_CONTROLS("SLIMTX2", ARIZONA_SLIMTX2MIX_INPUT_1_SOURCE),
315ARIZONA_MIXER_CONTROLS("SLIMTX3", ARIZONA_SLIMTX3MIX_INPUT_1_SOURCE),
316ARIZONA_MIXER_CONTROLS("SLIMTX4", ARIZONA_SLIMTX4MIX_INPUT_1_SOURCE),
317ARIZONA_MIXER_CONTROLS("SLIMTX5", ARIZONA_SLIMTX5MIX_INPUT_1_SOURCE),
318ARIZONA_MIXER_CONTROLS("SLIMTX6", ARIZONA_SLIMTX6MIX_INPUT_1_SOURCE),
319ARIZONA_MIXER_CONTROLS("SLIMTX7", ARIZONA_SLIMTX7MIX_INPUT_1_SOURCE),
320ARIZONA_MIXER_CONTROLS("SLIMTX8", ARIZONA_SLIMTX8MIX_INPUT_1_SOURCE),
312}; 321};
313 322
314ARIZONA_MIXER_ENUMS(EQ1, ARIZONA_EQ1MIX_INPUT_1_SOURCE); 323ARIZONA_MIXER_ENUMS(EQ1, ARIZONA_EQ1MIX_INPUT_1_SOURCE);
@@ -360,6 +369,15 @@ ARIZONA_MIXER_ENUMS(AIF2TX2, ARIZONA_AIF2TX2MIX_INPUT_1_SOURCE);
360ARIZONA_MIXER_ENUMS(AIF3TX1, ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE); 369ARIZONA_MIXER_ENUMS(AIF3TX1, ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE);
361ARIZONA_MIXER_ENUMS(AIF3TX2, ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE); 370ARIZONA_MIXER_ENUMS(AIF3TX2, ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE);
362 371
372ARIZONA_MIXER_ENUMS(SLIMTX1, ARIZONA_SLIMTX1MIX_INPUT_1_SOURCE);
373ARIZONA_MIXER_ENUMS(SLIMTX2, ARIZONA_SLIMTX2MIX_INPUT_1_SOURCE);
374ARIZONA_MIXER_ENUMS(SLIMTX3, ARIZONA_SLIMTX3MIX_INPUT_1_SOURCE);
375ARIZONA_MIXER_ENUMS(SLIMTX4, ARIZONA_SLIMTX4MIX_INPUT_1_SOURCE);
376ARIZONA_MIXER_ENUMS(SLIMTX5, ARIZONA_SLIMTX5MIX_INPUT_1_SOURCE);
377ARIZONA_MIXER_ENUMS(SLIMTX6, ARIZONA_SLIMTX6MIX_INPUT_1_SOURCE);
378ARIZONA_MIXER_ENUMS(SLIMTX7, ARIZONA_SLIMTX7MIX_INPUT_1_SOURCE);
379ARIZONA_MIXER_ENUMS(SLIMTX8, ARIZONA_SLIMTX8MIX_INPUT_1_SOURCE);
380
363ARIZONA_MUX_ENUMS(ASRC1L, ARIZONA_ASRC1LMIX_INPUT_1_SOURCE); 381ARIZONA_MUX_ENUMS(ASRC1L, ARIZONA_ASRC1LMIX_INPUT_1_SOURCE);
364ARIZONA_MUX_ENUMS(ASRC1R, ARIZONA_ASRC1RMIX_INPUT_1_SOURCE); 382ARIZONA_MUX_ENUMS(ASRC1R, ARIZONA_ASRC1RMIX_INPUT_1_SOURCE);
365ARIZONA_MUX_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE); 383ARIZONA_MUX_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE);
@@ -549,6 +567,56 @@ SND_SOC_DAPM_AIF_IN("AIF2RX1", NULL, 0,
549SND_SOC_DAPM_AIF_IN("AIF2RX2", NULL, 0, 567SND_SOC_DAPM_AIF_IN("AIF2RX2", NULL, 0,
550 ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX2_ENA_SHIFT, 0), 568 ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX2_ENA_SHIFT, 0),
551 569
570SND_SOC_DAPM_AIF_IN("SLIMRX1", NULL, 0,
571 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE,
572 ARIZONA_SLIMRX1_ENA_SHIFT, 0),
573SND_SOC_DAPM_AIF_IN("SLIMRX2", NULL, 0,
574 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE,
575 ARIZONA_SLIMRX2_ENA_SHIFT, 0),
576SND_SOC_DAPM_AIF_IN("SLIMRX3", NULL, 0,
577 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE,
578 ARIZONA_SLIMRX3_ENA_SHIFT, 0),
579SND_SOC_DAPM_AIF_IN("SLIMRX4", NULL, 0,
580 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE,
581 ARIZONA_SLIMRX4_ENA_SHIFT, 0),
582SND_SOC_DAPM_AIF_IN("SLIMRX5", NULL, 0,
583 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE,
584 ARIZONA_SLIMRX5_ENA_SHIFT, 0),
585SND_SOC_DAPM_AIF_IN("SLIMRX6", NULL, 0,
586 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE,
587 ARIZONA_SLIMRX6_ENA_SHIFT, 0),
588SND_SOC_DAPM_AIF_IN("SLIMRX7", NULL, 0,
589 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE,
590 ARIZONA_SLIMRX7_ENA_SHIFT, 0),
591SND_SOC_DAPM_AIF_IN("SLIMRX8", NULL, 0,
592 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE,
593 ARIZONA_SLIMRX8_ENA_SHIFT, 0),
594
595SND_SOC_DAPM_AIF_OUT("SLIMTX1", NULL, 0,
596 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE,
597 ARIZONA_SLIMTX1_ENA_SHIFT, 0),
598SND_SOC_DAPM_AIF_OUT("SLIMTX2", NULL, 0,
599 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE,
600 ARIZONA_SLIMTX2_ENA_SHIFT, 0),
601SND_SOC_DAPM_AIF_OUT("SLIMTX3", NULL, 0,
602 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE,
603 ARIZONA_SLIMTX3_ENA_SHIFT, 0),
604SND_SOC_DAPM_AIF_OUT("SLIMTX4", NULL, 0,
605 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE,
606 ARIZONA_SLIMTX4_ENA_SHIFT, 0),
607SND_SOC_DAPM_AIF_OUT("SLIMTX5", NULL, 0,
608 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE,
609 ARIZONA_SLIMTX5_ENA_SHIFT, 0),
610SND_SOC_DAPM_AIF_OUT("SLIMTX6", NULL, 0,
611 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE,
612 ARIZONA_SLIMTX6_ENA_SHIFT, 0),
613SND_SOC_DAPM_AIF_OUT("SLIMTX7", NULL, 0,
614 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE,
615 ARIZONA_SLIMTX7_ENA_SHIFT, 0),
616SND_SOC_DAPM_AIF_OUT("SLIMTX8", NULL, 0,
617 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE,
618 ARIZONA_SLIMTX8_ENA_SHIFT, 0),
619
552SND_SOC_DAPM_AIF_OUT("AIF3TX1", NULL, 0, 620SND_SOC_DAPM_AIF_OUT("AIF3TX1", NULL, 0,
553 ARIZONA_AIF3_TX_ENABLES, ARIZONA_AIF3TX1_ENA_SHIFT, 0), 621 ARIZONA_AIF3_TX_ENABLES, ARIZONA_AIF3TX1_ENA_SHIFT, 0),
554SND_SOC_DAPM_AIF_OUT("AIF3TX2", NULL, 0, 622SND_SOC_DAPM_AIF_OUT("AIF3TX2", NULL, 0,
@@ -639,6 +707,15 @@ ARIZONA_MIXER_WIDGETS(AIF2TX2, "AIF2TX2"),
639ARIZONA_MIXER_WIDGETS(AIF3TX1, "AIF3TX1"), 707ARIZONA_MIXER_WIDGETS(AIF3TX1, "AIF3TX1"),
640ARIZONA_MIXER_WIDGETS(AIF3TX2, "AIF3TX2"), 708ARIZONA_MIXER_WIDGETS(AIF3TX2, "AIF3TX2"),
641 709
710ARIZONA_MIXER_WIDGETS(SLIMTX1, "SLIMTX1"),
711ARIZONA_MIXER_WIDGETS(SLIMTX2, "SLIMTX2"),
712ARIZONA_MIXER_WIDGETS(SLIMTX3, "SLIMTX3"),
713ARIZONA_MIXER_WIDGETS(SLIMTX4, "SLIMTX4"),
714ARIZONA_MIXER_WIDGETS(SLIMTX5, "SLIMTX5"),
715ARIZONA_MIXER_WIDGETS(SLIMTX6, "SLIMTX6"),
716ARIZONA_MIXER_WIDGETS(SLIMTX7, "SLIMTX7"),
717ARIZONA_MIXER_WIDGETS(SLIMTX8, "SLIMTX8"),
718
642ARIZONA_MUX_WIDGETS(ASRC1L, "ASRC1L"), 719ARIZONA_MUX_WIDGETS(ASRC1L, "ASRC1L"),
643ARIZONA_MUX_WIDGETS(ASRC1R, "ASRC1R"), 720ARIZONA_MUX_WIDGETS(ASRC1R, "ASRC1R"),
644ARIZONA_MUX_WIDGETS(ASRC2L, "ASRC2L"), 721ARIZONA_MUX_WIDGETS(ASRC2L, "ASRC2L"),
@@ -689,6 +766,14 @@ SND_SOC_DAPM_OUTPUT("MICSUPP"),
689 { name, "AIF2RX2", "AIF2RX2" }, \ 766 { name, "AIF2RX2", "AIF2RX2" }, \
690 { name, "AIF3RX1", "AIF3RX1" }, \ 767 { name, "AIF3RX1", "AIF3RX1" }, \
691 { name, "AIF3RX2", "AIF3RX2" }, \ 768 { name, "AIF3RX2", "AIF3RX2" }, \
769 { name, "SLIMRX1", "SLIMRX1" }, \
770 { name, "SLIMRX2", "SLIMRX2" }, \
771 { name, "SLIMRX3", "SLIMRX3" }, \
772 { name, "SLIMRX4", "SLIMRX4" }, \
773 { name, "SLIMRX5", "SLIMRX5" }, \
774 { name, "SLIMRX6", "SLIMRX6" }, \
775 { name, "SLIMRX7", "SLIMRX7" }, \
776 { name, "SLIMRX8", "SLIMRX8" }, \
692 { name, "EQ1", "EQ1" }, \ 777 { name, "EQ1", "EQ1" }, \
693 { name, "EQ2", "EQ2" }, \ 778 { name, "EQ2", "EQ2" }, \
694 { name, "EQ3", "EQ3" }, \ 779 { name, "EQ3", "EQ3" }, \
@@ -776,13 +861,41 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
776 { "AIF3RX1", NULL, "AIF3 Playback" }, 861 { "AIF3RX1", NULL, "AIF3 Playback" },
777 { "AIF3RX2", NULL, "AIF3 Playback" }, 862 { "AIF3RX2", NULL, "AIF3 Playback" },
778 863
864 { "Slim1 Capture", NULL, "SLIMTX1" },
865 { "Slim1 Capture", NULL, "SLIMTX2" },
866 { "Slim1 Capture", NULL, "SLIMTX3" },
867 { "Slim1 Capture", NULL, "SLIMTX4" },
868
869 { "SLIMRX1", NULL, "Slim1 Playback" },
870 { "SLIMRX2", NULL, "Slim1 Playback" },
871 { "SLIMRX3", NULL, "Slim1 Playback" },
872 { "SLIMRX4", NULL, "Slim1 Playback" },
873
874 { "Slim2 Capture", NULL, "SLIMTX5" },
875 { "Slim2 Capture", NULL, "SLIMTX6" },
876
877 { "SLIMRX5", NULL, "Slim2 Playback" },
878 { "SLIMRX6", NULL, "Slim2 Playback" },
879
880 { "Slim3 Capture", NULL, "SLIMTX7" },
881 { "Slim3 Capture", NULL, "SLIMTX8" },
882
883 { "SLIMRX7", NULL, "Slim3 Playback" },
884 { "SLIMRX8", NULL, "Slim3 Playback" },
885
779 { "AIF1 Playback", NULL, "SYSCLK" }, 886 { "AIF1 Playback", NULL, "SYSCLK" },
780 { "AIF2 Playback", NULL, "SYSCLK" }, 887 { "AIF2 Playback", NULL, "SYSCLK" },
781 { "AIF3 Playback", NULL, "SYSCLK" }, 888 { "AIF3 Playback", NULL, "SYSCLK" },
889 { "Slim1 Playback", NULL, "SYSCLK" },
890 { "Slim2 Playback", NULL, "SYSCLK" },
891 { "Slim3 Playback", NULL, "SYSCLK" },
782 892
783 { "AIF1 Capture", NULL, "SYSCLK" }, 893 { "AIF1 Capture", NULL, "SYSCLK" },
784 { "AIF2 Capture", NULL, "SYSCLK" }, 894 { "AIF2 Capture", NULL, "SYSCLK" },
785 { "AIF3 Capture", NULL, "SYSCLK" }, 895 { "AIF3 Capture", NULL, "SYSCLK" },
896 { "Slim1 Capture", NULL, "SYSCLK" },
897 { "Slim2 Capture", NULL, "SYSCLK" },
898 { "Slim3 Capture", NULL, "SYSCLK" },
786 899
787 { "IN1L PGA", NULL, "IN1L" }, 900 { "IN1L PGA", NULL, "IN1L" },
788 { "IN1R PGA", NULL, "IN1R" }, 901 { "IN1R PGA", NULL, "IN1R" },
@@ -828,6 +941,15 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
828 ARIZONA_MIXER_ROUTES("AIF3TX1", "AIF3TX1"), 941 ARIZONA_MIXER_ROUTES("AIF3TX1", "AIF3TX1"),
829 ARIZONA_MIXER_ROUTES("AIF3TX2", "AIF3TX2"), 942 ARIZONA_MIXER_ROUTES("AIF3TX2", "AIF3TX2"),
830 943
944 ARIZONA_MIXER_ROUTES("SLIMTX1", "SLIMTX1"),
945 ARIZONA_MIXER_ROUTES("SLIMTX2", "SLIMTX2"),
946 ARIZONA_MIXER_ROUTES("SLIMTX3", "SLIMTX3"),
947 ARIZONA_MIXER_ROUTES("SLIMTX4", "SLIMTX4"),
948 ARIZONA_MIXER_ROUTES("SLIMTX5", "SLIMTX5"),
949 ARIZONA_MIXER_ROUTES("SLIMTX6", "SLIMTX6"),
950 ARIZONA_MIXER_ROUTES("SLIMTX7", "SLIMTX7"),
951 ARIZONA_MIXER_ROUTES("SLIMTX8", "SLIMTX8"),
952
831 ARIZONA_MIXER_ROUTES("EQ1", "EQ1"), 953 ARIZONA_MIXER_ROUTES("EQ1", "EQ1"),
832 ARIZONA_MIXER_ROUTES("EQ2", "EQ2"), 954 ARIZONA_MIXER_ROUTES("EQ2", "EQ2"),
833 ARIZONA_MIXER_ROUTES("EQ3", "EQ3"), 955 ARIZONA_MIXER_ROUTES("EQ3", "EQ3"),
@@ -962,6 +1084,63 @@ static struct snd_soc_dai_driver wm5110_dai[] = {
962 .ops = &arizona_dai_ops, 1084 .ops = &arizona_dai_ops,
963 .symmetric_rates = 1, 1085 .symmetric_rates = 1,
964 }, 1086 },
1087 {
1088 .name = "wm5110-slim1",
1089 .id = 4,
1090 .playback = {
1091 .stream_name = "Slim1 Playback",
1092 .channels_min = 1,
1093 .channels_max = 4,
1094 .rates = WM5110_RATES,
1095 .formats = WM5110_FORMATS,
1096 },
1097 .capture = {
1098 .stream_name = "Slim1 Capture",
1099 .channels_min = 1,
1100 .channels_max = 4,
1101 .rates = WM5110_RATES,
1102 .formats = WM5110_FORMATS,
1103 },
1104 .ops = &arizona_simple_dai_ops,
1105 },
1106 {
1107 .name = "wm5110-slim2",
1108 .id = 5,
1109 .playback = {
1110 .stream_name = "Slim2 Playback",
1111 .channels_min = 1,
1112 .channels_max = 2,
1113 .rates = WM5110_RATES,
1114 .formats = WM5110_FORMATS,
1115 },
1116 .capture = {
1117 .stream_name = "Slim2 Capture",
1118 .channels_min = 1,
1119 .channels_max = 2,
1120 .rates = WM5110_RATES,
1121 .formats = WM5110_FORMATS,
1122 },
1123 .ops = &arizona_simple_dai_ops,
1124 },
1125 {
1126 .name = "wm5110-slim3",
1127 .id = 6,
1128 .playback = {
1129 .stream_name = "Slim3 Playback",
1130 .channels_min = 1,
1131 .channels_max = 2,
1132 .rates = WM5110_RATES,
1133 .formats = WM5110_FORMATS,
1134 },
1135 .capture = {
1136 .stream_name = "Slim3 Capture",
1137 .channels_min = 1,
1138 .channels_max = 2,
1139 .rates = WM5110_RATES,
1140 .formats = WM5110_FORMATS,
1141 },
1142 .ops = &arizona_simple_dai_ops,
1143 },
965}; 1144};
966 1145
967static int wm5110_codec_probe(struct snd_soc_codec *codec) 1146static int wm5110_codec_probe(struct snd_soc_codec *codec)