Lines Matching refs:component

216 static void wm8900_reset(struct snd_soc_component *component)  in wm8900_reset()  argument
218 snd_soc_component_write(component, WM8900_REG_RESET, 0); in wm8900_reset()
224 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm8900_hp_event() local
225 u16 hpctl1 = snd_soc_component_read32(component, WM8900_REG_HPCTL1); in wm8900_hp_event()
232 snd_soc_component_write(component, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
241 snd_soc_component_write(component, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
248 snd_soc_component_write(component, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
252 snd_soc_component_write(component, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
254 snd_soc_component_write(component, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
260 snd_soc_component_write(component, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
264 snd_soc_component_write(component, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
270 snd_soc_component_write(component, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
275 snd_soc_component_write(component, WM8900_REG_HPCTL1, 0); in wm8900_hp_event()
635 struct snd_soc_component *component = dai->component; in wm8900_hw_params() local
638 reg = snd_soc_component_read32(component, WM8900_REG_AUDIO1) & ~0x60; in wm8900_hw_params()
656 snd_soc_component_write(component, WM8900_REG_AUDIO1, reg); in wm8900_hw_params()
659 reg = snd_soc_component_read32(component, WM8900_REG_DACCTRL); in wm8900_hw_params()
666 snd_soc_component_write(component, WM8900_REG_DACCTRL, reg); in wm8900_hw_params()
751 static int wm8900_set_fll(struct snd_soc_component *component, in wm8900_set_fll() argument
754 struct wm8900_priv *wm8900 = snd_soc_component_get_drvdata(component); in wm8900_set_fll()
761 snd_soc_component_update_bits(component, WM8900_REG_POWER1, in wm8900_set_fll()
766 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING1, in wm8900_set_fll()
768 snd_soc_component_update_bits(component, WM8900_REG_FLLCTL1, in wm8900_set_fll()
784 snd_soc_component_write(component, WM8900_REG_FLLCTL1, in wm8900_set_fll()
787 snd_soc_component_write(component, WM8900_REG_FLLCTL4, fll_div.n >> 5); in wm8900_set_fll()
788 snd_soc_component_write(component, WM8900_REG_FLLCTL5, in wm8900_set_fll()
792 snd_soc_component_write(component, WM8900_REG_FLLCTL2, in wm8900_set_fll()
794 snd_soc_component_write(component, WM8900_REG_FLLCTL3, fll_div.k & 0xff); in wm8900_set_fll()
796 snd_soc_component_write(component, WM8900_REG_FLLCTL2, 0); in wm8900_set_fll()
799 snd_soc_component_write(component, WM8900_REG_FLLCTL6, in wm8900_set_fll()
802 snd_soc_component_write(component, WM8900_REG_FLLCTL6, 0); in wm8900_set_fll()
804 snd_soc_component_update_bits(component, WM8900_REG_POWER1, in wm8900_set_fll()
809 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING1, in wm8900_set_fll()
818 return wm8900_set_fll(codec_dai->component, pll_id, freq_in, freq_out); in wm8900_set_dai_pll()
824 struct snd_soc_component *component = codec_dai->component; in wm8900_set_dai_clkdiv() local
828 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING1, in wm8900_set_dai_clkdiv()
832 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING1, in wm8900_set_dai_clkdiv()
836 snd_soc_component_update_bits(component, WM8900_REG_AUDIO4, in wm8900_set_dai_clkdiv()
840 snd_soc_component_update_bits(component, WM8900_REG_AUDIO3, in wm8900_set_dai_clkdiv()
844 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING2, in wm8900_set_dai_clkdiv()
848 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING2, in wm8900_set_dai_clkdiv()
852 snd_soc_component_update_bits(component, WM8900_REG_DACCTRL, in wm8900_set_dai_clkdiv()
866 struct snd_soc_component *component = codec_dai->component; in wm8900_set_dai_fmt() local
869 clocking1 = snd_soc_component_read32(component, WM8900_REG_CLOCKING1); in wm8900_set_dai_fmt()
870 aif1 = snd_soc_component_read32(component, WM8900_REG_AUDIO1); in wm8900_set_dai_fmt()
871 aif3 = snd_soc_component_read32(component, WM8900_REG_AUDIO3); in wm8900_set_dai_fmt()
872 aif4 = snd_soc_component_read32(component, WM8900_REG_AUDIO4); in wm8900_set_dai_fmt()
968 snd_soc_component_write(component, WM8900_REG_CLOCKING1, clocking1); in wm8900_set_dai_fmt()
969 snd_soc_component_write(component, WM8900_REG_AUDIO1, aif1); in wm8900_set_dai_fmt()
970 snd_soc_component_write(component, WM8900_REG_AUDIO3, aif3); in wm8900_set_dai_fmt()
971 snd_soc_component_write(component, WM8900_REG_AUDIO4, aif4); in wm8900_set_dai_fmt()
978 struct snd_soc_component *component = codec_dai->component; in wm8900_digital_mute() local
981 reg = snd_soc_component_read32(component, WM8900_REG_DACCTRL); in wm8900_digital_mute()
988 snd_soc_component_write(component, WM8900_REG_DACCTRL, reg); in wm8900_digital_mute()
1028 static int wm8900_set_bias_level(struct snd_soc_component *component, in wm8900_set_bias_level() argument
1036 snd_soc_component_update_bits(component, WM8900_REG_GPIO, in wm8900_set_bias_level()
1039 snd_soc_component_update_bits(component, WM8900_REG_ADDCTL, in wm8900_set_bias_level()
1049 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { in wm8900_set_bias_level()
1051 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1055 snd_soc_component_write(component, WM8900_REG_ADDCTL, in wm8900_set_bias_level()
1060 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1067 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1071 snd_soc_component_write(component, WM8900_REG_ADDCTL, 0); in wm8900_set_bias_level()
1073 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1077 reg = snd_soc_component_read32(component, WM8900_REG_POWER1); in wm8900_set_bias_level()
1078 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1081 snd_soc_component_write(component, WM8900_REG_POWER2, in wm8900_set_bias_level()
1083 snd_soc_component_write(component, WM8900_REG_POWER3, 0); in wm8900_set_bias_level()
1088 reg = snd_soc_component_read32(component, WM8900_REG_POWER1); in wm8900_set_bias_level()
1089 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1091 snd_soc_component_write(component, WM8900_REG_ADDCTL, in wm8900_set_bias_level()
1096 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1101 snd_soc_component_write(component, WM8900_REG_HPCTL1, 0); in wm8900_set_bias_level()
1104 snd_soc_component_write(component, WM8900_REG_ADDCTL, 0); in wm8900_set_bias_level()
1105 snd_soc_component_write(component, WM8900_REG_POWER1, 0); in wm8900_set_bias_level()
1106 snd_soc_component_write(component, WM8900_REG_POWER2, 0); in wm8900_set_bias_level()
1107 snd_soc_component_write(component, WM8900_REG_POWER3, 0); in wm8900_set_bias_level()
1113 snd_soc_component_write(component, WM8900_REG_POWER2, in wm8900_set_bias_level()
1120 static int wm8900_suspend(struct snd_soc_component *component) in wm8900_suspend() argument
1122 struct wm8900_priv *wm8900 = snd_soc_component_get_drvdata(component); in wm8900_suspend()
1128 ret = wm8900_set_fll(component, 0, 0, 0); in wm8900_suspend()
1130 dev_err(component->dev, "Failed to stop FLL\n"); in wm8900_suspend()
1137 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); in wm8900_suspend()
1142 static int wm8900_resume(struct snd_soc_component *component) in wm8900_resume() argument
1144 struct wm8900_priv *wm8900 = snd_soc_component_get_drvdata(component); in wm8900_resume()
1147 wm8900_reset(component); in wm8900_resume()
1151 dev_err(component->dev, "Failed to restore cache: %d\n", ret); in wm8900_resume()
1155 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); in wm8900_resume()
1165 ret = wm8900_set_fll(component, 0, fll_in, fll_out); in wm8900_resume()
1167 dev_err(component->dev, "Failed to restart FLL\n"); in wm8900_resume()
1175 static int wm8900_probe(struct snd_soc_component *component) in wm8900_probe() argument
1179 reg = snd_soc_component_read32(component, WM8900_REG_ID); in wm8900_probe()
1181 dev_err(component->dev, "Device is not a WM8900 - ID %x\n", reg); in wm8900_probe()
1185 wm8900_reset(component); in wm8900_probe()
1188 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); in wm8900_probe()
1191 snd_soc_component_update_bits(component, WM8900_REG_LINVOL, 0x100, 0x100); in wm8900_probe()
1192 snd_soc_component_update_bits(component, WM8900_REG_RINVOL, 0x100, 0x100); in wm8900_probe()
1193 snd_soc_component_update_bits(component, WM8900_REG_LOUT1CTL, 0x100, 0x100); in wm8900_probe()
1194 snd_soc_component_update_bits(component, WM8900_REG_ROUT1CTL, 0x100, 0x100); in wm8900_probe()
1195 snd_soc_component_update_bits(component, WM8900_REG_LOUT2CTL, 0x100, 0x100); in wm8900_probe()
1196 snd_soc_component_update_bits(component, WM8900_REG_ROUT2CTL, 0x100, 0x100); in wm8900_probe()
1197 snd_soc_component_update_bits(component, WM8900_REG_LDAC_DV, 0x100, 0x100); in wm8900_probe()
1198 snd_soc_component_update_bits(component, WM8900_REG_RDAC_DV, 0x100, 0x100); in wm8900_probe()
1199 snd_soc_component_update_bits(component, WM8900_REG_LADC_DV, 0x100, 0x100); in wm8900_probe()
1200 snd_soc_component_update_bits(component, WM8900_REG_RADC_DV, 0x100, 0x100); in wm8900_probe()
1203 snd_soc_component_write(component, WM8900_REG_OUTBIASCTL, 0x81); in wm8900_probe()