• Home
  • Raw
  • Download

Lines Matching full:component

197 	struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);  in wm8961_hp_event()  local
198 u16 hp_reg = snd_soc_component_read32(component, WM8961_ANALOGUE_HP_0); in wm8961_hp_event()
199 u16 cp_reg = snd_soc_component_read32(component, WM8961_CHARGE_PUMP_1); in wm8961_hp_event()
200 u16 pwr_reg = snd_soc_component_read32(component, WM8961_PWR_MGMT_2); in wm8961_hp_event()
201 u16 dcs_reg = snd_soc_component_read32(component, WM8961_DC_SERVO_1); in wm8961_hp_event()
207 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
211 snd_soc_component_write(component, WM8961_CHARGE_PUMP_1, cp_reg); in wm8961_hp_event()
216 snd_soc_component_write(component, WM8961_PWR_MGMT_2, pwr_reg); in wm8961_hp_event()
220 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
224 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
230 dev_dbg(component->dev, "Enabling DC servo\n"); in wm8961_hp_event()
232 snd_soc_component_write(component, WM8961_DC_SERVO_1, dcs_reg); in wm8961_hp_event()
235 dcs_reg = snd_soc_component_read32(component, WM8961_DC_SERVO_1); in wm8961_hp_event()
241 dev_err(component->dev, "DC servo timed out\n"); in wm8961_hp_event()
243 dev_dbg(component->dev, "DC servo startup complete\n"); in wm8961_hp_event()
247 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
251 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
257 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
261 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
266 snd_soc_component_write(component, WM8961_DC_SERVO_1, dcs_reg); in wm8961_hp_event()
271 snd_soc_component_write(component, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
275 snd_soc_component_write(component, WM8961_PWR_MGMT_2, pwr_reg); in wm8961_hp_event()
278 dev_dbg(component->dev, "Disabling charge pump\n"); in wm8961_hp_event()
279 snd_soc_component_write(component, WM8961_CHARGE_PUMP_1, in wm8961_hp_event()
289 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm8961_spk_event() local
290 u16 pwr_reg = snd_soc_component_read32(component, WM8961_PWR_MGMT_2); in wm8961_spk_event()
291 u16 spk_reg = snd_soc_component_read32(component, WM8961_CLASS_D_CONTROL_1); in wm8961_spk_event()
296 snd_soc_component_write(component, WM8961_PWR_MGMT_2, pwr_reg); in wm8961_spk_event()
300 snd_soc_component_write(component, WM8961_CLASS_D_CONTROL_1, spk_reg); in wm8961_spk_event()
306 snd_soc_component_write(component, WM8961_CLASS_D_CONTROL_1, spk_reg); in wm8961_spk_event()
310 snd_soc_component_write(component, WM8961_PWR_MGMT_2, pwr_reg); in wm8961_spk_event()
508 struct snd_soc_component *component = dai->component; in wm8961_hw_params() local
509 struct wm8961_priv *wm8961 = snd_soc_component_get_drvdata(component); in wm8961_hw_params()
516 dev_err(component->dev, "MCLK has not been specified\n"); in wm8961_hw_params()
527 reg = snd_soc_component_read32(component, WM8961_ADDITIONAL_CONTROL_3); in wm8961_hw_params()
530 snd_soc_component_write(component, WM8961_ADDITIONAL_CONTROL_3, reg); in wm8961_hw_params()
531 dev_dbg(component->dev, "Selected SRATE %dHz for %dHz\n", in wm8961_hw_params()
538 dev_err(component->dev, in wm8961_hw_params()
543 dev_err(component->dev, in wm8961_hw_params()
553 dev_err(component->dev, "Unable to generate CLK_SYS_RATE\n"); in wm8961_hw_params()
556 dev_dbg(component->dev, "Selected CLK_SYS_RATE of %d for %d/%d=%d\n", in wm8961_hw_params()
560 reg = snd_soc_component_read32(component, WM8961_CLOCKING_4); in wm8961_hw_params()
563 snd_soc_component_write(component, WM8961_CLOCKING_4, reg); in wm8961_hw_params()
565 reg = snd_soc_component_read32(component, WM8961_AUDIO_INTERFACE_0); in wm8961_hw_params()
582 snd_soc_component_write(component, WM8961_AUDIO_INTERFACE_0, reg); in wm8961_hw_params()
585 reg = snd_soc_component_read32(component, WM8961_ADC_DAC_CONTROL_2); in wm8961_hw_params()
590 snd_soc_component_write(component, WM8961_ADC_DAC_CONTROL_2, reg); in wm8961_hw_params()
599 struct snd_soc_component *component = dai->component; in wm8961_set_sysclk() local
600 struct wm8961_priv *wm8961 = snd_soc_component_get_drvdata(component); in wm8961_set_sysclk()
601 u16 reg = snd_soc_component_read32(component, WM8961_CLOCKING1); in wm8961_set_sysclk()
604 dev_err(component->dev, "MCLK must be <33MHz\n"); in wm8961_set_sysclk()
609 dev_dbg(component->dev, "Using MCLK/2 for %dHz MCLK\n", freq); in wm8961_set_sysclk()
613 dev_dbg(component->dev, "Using MCLK/1 for %dHz MCLK\n", freq); in wm8961_set_sysclk()
617 snd_soc_component_write(component, WM8961_CLOCKING1, reg); in wm8961_set_sysclk()
626 struct snd_soc_component *component = dai->component; in wm8961_set_fmt() local
627 u16 aif = snd_soc_component_read32(component, WM8961_AUDIO_INTERFACE_0); in wm8961_set_fmt()
688 return snd_soc_component_write(component, WM8961_AUDIO_INTERFACE_0, aif); in wm8961_set_fmt()
693 struct snd_soc_component *component = dai->component; in wm8961_set_tristate() local
694 u16 reg = snd_soc_component_read32(component, WM8961_ADDITIONAL_CONTROL_2); in wm8961_set_tristate()
701 return snd_soc_component_write(component, WM8961_ADDITIONAL_CONTROL_2, reg); in wm8961_set_tristate()
706 struct snd_soc_component *component = dai->component; in wm8961_digital_mute() local
707 u16 reg = snd_soc_component_read32(component, WM8961_ADC_DAC_CONTROL_1); in wm8961_digital_mute()
716 return snd_soc_component_write(component, WM8961_ADC_DAC_CONTROL_1, reg); in wm8961_digital_mute()
721 struct snd_soc_component *component = dai->component; in wm8961_set_clkdiv() local
726 reg = snd_soc_component_read32(component, WM8961_CLOCKING2); in wm8961_set_clkdiv()
729 snd_soc_component_write(component, WM8961_CLOCKING2, reg); in wm8961_set_clkdiv()
733 reg = snd_soc_component_read32(component, WM8961_AUDIO_INTERFACE_2); in wm8961_set_clkdiv()
736 snd_soc_component_write(component, WM8961_AUDIO_INTERFACE_2, reg); in wm8961_set_clkdiv()
746 static int wm8961_set_bias_level(struct snd_soc_component *component, in wm8961_set_bias_level() argument
761 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY) { in wm8961_set_bias_level()
763 reg = snd_soc_component_read32(component, WM8961_ANTI_POP); in wm8961_set_bias_level()
765 snd_soc_component_write(component, WM8961_ANTI_POP, reg); in wm8961_set_bias_level()
768 reg = snd_soc_component_read32(component, WM8961_PWR_MGMT_1); in wm8961_set_bias_level()
771 snd_soc_component_write(component, WM8961_PWR_MGMT_1, reg); in wm8961_set_bias_level()
776 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_PREPARE) { in wm8961_set_bias_level()
778 reg = snd_soc_component_read32(component, WM8961_PWR_MGMT_1); in wm8961_set_bias_level()
780 snd_soc_component_write(component, WM8961_PWR_MGMT_1, reg); in wm8961_set_bias_level()
783 reg = snd_soc_component_read32(component, WM8961_ANTI_POP); in wm8961_set_bias_level()
785 snd_soc_component_write(component, WM8961_ANTI_POP, reg); in wm8961_set_bias_level()
788 reg = snd_soc_component_read32(component, WM8961_PWR_MGMT_1); in wm8961_set_bias_level()
790 snd_soc_component_write(component, WM8961_PWR_MGMT_1, reg); in wm8961_set_bias_level()
834 static int wm8961_probe(struct snd_soc_component *component) in wm8961_probe() argument
839 reg = snd_soc_component_read32(component, WM8961_CHARGE_PUMP_B); in wm8961_probe()
841 snd_soc_component_write(component, WM8961_CHARGE_PUMP_B, reg); in wm8961_probe()
845 reg = snd_soc_component_read32(component, WM8961_ROUT1_VOLUME); in wm8961_probe()
846 snd_soc_component_write(component, WM8961_ROUT1_VOLUME, in wm8961_probe()
848 snd_soc_component_write(component, WM8961_LOUT1_VOLUME, reg | WM8961_LO1ZC); in wm8961_probe()
849 reg = snd_soc_component_read32(component, WM8961_ROUT2_VOLUME); in wm8961_probe()
850 snd_soc_component_write(component, WM8961_ROUT2_VOLUME, in wm8961_probe()
852 snd_soc_component_write(component, WM8961_LOUT2_VOLUME, reg | WM8961_SPKLZC); in wm8961_probe()
854 reg = snd_soc_component_read32(component, WM8961_RIGHT_ADC_VOLUME); in wm8961_probe()
855 snd_soc_component_write(component, WM8961_RIGHT_ADC_VOLUME, reg | WM8961_ADCVU); in wm8961_probe()
856 reg = snd_soc_component_read32(component, WM8961_RIGHT_INPUT_VOLUME); in wm8961_probe()
857 snd_soc_component_write(component, WM8961_RIGHT_INPUT_VOLUME, reg | WM8961_IPVU); in wm8961_probe()
860 reg = snd_soc_component_read32(component, WM8961_ADC_DAC_CONTROL_2); in wm8961_probe()
862 snd_soc_component_write(component, WM8961_ADC_DAC_CONTROL_2, reg); in wm8961_probe()
867 reg = snd_soc_component_read32(component, WM8961_CLOCKING_3); in wm8961_probe()
869 snd_soc_component_write(component, WM8961_CLOCKING_3, reg); in wm8961_probe()
876 static int wm8961_resume(struct snd_soc_component *component) in wm8961_resume() argument
878 snd_soc_component_cache_sync(component); in wm8961_resume()