aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/max9877.c39
1 files changed, 37 insertions, 2 deletions
diff --git a/sound/soc/codecs/max9877.c b/sound/soc/codecs/max9877.c
index 8505b401d3c4..29549cdbf4c1 100644
--- a/sound/soc/codecs/max9877.c
+++ b/sound/soc/codecs/max9877.c
@@ -87,15 +87,50 @@ static const struct snd_kcontrol_new max9877_controls[] = {
87 MAX9877_INPUT_MODE, 6, 1, 0), 87 MAX9877_INPUT_MODE, 6, 1, 0),
88 SOC_SINGLE("MAX9877 Bypass Mode Switch", 88 SOC_SINGLE("MAX9877 Bypass Mode Switch",
89 MAX9877_OUTPUT_MODE, 6, 1, 0), 89 MAX9877_OUTPUT_MODE, 6, 1, 0),
90 SOC_SINGLE("MAX9877 Shutdown Mode Switch",
91 MAX9877_OUTPUT_MODE, 7, 1, 1),
92 SOC_ENUM("MAX9877 Output Mode", max9877_enum[0]), 90 SOC_ENUM("MAX9877 Output Mode", max9877_enum[0]),
93 SOC_ENUM("MAX9877 Oscillator Mode", max9877_enum[1]), 91 SOC_ENUM("MAX9877 Oscillator Mode", max9877_enum[1]),
94}; 92};
95 93
94static const struct snd_soc_dapm_widget max9877_dapm_widgets[] = {
95SND_SOC_DAPM_INPUT("INA1"),
96SND_SOC_DAPM_INPUT("INA2"),
97SND_SOC_DAPM_INPUT("INB1"),
98SND_SOC_DAPM_INPUT("INB2"),
99SND_SOC_DAPM_INPUT("RXIN+"),
100SND_SOC_DAPM_INPUT("RXIN-"),
101
102SND_SOC_DAPM_PGA("SHDN", MAX9877_OUTPUT_MODE, 7, 1, NULL, 0),
103
104SND_SOC_DAPM_OUTPUT("OUT+"),
105SND_SOC_DAPM_OUTPUT("OUT-"),
106SND_SOC_DAPM_OUTPUT("HPL"),
107SND_SOC_DAPM_OUTPUT("HPR"),
108};
109
110static const struct snd_soc_dapm_route max9877_dapm_routes[] = {
111 { "SHDN", NULL, "INA1" },
112 { "SHDN", NULL, "INA2" },
113 { "SHDN", NULL, "INB1" },
114 { "SHDN", NULL, "INB2" },
115
116 { "OUT+", NULL, "RXIN+" },
117 { "OUT+", NULL, "SHDN" },
118
119 { "OUT-", NULL, "SHDN" },
120 { "OUT-", NULL, "RXIN-" },
121
122 { "HPL", NULL, "SHDN" },
123 { "HPR", NULL, "SHDN" },
124};
125
96static const struct snd_soc_codec_driver max9877_codec = { 126static const struct snd_soc_codec_driver max9877_codec = {
97 .controls = max9877_controls, 127 .controls = max9877_controls,
98 .num_controls = ARRAY_SIZE(max9877_controls), 128 .num_controls = ARRAY_SIZE(max9877_controls),
129
130 .dapm_widgets = max9877_dapm_widgets,
131 .num_dapm_widgets = ARRAY_SIZE(max9877_dapm_widgets),
132 .dapm_routes = max9877_dapm_routes,
133 .num_dapm_routes = ARRAY_SIZE(max9877_dapm_routes),
99}; 134};
100 135
101static const struct regmap_config max9877_regmap = { 136static const struct regmap_config max9877_regmap = {