Lines Matching +full:15 +full:- +full:input

1 // SPDX-License-Identifier: GPL-2.0-or-later
20 #include <sound/soc-dapm.h>
73 #define AUDIO_C_RESET (1 << 15)
97 struct snd_soc_component *component = dai->component; in mc13783_pcm_hw_params_dac()
109 return -EINVAL; in mc13783_pcm_hw_params_dac()
116 struct snd_soc_component *component = dai->component; in mc13783_pcm_hw_params_codec()
128 return -EINVAL; in mc13783_pcm_hw_params_codec()
141 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in mc13783_pcm_hw_params_sync()
150 struct snd_soc_component *component = dai->component; in mc13783_set_fmt()
165 return -EINVAL; in mc13783_set_fmt()
192 return -EINVAL; in mc13783_set_fmt()
204 if (dai->id == MC13783_ID_STEREO_DAC) in mc13783_set_fmt_async()
233 -1,
235 -1, /* 12000000, invalid for voice codec */
236 -1, /* 3686400, invalid for voice codec */
244 struct snd_soc_component *component = dai->component; in mc13783_set_sysclk()
257 return -EINVAL; in mc13783_set_sysclk()
297 struct snd_soc_component *component = dai->component; in mc13783_set_tdm_slot_dac()
313 return -EINVAL; in mc13783_set_tdm_slot_dac()
330 return -EINVAL; in mc13783_set_tdm_slot_dac()
342 struct snd_soc_component *component = dai->component; in mc13783_set_tdm_slot_codec()
347 return -EINVAL; in mc13783_set_tdm_slot_codec()
350 return -EINVAL; in mc13783_set_tdm_slot_codec()
390 /* Virtual mux. The chip does the input selection automatically
391 * as soon as we enable one input. */
449 SOC_DAPM_SINGLE("Switch", MC13783_AUDIO_RX0, 15, 1, 0);
452 /* Input */
468 SND_SOC_DAPM_MUX("PGA Left Input Mux", SND_SOC_NOPM, 0, 0,
470 SND_SOC_DAPM_MUX("PGA Right Input Mux", SND_SOC_NOPM, 0, 0,
479 SND_SOC_DAPM_PGA("PGA Left Input", SND_SOC_NOPM, 0, 0, NULL, 0),
480 SND_SOC_DAPM_PGA("PGA Right Input", SND_SOC_NOPM, 0, 0, NULL, 0),
483 SND_SOC_DAPM_SUPPLY("ADC_Reset", MC13783_AUDIO_CODEC, 15, 0, NULL, 0),
491 SND_SOC_DAPM_SUPPLY("DAC_Reset", MC13783_AUDIO_DAC, 15, 0, NULL, 0),
512 SND_SOC_DAPM_SWITCH("Line out Amp Right", MC13783_AUDIO_RX0, 15, 0,
519 /* Input */
525 { "PGA Left Input Mux", "MC1L", "MC1L Amp" },
526 { "PGA Left Input Mux", "RXINL", "RXINL"},
527 { "PGA Right Input Mux", "MC1R", "MC1R Amp" },
528 { "PGA Right Input Mux", "MC2", "MC2 Amp"},
529 { "PGA Right Input Mux", "TXIN", "TXIN Amp"},
530 { "PGA Right Input Mux", "RXINR", "RXINR"},
532 { "PGA Left Input", NULL, "PGA Left Input Mux"},
533 { "PGA Right Input", NULL, "PGA Right Input Mux"},
535 { "ADC", NULL, "PGA Left Input"},
536 { "ADC", NULL, "PGA Right Input"},
572 SOC_SINGLE("PCM Playback Volume", MC13783_AUDIO_RX1, 6, 15, 0),
580 SOC_DOUBLE("Line out Amp Switch", MC13783_AUDIO_RX0, 16, 15, 1, 0),
585 SOC_SINGLE("CODEC Capture Volume", MC13783_AUDIO_RX1, 1, 15, 0),
588 SOC_SINGLE("Line in Capture Volume", MC13783_AUDIO_RX1, 12, 15, 0),
600 dev_get_regmap(component->dev->parent, NULL)); in mc13783_probe()
603 mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_RX0, 0x25893); in mc13783_probe()
604 mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_RX1, 0x00d35A); in mc13783_probe()
605 mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_TX, 0x420000); in mc13783_probe()
606 mc13xxx_reg_write(priv->mc13xxx, MC13783_SSI_NETWORK, 0x013060); in mc13783_probe()
607 mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_CODEC, 0x180027); in mc13783_probe()
608 mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_DAC, 0x0e0004); in mc13783_probe()
610 if (priv->adc_ssi_port == MC13783_SSI1_PORT) in mc13783_probe()
611 mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_CODEC, in mc13783_probe()
614 mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_CODEC, in mc13783_probe()
617 if (priv->dac_ssi_port == MC13783_SSI1_PORT) in mc13783_probe()
618 mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC, in mc13783_probe()
621 mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC, in mc13783_probe()
632 mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_RX0, 0x3, 0); in mc13783_remove()
659 * (mc13783-hifi-playback and mc13783-hifi-capture). Using the same port
660 * forces us to use symmetric rates (mc13783-hifi).
664 .name = "mc13783-hifi-playback",
675 .name = "mc13783-hifi-capture",
697 .name = "mc13783-hifi",
735 struct mc13xxx_codec_platform_data *pdata = pdev->dev.platform_data; in mc13783_codec_probe()
739 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); in mc13783_codec_probe()
741 return -ENOMEM; in mc13783_codec_probe()
744 priv->adc_ssi_port = pdata->adc_ssi_port; in mc13783_codec_probe()
745 priv->dac_ssi_port = pdata->dac_ssi_port; in mc13783_codec_probe()
747 np = of_get_child_by_name(pdev->dev.parent->of_node, "codec"); in mc13783_codec_probe()
749 return -ENOSYS; in mc13783_codec_probe()
751 ret = of_property_read_u32(np, "adc-port", &priv->adc_ssi_port); in mc13783_codec_probe()
757 ret = of_property_read_u32(np, "dac-port", &priv->dac_ssi_port); in mc13783_codec_probe()
766 dev_set_drvdata(&pdev->dev, priv); in mc13783_codec_probe()
767 priv->mc13xxx = dev_get_drvdata(pdev->dev.parent); in mc13783_codec_probe()
769 if (priv->adc_ssi_port == priv->dac_ssi_port) in mc13783_codec_probe()
770 ret = devm_snd_soc_register_component(&pdev->dev, &soc_component_dev_mc13783, in mc13783_codec_probe()
773 ret = devm_snd_soc_register_component(&pdev->dev, &soc_component_dev_mc13783, in mc13783_codec_probe()
781 .name = "mc13783-codec",