Lines Matching refs:component

128 static int wm8955_reset(struct snd_soc_component *component)  in wm8955_reset()  argument
130 return snd_soc_component_write(component, WM8955_RESET, 0); in wm8955_reset()
242 static int wm8955_configure_clocking(struct snd_soc_component *component) in wm8955_configure_clocking() argument
244 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_configure_clocking()
267 dev_err(component->dev, "Sample rate %dHz unsupported\n", in wm8955_configure_clocking()
282 ret = wm8955_pll_factors(component->dev, wm8955->mclk_rate, in wm8955_configure_clocking()
285 dev_err(component->dev, in wm8955_configure_clocking()
291 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_1, in wm8955_configure_clocking()
295 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_2, in wm8955_configure_clocking()
298 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_3, in wm8955_configure_clocking()
302 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_4, in wm8955_configure_clocking()
305 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_4, in wm8955_configure_clocking()
314 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_configure_clocking()
316 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_configure_clocking()
322 snd_soc_component_update_bits(component, WM8955_SAMPLE_RATE, in wm8955_configure_clocking()
324 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_configure_clocking()
333 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm8955_sysclk() local
339 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_sysclk()
341 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_sysclk()
348 ret = wm8955_configure_clocking(component); in wm8955_sysclk()
360 static int wm8955_set_deemph(struct snd_soc_component *component) in wm8955_set_deemph() argument
362 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_set_deemph()
381 dev_dbg(component->dev, "Set deemphasis %d\n", val); in wm8955_set_deemph()
383 return snd_soc_component_update_bits(component, WM8955_DAC_CONTROL, in wm8955_set_deemph()
390 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in wm8955_get_deemph() local
391 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_get_deemph()
400 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in wm8955_put_deemph() local
401 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_put_deemph()
409 return wm8955_set_deemph(component); in wm8955_put_deemph()
592 struct snd_soc_component *component = dai->component; in wm8955_hw_params() local
593 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_hw_params()
613 snd_soc_component_update_bits(component, WM8955_AUDIO_INTERFACE, in wm8955_hw_params()
617 wm8955_set_deemph(component); in wm8955_hw_params()
622 ret = snd_soc_component_read(component, WM8955_POWER_MANAGEMENT_1); in wm8955_hw_params()
626 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_hw_params()
628 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_hw_params()
631 wm8955_configure_clocking(component); in wm8955_hw_params()
641 struct snd_soc_component *component = dai->component; in wm8955_set_sysclk() local
642 struct wm8955_priv *priv = snd_soc_component_get_drvdata(component); in wm8955_set_sysclk()
655 snd_soc_component_update_bits(component, WM8955_SAMPLE_RATE, in wm8955_set_sysclk()
670 struct snd_soc_component *component = dai->component; in wm8955_set_fmt() local
740 snd_soc_component_update_bits(component, WM8955_AUDIO_INTERFACE, in wm8955_set_fmt()
750 struct snd_soc_component *component = codec_dai->component; in wm8955_mute() local
758 snd_soc_component_update_bits(component, WM8955_DAC_CONTROL, WM8955_DACMU, val); in wm8955_mute()
763 static int wm8955_set_bias_level(struct snd_soc_component *component, in wm8955_set_bias_level() argument
766 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_set_bias_level()
775 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_set_bias_level()
780 snd_soc_component_update_bits(component, WM8955_ADDITIONAL_CONTROL_1, in wm8955_set_bias_level()
786 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { in wm8955_set_bias_level()
790 dev_err(component->dev, in wm8955_set_bias_level()
799 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_set_bias_level()
809 snd_soc_component_update_bits(component, in wm8955_set_bias_level()
815 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_set_bias_level()
820 snd_soc_component_update_bits(component, WM8955_ADDITIONAL_CONTROL_1, in wm8955_set_bias_level()
826 snd_soc_component_update_bits(component, in wm8955_set_bias_level()
831 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_set_bias_level()
867 static int wm8955_probe(struct snd_soc_component *component) in wm8955_probe() argument
869 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_probe()
870 struct wm8955_pdata *pdata = dev_get_platdata(component->dev); in wm8955_probe()
876 ret = devm_regulator_bulk_get(component->dev, ARRAY_SIZE(wm8955->supplies), in wm8955_probe()
879 dev_err(component->dev, "Failed to request supplies: %d\n", ret); in wm8955_probe()
886 dev_err(component->dev, "Failed to enable supplies: %d\n", ret); in wm8955_probe()
890 ret = wm8955_reset(component); in wm8955_probe()
892 dev_err(component->dev, "Failed to issue reset: %d\n", ret); in wm8955_probe()
897 snd_soc_component_update_bits(component, WM8955_LEFT_DAC_VOLUME, in wm8955_probe()
899 snd_soc_component_update_bits(component, WM8955_RIGHT_DAC_VOLUME, in wm8955_probe()
901 snd_soc_component_update_bits(component, WM8955_LOUT1_VOLUME, in wm8955_probe()
904 snd_soc_component_update_bits(component, WM8955_ROUT1_VOLUME, in wm8955_probe()
907 snd_soc_component_update_bits(component, WM8955_LOUT2_VOLUME, in wm8955_probe()
910 snd_soc_component_update_bits(component, WM8955_ROUT2_VOLUME, in wm8955_probe()
913 snd_soc_component_update_bits(component, WM8955_MONOOUT_VOLUME, in wm8955_probe()
917 snd_soc_component_update_bits(component, WM8955_BASS_CONTROL, WM8955_BB, WM8955_BB); in wm8955_probe()
922 snd_soc_component_update_bits(component, WM8955_ADDITIONAL_CONTROL_2, in wm8955_probe()
926 snd_soc_component_update_bits(component, WM8955_MONO_OUT_MIX_1, in wm8955_probe()
930 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); in wm8955_probe()