Lines Matching +full:in2 +full:-

1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8998.c -- ALSA SoC Audio driver for WM8998 codecs
41 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm8998_asrc_ev()
57 dev_warn(component->dev, in wm8998_asrc_ev()
60 return -EINVAL; in wm8998_asrc_ev()
64 dev_err(component->dev, in wm8998_asrc_ev()
67 return -EINVAL; in wm8998_asrc_ev()
77 val -= 0x8; in wm8998_asrc_ev()
81 dev_warn(component->dev, in wm8998_asrc_ev()
84 return -EINVAL; in wm8998_asrc_ev()
88 dev_err(component->dev, in wm8998_asrc_ev()
91 return -EINVAL; in wm8998_asrc_ev()
95 return -EINVAL; in wm8998_asrc_ev()
107 struct arizona *arizona = wm8998->core.arizona; in wm8998_inmux_put()
108 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; in wm8998_inmux_put()
113 mux = ucontrol->value.enumerated.item[0]; in wm8998_inmux_put()
115 return -EINVAL; in wm8998_inmux_put()
117 switch (e->reg) { in wm8998_inmux_put()
128 inmode = arizona->pdata.inmode[mode_index]; in wm8998_inmux_put()
141 change = snd_soc_component_update_bits(component, e->reg, in wm8998_inmux_put()
147 ucontrol->value.enumerated.item[0], in wm8998_inmux_put()
150 dev_err(arizona->dev, "Failed to update demux power state: %d\n", ret); in wm8998_inmux_put()
185 SOC_DAPM_ENUM_EXT("IN2 Mux", wm8998_in2mux_enum,
189 static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
190 static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
191 static DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);
204 SOC_ENUM("IN2 OSR", arizona_in_dmic_osr[1]),
210 SOC_SINGLE_RANGE_TLV("IN2 Volume", ARIZONA_IN2L_CONTROL,
219 SOC_SINGLE("IN2 HPF Switch", ARIZONA_IN2L_CONTROL,
226 SOC_SINGLE_TLV("IN2 Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_2L,
533 SND_SOC_DAPM_MUX("IN2 Mux", SND_SOC_NOPM, 0, 0, &wm8998_in2mux),
545 SND_SOC_DAPM_PGA_E("IN2 PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2L_ENA_SHIFT,
852 { name, "IN2L", "IN2 PGA" }, \
1020 { "IN2 Mux", "A", "IN2A" },
1021 { "IN2 Mux", "B", "IN2B" },
1025 { "IN2 PGA", NULL, "IN2 Mux" },
1153 .name = "wm8998-aif1",
1175 .name = "wm8998-aif2",
1197 .name = "wm8998-aif3",
1219 .name = "wm8998-slim1",
1238 .name = "wm8998-slim2",
1265 return arizona_set_fll(&wm8998->fll[0], source, Fref, Fout); in wm8998_set_fll()
1267 return arizona_set_fll(&wm8998->fll[1], source, Fref, Fout); in wm8998_set_fll()
1269 return arizona_set_fll_refclk(&wm8998->fll[0], source, Fref, in wm8998_set_fll()
1272 return arizona_set_fll_refclk(&wm8998->fll[1], source, Fref, in wm8998_set_fll()
1275 return -EINVAL; in wm8998_set_fll()
1283 struct arizona *arizona = priv->core.arizona; in wm8998_component_probe()
1286 arizona->dapm = dapm; in wm8998_component_probe()
1287 snd_soc_component_init_regmap(component, arizona->regmap); in wm8998_component_probe()
1304 priv->core.arizona->dapm = NULL; in wm8998_component_remove()
1339 struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); in wm8998_probe()
1343 wm8998 = devm_kzalloc(&pdev->dev, sizeof(struct wm8998_priv), in wm8998_probe()
1346 return -ENOMEM; in wm8998_probe()
1350 if (!dev_get_platdata(arizona->dev)) { in wm8998_probe()
1357 wm8998->core.arizona = arizona; in wm8998_probe()
1358 wm8998->core.num_inputs = 3; /* IN1L, IN1R, IN2 */ in wm8998_probe()
1360 /* This may return -EPROBE_DEFER, so do this early on */ in wm8998_probe()
1361 ret = arizona_jack_codec_dev_probe(&wm8998->core, &pdev->dev); in wm8998_probe()
1365 for (i = 0; i < ARRAY_SIZE(wm8998->fll); i++) in wm8998_probe()
1366 wm8998->fll[i].vco_mult = 1; in wm8998_probe()
1368 arizona_init_fll(arizona, 1, ARIZONA_FLL1_CONTROL_1 - 1, in wm8998_probe()
1370 &wm8998->fll[0]); in wm8998_probe()
1371 arizona_init_fll(arizona, 2, ARIZONA_FLL2_CONTROL_1 - 1, in wm8998_probe()
1373 &wm8998->fll[1]); in wm8998_probe()
1376 arizona_init_dai(&wm8998->core, i); in wm8998_probe()
1380 regmap_update_bits(arizona->regmap, wm8998_digital_vu[i], in wm8998_probe()
1383 pm_runtime_enable(&pdev->dev); in wm8998_probe()
1384 pm_runtime_idle(&pdev->dev); in wm8998_probe()
1392 ret = devm_snd_soc_register_component(&pdev->dev, in wm8998_probe()
1397 dev_err(&pdev->dev, "Failed to register component: %d\n", ret); in wm8998_probe()
1406 pm_runtime_disable(&pdev->dev); in wm8998_probe()
1407 arizona_jack_codec_dev_remove(&wm8998->core); in wm8998_probe()
1415 struct arizona *arizona = wm8998->core.arizona; in wm8998_remove()
1417 pm_runtime_disable(&pdev->dev); in wm8998_remove()
1421 arizona_jack_codec_dev_remove(&wm8998->core); in wm8998_remove()
1426 .name = "wm8998-codec",
1437 MODULE_ALIAS("platform:wm8998-codec");