Lines Matching +full:adc +full:- +full:clk
1 // SPDX-License-Identifier: GPL-2.0
14 #include <linux/clk.h>
163 struct clk *clk; member
167 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(jz4725b_dac_tlv, -2250, 150, 0);
169 0, 11, TLV_DB_SCALE_ITEM(-2250, 0, 0),
170 12, 31, TLV_DB_SCALE_ITEM(-2250, 150, 0),
174 0, 11, TLV_DB_SCALE_ITEM(-3350, 200, 0),
175 12, 23, TLV_DB_SCALE_ITEM(-1050, 100, 0),
228 SOC_SINGLE("High-Pass Filter Capture Switch",
251 SOC_DAPM_ENUM("ADC Source Capture Route", jz4725b_codec_adc_src_enum);
266 struct snd_soc_component *codec = snd_soc_dapm_to_component(w->dapm); in jz4725b_out_stage_enable()
268 struct regmap *map = icdc->regmap; in jz4725b_out_stage_enable()
287 return -EINVAL; in jz4725b_out_stage_enable()
296 /* ADC */
297 SND_SOC_DAPM_ADC("ADC", "Capture",
300 SND_SOC_DAPM_MUX("ADC Source Capture Route", SND_SOC_NOPM, 0, 0,
326 SND_SOC_DAPM_MIXER("Mixer to ADC", JZ4725B_CODEC_REG_PMR1,
360 {"Mixer to ADC", NULL, "Mixer"},
361 {"ADC Source Capture Route", "Mixer", "Mixer to ADC"},
362 {"ADC Source Capture Route", "Line In", "Line In"},
363 {"ADC Source Capture Route", "Mic 1", "Mic 1"},
364 {"ADC Source Capture Route", "Mic 2", "Mic 2"},
365 {"ADC", NULL, "ADC Source Capture Route"},
377 struct regmap *map = icdc->regmap; in jz4725b_codec_set_bias_level()
406 struct regmap *map = icdc->regmap; in jz4725b_codec_dev_probe()
408 clk_prepare_enable(icdc->clk); in jz4725b_codec_dev_probe()
425 clk_disable_unprepare(icdc->clk); in jz4725b_codec_dev_remove()
451 struct jz_icdc *icdc = snd_soc_component_get_drvdata(dai->component); in jz4725b_codec_hw_params()
468 return -EINVAL; in jz4725b_codec_hw_params()
477 return -EINVAL; in jz4725b_codec_hw_params()
479 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in jz4725b_codec_hw_params()
480 regmap_update_bits(icdc->regmap, in jz4725b_codec_hw_params()
485 regmap_update_bits(icdc->regmap, in jz4725b_codec_hw_params()
490 regmap_update_bits(icdc->regmap, in jz4725b_codec_hw_params()
495 regmap_update_bits(icdc->regmap, in jz4725b_codec_hw_params()
512 .name = "jz4725b-hifi",
544 return readl_poll_timeout(icdc->base + ICDC_RGADW_OFFSET, reg, in jz4725b_codec_io_wait()
560 tmp = readl(icdc->base + ICDC_RGADW_OFFSET); in jz4725b_codec_reg_read()
563 writel(tmp, icdc->base + ICDC_RGADW_OFFSET); in jz4725b_codec_reg_read()
567 *val = readl(icdc->base + ICDC_RGDATA_OFFSET) & in jz4725b_codec_reg_read()
584 icdc->base + ICDC_RGADW_OFFSET); in jz4725b_codec_reg_write()
619 struct device *dev = &pdev->dev; in jz4725b_codec_probe()
625 return -ENOMEM; in jz4725b_codec_probe()
627 icdc->base = devm_platform_ioremap_resource(pdev, 0); in jz4725b_codec_probe()
628 if (IS_ERR(icdc->base)) in jz4725b_codec_probe()
629 return PTR_ERR(icdc->base); in jz4725b_codec_probe()
631 icdc->regmap = devm_regmap_init(dev, NULL, icdc, in jz4725b_codec_probe()
633 if (IS_ERR(icdc->regmap)) in jz4725b_codec_probe()
634 return PTR_ERR(icdc->regmap); in jz4725b_codec_probe()
636 icdc->clk = devm_clk_get(&pdev->dev, "aic"); in jz4725b_codec_probe()
637 if (IS_ERR(icdc->clk)) in jz4725b_codec_probe()
638 return PTR_ERR(icdc->clk); in jz4725b_codec_probe()
651 { .compatible = "ingenic,jz4725b-codec", },
659 .name = "jz4725b-codec",