Lines Matching +full:left +full:-

1 // SPDX-License-Identifier: GPL-2.0-or-later
58 /* Input - Gain, Select and Filter Registers */
71 /* Output - Gain, Select and Filter Registers */
288 0x0, 0x10, TLV_DB_SCALE_ITEM(-5400, 0, 0),
289 /* -54dB to 15dB */
290 0x11, 0x3f, TLV_DB_SCALE_ITEM(-5400, 150, 0)
295 /* -78dB to 12dB */
296 0x08, 0x7f, TLV_DB_SCALE_ITEM(-7800, 75, 0)
305 static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, -600, 600, 0);
306 static const DECLARE_TLV_DB_SCALE(mixin_gain_tlv, -450, 150, 0);
307 static const DECLARE_TLV_DB_SCALE(eq_gain_tlv, -1050, 150, 0);
308 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -5700, 100, 0);
309 static const DECLARE_TLV_DB_SCALE(lineout_vol_tlv, -4800, 100, 0);
310 static const DECLARE_TLV_DB_SCALE(alc_threshold_tlv, -9450, 150, 0);
382 "ADC output left", "ADC output right", "AIF input left",
392 /* MIC PGA Left source select */
457 /* Select the left or right channel and capture data */ in da9055_get_alc_data()
483 if (ucontrol->value.integer.value[0]) { in da9055_put_alc_sw()
493 /* Mute Mic PGA Left and Right */ in da9055_put_alc_sw()
503 /* Enable ADC Left and Right */ in da9055_put_alc_sw()
509 /* Calculate average for Left and Right data */ in da9055_put_alc_sw()
510 /* Left Data */ in da9055_put_alc_sw()
518 offset_l = -avg_left_data; in da9055_put_alc_sw()
519 offset_r = -avg_right_data; in da9055_put_alc_sw()
641 SOC_SINGLE("DAC Left Invert", DA9055_DIG_CTRL, 3, 1, 0),
691 /* Mic PGA Left Source */
699 /* In Mixer Left */
701 SOC_DAPM_SINGLE("Aux Left Switch", DA9055_MIXIN_L_SELECT, 0, 1, 0),
702 SOC_DAPM_SINGLE("Mic Left Switch", DA9055_MIXIN_L_SELECT, 1, 1, 0),
710 SOC_DAPM_SINGLE("Mic Left Switch", DA9055_MIXIN_R_SELECT, 2, 1, 0),
711 SOC_DAPM_SINGLE("Mixin Left Switch", DA9055_MIXIN_R_SELECT, 3, 1, 0),
714 /* DAC Left Source */
722 /* Out Mixer Left */
724 SOC_DAPM_SINGLE("Aux Left Switch", DA9055_MIXOUT_L_SELECT, 0, 1, 0),
725 SOC_DAPM_SINGLE("Mixin Left Switch", DA9055_MIXOUT_L_SELECT, 1, 1, 0),
727 SOC_DAPM_SINGLE("DAC Left Switch", DA9055_MIXOUT_L_SELECT, 3, 1, 0),
728 SOC_DAPM_SINGLE("Aux Left Invert Switch", DA9055_MIXOUT_L_SELECT,
730 SOC_DAPM_SINGLE("Mixin Left Invert Switch", DA9055_MIXOUT_L_SELECT,
740 SOC_DAPM_SINGLE("Mixin Left Switch", DA9055_MIXOUT_R_SELECT, 2, 1, 0),
746 SOC_DAPM_SINGLE("Mixin Left Invert Switch", DA9055_MIXOUT_R_SELECT,
772 SND_SOC_DAPM_MUX("Mic Left Source", SND_SOC_NOPM, 0, 0,
778 SND_SOC_DAPM_PGA("Mic Left", DA9055_MIC_L_CTRL, 7, 0, NULL, 0),
780 SND_SOC_DAPM_PGA("Aux Left", DA9055_AUX_L_CTRL, 7, 0, NULL, 0),
782 SND_SOC_DAPM_PGA("MIXIN Left", DA9055_MIXIN_L_CTRL, 7, 0, NULL, 0),
790 SND_SOC_DAPM_MIXER("In Mixer Left", SND_SOC_NOPM, 0, 0,
798 SND_SOC_DAPM_ADC("ADC Left", "Capture", DA9055_ADC_L_CTRL, 7, 0),
804 SND_SOC_DAPM_MUX("DAC Left Source", SND_SOC_NOPM, 0, 0,
810 SND_SOC_DAPM_AIF_IN("AIFIN Left", "Playback", 0, SND_SOC_NOPM, 0, 0),
814 SND_SOC_DAPM_DAC("DAC Left", "Playback", DA9055_DAC_L_CTRL, 7, 0),
818 SND_SOC_DAPM_MIXER("Out Mixer Left", SND_SOC_NOPM, 0, 0,
826 SND_SOC_DAPM_SWITCH("Headphone Left Enable", SND_SOC_NOPM, 0, 0,
834 SND_SOC_DAPM_PGA("MIXOUT Left", DA9055_MIXOUT_L_CTRL, 7, 0, NULL, 0),
837 SND_SOC_DAPM_PGA("Headphone Left", DA9055_HP_L_CTRL, 7, 0, NULL, 0),
851 {"Mic Left Source", "MIC1_P_N", "MIC1"},
852 {"Mic Left Source", "MIC1_P", "MIC1"},
853 {"Mic Left Source", "MIC1_N", "MIC1"},
854 {"Mic Left Source", "MIC2_L", "MIC2"},
860 {"Mic Left", NULL, "Mic Left Source"},
863 {"Aux Left", NULL, "AUXL"},
866 {"In Mixer Left", "Mic Left Switch", "Mic Left"},
867 {"In Mixer Left", "Mic Right Switch", "Mic Right"},
868 {"In Mixer Left", "Aux Left Switch", "Aux Left"},
871 {"In Mixer Right", "Mic Left Switch", "Mic Left"},
873 {"In Mixer Right", "Mixin Left Switch", "MIXIN Left"},
875 {"MIXIN Left", NULL, "In Mixer Left"},
876 {"ADC Left", NULL, "MIXIN Left"},
881 {"ADC Left", NULL, "AIF"},
885 {"AIFIN Left", NULL, "AIF"},
888 {"DAC Left Source", "ADC output left", "ADC Left"},
889 {"DAC Left Source", "ADC output right", "ADC Right"},
890 {"DAC Left Source", "AIF input left", "AIFIN Left"},
891 {"DAC Left Source", "AIF input right", "AIFIN Right"},
893 {"DAC Right Source", "ADC output left", "ADC Left"},
895 {"DAC Right Source", "AIF input left", "AIFIN Left"},
898 {"DAC Left", NULL, "DAC Left Source"},
901 {"Out Mixer Left", "Aux Left Switch", "Aux Left"},
902 {"Out Mixer Left", "Mixin Left Switch", "MIXIN Left"},
903 {"Out Mixer Left", "Mixin Right Switch", "MIXIN Right"},
904 {"Out Mixer Left", "Aux Left Invert Switch", "Aux Left"},
905 {"Out Mixer Left", "Mixin Left Invert Switch", "MIXIN Left"},
906 {"Out Mixer Left", "Mixin Right Invert Switch", "MIXIN Right"},
907 {"Out Mixer Left", "DAC Left Switch", "DAC Left"},
911 {"Out Mixer Right", "Mixin Left Switch", "MIXIN Left"},
914 {"Out Mixer Right", "Mixin Left Invert Switch", "MIXIN Left"},
917 {"MIXOUT Left", NULL, "Out Mixer Left"},
918 {"Headphone Left Enable", "Switch", "MIXOUT Left"},
919 {"Headphone Left", NULL, "Headphone Left Enable"},
920 {"Headphone Left", NULL, "Charge Pump"},
921 {"HPL", NULL, "Headphone Left"},
1050 struct snd_soc_component *component = dai->component; in da9055_hw_params()
1069 return -EINVAL; in da9055_hw_params()
1118 return -EINVAL; in da9055_hw_params()
1121 if (da9055->mclk_rate) { in da9055_hw_params()
1126 * Non-PLL Mode in da9055_hw_params()
1135 if (da9055->mclk_rate && (da9055->mclk_rate != sysclk)) { in da9055_hw_params()
1137 if (!da9055->master) { in da9055_hw_params()
1158 struct snd_soc_component *component = codec_dai->component; in da9055_set_dai_fmt()
1174 return -EINVAL; in da9055_set_dai_fmt()
1179 (da9055->master != mode)) in da9055_set_dai_fmt()
1180 return -EINVAL; in da9055_set_dai_fmt()
1182 da9055->master = mode; in da9055_set_dai_fmt()
1199 return -EINVAL; in da9055_set_dai_fmt()
1215 struct snd_soc_component *component = dai->component; in da9055_mute()
1238 struct snd_soc_component *component = codec_dai->component; in da9055_set_dai_sysclk()
1253 da9055->mclk_rate = freq; in da9055_set_dai_sysclk()
1256 dev_err(codec_dai->dev, "Unsupported MCLK value %d\n", in da9055_set_dai_sysclk()
1258 return -EINVAL; in da9055_set_dai_sysclk()
1262 dev_err(codec_dai->dev, "Unknown clock source %d\n", clk_id); in da9055_set_dai_sysclk()
1263 return -EINVAL; in da9055_set_dai_sysclk()
1281 struct snd_soc_component *component = codec_dai->component; in da9055_set_dai_pll()
1290 if (!da9055->master && (fout != 2822400)) in da9055_set_dai_pll()
1297 (da9055->master == da9055_pll_div[cnt].mode) && in da9055_set_dai_pll()
1316 dev_err(codec_dai->dev, "Error in setting up PLL\n"); in da9055_set_dai_pll()
1317 return -EINVAL; in da9055_set_dai_pll()
1331 .name = "da9055-hifi",
1425 if (da9055->pdata) { in da9055_probe()
1427 if (da9055->pdata->micbias_source) { in da9055_probe()
1436 switch (da9055->pdata->micbias) { in da9055_probe()
1443 (da9055->pdata->micbias) << 4); in da9055_probe()
1477 struct da9055_platform_data *pdata = dev_get_platdata(&i2c->dev); in da9055_i2c_probe()
1480 da9055 = devm_kzalloc(&i2c->dev, sizeof(struct da9055_priv), in da9055_i2c_probe()
1483 return -ENOMEM; in da9055_i2c_probe()
1486 da9055->pdata = pdata; in da9055_i2c_probe()
1490 da9055->regmap = devm_regmap_init_i2c(i2c, &da9055_regmap_config); in da9055_i2c_probe()
1491 if (IS_ERR(da9055->regmap)) { in da9055_i2c_probe()
1492 ret = PTR_ERR(da9055->regmap); in da9055_i2c_probe()
1493 dev_err(&i2c->dev, "regmap_init() failed: %d\n", ret); in da9055_i2c_probe()
1497 ret = devm_snd_soc_register_component(&i2c->dev, in da9055_i2c_probe()
1500 dev_err(&i2c->dev, "Failed to register da9055 component: %d\n", in da9055_i2c_probe()
1514 { "da9055-codec" },
1521 { .compatible = "dlg,da9055-codec", },
1530 .name = "da9055-codec",