Lines Matching refs:component

194 	struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);  in wm8961_hp_event()  local
195 u16 hp_reg = snd_soc_component_read(component, WM8961_ANALOGUE_HP_0); in wm8961_hp_event()
196 u16 cp_reg = snd_soc_component_read(component, WM8961_CHARGE_PUMP_1); in wm8961_hp_event()
197 u16 pwr_reg = snd_soc_component_read(component, WM8961_PWR_MGMT_2); in wm8961_hp_event()
198 u16 dcs_reg = snd_soc_component_read(component, WM8961_DC_SERVO_1); in wm8961_hp_event()
204 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
208 snd_soc_component_write(component, WM8961_CHARGE_PUMP_1, cp_reg); in wm8961_hp_event()
213 snd_soc_component_write(component, WM8961_PWR_MGMT_2, pwr_reg); in wm8961_hp_event()
217 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
221 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
227 dev_dbg(component->dev, "Enabling DC servo\n"); in wm8961_hp_event()
229 snd_soc_component_write(component, WM8961_DC_SERVO_1, dcs_reg); in wm8961_hp_event()
232 dcs_reg = snd_soc_component_read(component, WM8961_DC_SERVO_1); in wm8961_hp_event()
238 dev_err(component->dev, "DC servo timed out\n"); in wm8961_hp_event()
240 dev_dbg(component->dev, "DC servo startup complete\n"); in wm8961_hp_event()
244 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
248 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
254 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
258 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
263 snd_soc_component_write(component, WM8961_DC_SERVO_1, dcs_reg); in wm8961_hp_event()
268 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
272 snd_soc_component_write(component, WM8961_PWR_MGMT_2, pwr_reg); in wm8961_hp_event()
275 dev_dbg(component->dev, "Disabling charge pump\n"); in wm8961_hp_event()
276 snd_soc_component_write(component, WM8961_CHARGE_PUMP_1, in wm8961_hp_event()
286 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm8961_spk_event() local
287 u16 pwr_reg = snd_soc_component_read(component, WM8961_PWR_MGMT_2); in wm8961_spk_event()
288 u16 spk_reg = snd_soc_component_read(component, WM8961_CLASS_D_CONTROL_1); in wm8961_spk_event()
293 snd_soc_component_write(component, WM8961_PWR_MGMT_2, pwr_reg); in wm8961_spk_event()
297 snd_soc_component_write(component, WM8961_CLASS_D_CONTROL_1, spk_reg); in wm8961_spk_event()
303 snd_soc_component_write(component, WM8961_CLASS_D_CONTROL_1, spk_reg); in wm8961_spk_event()
307 snd_soc_component_write(component, WM8961_PWR_MGMT_2, pwr_reg); in wm8961_spk_event()
505 struct snd_soc_component *component = dai->component; in wm8961_hw_params() local
506 struct wm8961_priv *wm8961 = snd_soc_component_get_drvdata(component); in wm8961_hw_params()
513 dev_err(component->dev, "MCLK has not been specified\n"); in wm8961_hw_params()
524 reg = snd_soc_component_read(component, WM8961_ADDITIONAL_CONTROL_3); in wm8961_hw_params()
527 snd_soc_component_write(component, WM8961_ADDITIONAL_CONTROL_3, reg); in wm8961_hw_params()
528 dev_dbg(component->dev, "Selected SRATE %dHz for %dHz\n", in wm8961_hw_params()
535 dev_err(component->dev, in wm8961_hw_params()
540 dev_err(component->dev, in wm8961_hw_params()
550 dev_err(component->dev, "Unable to generate CLK_SYS_RATE\n"); in wm8961_hw_params()
553 dev_dbg(component->dev, "Selected CLK_SYS_RATE of %d for %d/%d=%d\n", in wm8961_hw_params()
557 reg = snd_soc_component_read(component, WM8961_CLOCKING_4); in wm8961_hw_params()
560 snd_soc_component_write(component, WM8961_CLOCKING_4, reg); in wm8961_hw_params()
562 reg = snd_soc_component_read(component, WM8961_AUDIO_INTERFACE_0); in wm8961_hw_params()
579 snd_soc_component_write(component, WM8961_AUDIO_INTERFACE_0, reg); in wm8961_hw_params()
582 reg = snd_soc_component_read(component, WM8961_ADC_DAC_CONTROL_2); in wm8961_hw_params()
587 snd_soc_component_write(component, WM8961_ADC_DAC_CONTROL_2, reg); in wm8961_hw_params()
596 struct snd_soc_component *component = dai->component; in wm8961_set_sysclk() local
597 struct wm8961_priv *wm8961 = snd_soc_component_get_drvdata(component); in wm8961_set_sysclk()
598 u16 reg = snd_soc_component_read(component, WM8961_CLOCKING1); in wm8961_set_sysclk()
601 dev_err(component->dev, "MCLK must be <33MHz\n"); in wm8961_set_sysclk()
606 dev_dbg(component->dev, "Using MCLK/2 for %dHz MCLK\n", freq); in wm8961_set_sysclk()
610 dev_dbg(component->dev, "Using MCLK/1 for %dHz MCLK\n", freq); in wm8961_set_sysclk()
614 snd_soc_component_write(component, WM8961_CLOCKING1, reg); in wm8961_set_sysclk()
623 struct snd_soc_component *component = dai->component; in wm8961_set_fmt() local
624 u16 aif = snd_soc_component_read(component, WM8961_AUDIO_INTERFACE_0); in wm8961_set_fmt()
685 return snd_soc_component_write(component, WM8961_AUDIO_INTERFACE_0, aif); in wm8961_set_fmt()
690 struct snd_soc_component *component = dai->component; in wm8961_set_tristate() local
691 u16 reg = snd_soc_component_read(component, WM8961_ADDITIONAL_CONTROL_2); in wm8961_set_tristate()
698 return snd_soc_component_write(component, WM8961_ADDITIONAL_CONTROL_2, reg); in wm8961_set_tristate()
703 struct snd_soc_component *component = dai->component; in wm8961_mute() local
704 u16 reg = snd_soc_component_read(component, WM8961_ADC_DAC_CONTROL_1); in wm8961_mute()
713 return snd_soc_component_write(component, WM8961_ADC_DAC_CONTROL_1, reg); in wm8961_mute()
718 struct snd_soc_component *component = dai->component; in wm8961_set_clkdiv() local
723 reg = snd_soc_component_read(component, WM8961_CLOCKING2); in wm8961_set_clkdiv()
726 snd_soc_component_write(component, WM8961_CLOCKING2, reg); in wm8961_set_clkdiv()
730 reg = snd_soc_component_read(component, WM8961_AUDIO_INTERFACE_2); in wm8961_set_clkdiv()
733 snd_soc_component_write(component, WM8961_AUDIO_INTERFACE_2, reg); in wm8961_set_clkdiv()
743 static int wm8961_set_bias_level(struct snd_soc_component *component, in wm8961_set_bias_level() argument
758 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY) { in wm8961_set_bias_level()
760 reg = snd_soc_component_read(component, WM8961_ANTI_POP); in wm8961_set_bias_level()
762 snd_soc_component_write(component, WM8961_ANTI_POP, reg); in wm8961_set_bias_level()
765 reg = snd_soc_component_read(component, WM8961_PWR_MGMT_1); in wm8961_set_bias_level()
768 snd_soc_component_write(component, WM8961_PWR_MGMT_1, reg); in wm8961_set_bias_level()
773 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_PREPARE) { in wm8961_set_bias_level()
775 reg = snd_soc_component_read(component, WM8961_PWR_MGMT_1); in wm8961_set_bias_level()
777 snd_soc_component_write(component, WM8961_PWR_MGMT_1, reg); in wm8961_set_bias_level()
780 reg = snd_soc_component_read(component, WM8961_ANTI_POP); in wm8961_set_bias_level()
782 snd_soc_component_write(component, WM8961_ANTI_POP, reg); in wm8961_set_bias_level()
785 reg = snd_soc_component_read(component, WM8961_PWR_MGMT_1); in wm8961_set_bias_level()
787 snd_soc_component_write(component, WM8961_PWR_MGMT_1, reg); in wm8961_set_bias_level()
832 static int wm8961_probe(struct snd_soc_component *component) in wm8961_probe() argument
837 reg = snd_soc_component_read(component, WM8961_CHARGE_PUMP_B); in wm8961_probe()
839 snd_soc_component_write(component, WM8961_CHARGE_PUMP_B, reg); in wm8961_probe()
843 reg = snd_soc_component_read(component, WM8961_ROUT1_VOLUME); in wm8961_probe()
844 snd_soc_component_write(component, WM8961_ROUT1_VOLUME, in wm8961_probe()
846 snd_soc_component_write(component, WM8961_LOUT1_VOLUME, reg | WM8961_LO1ZC); in wm8961_probe()
847 reg = snd_soc_component_read(component, WM8961_ROUT2_VOLUME); in wm8961_probe()
848 snd_soc_component_write(component, WM8961_ROUT2_VOLUME, in wm8961_probe()
850 snd_soc_component_write(component, WM8961_LOUT2_VOLUME, reg | WM8961_SPKLZC); in wm8961_probe()
852 reg = snd_soc_component_read(component, WM8961_RIGHT_ADC_VOLUME); in wm8961_probe()
853 snd_soc_component_write(component, WM8961_RIGHT_ADC_VOLUME, reg | WM8961_ADCVU); in wm8961_probe()
854 reg = snd_soc_component_read(component, WM8961_RIGHT_INPUT_VOLUME); in wm8961_probe()
855 snd_soc_component_write(component, WM8961_RIGHT_INPUT_VOLUME, reg | WM8961_IPVU); in wm8961_probe()
858 reg = snd_soc_component_read(component, WM8961_ADC_DAC_CONTROL_2); in wm8961_probe()
860 snd_soc_component_write(component, WM8961_ADC_DAC_CONTROL_2, reg); in wm8961_probe()
865 reg = snd_soc_component_read(component, WM8961_CLOCKING_3); in wm8961_probe()
867 snd_soc_component_write(component, WM8961_CLOCKING_3, reg); in wm8961_probe()
874 static int wm8961_resume(struct snd_soc_component *component) in wm8961_resume() argument
876 snd_soc_component_cache_sync(component); in wm8961_resume()