Lines Matching refs:component

227 static int pm4125_global_mbias_disable(struct snd_soc_component *component)  in pm4125_global_mbias_disable()  argument
229 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_global_mbias_disable()
233 snd_soc_component_write_field(component, PM4125_ANA_MBIAS_EN, in pm4125_global_mbias_disable()
236 snd_soc_component_write_field(component, PM4125_ANA_MBIAS_EN, in pm4125_global_mbias_disable()
244 static int pm4125_global_mbias_enable(struct snd_soc_component *component) in pm4125_global_mbias_enable() argument
246 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_global_mbias_enable()
249 snd_soc_component_write_field(component, PM4125_ANA_MBIAS_EN, in pm4125_global_mbias_enable()
252 snd_soc_component_write_field(component, PM4125_ANA_MBIAS_EN, in pm4125_global_mbias_enable()
261 static int pm4125_rx_clk_enable(struct snd_soc_component *component) in pm4125_rx_clk_enable() argument
263 pm4125_global_mbias_enable(component); in pm4125_rx_clk_enable()
265 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_rx_clk_enable()
268 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_rx_clk_enable()
273 snd_soc_component_write_field(component, PM4125_ANA_HPHPA_FSM_CLK, in pm4125_rx_clk_enable()
276 snd_soc_component_write_field(component, PM4125_ANA_HPHPA_FSM_CLK, in pm4125_rx_clk_enable()
279 snd_soc_component_update_bits(component, PM4125_ANA_NCP_VCTRL, 0x07, 0x06); in pm4125_rx_clk_enable()
280 snd_soc_component_write_field(component, PM4125_ANA_NCP_EN, in pm4125_rx_clk_enable()
288 static int pm4125_rx_clk_disable(struct snd_soc_component *component) in pm4125_rx_clk_disable() argument
291 snd_soc_component_write_field(component, PM4125_ANA_HPHPA_FSM_CLK, in pm4125_rx_clk_disable()
294 snd_soc_component_write_field(component, PM4125_ANA_HPHPA_FSM_CLK, in pm4125_rx_clk_disable()
297 snd_soc_component_write_field(component, PM4125_ANA_NCP_EN, in pm4125_rx_clk_disable()
300 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_rx_clk_disable()
303 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_rx_clk_disable()
307 pm4125_global_mbias_disable(component); in pm4125_rx_clk_disable()
316 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_rxclk() local
320 pm4125_rx_clk_enable(component); in pm4125_codec_enable_rxclk()
323 pm4125_rx_clk_disable(component); in pm4125_codec_enable_rxclk()
333 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_hphl_dac_event() local
334 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_codec_hphl_dac_event()
338 snd_soc_component_write_field(component, PM4125_ANA_HPHPA_CNP_CTL_1, in pm4125_codec_hphl_dac_event()
341 snd_soc_component_write_field(component, PM4125_SWR_HPHPA_HD2, in pm4125_codec_hphl_dac_event()
347 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_COMP_CTL_0, in pm4125_codec_hphl_dac_event()
352 snd_soc_component_write_field(component, in pm4125_codec_hphl_dac_event()
362 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_COMP_CTL_0, in pm4125_codec_hphl_dac_event()
366 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX0_CTL, in pm4125_codec_hphl_dac_event()
369 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_GAIN_CTL, in pm4125_codec_hphl_dac_event()
372 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_codec_hphl_dac_event()
377 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_codec_hphl_dac_event()
380 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_GAIN_CTL, in pm4125_codec_hphl_dac_event()
383 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX0_CTL, in pm4125_codec_hphl_dac_event()
387 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_COMP_CTL_0, in pm4125_codec_hphl_dac_event()
399 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_hphr_dac_event() local
400 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_codec_hphr_dac_event()
404 snd_soc_component_write_field(component, PM4125_ANA_HPHPA_CNP_CTL_1, in pm4125_codec_hphr_dac_event()
407 snd_soc_component_write_field(component, PM4125_SWR_HPHPA_HD2, in pm4125_codec_hphr_dac_event()
413 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_COMP_CTL_0, in pm4125_codec_hphr_dac_event()
417 snd_soc_component_write_field(component, in pm4125_codec_hphr_dac_event()
427 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_COMP_CTL_0, in pm4125_codec_hphr_dac_event()
431 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX1_CTL, in pm4125_codec_hphr_dac_event()
434 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_GAIN_CTL, in pm4125_codec_hphr_dac_event()
437 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_codec_hphr_dac_event()
442 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_codec_hphr_dac_event()
445 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_GAIN_CTL, in pm4125_codec_hphr_dac_event()
448 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX1_CTL, in pm4125_codec_hphr_dac_event()
452 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_COMP_CTL_0, in pm4125_codec_hphr_dac_event()
464 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_ear_lo_dac_event() local
468 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX0_CTL, in pm4125_codec_ear_lo_dac_event()
471 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_codec_ear_lo_dac_event()
474 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_GAIN_CTL, in pm4125_codec_ear_lo_dac_event()
479 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_CLK_CTL, in pm4125_codec_ear_lo_dac_event()
482 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX_GAIN_CTL, in pm4125_codec_ear_lo_dac_event()
485 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_RX0_CTL, in pm4125_codec_ear_lo_dac_event()
498 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_hphl_wdt_irq() local
499 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_codec_enable_hphl_wdt_irq()
517 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_hphr_wdt_irq() local
518 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_codec_enable_hphr_wdt_irq()
536 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_hphr_pa() local
541 snd_soc_component_write_field(component, PM4125_DIG_SWR_PDM_WD_CTL1, in pm4125_codec_enable_hphr_pa()
547 snd_soc_component_write_field(component, PM4125_DIG_SWR_PDM_WD_CTL1, in pm4125_codec_enable_hphr_pa()
558 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_hphl_pa() local
563 snd_soc_component_write_field(component, PM4125_DIG_SWR_PDM_WD_CTL0, in pm4125_codec_enable_hphl_pa()
569 snd_soc_component_write_field(component, PM4125_DIG_SWR_PDM_WD_CTL0, in pm4125_codec_enable_hphl_pa()
580 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_lo_pa() local
584 snd_soc_component_update_bits(component, PM4125_ANA_COMBOPA_CTL_5, 0x04, 0x00); in pm4125_codec_enable_lo_pa()
586 snd_soc_component_update_bits(component, PM4125_ANA_COMBOPA_CTL_4, 0x0F, 0x0F); in pm4125_codec_enable_lo_pa()
588 snd_soc_component_write_field(component, PM4125_ANA_COMBOPA_CTL, in pm4125_codec_enable_lo_pa()
591 snd_soc_component_write_field(component, PM4125_DIG_SWR_PDM_WD_CTL0, in pm4125_codec_enable_lo_pa()
597 snd_soc_component_update_bits(component, PM4125_ANA_COMBOPA_CTL_4, 0x0F, 0x04); in pm4125_codec_enable_lo_pa()
601 snd_soc_component_write_field(component, PM4125_ANA_COMBOPA_CTL, in pm4125_codec_enable_lo_pa()
605 snd_soc_component_write_field(component, PM4125_DIG_SWR_PDM_WD_CTL0, in pm4125_codec_enable_lo_pa()
616 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_ear_pa() local
620 snd_soc_component_update_bits(component, PM4125_ANA_COMBOPA_CTL_5, 0x04, 0x00); in pm4125_codec_enable_ear_pa()
622 snd_soc_component_update_bits(component, PM4125_ANA_COMBOPA_CTL_4, 0x0F, 0x0F); in pm4125_codec_enable_ear_pa()
624 snd_soc_component_update_bits(component, PM4125_ANA_COMBOPA_CTL, in pm4125_codec_enable_ear_pa()
627 snd_soc_component_write_field(component, PM4125_DIG_SWR_PDM_WD_CTL0, in pm4125_codec_enable_ear_pa()
633 snd_soc_component_update_bits(component, PM4125_ANA_COMBOPA_CTL_4, 0x0F, 0x04); in pm4125_codec_enable_ear_pa()
637 snd_soc_component_write_field(component, PM4125_DIG_SWR_PDM_WD_CTL0, in pm4125_codec_enable_ear_pa()
648 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_adc() local
649 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_codec_enable_adc()
655 !(snd_soc_component_read(component, PM4125_ANA_TX_AMIC2) & 0x10)) { in pm4125_codec_enable_adc()
658 pm4125_global_mbias_enable(component); in pm4125_codec_enable_adc()
660 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_TX_ANA_MODE_0_1, in pm4125_codec_enable_adc()
664 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_TX_ANA_MODE_0_1, in pm4125_codec_enable_adc()
673 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_TX_ANA_MODE_0_1, in pm4125_codec_enable_adc()
677 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_TX_ANA_MODE_0_1, in pm4125_codec_enable_adc()
680 pm4125_global_mbias_disable(component); in pm4125_codec_enable_adc()
690 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_dmic() local
695 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_AMIC_CTL, in pm4125_codec_enable_dmic()
698 snd_soc_component_update_bits(component, dmic_clk_reg, in pm4125_codec_enable_dmic()
703 snd_soc_component_update_bits(component, dmic_clk_reg, in pm4125_codec_enable_dmic()
706 snd_soc_component_write_field(component, PM4125_DIG_SWR_CDC_AMIC_CTL, in pm4125_codec_enable_dmic()
715 static int pm4125_micbias_control(struct snd_soc_component *component, int micb_num, int req, in pm4125_micbias_control() argument
718 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_micbias_control()
724 dev_err(component->dev, "%s: Invalid micbias index, micb_ind:%d\n", in pm4125_micbias_control()
744 dev_err(component->dev, "%s: Invalid micbias number: %d\n", in pm4125_micbias_control()
754 snd_soc_component_update_bits(component, micb_reg, in pm4125_micbias_control()
762 snd_soc_component_update_bits(component, micb_reg, in pm4125_micbias_control()
768 pm4125_global_mbias_enable(component); in pm4125_micbias_control()
769 snd_soc_component_update_bits(component, micb_reg, in pm4125_micbias_control()
778 snd_soc_component_update_bits(component, micb_reg, in pm4125_micbias_control()
780 snd_soc_component_update_bits(component, micb_reg, in pm4125_micbias_control()
782 pm4125_global_mbias_disable(component); in pm4125_micbias_control()
785 snd_soc_component_update_bits(component, micb_reg, in pm4125_micbias_control()
787 pm4125_global_mbias_disable(component); in pm4125_micbias_control()
798 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_micbias() local
804 pm4125_micbias_control(component, micb_num, MICB_PULLUP_ENABLE, true); in pm4125_codec_enable_micbias()
806 pm4125_micbias_control(component, micb_num, MICB_ENABLE, true); in pm4125_codec_enable_micbias()
813 pm4125_micbias_control(component, micb_num, MICB_PULLUP_DISABLE, true); in pm4125_codec_enable_micbias()
815 pm4125_micbias_control(component, micb_num, MICB_DISABLE, true); in pm4125_codec_enable_micbias()
825 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in pm4125_codec_enable_micbias_pullup() local
830 pm4125_micbias_control(component, micb_num, MICB_PULLUP_ENABLE, true); in pm4125_codec_enable_micbias_pullup()
836 pm4125_micbias_control(component, micb_num, MICB_PULLUP_DISABLE, true); in pm4125_codec_enable_micbias_pullup()
870 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); in pm4125_get_compander() local
871 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_get_compander()
884 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); in pm4125_set_compander() local
885 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_set_compander()
960 static void pm4125_mbhc_bias_control(struct snd_soc_component *component, bool enable) in pm4125_mbhc_bias_control() argument
962 snd_soc_component_write_field(component, PM4125_ANA_MBHC_ELECT, in pm4125_mbhc_bias_control()
968 static void pm4125_mbhc_program_btn_thr(struct snd_soc_component *component, in pm4125_mbhc_program_btn_thr() argument
975 dev_err(component->dev, "%s: invalid number of buttons: %d\n", in pm4125_mbhc_program_btn_thr()
982 snd_soc_component_write_field(component, PM4125_ANA_MBHC_BTN0_ZDET_VREF1 + i, in pm4125_mbhc_program_btn_thr()
992 static int pm4125_mbhc_init(struct snd_soc_component *component) in pm4125_mbhc_init() argument
994 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_mbhc_init()
1015 pm4125->wcd_mbhc = wcd_mbhc_init(component, &mbhc_cb, intr_ids, pm4125_mbhc_fields, false); in pm4125_mbhc_init()
1022 static void pm4125_mbhc_deinit(struct snd_soc_component *component) in pm4125_mbhc_deinit() argument
1024 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_mbhc_deinit()
1309 static int pm4125_soc_codec_probe(struct snd_soc_component *component) in pm4125_soc_codec_probe() argument
1311 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_soc_codec_probe()
1313 struct device *dev = component->dev; in pm4125_soc_codec_probe()
1324 snd_soc_component_init_regmap(component, pm4125->regmap); in pm4125_soc_codec_probe()
1356 ret = pm4125_mbhc_init(component); in pm4125_soc_codec_probe()
1358 dev_err(component->dev, "mbhc initialization failed\n"); in pm4125_soc_codec_probe()
1363 static void pm4125_soc_codec_remove(struct snd_soc_component *component) in pm4125_soc_codec_remove() argument
1365 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); in pm4125_soc_codec_remove()
1367 pm4125_mbhc_deinit(component); in pm4125_soc_codec_remove()