Lines Matching +full:spi +full:- +full:mux

1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8750.c -- WM8750 ALSA SoC audio driver
20 #include <linux/spi/spi.h>
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]),
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 */
247 /* Left Line Mux */
251 /* Right Line Mux */
255 /* Left PGA Mux */
259 /* Right PGA Mux */
263 /* Out 3 Mux */
267 /* Differential Mux */
271 /* Mono ADC Mux */
297 SND_SOC_DAPM_MUX("Left PGA Mux", WM8750_PWR1, 5, 0,
299 SND_SOC_DAPM_MUX("Right PGA Mux", WM8750_PWR1, 4, 0,
301 SND_SOC_DAPM_MUX("Left Line Mux", SND_SOC_NOPM, 0, 0,
303 SND_SOC_DAPM_MUX("Right Line Mux", SND_SOC_NOPM, 0, 0,
306 SND_SOC_DAPM_MUX("Out3 Mux", SND_SOC_NOPM, 0, 0, &wm8750_out3_controls),
310 SND_SOC_DAPM_MUX("Differential Mux", SND_SOC_NOPM, 0, 0,
312 SND_SOC_DAPM_MUX("Left ADC Mux", SND_SOC_NOPM, 0, 0,
314 SND_SOC_DAPM_MUX("Right ADC Mux", SND_SOC_NOPM, 0, 0,
336 {"Left Mixer", "Left Bypass Switch", "Left Line Mux"},
338 {"Left Mixer", "Right Bypass Switch", "Right Line Mux"},
342 {"Right Mixer", "Left Bypass Switch", "Left Line Mux"},
344 {"Right Mixer", "Right Bypass Switch", "Right Line Mux"},
364 {"Mono Mixer", "Left Bypass Switch", "Left Line Mux"},
366 {"Mono Mixer", "Right Bypass Switch", "Right Line Mux"},
373 {"Out3 Mux", "VREF", "VREF"},
374 {"Out3 Mux", "ROUT1 + Vol", "ROUT1"},
375 {"Out3 Mux", "ROUT1", "Right Mixer"},
376 {"Out3 Mux", "MonoOut", "MONO1"},
377 {"Out 3", NULL, "Out3 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"},
387 /* Right Line Mux */
388 {"Right Line Mux", "Line 1", "RINPUT1"},
389 {"Right Line Mux", "Line 2", "RINPUT2"},
390 {"Right Line Mux", "Line 3", "RINPUT3"},
391 {"Right Line Mux", "PGA", "Right PGA Mux"},
392 {"Right 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"},
400 /* Right PGA Mux */
401 {"Right PGA Mux", "Line 1", "RINPUT1"},
402 {"Right PGA Mux", "Line 2", "RINPUT2"},
403 {"Right PGA Mux", "Line 3", "RINPUT3"},
404 {"Right PGA Mux", "Differential", "Differential Mux"},
406 /* Differential Mux */
407 {"Differential Mux", "Line 1", "LINPUT1"},
408 {"Differential Mux", "Line 1", "RINPUT1"},
409 {"Differential Mux", "Line 2", "LINPUT2"},
410 {"Differential Mux", "Line 2", "RINPUT2"},
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"},
417 /* Right ADC Mux */
418 {"Right ADC Mux", "Stereo", "Right PGA Mux"},
419 {"Right ADC Mux", "Mono (Right)", "Right PGA Mux"},
420 {"Right ADC Mux", "Digital Mono", "Right PGA Mux"},
423 {"Left ADC", NULL, "Left ADC Mux"},
424 {"Right ADC", NULL, "Right 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",
742 static int wm8750_spi_probe(struct spi_device *spi) in wm8750_spi_probe() argument
748 wm8750 = devm_kzalloc(&spi->dev, sizeof(struct wm8750_priv), in wm8750_spi_probe()
751 return -ENOMEM; in wm8750_spi_probe()
753 regmap = devm_regmap_init_spi(spi, &wm8750_regmap); in wm8750_spi_probe()
757 spi_set_drvdata(spi, wm8750); in wm8750_spi_probe()
759 ret = devm_snd_soc_register_component(&spi->dev, in wm8750_spi_probe()
769 MODULE_DEVICE_TABLE(spi, wm8750_spi_ids);
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()
834 printk(KERN_ERR "Failed to register wm8750 SPI driver: %d\n", in wm8750_modinit()