Lines Matching refs:codec
255 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8580_out_vu() local
256 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); in wm8580_out_vu()
272 snd_soc_update_bits(codec, reg, 0x100, 0x100); in wm8580_out_vu()
273 snd_soc_update_bits(codec, reg2, 0x100, 0x100); in wm8580_out_vu()
433 struct snd_soc_codec *codec = codec_dai->codec; in wm8580_set_dai_pll() local
434 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); in wm8580_set_dai_pll()
473 snd_soc_update_bits(codec, WM8580_PWRDN2, pwr_mask, pwr_mask); in wm8580_set_dai_pll()
478 snd_soc_write(codec, WM8580_PLLA1 + offset, pll_div.k & 0x1ff); in wm8580_set_dai_pll()
479 snd_soc_write(codec, WM8580_PLLA2 + offset, (pll_div.k >> 9) & 0x1ff); in wm8580_set_dai_pll()
480 snd_soc_write(codec, WM8580_PLLA3 + offset, in wm8580_set_dai_pll()
483 reg = snd_soc_read(codec, WM8580_PLLA4 + offset); in wm8580_set_dai_pll()
488 snd_soc_write(codec, WM8580_PLLA4 + offset, reg); in wm8580_set_dai_pll()
491 snd_soc_update_bits(codec, WM8580_PWRDN2, pwr_mask, 0); in wm8580_set_dai_pll()
507 struct snd_soc_codec *codec = dai->codec; in wm8580_paif_hw_params() local
508 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); in wm8580_paif_hw_params()
540 dev_err(codec->dev, "Invalid clock ratio %d/%d\n", in wm8580_paif_hw_params()
545 dev_dbg(codec->dev, "Running at %dfs with %dHz clock\n", in wm8580_paif_hw_params()
553 dev_dbg(codec->dev, "Selecting 64x OSR\n"); in wm8580_paif_hw_params()
557 dev_dbg(codec->dev, "Selecting 128x OSR\n"); in wm8580_paif_hw_params()
561 snd_soc_update_bits(codec, WM8580_PAIF3, WM8580_DACOSR, osr); in wm8580_paif_hw_params()
564 snd_soc_update_bits(codec, WM8580_PAIF1 + dai->driver->id, in wm8580_paif_hw_params()
567 snd_soc_update_bits(codec, WM8580_PAIF3 + dai->driver->id, in wm8580_paif_hw_params()
575 struct snd_soc_codec *codec = codec_dai->codec; in wm8580_set_paif_dai_fmt() local
580 aifa = snd_soc_read(codec, WM8580_PAIF1 + codec_dai->driver->id); in wm8580_set_paif_dai_fmt()
581 aifb = snd_soc_read(codec, WM8580_PAIF3 + codec_dai->driver->id); in wm8580_set_paif_dai_fmt()
647 snd_soc_write(codec, WM8580_PAIF1 + codec_dai->driver->id, aifa); in wm8580_set_paif_dai_fmt()
648 snd_soc_write(codec, WM8580_PAIF3 + codec_dai->driver->id, aifb); in wm8580_set_paif_dai_fmt()
656 struct snd_soc_codec *codec = codec_dai->codec; in wm8580_set_dai_clkdiv() local
661 reg = snd_soc_read(codec, WM8580_PLLB4); in wm8580_set_dai_clkdiv()
683 snd_soc_write(codec, WM8580_PLLB4, reg); in wm8580_set_dai_clkdiv()
687 reg = snd_soc_read(codec, WM8580_PLLB4); in wm8580_set_dai_clkdiv()
709 snd_soc_write(codec, WM8580_PLLB4, reg); in wm8580_set_dai_clkdiv()
722 struct snd_soc_codec *codec = dai->codec; in wm8580_set_sysclk() local
723 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); in wm8580_set_sysclk()
758 dev_err(codec->dev, "Unknown clock %d\n", clk_id); in wm8580_set_sysclk()
765 ret = snd_soc_update_bits(codec, WM8580_CLKSEL, sel_mask, sel); in wm8580_set_sysclk()
774 struct snd_soc_codec *codec = codec_dai->codec; in wm8580_digital_mute() local
777 reg = snd_soc_read(codec, WM8580_DAC_CONTROL5); in wm8580_digital_mute()
784 snd_soc_write(codec, WM8580_DAC_CONTROL5, reg); in wm8580_digital_mute()
789 static int wm8580_set_bias_level(struct snd_soc_codec *codec, in wm8580_set_bias_level() argument
798 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { in wm8580_set_bias_level()
800 snd_soc_update_bits(codec, WM8580_PWRDN1, in wm8580_set_bias_level()
805 snd_soc_update_bits(codec, WM8580_ADC_CONTROL1, in wm8580_set_bias_level()
811 snd_soc_update_bits(codec, WM8580_PWRDN1, in wm8580_set_bias_level()
865 static int wm8580_probe(struct snd_soc_codec *codec) in wm8580_probe() argument
867 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); in wm8580_probe()
873 dev_err(codec->dev, "Failed to enable supplies: %d\n", ret); in wm8580_probe()
878 ret = snd_soc_write(codec, WM8580_RESET, 0); in wm8580_probe()
880 dev_err(codec->dev, "Failed to reset codec: %d\n", ret); in wm8580_probe()
893 static int wm8580_remove(struct snd_soc_codec *codec) in wm8580_remove() argument
895 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); in wm8580_remove()