Lines Matching +full:mic +full:- +full:min +full:- +full:freq
1 // SPDX-License-Identifier: GPL-2.0-only
61 static const char *rec_src_text[] = { "Line", "Mic" };
73 static const DECLARE_TLV_DB_SCALE(out_gain_tlv, -12100, 100, 0);
74 static const DECLARE_TLV_DB_SCALE(input_gain_tlv, -1725, 75, 0);
75 static const DECLARE_TLV_DB_SCALE(sidetone_vol_tlv, -1800, 300, 0);
83 val = (ucontrol->value.integer.value[0] & 0x07); in snd_soc_tlv320aic23_put_volsw()
86 * 000 = -6db in snd_soc_tlv320aic23_put_volsw()
87 * 001 = -9db in snd_soc_tlv320aic23_put_volsw()
88 * 010 = -12db in snd_soc_tlv320aic23_put_volsw()
89 * 011 = -18db (Min) in snd_soc_tlv320aic23_put_volsw()
92 val = (val >= 4) ? 4 : (3 - val); in snd_soc_tlv320aic23_put_volsw()
108 val = (val >= 4) ? 4 : (3 - val); in snd_soc_tlv320aic23_get_volsw()
109 ucontrol->value.integer.value[0] = val; in snd_soc_tlv320aic23_get_volsw()
122 SOC_SINGLE("Mic Input Switch", TLV320AIC23_ANLG, 1, 1, 1),
123 SOC_SINGLE("Mic Booster Switch", TLV320AIC23_ANLG, 0, 1, 0),
127 SOC_ENUM("Playback De-emphasis", tlv320aic23_deemph),
130 /* PGA Mixer controls for Line and Mic switch */
133 SOC_DAPM_SINGLE("Mic Sidetone Switch", TLV320AIC23_ANLG, 5, 1, 0),
146 SND_SOC_DAPM_PGA("Mic Input", TLV320AIC23_PWR, 1, 1, NULL, 0),
163 {"Output Mixer", "Mic Sidetone Switch", "Mic Input"},
174 {"Mic Input", NULL, "MICIN"},
178 {"Capture Source", "Mic", "Mic Input"},
201 * Normal BOSR 0-256/2 = 128, 1-384/2 = 192
202 * USB BOSR 0-250/2 = 125, 1-272/2 = 136
210 LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/
211 LOWER_GROUP, /* Usb, bosr - 0*/
212 LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/
213 UPPER_GROUP, /* Usb, bosr - 1*/
234 int diff_adc = need_adc - adc; in get_score()
235 int diff_dac = need_dac - dac; in get_score()
244 int best_i = -1; in find_rate()
245 int best_j = -1; in find_rate()
253 * rates given are +/- 1/32 in find_rate()
255 adc_l = need_adc - (need_adc >> 5); in find_rate()
257 dac_l = need_dac - (need_dac >> 5); in find_rate()
319 return -EINVAL; in set_sample_rate_control()
337 struct snd_soc_component *component = dai->component; in tlv320aic23_hw_params()
341 u32 sample_rate_adc = aic23->requested_adc; in tlv320aic23_hw_params()
342 u32 sample_rate_dac = aic23->requested_dac; in tlv320aic23_hw_params()
345 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in tlv320aic23_hw_params()
346 aic23->requested_dac = sample_rate_dac = sample_rate; in tlv320aic23_hw_params()
350 aic23->requested_adc = sample_rate_adc = sample_rate; in tlv320aic23_hw_params()
354 ret = set_sample_rate_control(component, aic23->mclk, sample_rate_adc, in tlv320aic23_hw_params()
382 struct snd_soc_component *component = dai->component; in tlv320aic23_pcm_prepare()
393 struct snd_soc_component *component = dai->component; in tlv320aic23_shutdown()
401 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in tlv320aic23_shutdown()
402 aic23->requested_dac = 0; in tlv320aic23_shutdown()
404 aic23->requested_adc = 0; in tlv320aic23_shutdown()
409 struct snd_soc_component *component = dai->component; in tlv320aic23_mute()
427 struct snd_soc_component *component = codec_dai->component; in tlv320aic23_set_dai_fmt()
440 return -EINVAL; in tlv320aic23_set_dai_fmt()
461 return -EINVAL; in tlv320aic23_set_dai_fmt()
471 int clk_id, unsigned int freq, int dir) in tlv320aic23_set_dai_sysclk() argument
474 aic23->mclk = freq; in tlv320aic23_set_dai_sysclk()
521 .name = "tlv320aic23-hifi",
540 regcache_mark_dirty(aic23->regmap); in tlv320aic23_resume()
541 regcache_sync(aic23->regmap); in tlv320aic23_resume()
600 return -ENOMEM; in tlv320aic23_probe()
602 aic23->regmap = regmap; in tlv320aic23_probe()