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_read(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()
629 struct snd_soc_component *component = dai->component; in wm8900_hw_params() local
632 reg = snd_soc_component_read(component, WM8900_REG_AUDIO1) & ~0x60; in wm8900_hw_params()
650 snd_soc_component_write(component, WM8900_REG_AUDIO1, reg); in wm8900_hw_params()
653 reg = snd_soc_component_read(component, WM8900_REG_DACCTRL); in wm8900_hw_params()
660 snd_soc_component_write(component, WM8900_REG_DACCTRL, reg); in wm8900_hw_params()
745 static int wm8900_set_fll(struct snd_soc_component *component, in wm8900_set_fll() argument
748 struct wm8900_priv *wm8900 = snd_soc_component_get_drvdata(component); in wm8900_set_fll()
755 snd_soc_component_update_bits(component, WM8900_REG_POWER1, in wm8900_set_fll()
760 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING1, in wm8900_set_fll()
762 snd_soc_component_update_bits(component, WM8900_REG_FLLCTL1, in wm8900_set_fll()
778 snd_soc_component_write(component, WM8900_REG_FLLCTL1, in wm8900_set_fll()
781 snd_soc_component_write(component, WM8900_REG_FLLCTL4, fll_div.n >> 5); in wm8900_set_fll()
782 snd_soc_component_write(component, WM8900_REG_FLLCTL5, in wm8900_set_fll()
786 snd_soc_component_write(component, WM8900_REG_FLLCTL2, in wm8900_set_fll()
788 snd_soc_component_write(component, WM8900_REG_FLLCTL3, fll_div.k & 0xff); in wm8900_set_fll()
790 snd_soc_component_write(component, WM8900_REG_FLLCTL2, 0); in wm8900_set_fll()
793 snd_soc_component_write(component, WM8900_REG_FLLCTL6, in wm8900_set_fll()
796 snd_soc_component_write(component, WM8900_REG_FLLCTL6, 0); in wm8900_set_fll()
798 snd_soc_component_update_bits(component, WM8900_REG_POWER1, in wm8900_set_fll()
803 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING1, in wm8900_set_fll()
812 return wm8900_set_fll(codec_dai->component, pll_id, freq_in, freq_out); in wm8900_set_dai_pll()
818 struct snd_soc_component *component = codec_dai->component; in wm8900_set_dai_clkdiv() local
822 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING1, in wm8900_set_dai_clkdiv()
826 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING1, in wm8900_set_dai_clkdiv()
830 snd_soc_component_update_bits(component, WM8900_REG_AUDIO4, in wm8900_set_dai_clkdiv()
834 snd_soc_component_update_bits(component, WM8900_REG_AUDIO3, in wm8900_set_dai_clkdiv()
838 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING2, in wm8900_set_dai_clkdiv()
842 snd_soc_component_update_bits(component, WM8900_REG_CLOCKING2, in wm8900_set_dai_clkdiv()
846 snd_soc_component_update_bits(component, WM8900_REG_DACCTRL, in wm8900_set_dai_clkdiv()
860 struct snd_soc_component *component = codec_dai->component; in wm8900_set_dai_fmt() local
863 clocking1 = snd_soc_component_read(component, WM8900_REG_CLOCKING1); in wm8900_set_dai_fmt()
864 aif1 = snd_soc_component_read(component, WM8900_REG_AUDIO1); in wm8900_set_dai_fmt()
865 aif3 = snd_soc_component_read(component, WM8900_REG_AUDIO3); in wm8900_set_dai_fmt()
866 aif4 = snd_soc_component_read(component, WM8900_REG_AUDIO4); in wm8900_set_dai_fmt()
962 snd_soc_component_write(component, WM8900_REG_CLOCKING1, clocking1); in wm8900_set_dai_fmt()
963 snd_soc_component_write(component, WM8900_REG_AUDIO1, aif1); in wm8900_set_dai_fmt()
964 snd_soc_component_write(component, WM8900_REG_AUDIO3, aif3); in wm8900_set_dai_fmt()
965 snd_soc_component_write(component, WM8900_REG_AUDIO4, aif4); in wm8900_set_dai_fmt()
972 struct snd_soc_component *component = codec_dai->component; in wm8900_mute() local
975 reg = snd_soc_component_read(component, WM8900_REG_DACCTRL); in wm8900_mute()
982 snd_soc_component_write(component, WM8900_REG_DACCTRL, reg); in wm8900_mute()
1023 static int wm8900_set_bias_level(struct snd_soc_component *component, in wm8900_set_bias_level() argument
1031 snd_soc_component_update_bits(component, WM8900_REG_GPIO, in wm8900_set_bias_level()
1034 snd_soc_component_update_bits(component, WM8900_REG_ADDCTL, in wm8900_set_bias_level()
1044 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { in wm8900_set_bias_level()
1046 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1050 snd_soc_component_write(component, WM8900_REG_ADDCTL, in wm8900_set_bias_level()
1055 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1062 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1066 snd_soc_component_write(component, WM8900_REG_ADDCTL, 0); in wm8900_set_bias_level()
1068 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1072 reg = snd_soc_component_read(component, WM8900_REG_POWER1); in wm8900_set_bias_level()
1073 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1076 snd_soc_component_write(component, WM8900_REG_POWER2, in wm8900_set_bias_level()
1078 snd_soc_component_write(component, WM8900_REG_POWER3, 0); in wm8900_set_bias_level()
1083 reg = snd_soc_component_read(component, WM8900_REG_POWER1); in wm8900_set_bias_level()
1084 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1086 snd_soc_component_write(component, WM8900_REG_ADDCTL, in wm8900_set_bias_level()
1091 snd_soc_component_write(component, WM8900_REG_POWER1, in wm8900_set_bias_level()
1096 snd_soc_component_write(component, WM8900_REG_HPCTL1, 0); in wm8900_set_bias_level()
1099 snd_soc_component_write(component, WM8900_REG_ADDCTL, 0); in wm8900_set_bias_level()
1100 snd_soc_component_write(component, WM8900_REG_POWER1, 0); in wm8900_set_bias_level()
1101 snd_soc_component_write(component, WM8900_REG_POWER2, 0); in wm8900_set_bias_level()
1102 snd_soc_component_write(component, WM8900_REG_POWER3, 0); in wm8900_set_bias_level()
1108 snd_soc_component_write(component, WM8900_REG_POWER2, in wm8900_set_bias_level()
1115 static int wm8900_suspend(struct snd_soc_component *component) in wm8900_suspend() argument
1117 struct wm8900_priv *wm8900 = snd_soc_component_get_drvdata(component); in wm8900_suspend()
1123 ret = wm8900_set_fll(component, 0, 0, 0); in wm8900_suspend()
1125 dev_err(component->dev, "Failed to stop FLL\n"); in wm8900_suspend()
1132 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); in wm8900_suspend()
1137 static int wm8900_resume(struct snd_soc_component *component) in wm8900_resume() argument
1139 struct wm8900_priv *wm8900 = snd_soc_component_get_drvdata(component); in wm8900_resume()
1142 wm8900_reset(component); in wm8900_resume()
1146 dev_err(component->dev, "Failed to restore cache: %d\n", ret); in wm8900_resume()
1150 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); in wm8900_resume()
1160 ret = wm8900_set_fll(component, 0, fll_in, fll_out); in wm8900_resume()
1162 dev_err(component->dev, "Failed to restart FLL\n"); in wm8900_resume()
1170 static int wm8900_probe(struct snd_soc_component *component) in wm8900_probe() argument
1174 reg = snd_soc_component_read(component, WM8900_REG_ID); in wm8900_probe()
1176 dev_err(component->dev, "Device is not a WM8900 - ID %x\n", reg); in wm8900_probe()
1180 wm8900_reset(component); in wm8900_probe()
1183 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); in wm8900_probe()
1186 snd_soc_component_update_bits(component, WM8900_REG_LINVOL, 0x100, 0x100); in wm8900_probe()
1187 snd_soc_component_update_bits(component, WM8900_REG_RINVOL, 0x100, 0x100); in wm8900_probe()
1188 snd_soc_component_update_bits(component, WM8900_REG_LOUT1CTL, 0x100, 0x100); in wm8900_probe()
1189 snd_soc_component_update_bits(component, WM8900_REG_ROUT1CTL, 0x100, 0x100); in wm8900_probe()
1190 snd_soc_component_update_bits(component, WM8900_REG_LOUT2CTL, 0x100, 0x100); in wm8900_probe()
1191 snd_soc_component_update_bits(component, WM8900_REG_ROUT2CTL, 0x100, 0x100); in wm8900_probe()
1192 snd_soc_component_update_bits(component, WM8900_REG_LDAC_DV, 0x100, 0x100); in wm8900_probe()
1193 snd_soc_component_update_bits(component, WM8900_REG_RDAC_DV, 0x100, 0x100); in wm8900_probe()
1194 snd_soc_component_update_bits(component, WM8900_REG_LADC_DV, 0x100, 0x100); in wm8900_probe()
1195 snd_soc_component_update_bits(component, WM8900_REG_RADC_DV, 0x100, 0x100); in wm8900_probe()
1198 snd_soc_component_write(component, WM8900_REG_OUTBIASCTL, 0x81); in wm8900_probe()