Lines Matching refs:codec
90 struct snd_soc_codec *codec; member
1551 static int wm2200_probe(struct snd_soc_codec *codec) in wm2200_probe() argument
1553 struct wm2200_priv *wm2200 = dev_get_drvdata(codec->dev); in wm2200_probe()
1556 wm2200->codec = codec; in wm2200_probe()
1558 ret = snd_soc_add_codec_controls(codec, wm_adsp_fw_controls, 2); in wm2200_probe()
1567 struct snd_soc_codec *codec = dai->codec; in wm2200_set_fmt() local
1581 dev_err(codec->dev, "Unsupported DAI format %d\n", in wm2200_set_fmt()
1600 dev_err(codec->dev, "Unsupported master mode %d\n", in wm2200_set_fmt()
1622 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_1, WM2200_AIF1_BCLK_MSTR | in wm2200_set_fmt()
1624 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_2, in wm2200_set_fmt()
1627 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_3, in wm2200_set_fmt()
1630 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_5, in wm2200_set_fmt()
1699 struct snd_soc_codec *codec = dai->codec; in wm2200_hw_params() local
1700 struct wm2200_priv *wm2200 = snd_soc_codec_get_drvdata(codec); in wm2200_hw_params()
1712 dev_dbg(codec->dev, "Word length %d bits, frame length %d bits\n", in wm2200_hw_params()
1721 dev_err(codec->dev, "SYSCLK has no rate set\n"); in wm2200_hw_params()
1729 dev_err(codec->dev, "Unsupported sample rate: %dHz\n", in wm2200_hw_params()
1735 dev_dbg(codec->dev, "Target BCLK is %dHz, using %dHz SYSCLK\n", in wm2200_hw_params()
1747 dev_err(codec->dev, in wm2200_hw_params()
1754 dev_dbg(codec->dev, "Setting %dHz BCLK\n", bclk_rates[bclk]); in wm2200_hw_params()
1755 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_1, in wm2200_hw_params()
1759 dev_dbg(codec->dev, "Setting %dHz LRCLK\n", bclk_rates[bclk] / lrclk); in wm2200_hw_params()
1762 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_7, in wm2200_hw_params()
1765 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_6, in wm2200_hw_params()
1770 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_9, in wm2200_hw_params()
1774 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_8, in wm2200_hw_params()
1778 snd_soc_update_bits(codec, WM2200_CLOCKING_4, in wm2200_hw_params()
1789 static int wm2200_set_sysclk(struct snd_soc_codec *codec, int clk_id, in wm2200_set_sysclk() argument
1792 struct wm2200_priv *wm2200 = snd_soc_codec_get_drvdata(codec); in wm2200_set_sysclk()
1800 dev_err(codec->dev, "Unknown clock %d\n", clk_id); in wm2200_set_sysclk()
1811 dev_err(codec->dev, "Invalid source %d\n", source); in wm2200_set_sysclk()
1821 dev_err(codec->dev, "Invalid clock rate: %d\n", freq); in wm2200_set_sysclk()
1829 snd_soc_update_bits(codec, WM2200_CLOCKING_3, WM2200_SYSCLK_FREQ_MASK | in wm2200_set_sysclk()
1937 static int wm2200_set_fll(struct snd_soc_codec *codec, int fll_id, int source, in wm2200_set_fll() argument
1940 struct i2c_client *i2c = to_i2c_client(codec->dev); in wm2200_set_fll()
1941 struct wm2200_priv *wm2200 = snd_soc_codec_get_drvdata(codec); in wm2200_set_fll()
1947 dev_dbg(codec->dev, "FLL disabled"); in wm2200_set_fll()
1950 pm_runtime_put(codec->dev); in wm2200_set_fll()
1953 snd_soc_update_bits(codec, WM2200_FLL_CONTROL_1, in wm2200_set_fll()
1964 dev_err(codec->dev, "Invalid FLL source %d\n", source); in wm2200_set_fll()
1973 snd_soc_update_bits(codec, WM2200_FLL_CONTROL_1, WM2200_FLL_ENA, 0); in wm2200_set_fll()
1975 snd_soc_update_bits(codec, WM2200_FLL_CONTROL_2, in wm2200_set_fll()
1980 snd_soc_update_bits(codec, WM2200_FLL_CONTROL_3, in wm2200_set_fll()
1983 snd_soc_update_bits(codec, WM2200_FLL_EFS_2, in wm2200_set_fll()
1987 snd_soc_update_bits(codec, WM2200_FLL_CONTROL_3, in wm2200_set_fll()
1989 snd_soc_update_bits(codec, WM2200_FLL_EFS_2, in wm2200_set_fll()
1993 snd_soc_update_bits(codec, WM2200_FLL_CONTROL_4, WM2200_FLL_THETA_MASK, in wm2200_set_fll()
1995 snd_soc_update_bits(codec, WM2200_FLL_CONTROL_6, WM2200_FLL_N_MASK, in wm2200_set_fll()
1997 snd_soc_update_bits(codec, WM2200_FLL_CONTROL_7, in wm2200_set_fll()
2002 snd_soc_update_bits(codec, WM2200_FLL_EFS_1, in wm2200_set_fll()
2008 pm_runtime_get_sync(codec->dev); in wm2200_set_fll()
2010 snd_soc_update_bits(codec, WM2200_FLL_CONTROL_1, in wm2200_set_fll()
2018 snd_soc_update_bits(codec, WM2200_CLOCKING_3, WM2200_SYSCLK_ENA, in wm2200_set_fll()
2033 ret = snd_soc_read(codec, in wm2200_set_fll()
2036 dev_err(codec->dev, in wm2200_set_fll()
2045 dev_err(codec->dev, "FLL lock timed out\n"); in wm2200_set_fll()
2046 pm_runtime_put(codec->dev); in wm2200_set_fll()
2054 dev_dbg(codec->dev, "FLL running %dHz->%dHz\n", Fref, Fout); in wm2200_set_fll()
2061 struct snd_soc_codec *codec = dai->codec; in wm2200_dai_probe() local
2065 ret = snd_soc_read(codec, WM2200_GPIO_CTRL_1); in wm2200_dai_probe()
2072 dev_err(codec->dev, "Failed to read GPIO 1 config: %d\n", ret); in wm2200_dai_probe()
2075 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_2, in wm2200_dai_probe()