Lines Matching refs:component
131 static int wm8955_reset(struct snd_soc_component *component) in wm8955_reset() argument
133 return snd_soc_component_write(component, WM8955_RESET, 0); in wm8955_reset()
245 static int wm8955_configure_clocking(struct snd_soc_component *component) in wm8955_configure_clocking() argument
247 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_configure_clocking()
270 dev_err(component->dev, "Sample rate %dHz unsupported\n", in wm8955_configure_clocking()
285 ret = wm8995_pll_factors(component->dev, wm8955->mclk_rate, in wm8955_configure_clocking()
288 dev_err(component->dev, in wm8955_configure_clocking()
294 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_1, in wm8955_configure_clocking()
298 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_2, in wm8955_configure_clocking()
301 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_3, in wm8955_configure_clocking()
305 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_4, in wm8955_configure_clocking()
308 snd_soc_component_update_bits(component, WM8955_PLL_CONTROL_4, in wm8955_configure_clocking()
317 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_configure_clocking()
319 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_configure_clocking()
325 snd_soc_component_update_bits(component, WM8955_SAMPLE_RATE, in wm8955_configure_clocking()
327 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_configure_clocking()
336 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm8955_sysclk() local
342 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_sysclk()
344 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_sysclk()
351 ret = wm8955_configure_clocking(component); in wm8955_sysclk()
363 static int wm8955_set_deemph(struct snd_soc_component *component) in wm8955_set_deemph() argument
365 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_set_deemph()
384 dev_dbg(component->dev, "Set deemphasis %d\n", val); in wm8955_set_deemph()
386 return snd_soc_component_update_bits(component, WM8955_DAC_CONTROL, in wm8955_set_deemph()
393 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in wm8955_get_deemph() local
394 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_get_deemph()
403 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in wm8955_put_deemph() local
404 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_put_deemph()
412 return wm8955_set_deemph(component); in wm8955_put_deemph()
595 struct snd_soc_component *component = dai->component; in wm8955_hw_params() local
596 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_hw_params()
616 snd_soc_component_update_bits(component, WM8955_AUDIO_INTERFACE, in wm8955_hw_params()
620 wm8955_set_deemph(component); in wm8955_hw_params()
625 ret = snd_soc_component_read32(component, WM8955_POWER_MANAGEMENT_1); in wm8955_hw_params()
629 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_hw_params()
631 snd_soc_component_update_bits(component, WM8955_CLOCKING_PLL, in wm8955_hw_params()
634 wm8955_configure_clocking(component); in wm8955_hw_params()
644 struct snd_soc_component *component = dai->component; in wm8955_set_sysclk() local
645 struct wm8955_priv *priv = snd_soc_component_get_drvdata(component); in wm8955_set_sysclk()
658 snd_soc_component_update_bits(component, WM8955_SAMPLE_RATE, in wm8955_set_sysclk()
673 struct snd_soc_component *component = dai->component; in wm8955_set_fmt() local
743 snd_soc_component_update_bits(component, WM8955_AUDIO_INTERFACE, in wm8955_set_fmt()
753 struct snd_soc_component *component = codec_dai->component; in wm8955_digital_mute() local
761 snd_soc_component_update_bits(component, WM8955_DAC_CONTROL, WM8955_DACMU, val); in wm8955_digital_mute()
766 static int wm8955_set_bias_level(struct snd_soc_component *component, in wm8955_set_bias_level() argument
769 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_set_bias_level()
778 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_set_bias_level()
783 snd_soc_component_update_bits(component, WM8955_ADDITIONAL_CONTROL_1, in wm8955_set_bias_level()
789 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { in wm8955_set_bias_level()
793 dev_err(component->dev, in wm8955_set_bias_level()
802 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_set_bias_level()
812 snd_soc_component_update_bits(component, in wm8955_set_bias_level()
818 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_set_bias_level()
823 snd_soc_component_update_bits(component, WM8955_ADDITIONAL_CONTROL_1, in wm8955_set_bias_level()
829 snd_soc_component_update_bits(component, in wm8955_set_bias_level()
834 snd_soc_component_update_bits(component, WM8955_POWER_MANAGEMENT_1, in wm8955_set_bias_level()
869 static int wm8955_probe(struct snd_soc_component *component) in wm8955_probe() argument
871 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); in wm8955_probe()
872 struct wm8955_pdata *pdata = dev_get_platdata(component->dev); in wm8955_probe()
878 ret = devm_regulator_bulk_get(component->dev, ARRAY_SIZE(wm8955->supplies), in wm8955_probe()
881 dev_err(component->dev, "Failed to request supplies: %d\n", ret); in wm8955_probe()
888 dev_err(component->dev, "Failed to enable supplies: %d\n", ret); in wm8955_probe()
892 ret = wm8955_reset(component); in wm8955_probe()
894 dev_err(component->dev, "Failed to issue reset: %d\n", ret); in wm8955_probe()
899 snd_soc_component_update_bits(component, WM8955_LEFT_DAC_VOLUME, in wm8955_probe()
901 snd_soc_component_update_bits(component, WM8955_RIGHT_DAC_VOLUME, in wm8955_probe()
903 snd_soc_component_update_bits(component, WM8955_LOUT1_VOLUME, in wm8955_probe()
906 snd_soc_component_update_bits(component, WM8955_ROUT1_VOLUME, in wm8955_probe()
909 snd_soc_component_update_bits(component, WM8955_LOUT2_VOLUME, in wm8955_probe()
912 snd_soc_component_update_bits(component, WM8955_ROUT2_VOLUME, in wm8955_probe()
915 snd_soc_component_update_bits(component, WM8955_MONOOUT_VOLUME, in wm8955_probe()
919 snd_soc_component_update_bits(component, WM8955_BASS_CONTROL, WM8955_BB, WM8955_BB); in wm8955_probe()
924 snd_soc_component_update_bits(component, WM8955_ADDITIONAL_CONTROL_2, in wm8955_probe()
928 snd_soc_component_update_bits(component, WM8955_MONO_OUT_MIX_1, in wm8955_probe()
932 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); in wm8955_probe()