Lines Matching +full:adc +full:- +full:freq
1 // SPDX-License-Identifier: GPL-2.0-or-later
20 #include <sound/soc-dapm.h>
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 */
241 int clk_id, unsigned int freq, int dir, in mc13783_set_sysclk() argument
244 struct snd_soc_component *component = dai->component; in mc13783_set_sysclk()
252 if (mc13783_sysclk[clk] == freq) in mc13783_set_sysclk()
257 return -EINVAL; in mc13783_set_sysclk()
270 int clk_id, unsigned int freq, int dir) in mc13783_set_sysclk_dac() argument
272 return mc13783_set_sysclk(dai, clk_id, freq, dir, MC13783_AUDIO_DAC); in mc13783_set_sysclk_dac()
276 int clk_id, unsigned int freq, int dir) in mc13783_set_sysclk_codec() argument
278 return mc13783_set_sysclk(dai, clk_id, freq, dir, MC13783_AUDIO_CODEC); in mc13783_set_sysclk_codec()
282 int clk_id, unsigned int freq, int dir) in mc13783_set_sysclk_sync() argument
286 ret = mc13783_set_sysclk(dai, clk_id, freq, dir, MC13783_AUDIO_DAC); in mc13783_set_sysclk_sync()
290 return mc13783_set_sysclk(dai, clk_id, freq, dir, MC13783_AUDIO_CODEC); in mc13783_set_sysclk_sync()
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()
482 SND_SOC_DAPM_ADC("ADC", "Capture", MC13783_AUDIO_CODEC, 11, 0),
535 { "ADC", NULL, "PGA Left Input"},
536 { "ADC", NULL, "PGA Right Input"},
537 { "ADC", NULL, "ADC_Reset"},
539 { "Voice CODEC PGA", "Voice CODEC Bypass", "ADC" },
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",