Lines Matching +full:left +full:-
1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8750.c -- WM8750 ALSA SoC audio driver
97 static const char *wm8750_alc_func[] = {"Off", "Right", "Left", "Stereo"};
110 static const char *wm8750_mono_mux[] = {"Stereo", "Mono (Left)",
145 SOC_ENUM("Playback De-emphasis", wm8750_enum[15]),
158 SOC_ENUM("Treble Cut-off", wm8750_enum[2]),
162 SOC_ENUM("3D Lower Cut-off", wm8750_enum[3]),
163 SOC_ENUM("3D Upper Cut-off", wm8750_enum[4]),
177 SOC_SINGLE("Left ADC Capture Volume", WM8750_LADC, 0, 255, 0),
186 /* ADCDAC Bit 0 - ADCHPD */
187 /* ADCDAC Bit 4 - HPOR */
188 /* ADCTL1 Bit 2,3 - DATSEL */
189 /* ADCTL1 Bit 4,5 - DMONOMIX */
190 /* ADCTL1 Bit 6,7 - VSEL */
191 /* ADCTL2 Bit 2 - LRCM */
192 /* ADCTL2 Bit 3 - TRI */
193 /* ADCTL3 Bit 5 - HPFLREN */
194 /* ADCTL3 Bit 6 - VROI */
195 /* ADCTL3 Bit 7,8 - ADCLRM */
196 /* ADCIN Bit 4 - LDCM */
197 /* ADCIN Bit 5 - RDCM */
201 SOC_DOUBLE_R("Bypass Left Playback Volume", WM8750_LOUTM1,
223 /* Left Mixer */
226 SOC_DAPM_SINGLE("Left Bypass Switch", WM8750_LOUTM1, 7, 1, 0),
233 SOC_DAPM_SINGLE("Left Playback Switch", WM8750_ROUTM1, 8, 1, 0),
234 SOC_DAPM_SINGLE("Left Bypass Switch", WM8750_ROUTM1, 7, 1, 0),
241 SOC_DAPM_SINGLE("Left Playback Switch", WM8750_MOUTM1, 8, 1, 0),
242 SOC_DAPM_SINGLE("Left Bypass Switch", WM8750_MOUTM1, 7, 1, 0),
247 /* Left Line Mux */
255 /* Left PGA Mux */
276 SND_SOC_DAPM_MIXER("Left Mixer", SND_SOC_NOPM, 0, 0,
287 SND_SOC_DAPM_PGA("Left Out 2", WM8750_PWR2, 4, 0, NULL, 0),
289 SND_SOC_DAPM_PGA("Left Out 1", WM8750_PWR2, 6, 0, NULL, 0),
291 SND_SOC_DAPM_DAC("Left DAC", "Left Playback", WM8750_PWR2, 8, 0),
295 SND_SOC_DAPM_ADC("Left ADC", "Left Capture", WM8750_PWR1, 3, 0),
297 SND_SOC_DAPM_MUX("Left PGA Mux", WM8750_PWR1, 5, 0,
301 SND_SOC_DAPM_MUX("Left Line Mux", SND_SOC_NOPM, 0, 0,
312 SND_SOC_DAPM_MUX("Left ADC Mux", SND_SOC_NOPM, 0, 0,
334 /* left mixer */
335 {"Left Mixer", "Playback Switch", "Left DAC"},
336 {"Left Mixer", "Left Bypass Switch", "Left Line Mux"},
337 {"Left Mixer", "Right Playback Switch", "Right DAC"},
338 {"Left Mixer", "Right Bypass Switch", "Right Line Mux"},
341 {"Right Mixer", "Left Playback Switch", "Left DAC"},
342 {"Right Mixer", "Left Bypass Switch", "Left Line Mux"},
346 /* left out 1 */
347 {"Left Out 1", NULL, "Left Mixer"},
348 {"LOUT1", NULL, "Left Out 1"},
350 /* left out 2 */
351 {"Left Out 2", NULL, "Left Mixer"},
352 {"LOUT2", NULL, "Left Out 2"},
363 {"Mono Mixer", "Left Playback Switch", "Left DAC"},
364 {"Mono Mixer", "Left Bypass Switch", "Left Line Mux"},
380 /* Left Line Mux */
381 {"Left Line Mux", "Line 1", "LINPUT1"},
382 {"Left Line Mux", "Line 2", "LINPUT2"},
383 {"Left Line Mux", "Line 3", "LINPUT3"},
384 {"Left Line Mux", "PGA", "Left PGA Mux"},
385 {"Left Line Mux", "Differential", "Differential Mux"},
394 /* Left PGA Mux */
395 {"Left PGA Mux", "Line 1", "LINPUT1"},
396 {"Left PGA Mux", "Line 2", "LINPUT2"},
397 {"Left PGA Mux", "Line 3", "LINPUT3"},
398 {"Left PGA Mux", "Differential", "Differential Mux"},
412 /* Left ADC Mux */
413 {"Left ADC Mux", "Stereo", "Left PGA Mux"},
414 {"Left ADC Mux", "Mono (Left)", "Left PGA Mux"},
415 {"Left ADC Mux", "Digital Mono", "Left PGA Mux"},
423 {"Left ADC", NULL, "Left ADC Mux"},
496 return -EINVAL; in get_coeff()
502 struct snd_soc_component *component = codec_dai->component; in wm8750_set_dai_sysclk()
511 wm8750->sysclk = freq; in wm8750_set_dai_sysclk()
514 return -EINVAL; in wm8750_set_dai_sysclk()
520 struct snd_soc_component *component = codec_dai->component; in wm8750_set_dai_fmt()
531 return -EINVAL; in wm8750_set_dai_fmt()
551 return -EINVAL; in wm8750_set_dai_fmt()
568 return -EINVAL; in wm8750_set_dai_fmt()
579 struct snd_soc_component *component = dai->component; in wm8750_pcm_hw_params()
583 int coeff = get_coeff(wm8750->sysclk, params_rate(params)); in wm8750_pcm_hw_params()
611 struct snd_soc_component *component = dai->component; in wm8750_mute()
670 .name = "wm8750-hifi",
748 wm8750 = devm_kzalloc(&spi->dev, sizeof(struct wm8750_priv), in wm8750_spi_probe()
751 return -ENOMEM; in wm8750_spi_probe()
759 ret = devm_snd_soc_register_component(&spi->dev, in wm8750_spi_probe()
788 wm8750 = devm_kzalloc(&i2c->dev, sizeof(struct wm8750_priv), in wm8750_i2c_probe()
791 return -ENOMEM; in wm8750_i2c_probe()
799 ret = devm_snd_soc_register_component(&i2c->dev, in wm8750_i2c_probe()