Lines Matching refs:component
564 static int wm8985_add_widgets(struct snd_soc_component *component) in wm8985_add_widgets() argument
566 struct wm8985_priv *wm8985 = snd_soc_component_get_drvdata(component); in wm8985_add_widgets()
567 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in wm8985_add_widgets()
576 snd_soc_add_component_controls(component, wm8985_specific_snd_controls, in wm8985_add_widgets()
592 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in eqmode_get() local
595 reg = snd_soc_component_read(component, WM8985_EQ1_LOW_SHELF); in eqmode_get()
607 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in eqmode_put() local
615 reg_eq = snd_soc_component_read(component, WM8985_EQ1_LOW_SHELF); in eqmode_put()
627 regpwr2 = snd_soc_component_read(component, WM8985_POWER_MANAGEMENT_2); in eqmode_put()
628 regpwr3 = snd_soc_component_read(component, WM8985_POWER_MANAGEMENT_3); in eqmode_put()
630 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_2, in eqmode_put()
632 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_3, in eqmode_put()
634 snd_soc_component_update_bits(component, WM8985_ADDITIONAL_CONTROL, in eqmode_put()
637 snd_soc_component_update_bits(component, WM8985_EQ1_LOW_SHELF, in eqmode_put()
642 snd_soc_component_write(component, WM8985_POWER_MANAGEMENT_2, regpwr2); in eqmode_put()
643 snd_soc_component_write(component, WM8985_POWER_MANAGEMENT_3, regpwr3); in eqmode_put()
647 static int wm8985_reset(struct snd_soc_component *component) in wm8985_reset() argument
649 return snd_soc_component_write(component, WM8985_SOFTWARE_RESET, 0x0); in wm8985_reset()
654 struct snd_soc_component *component = dai->component; in wm8985_dac_mute() local
656 return snd_soc_component_update_bits(component, WM8985_DAC_CONTROL, in wm8985_dac_mute()
663 struct snd_soc_component *component; in wm8985_set_fmt() local
666 component = dai->component; in wm8985_set_fmt()
687 snd_soc_component_update_bits(component, WM8985_AUDIO_INTERFACE, in wm8985_set_fmt()
702 snd_soc_component_update_bits(component, WM8985_CLOCK_GEN_CONTROL, in wm8985_set_fmt()
739 snd_soc_component_update_bits(component, WM8985_AUDIO_INTERFACE, in wm8985_set_fmt()
741 snd_soc_component_update_bits(component, WM8985_AUDIO_INTERFACE, in wm8985_set_fmt()
751 struct snd_soc_component *component; in wm8985_hw_params() local
757 component = dai->component; in wm8985_hw_params()
758 wm8985 = snd_soc_component_get_drvdata(component); in wm8985_hw_params()
783 snd_soc_component_update_bits(component, WM8985_AUDIO_INTERFACE, in wm8985_hw_params()
800 snd_soc_component_update_bits(component, WM8985_ADDITIONAL_CONTROL, in wm8985_hw_params()
819 snd_soc_component_update_bits(component, WM8985_CLOCK_GEN_CONTROL, in wm8985_hw_params()
835 snd_soc_component_update_bits(component, WM8985_CLOCK_GEN_CONTROL, in wm8985_hw_params()
887 struct snd_soc_component *component; in wm8985_set_pll() local
890 component = dai->component; in wm8985_set_pll()
893 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_1, in wm8985_set_pll()
901 snd_soc_component_write(component, WM8985_PLL_N, in wm8985_set_pll()
905 snd_soc_component_write(component, WM8985_PLL_K_3, pll_div.k & 0x1ff); in wm8985_set_pll()
906 snd_soc_component_write(component, WM8985_PLL_K_2, (pll_div.k >> 9) & 0x1ff); in wm8985_set_pll()
907 snd_soc_component_write(component, WM8985_PLL_K_1, (pll_div.k >> 18)); in wm8985_set_pll()
909 snd_soc_component_update_bits(component, WM8985_CLOCK_GEN_CONTROL, in wm8985_set_pll()
912 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_1, in wm8985_set_pll()
921 struct snd_soc_component *component; in wm8985_set_sysclk() local
924 component = dai->component; in wm8985_set_sysclk()
925 wm8985 = snd_soc_component_get_drvdata(component); in wm8985_set_sysclk()
929 snd_soc_component_update_bits(component, WM8985_CLOCK_GEN_CONTROL, in wm8985_set_sysclk()
931 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_1, in wm8985_set_sysclk()
935 snd_soc_component_update_bits(component, WM8985_CLOCK_GEN_CONTROL, in wm8985_set_sysclk()
947 static int wm8985_set_bias_level(struct snd_soc_component *component, in wm8985_set_bias_level() argument
953 wm8985 = snd_soc_component_get_drvdata(component); in wm8985_set_bias_level()
958 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
963 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { in wm8985_set_bias_level()
967 dev_err(component->dev, in wm8985_set_bias_level()
976 snd_soc_component_update_bits(component, WM8985_OUT4_TO_ADC, in wm8985_set_bias_level()
980 snd_soc_component_update_bits(component, WM8985_OUTPUT_CTRL0, in wm8985_set_bias_level()
982 snd_soc_component_update_bits(component, WM8985_OUTPUT_CTRL0, in wm8985_set_bias_level()
986 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
989 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
994 snd_soc_component_update_bits(component, WM8985_OUT4_TO_ADC, in wm8985_set_bias_level()
998 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
1004 snd_soc_component_update_bits(component, WM8985_OUTPUT_CTRL0, in wm8985_set_bias_level()
1006 snd_soc_component_update_bits(component, WM8985_OUTPUT_CTRL0, in wm8985_set_bias_level()
1009 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
1012 snd_soc_component_write(component, WM8985_POWER_MANAGEMENT_1, 0); in wm8985_set_bias_level()
1013 snd_soc_component_write(component, WM8985_POWER_MANAGEMENT_2, 0); in wm8985_set_bias_level()
1014 snd_soc_component_write(component, WM8985_POWER_MANAGEMENT_3, 0); in wm8985_set_bias_level()
1026 static int wm8985_probe(struct snd_soc_component *component) in wm8985_probe() argument
1032 wm8985 = snd_soc_component_get_drvdata(component); in wm8985_probe()
1037 ret = devm_regulator_bulk_get(component->dev, ARRAY_SIZE(wm8985->supplies), in wm8985_probe()
1040 dev_err(component->dev, "Failed to request supplies: %d\n", ret); in wm8985_probe()
1047 dev_err(component->dev, "Failed to enable supplies: %d\n", ret); in wm8985_probe()
1051 ret = wm8985_reset(component); in wm8985_probe()
1053 dev_err(component->dev, "Failed to issue reset: %d\n", ret); in wm8985_probe()
1059 snd_soc_component_update_bits(component, volume_update_regs[i], in wm8985_probe()
1062 snd_soc_component_update_bits(component, WM8985_BIAS_CTRL, WM8985_BIASCUT, in wm8985_probe()
1065 wm8985_add_widgets(component); in wm8985_probe()