Lines Matching +full:codec +full:- +full:aif2

1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8997.c -- WM8997 ALSA SoC Audio driver
38 static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
39 static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
40 static DECLARE_TLV_DB_SCALE(noise_tlv, -13200, 600, 0);
41 static DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);
84 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm8997_sysclk_ev()
85 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in wm8997_sysclk_ev()
86 struct regmap *regmap = arizona->regmap; in wm8997_sysclk_ev()
90 switch (arizona->rev) { in wm8997_sysclk_ev()
750 { "AIF2 Capture", NULL, "DBVDD2" },
751 { "AIF2 Playback", NULL, "DBVDD2" },
799 { "AIF2 Capture", NULL, "AIF2TX1" },
800 { "AIF2 Capture", NULL, "AIF2TX2" },
802 { "AIF2RX1", NULL, "AIF2 Playback" },
803 { "AIF2RX2", NULL, "AIF2 Playback" },
828 { "AIF2 Playback", NULL, "SYSCLK" },
834 { "AIF2 Capture", NULL, "SYSCLK" },
933 return arizona_set_fll(&wm8997->fll[0], source, Fref, Fout); in wm8997_set_fll()
935 return arizona_set_fll(&wm8997->fll[1], source, Fref, Fout); in wm8997_set_fll()
937 return arizona_set_fll_refclk(&wm8997->fll[0], source, Fref, in wm8997_set_fll()
940 return arizona_set_fll_refclk(&wm8997->fll[1], source, Fref, in wm8997_set_fll()
943 return -EINVAL; in wm8997_set_fll()
954 .name = "wm8997-aif1",
976 .name = "wm8997-aif2",
980 .stream_name = "AIF2 Playback",
987 .stream_name = "AIF2 Capture",
998 .name = "wm8997-slim1",
1017 .name = "wm8997-slim2",
1036 .name = "wm8997-slim3",
1060 struct arizona *arizona = priv->core.arizona; in wm8997_component_probe()
1063 snd_soc_component_init_regmap(component, arizona->regmap); in wm8997_component_probe()
1071 priv->core.arizona->dapm = dapm; in wm8997_component_probe()
1080 priv->core.arizona->dapm = NULL; in wm8997_component_remove()
1112 struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); in wm8997_probe()
1116 wm8997 = devm_kzalloc(&pdev->dev, sizeof(struct wm8997_priv), in wm8997_probe()
1119 return -ENOMEM; in wm8997_probe()
1123 if (!dev_get_platdata(arizona->dev)) { in wm8997_probe()
1130 wm8997->core.arizona = arizona; in wm8997_probe()
1131 wm8997->core.num_inputs = 4; in wm8997_probe()
1133 arizona_init_dvfs(&wm8997->core); in wm8997_probe()
1135 /* This may return -EPROBE_DEFER, so do this early on */ in wm8997_probe()
1136 ret = arizona_jack_codec_dev_probe(&wm8997->core, &pdev->dev); in wm8997_probe()
1140 for (i = 0; i < ARRAY_SIZE(wm8997->fll); i++) in wm8997_probe()
1141 wm8997->fll[i].vco_mult = 1; in wm8997_probe()
1143 arizona_init_fll(arizona, 1, ARIZONA_FLL1_CONTROL_1 - 1, in wm8997_probe()
1145 &wm8997->fll[0]); in wm8997_probe()
1146 arizona_init_fll(arizona, 2, ARIZONA_FLL2_CONTROL_1 - 1, in wm8997_probe()
1148 &wm8997->fll[1]); in wm8997_probe()
1151 regmap_update_bits(arizona->regmap, ARIZONA_SAMPLE_RATE_2, in wm8997_probe()
1153 regmap_update_bits(arizona->regmap, ARIZONA_SAMPLE_RATE_3, in wm8997_probe()
1157 arizona_init_dai(&wm8997->core, i); in wm8997_probe()
1161 regmap_update_bits(arizona->regmap, wm8997_digital_vu[i], in wm8997_probe()
1164 pm_runtime_enable(&pdev->dev); in wm8997_probe()
1165 pm_runtime_idle(&pdev->dev); in wm8997_probe()
1176 ret = devm_snd_soc_register_component(&pdev->dev, in wm8997_probe()
1181 dev_err(&pdev->dev, "Failed to register component: %d\n", ret); in wm8997_probe()
1190 pm_runtime_disable(&pdev->dev); in wm8997_probe()
1191 arizona_jack_codec_dev_remove(&wm8997->core); in wm8997_probe()
1199 struct arizona *arizona = wm8997->core.arizona; in wm8997_remove()
1201 pm_runtime_disable(&pdev->dev); in wm8997_remove()
1205 arizona_jack_codec_dev_remove(&wm8997->core); in wm8997_remove()
1210 .name = "wm8997-codec",
1221 MODULE_ALIAS("platform:wm8997-codec");