Lines Matching +full:adc2 +full:-
1 // SPDX-License-Identifier: GPL-2.0
3 * ak4619.c -- Asahi Kasei ALSA SoC Audio driver
37 #define LADC2 0x08 /* ADC2 Lch Digital Volume */
38 #define RADC2 0x09 /* ADC2 Rch Digital Volume */
47 #define DAC_DEMP 0x13 /* DAC De-Emphasis Setting */
126 /* DAC De-Emphasis Setting */
165 * min : 0xFE : -115.0 dB
168 static const DECLARE_TLV_DB_SCALE(dac_tlv, -11550, 50, 1);
175 * min: 0x00 : -6.0 dB
177 static const DECLARE_TLV_DB_SCALE(mic_tlv, -600, 300, 0);
184 * min : 0xFE : -103.0 dB
187 static const DECLARE_TLV_DB_SCALE(adc_tlv, -10350, 50, 1);
199 "Sharp Roll-Off Filter",
200 "Slow Roll-Off Filter",
201 "Short Delay Sharp Roll-Off Filter",
202 "Short Delay Slow Roll-Off Filter",
209 /* DAC De-Emphasis Filter select */
219 "Sharp Roll-Off Filter",
220 "Slow Roll-Off Filter",
221 "Short Delay Sharp Roll-Off Filter",
222 "Short Delay Slow Roll-Off Filter"
237 if (!ak4619->deemph_en)
240 switch (ak4619->playback_rate) {
262 int deemph_en = ucontrol->value.integer.value[0];
270 return -EINVAL;
273 if (ak4619->deemph_en != deemph_en)
276 ak4619->deemph_en = deemph_en;
288 ucontrol->value.integer.value[0] = ak4619->deemph_en;
325 SOC_ENUM("DAC 1 De-Emphasis Filter", ak4619_dac_1_de_emp),
326 SOC_ENUM("DAC 2 De-Emphasis Filter", ak4619_dac_2_de_emp),
331 SOC_SINGLE_BOOL_EXT("Playback De-Emphasis Switch", 0, ak4619_get_deemph, ak4619_put_deemph),
340 "Differential", "Single-Ended1", "Single-Ended2", "Pseudo Differential"
378 SND_SOC_DAPM_ADC("ADC2", NULL, PWR_MGMT, 5, 0),
445 {"SDOUT2", NULL, "ADC2"},
450 {"ADC2", NULL, "Analog Input 2 Left MUX"},
451 {"ADC2", NULL, "Analog Input 2 Right MUX"},
454 {"Analog Input 1 Left MUX", "Single-Ended1", "MIC1L"},
455 {"Analog Input 1 Left MUX", "Single-Ended2", "MIC1L"},
459 {"Analog Input 1 Right MUX", "Single-Ended1", "MIC1R"},
460 {"Analog Input 1 Right MUX", "Single-Ended2", "MIC1R"},
464 {"Analog Input 2 Left MUX", "Single-Ended1", "MIC2L"},
465 {"Analog Input 2 Left MUX", "Single-Ended2", "MIC2L"},
469 {"Analog Input 2 Right MUX", "Single-Ended1", "MIC2R"},
470 {"Analog Input 2 Right MUX", "Single-Ended2", "MIC2R"},
536 struct snd_soc_component *component = dai->component;
541 bool is_play = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
560 return -EINVAL;
563 return -EINVAL;
568 fs = ak4619->sysclk / rate;
570 return -EINVAL;
593 return -EINVAL;
602 return -EINVAL;
609 return -EINVAL;
612 return -EINVAL;
620 ak4619->playback_rate = rate;
629 struct snd_soc_component *component = dai->component;
643 return -EINVAL;
663 return -EINVAL;
671 return -EINVAL;
687 struct snd_soc_component *component = codec_dai->component;
690 ak4619->sysclk = freq;
697 struct snd_soc_component *component = dai->component;
708 struct snd_pcm_hw_constraint_list *constraint = &ak4619->constraint;
730 * [8kHz - 48kHz] : 256fs, 384fs or 512fs
731 * [64kHz - 96kHz] : 256fs
736 fs = ak4619->sysclk / ak4619_sr[i];
746 case (ARRAY_SIZE(ak4619_sr) - 1):
747 case (ARRAY_SIZE(ak4619_sr) - 2):
759 constraint->list = ak4619_sr;
760 constraint->mask = ak4619_rate_mask;
761 constraint->count = ARRAY_SIZE(ak4619_sr);
772 struct snd_soc_component *component = dai->component;
775 ak4619_hw_constraints(ak4619, substream->runtime);
828 { .compatible = "asahi-kasei,ak4619", .data = &ak4619_regmap_cfg },
851 .name = "ak4619-hifi",
872 struct device *dev = &i2c->dev;
878 return -ENOMEM;
882 ak4619->regmap = devm_regmap_init_i2c(i2c, &ak4619_regmap_cfg);
883 if (IS_ERR(ak4619->regmap)) {
884 ret = PTR_ERR(ak4619->regmap);
902 .name = "ak4619-codec",