Lines Matching +full:codec +full:- +full:aif3
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()
112 mux = ucontrol->value.enumerated.item[0]; in wm8998_inmux_put()
114 return -EINVAL; in wm8998_inmux_put()
116 switch (e->reg) { in wm8998_inmux_put()
127 inmode = arizona->pdata.inmode[mode_index]; in wm8998_inmux_put()
140 snd_soc_component_update_bits(component, e->reg, in wm8998_inmux_put()
146 ucontrol->value.enumerated.item[0], in wm8998_inmux_put()
182 static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
183 static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
184 static DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);
895 { "AIF3 Capture", NULL, "DBVDD3" },
896 { "AIF3 Playback", NULL, "DBVDD3" },
976 { "AIF3 Capture", NULL, "AIF3TX1" },
977 { "AIF3 Capture", NULL, "AIF3TX2" },
979 { "AIF3RX1", NULL, "AIF3 Playback" },
980 { "AIF3RX2", NULL, "AIF3 Playback" },
998 { "AIF3 Playback", NULL, "SYSCLK" },
1004 { "AIF3 Capture", NULL, "SYSCLK" },
1146 .name = "wm8998-aif1",
1168 .name = "wm8998-aif2",
1190 .name = "wm8998-aif3",
1194 .stream_name = "AIF3 Playback",
1201 .stream_name = "AIF3 Capture",
1212 .name = "wm8998-slim1",
1231 .name = "wm8998-slim2",
1258 return arizona_set_fll(&wm8998->fll[0], source, Fref, Fout); in wm8998_set_fll()
1260 return arizona_set_fll(&wm8998->fll[1], source, Fref, Fout); in wm8998_set_fll()
1262 return arizona_set_fll_refclk(&wm8998->fll[0], source, Fref, in wm8998_set_fll()
1265 return arizona_set_fll_refclk(&wm8998->fll[1], source, Fref, in wm8998_set_fll()
1268 return -EINVAL; in wm8998_set_fll()
1276 struct arizona *arizona = priv->core.arizona; in wm8998_component_probe()
1279 arizona->dapm = dapm; in wm8998_component_probe()
1280 snd_soc_component_init_regmap(component, arizona->regmap); in wm8998_component_probe()
1297 priv->core.arizona->dapm = NULL; in wm8998_component_remove()
1332 struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); in wm8998_probe()
1336 wm8998 = devm_kzalloc(&pdev->dev, sizeof(struct wm8998_priv), in wm8998_probe()
1339 return -ENOMEM; in wm8998_probe()
1343 if (!dev_get_platdata(arizona->dev)) { in wm8998_probe()
1350 wm8998->core.arizona = arizona; in wm8998_probe()
1351 wm8998->core.num_inputs = 3; /* IN1L, IN1R, IN2 */ in wm8998_probe()
1353 for (i = 0; i < ARRAY_SIZE(wm8998->fll); i++) in wm8998_probe()
1354 wm8998->fll[i].vco_mult = 1; in wm8998_probe()
1356 arizona_init_fll(arizona, 1, ARIZONA_FLL1_CONTROL_1 - 1, in wm8998_probe()
1358 &wm8998->fll[0]); in wm8998_probe()
1359 arizona_init_fll(arizona, 2, ARIZONA_FLL2_CONTROL_1 - 1, in wm8998_probe()
1361 &wm8998->fll[1]); in wm8998_probe()
1364 arizona_init_dai(&wm8998->core, i); in wm8998_probe()
1368 regmap_update_bits(arizona->regmap, wm8998_digital_vu[i], in wm8998_probe()
1371 pm_runtime_enable(&pdev->dev); in wm8998_probe()
1372 pm_runtime_idle(&pdev->dev); in wm8998_probe()
1380 ret = devm_snd_soc_register_component(&pdev->dev, in wm8998_probe()
1385 dev_err(&pdev->dev, "Failed to register component: %d\n", ret); in wm8998_probe()
1394 pm_runtime_disable(&pdev->dev); in wm8998_probe()
1402 struct arizona *arizona = wm8998->core.arizona; in wm8998_remove()
1404 pm_runtime_disable(&pdev->dev); in wm8998_remove()
1413 .name = "wm8998-codec",
1424 MODULE_ALIAS("platform:wm8998-codec");