Lines Matching refs:component

63 static void wm8400_component_reset(struct snd_soc_component *component)  in wm8400_component_reset()  argument
65 struct wm8400_priv *wm8400 = snd_soc_component_get_drvdata(component); in wm8400_component_reset()
85 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in wm8400_outpga_put_volsw_vu() local
97 val = snd_soc_component_read(component, reg); in wm8400_outpga_put_volsw_vu()
98 return snd_soc_component_write(component, reg, val | 0x0100); in wm8400_outpga_put_volsw_vu()
318 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in outmixer_event() local
327 reg = snd_soc_component_read(component, WM8400_OUTPUT_MIXER1); in outmixer_event()
335 reg = snd_soc_component_read(component, WM8400_OUTPUT_MIXER2); in outmixer_event()
343 reg = snd_soc_component_read(component, WM8400_SPEAKER_MIXER); in outmixer_event()
351 reg = snd_soc_component_read(component, WM8400_SPEAKER_MIXER); in outmixer_event()
835 struct snd_soc_component *component = codec_dai->component; in wm8400_set_dai_sysclk() local
836 struct wm8400_priv *wm8400 = snd_soc_component_get_drvdata(component); in wm8400_set_dai_sysclk()
924 struct snd_soc_component *component = codec_dai->component; in wm8400_set_dai_pll() local
925 struct wm8400_priv *wm8400 = snd_soc_component_get_drvdata(component); in wm8400_set_dai_pll()
948 reg = snd_soc_component_read(component, WM8400_POWER_MANAGEMENT_2); in wm8400_set_dai_pll()
950 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_2, reg); in wm8400_set_dai_pll()
952 reg = snd_soc_component_read(component, WM8400_FLL_CONTROL_1); in wm8400_set_dai_pll()
954 snd_soc_component_write(component, WM8400_FLL_CONTROL_1, reg); in wm8400_set_dai_pll()
962 snd_soc_component_write(component, WM8400_FLL_CONTROL_1, reg); in wm8400_set_dai_pll()
964 snd_soc_component_write(component, WM8400_FLL_CONTROL_2, factors.k); in wm8400_set_dai_pll()
965 snd_soc_component_write(component, WM8400_FLL_CONTROL_3, factors.n); in wm8400_set_dai_pll()
967 reg = snd_soc_component_read(component, WM8400_FLL_CONTROL_4); in wm8400_set_dai_pll()
970 snd_soc_component_write(component, WM8400_FLL_CONTROL_4, reg); in wm8400_set_dai_pll()
981 struct snd_soc_component *component = codec_dai->component; in wm8400_set_dai_fmt() local
984 audio1 = snd_soc_component_read(component, WM8400_AUDIO_INTERFACE_1); in wm8400_set_dai_fmt()
985 audio3 = snd_soc_component_read(component, WM8400_AUDIO_INTERFACE_3); in wm8400_set_dai_fmt()
1026 snd_soc_component_write(component, WM8400_AUDIO_INTERFACE_1, audio1); in wm8400_set_dai_fmt()
1027 snd_soc_component_write(component, WM8400_AUDIO_INTERFACE_3, audio3); in wm8400_set_dai_fmt()
1034 struct snd_soc_component *component = codec_dai->component; in wm8400_set_dai_clkdiv() local
1039 reg = snd_soc_component_read(component, WM8400_CLOCKING_2) & in wm8400_set_dai_clkdiv()
1041 snd_soc_component_write(component, WM8400_CLOCKING_2, reg | div); in wm8400_set_dai_clkdiv()
1044 reg = snd_soc_component_read(component, WM8400_CLOCKING_2) & in wm8400_set_dai_clkdiv()
1046 snd_soc_component_write(component, WM8400_CLOCKING_2, reg | div); in wm8400_set_dai_clkdiv()
1049 reg = snd_soc_component_read(component, WM8400_CLOCKING_2) & in wm8400_set_dai_clkdiv()
1051 snd_soc_component_write(component, WM8400_CLOCKING_2, reg | div); in wm8400_set_dai_clkdiv()
1054 reg = snd_soc_component_read(component, WM8400_CLOCKING_1) & in wm8400_set_dai_clkdiv()
1056 snd_soc_component_write(component, WM8400_CLOCKING_1, reg | div); in wm8400_set_dai_clkdiv()
1072 struct snd_soc_component *component = dai->component; in wm8400_hw_params() local
1073 u16 audio1 = snd_soc_component_read(component, WM8400_AUDIO_INTERFACE_1); in wm8400_hw_params()
1091 snd_soc_component_write(component, WM8400_AUDIO_INTERFACE_1, audio1); in wm8400_hw_params()
1097 struct snd_soc_component *component = dai->component; in wm8400_mute() local
1098 u16 val = snd_soc_component_read(component, WM8400_DAC_CTRL) & ~WM8400_DAC_MUTE; in wm8400_mute()
1101 snd_soc_component_write(component, WM8400_DAC_CTRL, val | WM8400_DAC_MUTE); in wm8400_mute()
1103 snd_soc_component_write(component, WM8400_DAC_CTRL, val); in wm8400_mute()
1109 static int wm8400_set_bias_level(struct snd_soc_component *component, in wm8400_set_bias_level() argument
1112 struct wm8400_priv *wm8400 = snd_soc_component_get_drvdata(component); in wm8400_set_bias_level()
1122 val = snd_soc_component_read(component, WM8400_POWER_MANAGEMENT_1) & in wm8400_set_bias_level()
1124 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_1, val | 0x2); in wm8400_set_bias_level()
1128 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { in wm8400_set_bias_level()
1138 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_1, in wm8400_set_bias_level()
1142 snd_soc_component_write(component, WM8400_ANTIPOP2, WM8400_SOFTST | in wm8400_set_bias_level()
1148 val = snd_soc_component_read(component, WM8400_POWER_MANAGEMENT_1); in wm8400_set_bias_level()
1150 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_1, val); in wm8400_set_bias_level()
1153 snd_soc_component_write(component, WM8400_ANTIPOP2, WM8400_SOFTST | in wm8400_set_bias_level()
1158 snd_soc_component_write(component, WM8400_ANTIPOP2, WM8400_BUFIOEN); in wm8400_set_bias_level()
1162 val = snd_soc_component_read(component, WM8400_POWER_MANAGEMENT_1) & in wm8400_set_bias_level()
1164 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_1, val | 0x4); in wm8400_set_bias_level()
1169 snd_soc_component_write(component, WM8400_ANTIPOP2, WM8400_SOFTST | in wm8400_set_bias_level()
1173 snd_soc_component_write(component, WM8400_ANTIPOP2, WM8400_SOFTST | in wm8400_set_bias_level()
1178 val = snd_soc_component_read(component, WM8400_DAC_CTRL); in wm8400_set_bias_level()
1179 snd_soc_component_write(component, WM8400_DAC_CTRL, val | WM8400_DAC_MUTE); in wm8400_set_bias_level()
1182 val = snd_soc_component_read(component, WM8400_POWER_MANAGEMENT_1); in wm8400_set_bias_level()
1186 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_1, val); in wm8400_set_bias_level()
1190 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_1, val); in wm8400_set_bias_level()
1195 snd_soc_component_write(component, WM8400_ANTIPOP1, WM8400_DIS_LLINE | in wm8400_set_bias_level()
1202 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_1, val); in wm8400_set_bias_level()
1205 snd_soc_component_write(component, WM8400_ANTIPOP2, 0x0); in wm8400_set_bias_level()
1260 static int wm8400_component_probe(struct snd_soc_component *component) in wm8400_component_probe() argument
1262 struct wm8400 *wm8400 = dev_get_platdata(component->dev); in wm8400_component_probe()
1267 priv = devm_kzalloc(component->dev, sizeof(struct wm8400_priv), in wm8400_component_probe()
1272 snd_soc_component_init_regmap(component, wm8400->regmap); in wm8400_component_probe()
1273 snd_soc_component_set_drvdata(component, priv); in wm8400_component_probe()
1279 dev_err(component->dev, "Failed to get regulators: %d\n", ret); in wm8400_component_probe()
1283 wm8400_component_reset(component); in wm8400_component_probe()
1285 reg = snd_soc_component_read(component, WM8400_POWER_MANAGEMENT_1); in wm8400_component_probe()
1286 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_1, reg | WM8400_CODEC_ENA); in wm8400_component_probe()
1289 reg = snd_soc_component_read(component, WM8400_LEFT_LINE_INPUT_1_2_VOLUME); in wm8400_component_probe()
1290 snd_soc_component_write(component, WM8400_LEFT_LINE_INPUT_1_2_VOLUME, in wm8400_component_probe()
1292 reg = snd_soc_component_read(component, WM8400_RIGHT_LINE_INPUT_1_2_VOLUME); in wm8400_component_probe()
1293 snd_soc_component_write(component, WM8400_RIGHT_LINE_INPUT_1_2_VOLUME, in wm8400_component_probe()
1296 snd_soc_component_write(component, WM8400_LEFT_OUTPUT_VOLUME, 0x50 | (1<<8)); in wm8400_component_probe()
1297 snd_soc_component_write(component, WM8400_RIGHT_OUTPUT_VOLUME, 0x50 | (1<<8)); in wm8400_component_probe()
1302 static void wm8400_component_remove(struct snd_soc_component *component) in wm8400_component_remove() argument
1306 reg = snd_soc_component_read(component, WM8400_POWER_MANAGEMENT_1); in wm8400_component_remove()
1307 snd_soc_component_write(component, WM8400_POWER_MANAGEMENT_1, in wm8400_component_remove()