Lines Matching refs:codec
263 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in wm8903_dcs_event() local
264 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_dcs_event()
271 snd_soc_update_bits(codec, WM8903_DC_SERVO_0, in wm8903_dcs_event()
285 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm); in wm8903_seq_notifier() local
286 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_seq_notifier()
292 dev_dbg(codec->dev, "Starting DC servo for %x\n", in wm8903_seq_notifier()
301 dev_dbg(codec->dev, in wm8903_seq_notifier()
305 snd_soc_write(codec, WM8903_DC_SERVO_4 + i, in wm8903_seq_notifier()
308 dev_dbg(codec->dev, in wm8903_seq_notifier()
318 snd_soc_update_bits(codec, WM8903_DC_SERVO_2, in wm8903_seq_notifier()
321 snd_soc_update_bits(codec, WM8903_DC_SERVO_0, in wm8903_seq_notifier()
339 val = snd_soc_read(codec, in wm8903_seq_notifier()
341 dev_dbg(codec->dev, "DC servo %d: %x\n", in wm8903_seq_notifier()
367 struct snd_soc_codec *codec = snd_soc_dapm_kcontrol_codec(kcontrol); in wm8903_class_w_put() local
368 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_class_w_put()
372 reg = snd_soc_read(codec, WM8903_CLASS_W_0); in wm8903_class_w_put()
377 dev_dbg(codec->dev, "Disabling Class W\n"); in wm8903_class_w_put()
378 snd_soc_write(codec, WM8903_CLASS_W_0, reg & in wm8903_class_w_put()
390 dev_dbg(codec->dev, "Enabling Class W\n"); in wm8903_class_w_put()
391 snd_soc_write(codec, WM8903_CLASS_W_0, reg | in wm8903_class_w_put()
397 dev_dbg(codec->dev, "Bypass use count now %d\n", in wm8903_class_w_put()
410 static int wm8903_set_deemph(struct snd_soc_codec *codec) in wm8903_set_deemph() argument
412 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_set_deemph()
432 dev_dbg(codec->dev, "Set deemphasis %d (%dHz)\n", in wm8903_set_deemph()
435 return snd_soc_update_bits(codec, WM8903_DAC_DIGITAL_1, in wm8903_set_deemph()
442 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8903_get_deemph() local
443 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_get_deemph()
453 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8903_put_deemph() local
454 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_put_deemph()
465 wm8903_set_deemph(codec); in wm8903_put_deemph()
1094 static int wm8903_set_bias_level(struct snd_soc_codec *codec, in wm8903_set_bias_level() argument
1102 snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, in wm8903_set_bias_level()
1108 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { in wm8903_set_bias_level()
1109 snd_soc_update_bits(codec, WM8903_BIAS_CONTROL_0, in wm8903_set_bias_level()
1117 snd_soc_update_bits(codec, in wm8903_set_bias_level()
1124 snd_soc_update_bits(codec, WM8903_POWER_MANAGEMENT_5, in wm8903_set_bias_level()
1128 snd_soc_update_bits(codec, in wm8903_set_bias_level()
1132 snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, in wm8903_set_bias_level()
1148 snd_soc_update_bits(codec, WM8903_POWER_MANAGEMENT_5, in wm8903_set_bias_level()
1152 snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, in wm8903_set_bias_level()
1155 snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, in wm8903_set_bias_level()
1159 snd_soc_update_bits(codec, WM8903_BIAS_CONTROL_0, in wm8903_set_bias_level()
1166 dev_dbg(codec->dev, "Enabling Class W\n"); in wm8903_set_bias_level()
1167 snd_soc_update_bits(codec, WM8903_CLASS_W_0, in wm8903_set_bias_level()
1174 snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, in wm8903_set_bias_level()
1180 snd_soc_update_bits(codec, WM8903_BIAS_CONTROL_0, in wm8903_set_bias_level()
1183 snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, in wm8903_set_bias_level()
1187 snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, in wm8903_set_bias_level()
1192 snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0, in wm8903_set_bias_level()
1198 snd_soc_update_bits(codec, WM8903_BIAS_CONTROL_0, in wm8903_set_bias_level()
1209 struct snd_soc_codec *codec = codec_dai->codec; in wm8903_set_dai_sysclk() local
1210 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_set_dai_sysclk()
1220 struct snd_soc_codec *codec = codec_dai->codec; in wm8903_set_dai_fmt() local
1221 u16 aif1 = snd_soc_read(codec, WM8903_AUDIO_INTERFACE_1); in wm8903_set_dai_fmt()
1299 snd_soc_write(codec, WM8903_AUDIO_INTERFACE_1, aif1); in wm8903_set_dai_fmt()
1306 struct snd_soc_codec *codec = codec_dai->codec; in wm8903_digital_mute() local
1309 reg = snd_soc_read(codec, WM8903_DAC_DIGITAL_1); in wm8903_digital_mute()
1316 snd_soc_write(codec, WM8903_DAC_DIGITAL_1, reg); in wm8903_digital_mute()
1436 struct snd_soc_codec *codec = dai->codec; in wm8903_hw_params() local
1437 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_hw_params()
1448 u16 aif1 = snd_soc_read(codec, WM8903_AUDIO_INTERFACE_1); in wm8903_hw_params()
1449 u16 aif2 = snd_soc_read(codec, WM8903_AUDIO_INTERFACE_2); in wm8903_hw_params()
1450 u16 aif3 = snd_soc_read(codec, WM8903_AUDIO_INTERFACE_3); in wm8903_hw_params()
1451 u16 clock0 = snd_soc_read(codec, WM8903_CLOCK_RATES_0); in wm8903_hw_params()
1452 u16 clock1 = snd_soc_read(codec, WM8903_CLOCK_RATES_1); in wm8903_hw_params()
1453 u16 dac_digital1 = snd_soc_read(codec, WM8903_DAC_DIGITAL_1); in wm8903_hw_params()
1472 dev_dbg(codec->dev, "DSP fs = %dHz\n", sample_rates[dsp_config].rate); in wm8903_hw_params()
1498 dev_dbg(codec->dev, "MCLK = %dHz, target sample rate = %dHz\n", in wm8903_hw_params()
1533 dev_dbg(codec->dev, "CLK_SYS_RATE=%x, CLK_SYS_MODE=%x div=%d\n", in wm8903_hw_params()
1538 dev_dbg(codec->dev, "Actual CLK_SYS = %dHz\n", clk_sys); in wm8903_hw_params()
1560 dev_dbg(codec->dev, "BCLK ratio %d for %dHz - actual BCLK = %dHz\n", in wm8903_hw_params()
1568 wm8903_set_deemph(codec); in wm8903_hw_params()
1570 snd_soc_write(codec, WM8903_CLOCK_RATES_0, clock0); in wm8903_hw_params()
1571 snd_soc_write(codec, WM8903_CLOCK_RATES_1, clock1); in wm8903_hw_params()
1572 snd_soc_write(codec, WM8903_AUDIO_INTERFACE_1, aif1); in wm8903_hw_params()
1573 snd_soc_write(codec, WM8903_AUDIO_INTERFACE_2, aif2); in wm8903_hw_params()
1574 snd_soc_write(codec, WM8903_AUDIO_INTERFACE_3, aif3); in wm8903_hw_params()
1575 snd_soc_write(codec, WM8903_DAC_DIGITAL_1, dac_digital1); in wm8903_hw_params()
1597 int wm8903_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, in wm8903_mic_detect() argument
1600 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_mic_detect()
1603 dev_dbg(codec->dev, "Enabling microphone detection: %x %x\n", in wm8903_mic_detect()
1617 snd_soc_update_bits(codec, WM8903_INTERRUPT_STATUS_1_MASK, in wm8903_mic_detect()
1624 snd_soc_update_bits(codec, WM8903_WRITE_SEQUENCER_0, in wm8903_mic_detect()
1626 snd_soc_update_bits(codec, WM8903_MIC_BIAS_CONTROL_0, in wm8903_mic_detect()
1629 snd_soc_update_bits(codec, WM8903_MIC_BIAS_CONTROL_0, in wm8903_mic_detect()
1759 static int wm8903_resume(struct snd_soc_codec *codec) in wm8903_resume() argument
1761 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_resume()