Lines Matching +full:out +full:- +full:mono
1 // SPDX-License-Identifier: GPL-2.0+
259 * min : 0x11 (-54.0 dB)
261 * reserved : 0x00 - 0x0F
267 /* -54 dB to +15 dB */
268 0x11, 0x3f, TLV_DB_SCALE_ITEM(-5400, 150, 0)
273 /* -54dB to 15dB */
274 0x11, 0x3f, TLV_DB_SCALE_ITEM(-5400, 150, 0)
278 0x0, 0x2, TLV_DB_SCALE_ITEM(-1800, 0, 1),
279 /* -18dB to 6dB */
280 0x3, 0x7, TLV_DB_SCALE_ITEM(-1800, 600, 0)
285 /* -48dB to 21dB */
286 0x11, 0x3f, TLV_DB_SCALE_ITEM(-4800, 150, 0)
289 static const DECLARE_TLV_DB_SCALE(eq_gain_tlv, -1050, 150, 0);
290 static const DECLARE_TLV_DB_SCALE(adc_eq_master_gain_tlv, -1800, 600, 1);
291 static const DECLARE_TLV_DB_SCALE(dac_gain_tlv, -7725, 75, 0);
292 static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, -600, 600, 0);
293 static const DECLARE_TLV_DB_SCALE(aux2_vol_tlv, -600, 600, 0);
294 static const DECLARE_TLV_DB_SCALE(inpga_gain_tlv, -450, 150, 0);
331 if (ucontrol->value.integer.value[0]) { in da7210_put_alc_sw()
334 dev_dbg(component->dev, in da7210_put_alc_sw()
336 return -EINVAL; in da7210_put_alc_sw()
355 if (ucontrol->value.integer.value[0]) { in da7210_put_noise_sup_sw()
385 return -EINVAL; in da7210_put_noise_sup_sw()
399 SOC_SINGLE_TLV("Mono Playback Volume", DA7210_OUT2, 0, 0x7, 0,
504 /* Out Mixer Left */
513 /* Out Mixer Right */
522 /* Mono Mixer */
545 SND_SOC_DAPM_PGA("Aux2 Mono", DA7210_STARTUP3, 4, 1, NULL, 0),
572 SND_SOC_DAPM_MIXER("Out Mixer Left", SND_SOC_NOPM, 0, 0,
576 SND_SOC_DAPM_MIXER("Out Mixer Right", SND_SOC_NOPM, 0, 0,
580 SND_SOC_DAPM_MIXER("Mono Mixer", SND_SOC_NOPM, 0, 0,
590 SND_SOC_DAPM_PGA("Out2 Mono", DA7210_STARTUP2, 2, 1, NULL, 0),
610 {"Aux2 Mono", NULL, "AUX2"},
615 {"In Mixer Left", "Aux2 Switch", "Aux2 Mono"},
616 {"In Mixer Left", "Outmix Left Switch", "Out Mixer Left"},
621 {"In Mixer Right", "Aux2 Switch", "Aux2 Mono"},
622 {"In Mixer Right", "Outmix Right Switch", "Out Mixer Right"},
631 {"Out Mixer Left", "Aux1 Left Switch", "Aux1 Left"},
632 {"Out Mixer Left", "Aux2 Switch", "Aux2 Mono"},
633 {"Out Mixer Left", "INPGA Left Switch", "INPGA Left"},
634 {"Out Mixer Left", "INPGA Right Switch", "INPGA Right"},
635 {"Out Mixer Left", "DAC Left Switch", "DAC Left"},
637 {"Out Mixer Right", "Aux1 Right Switch", "Aux1 Right"},
638 {"Out Mixer Right", "Aux2 Switch", "Aux2 Mono"},
639 {"Out Mixer Right", "INPGA Right Switch", "INPGA Right"},
640 {"Out Mixer Right", "INPGA Left Switch", "INPGA Left"},
641 {"Out Mixer Right", "DAC Right Switch", "DAC Right"},
643 {"Mono Mixer", "INPGA Right Switch", "INPGA Right"},
644 {"Mono Mixer", "INPGA Left Switch", "INPGA Left"},
645 {"Mono Mixer", "Outmix Right Switch", "Out Mixer Right"},
646 {"Mono Mixer", "Outmix Left Switch", "Out Mixer Left"},
648 {"OUTPGA Left Enable", NULL, "Out Mixer Left"},
649 {"OUTPGA Right Enable", NULL, "Out Mixer Right"},
663 {"Out2 Mono", NULL, "Mono Mixer"},
664 {"OUT2", NULL, "Out2 Mono"},
758 struct snd_soc_component *component = dai->component; in da7210_hw_params()
786 return -EINVAL; in da7210_hw_params()
833 return -EINVAL; in da7210_hw_params()
841 if (da7210->mclk_rate && (da7210->mclk_rate != sysclk)) { in da7210_hw_params()
845 if (!da7210->master) { in da7210_hw_params()
872 struct snd_soc_component *component = codec_dai->component; in da7210_set_dai_fmt()
882 return -EINVAL; in da7210_set_dai_fmt()
886 da7210->master = 1; in da7210_set_dai_fmt()
890 da7210->master = 0; in da7210_set_dai_fmt()
894 return -EINVAL; in da7210_set_dai_fmt()
912 return -EINVAL; in da7210_set_dai_fmt()
929 struct snd_soc_component *component = dai->component; in da7210_mute()
945 struct snd_soc_component *component = codec_dai->component; in da7210_set_dai_sysclk()
958 da7210->mclk_rate = freq; in da7210_set_dai_sysclk()
961 dev_err(codec_dai->dev, "Unsupported MCLK value %d\n", in da7210_set_dai_sysclk()
963 return -EINVAL; in da7210_set_dai_sysclk()
967 dev_err(codec_dai->dev, "Unknown clock source %d\n", clk_id); in da7210_set_dai_sysclk()
968 return -EINVAL; in da7210_set_dai_sysclk()
988 struct snd_soc_component *component = codec_dai->component; in da7210_set_dai_pll()
994 if (!da7210->master) in da7210_set_dai_pll()
1001 (da7210->master == da7210_pll_div[cnt].mode) && in da7210_set_dai_pll()
1029 dev_err(codec_dai->dev, "Unsupported PLL input frequency %d\n", fref); in da7210_set_dai_pll()
1030 return -EINVAL; in da7210_set_dai_pll()
1044 .name = "da7210-hifi",
1069 dev_info(component->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION); in da7210_probe()
1071 da7210->mclk_rate = 0; /* This will be set from set_sysclk() */ in da7210_probe()
1072 da7210->master = 0; /* This will be set from set_fmt() */ in da7210_probe()
1101 /* Enable Left and Right out PGA */ in da7210_probe()
1123 * Out of these two methods, the one using STANDBY bits is preferred in da7210_probe()
1126 * up/down in a controlled, pop-free manner. Also, as per application in da7210_probe()
1134 * - "Enable bit" of an IO or ADC/DAC is used to enable it in probe() in da7210_probe()
1135 * - "STANDBY bit" is controlled by DAPM in da7210_probe()
1138 /* Enable Line out amplifiers */ in da7210_probe()
1150 /* Set PLL Master clock range 10-20 MHz, enable PLL bypass */ in da7210_probe()
1160 dev_info(component->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION); in da7210_probe()
1184 /* Set PLL Master clock range 10-20 MHz */
1192 /* to re-lock */
1213 da7210 = devm_kzalloc(&i2c->dev, sizeof(struct da7210_priv), in da7210_i2c_probe()
1216 return -ENOMEM; in da7210_i2c_probe()
1220 da7210->regmap = devm_regmap_init_i2c(i2c, &da7210_regmap_config_i2c); in da7210_i2c_probe()
1221 if (IS_ERR(da7210->regmap)) { in da7210_i2c_probe()
1222 ret = PTR_ERR(da7210->regmap); in da7210_i2c_probe()
1223 dev_err(&i2c->dev, "regmap_init() failed: %d\n", ret); in da7210_i2c_probe()
1227 ret = regmap_register_patch(da7210->regmap, da7210_regmap_i2c_patch, in da7210_i2c_probe()
1230 dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); in da7210_i2c_probe()
1232 ret = devm_snd_soc_register_component(&i2c->dev, in da7210_i2c_probe()
1235 dev_err(&i2c->dev, "Failed to register component: %d\n", ret); in da7210_i2c_probe()
1265 /* Set PLL Master clock range 10-20 MHz */
1275 /* to re-lock */
1300 da7210 = devm_kzalloc(&spi->dev, sizeof(struct da7210_priv), in da7210_spi_probe()
1303 return -ENOMEM; in da7210_spi_probe()
1306 da7210->regmap = devm_regmap_init_spi(spi, &da7210_regmap_config_spi); in da7210_spi_probe()
1307 if (IS_ERR(da7210->regmap)) { in da7210_spi_probe()
1308 ret = PTR_ERR(da7210->regmap); in da7210_spi_probe()
1309 dev_err(&spi->dev, "Failed to register regmap: %d\n", ret); in da7210_spi_probe()
1313 ret = regmap_register_patch(da7210->regmap, da7210_regmap_spi_patch, in da7210_spi_probe()
1316 dev_warn(&spi->dev, "Failed to apply regmap patch: %d\n", ret); in da7210_spi_probe()
1318 ret = devm_snd_soc_register_component(&spi->dev, in da7210_spi_probe()