Lines Matching refs:codec
146 static void wait_for_dc_servo(struct snd_soc_codec *codec) in wait_for_dc_servo() argument
151 dev_dbg(codec->dev, "Waiting for DC servo...\n"); in wait_for_dc_servo()
155 reg = snd_soc_read(codec, WM9090_DC_SERVO_READBACK_0); in wait_for_dc_servo()
156 dev_dbg(codec->dev, "DC servo status: %x\n", reg); in wait_for_dc_servo()
162 dev_err(codec->dev, "Timed out waiting for DC Servo\n"); in wait_for_dc_servo()
257 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in hp_ev() local
258 unsigned int reg = snd_soc_read(codec, WM9090_ANALOGUE_HP_0); in hp_ev()
262 snd_soc_update_bits(codec, WM9090_CHARGE_PUMP_1, in hp_ev()
267 snd_soc_update_bits(codec, WM9090_POWER_MANAGEMENT_1, in hp_ev()
272 snd_soc_write(codec, WM9090_ANALOGUE_HP_0, reg); in hp_ev()
280 snd_soc_write(codec, WM9090_DC_SERVO_0, in hp_ev()
285 wait_for_dc_servo(codec); in hp_ev()
289 snd_soc_write(codec, WM9090_ANALOGUE_HP_0, reg); in hp_ev()
300 snd_soc_write(codec, WM9090_ANALOGUE_HP_0, reg); in hp_ev()
302 snd_soc_write(codec, WM9090_DC_SERVO_0, 0); in hp_ev()
304 snd_soc_update_bits(codec, WM9090_POWER_MANAGEMENT_1, in hp_ev()
308 snd_soc_update_bits(codec, WM9090_CHARGE_PUMP_1, in hp_ev()
425 static int wm9090_add_controls(struct snd_soc_codec *codec) in wm9090_add_controls() argument
427 struct wm9090_priv *wm9090 = snd_soc_codec_get_drvdata(codec); in wm9090_add_controls()
428 struct snd_soc_dapm_context *dapm = &codec->dapm; in wm9090_add_controls()
436 snd_soc_add_codec_controls(codec, wm9090_controls, in wm9090_add_controls()
445 snd_soc_add_codec_controls(codec, wm9090_in1_se_controls, in wm9090_add_controls()
455 snd_soc_add_codec_controls(codec, wm9090_in2_se_controls, in wm9090_add_controls()
461 snd_soc_write(codec, WM9090_AGC_CONTROL_0 + i, in wm9090_add_controls()
463 snd_soc_update_bits(codec, WM9090_POWER_MANAGEMENT_3, in wm9090_add_controls()
466 snd_soc_update_bits(codec, WM9090_POWER_MANAGEMENT_3, in wm9090_add_controls()
478 static int wm9090_set_bias_level(struct snd_soc_codec *codec, in wm9090_set_bias_level() argument
481 struct wm9090_priv *wm9090 = snd_soc_codec_get_drvdata(codec); in wm9090_set_bias_level()
488 snd_soc_update_bits(codec, WM9090_ANTIPOP2, WM9090_VMID_ENA, in wm9090_set_bias_level()
490 snd_soc_update_bits(codec, WM9090_POWER_MANAGEMENT_1, in wm9090_set_bias_level()
499 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { in wm9090_set_bias_level()
508 snd_soc_update_bits(codec, WM9090_POWER_MANAGEMENT_1, in wm9090_set_bias_level()
510 snd_soc_update_bits(codec, WM9090_ANTIPOP2, in wm9090_set_bias_level()
518 codec->dapm.bias_level = level; in wm9090_set_bias_level()
523 static int wm9090_probe(struct snd_soc_codec *codec) in wm9090_probe() argument
528 snd_soc_update_bits(codec, WM9090_IN1_LINE_INPUT_A_VOLUME, in wm9090_probe()
531 snd_soc_update_bits(codec, WM9090_IN1_LINE_INPUT_B_VOLUME, in wm9090_probe()
534 snd_soc_update_bits(codec, WM9090_IN2_LINE_INPUT_A_VOLUME, in wm9090_probe()
537 snd_soc_update_bits(codec, WM9090_IN2_LINE_INPUT_B_VOLUME, in wm9090_probe()
540 snd_soc_update_bits(codec, WM9090_SPEAKER_VOLUME_LEFT, in wm9090_probe()
543 snd_soc_update_bits(codec, WM9090_LEFT_OUTPUT_VOLUME, in wm9090_probe()
546 snd_soc_update_bits(codec, WM9090_RIGHT_OUTPUT_VOLUME, in wm9090_probe()
550 snd_soc_update_bits(codec, WM9090_CLOCKING_1, in wm9090_probe()
553 wm9090_add_controls(codec); in wm9090_probe()