Lines Matching full:component

68 	struct snd_soc_component *component;  member
79 static void spk_ctrl_fun(struct snd_soc_component *component, int status) in spk_ctrl_fun() argument
83 rk1000_codec = snd_soc_component_get_drvdata(component); in spk_ctrl_fun()
89 static int rk1000_codec_set_bias_level(struct snd_soc_component *component, in rk1000_codec_set_bias_level() argument
97 snd_soc_component_write(component, ACCELCODEC_R1D, 0x2a); in rk1000_codec_set_bias_level()
98 snd_soc_component_write(component, ACCELCODEC_R1E, 0x40); in rk1000_codec_set_bias_level()
99 snd_soc_component_write(component, ACCELCODEC_R1F, 0x49); in rk1000_codec_set_bias_level()
103 snd_soc_component_write(component, ACCELCODEC_R1D, 0x2a); in rk1000_codec_set_bias_level()
104 snd_soc_component_write(component, ACCELCODEC_R1E, 0x40); in rk1000_codec_set_bias_level()
105 snd_soc_component_write(component, ACCELCODEC_R1F, 0x49); in rk1000_codec_set_bias_level()
109 spk_ctrl_fun(component, GPIO_LOW); in rk1000_codec_set_bias_level()
110 snd_soc_component_write(component, ACCELCODEC_R1D, 0xFF); in rk1000_codec_set_bias_level()
111 snd_soc_component_write(component, ACCELCODEC_R1E, 0xFF); in rk1000_codec_set_bias_level()
112 snd_soc_component_write(component, ACCELCODEC_R1F, 0xFF); in rk1000_codec_set_bias_level()
121 struct snd_soc_component *component = codec_dai->component; in rk1000_codec_set_dai_fmt() local
125 rk1000_codec = snd_soc_component_get_drvdata(component); in rk1000_codec_set_dai_fmt()
127 snd_soc_component_write(component, ACCELCODEC_R1D, 0x2a); in rk1000_codec_set_dai_fmt()
128 snd_soc_component_write(component, ACCELCODEC_R1E, 0x40); in rk1000_codec_set_dai_fmt()
188 snd_soc_component_write(component, ACCELCODEC_R09, iface); in rk1000_codec_set_dai_fmt()
199 struct snd_soc_component *component = dai->component; in rk1000_codec_pcm_hw_params() local
203 iface = snd_soc_component_read(component, ACCELCODEC_R09) & 0x1f3; in rk1000_codec_pcm_hw_params()
204 snd_soc_component_write(component, ACCELCODEC_R0C, 0x17); in rk1000_codec_pcm_hw_params()
205 snd_soc_component_write(component, ACCELCODEC_R04, in rk1000_codec_pcm_hw_params()
208 snd_soc_component_write(component, ACCELCODEC_R0B, in rk1000_codec_pcm_hw_params()
213 snd_soc_component_write(component, ACCELCODEC_R09, iface); in rk1000_codec_pcm_hw_params()
214 snd_soc_component_write(component, ACCELCODEC_R0A, 0xa0); in rk1000_codec_pcm_hw_params()
215 snd_soc_component_write(component, ACCELCODEC_R0B, ASC_DEC_ENABLE | ASC_INT_ENABLE); in rk1000_codec_pcm_hw_params()
222 struct snd_soc_component *component = dai->component; in rk1000_codec_mute() local
225 rk1000_codec = snd_soc_component_get_drvdata(component); in rk1000_codec_mute()
228 snd_soc_component_write(component, ACCELCODEC_R17, 0xFF); in rk1000_codec_mute()
230 snd_soc_component_write(component, ACCELCODEC_R18, 0xFF); in rk1000_codec_mute()
232 snd_soc_component_write(component, ACCELCODEC_R19, 0xFF); in rk1000_codec_mute()
234 snd_soc_component_write(component, ACCELCODEC_R04, in rk1000_codec_mute()
239 snd_soc_component_write(component, ACCELCODEC_R1D, 0x2a); in rk1000_codec_mute()
240 snd_soc_component_write(component, ACCELCODEC_R1E, 0x40); in rk1000_codec_mute()
242 snd_soc_component_write(component, ACCELCODEC_R17, in rk1000_codec_mute()
246 snd_soc_component_write(component, ACCELCODEC_R18, in rk1000_codec_mute()
249 snd_soc_component_write(component, ACCELCODEC_R04, in rk1000_codec_mute()
253 snd_soc_component_write(component, ACCELCODEC_R19, 0x7F); in rk1000_codec_mute()
255 snd_soc_component_write(component, ACCELCODEC_R1F, in rk1000_codec_mute()
258 snd_soc_component_write(component, ACCELCODEC_R1F, in rk1000_codec_mute()
271 struct snd_soc_component *component = priv->component; in pa_delayedwork() local
273 spk_ctrl_fun(component, GPIO_HIGH); in pa_delayedwork()
310 static void rk1000_codec_reg_init(struct snd_soc_component *component) in rk1000_codec_reg_init() argument
318 rk1000_codec = snd_soc_component_get_drvdata(component); in rk1000_codec_reg_init()
319 ret = snd_soc_component_write(component, ACCELCODEC_R1D, 0x30); in rk1000_codec_reg_init()
320 snd_soc_component_write(component, ACCELCODEC_R1E, 0x40); in rk1000_codec_reg_init()
322 snd_soc_component_write(component, ACCELCODEC_R15, 0xC1); in rk1000_codec_reg_init()
324 snd_soc_component_write(component, ACCELCODEC_R1A, 0x14); in rk1000_codec_reg_init()
326 snd_soc_component_write(component, ACCELCODEC_R0C, 0x10 | ASC_INPUT_VOL_0DB); in rk1000_codec_reg_init()
327 snd_soc_component_write(component, ACCELCODEC_R0D, 0x10 | ASC_INPUT_VOL_0DB); in rk1000_codec_reg_init()
330 snd_soc_component_write(component, ACCELCODEC_R12, in rk1000_codec_reg_init()
335 snd_soc_component_write(component, ACCELCODEC_R12, 0x4c | ASC_MIC_INPUT); in rk1000_codec_reg_init()
338 snd_soc_component_write(component, ACCELCODEC_R1C, ASC_DEM_ENABLE); in rk1000_codec_reg_init()
339 snd_soc_component_write(component, ACCELCODEC_R0E, 0x10 | mic_vol); in rk1000_codec_reg_init()
341 snd_soc_component_write(component, ACCELCODEC_R13, 0x05 | 0 << 3); in rk1000_codec_reg_init()
342 snd_soc_component_write(component, ACCELCODEC_R14, 0x05 | 0 << 3); in rk1000_codec_reg_init()
344 snd_soc_component_write(component, ACCELCODEC_R04, in rk1000_codec_reg_init()
348 snd_soc_component_write(component, ACCELCODEC_R0A, FREQ441KHZ | ASC_NORMAL_MODE | in rk1000_codec_reg_init()
351 snd_soc_component_write(component, ACCELCODEC_R09, ASC_I2S_MODE | in rk1000_codec_reg_init()
354 snd_soc_component_write(component, ACCELCODEC_R00, ASC_HPF_ENABLE | in rk1000_codec_reg_init()
359 if (snd_soc_component_read(component, ACCELCODEC_R05) != 0x0f) { in rk1000_codec_reg_init()
360 snd_soc_component_write(component, ACCELCODEC_R05, in rk1000_codec_reg_init()
362 snd_soc_component_write(component, ACCELCODEC_R06, digital_gain & 0xFF); in rk1000_codec_reg_init()
365 if (snd_soc_component_read(component, ACCELCODEC_R07) != 0x0f) { in rk1000_codec_reg_init()
366 snd_soc_component_write(component, ACCELCODEC_R07, in rk1000_codec_reg_init()
368 snd_soc_component_write(component, ACCELCODEC_R08, digital_gain & 0xFF); in rk1000_codec_reg_init()
371 snd_soc_component_write(component, ACCELCODEC_R0B, in rk1000_codec_reg_init()
375 snd_soc_component_write(component, ACCELCODEC_R1F, in rk1000_codec_reg_init()
378 snd_soc_component_write(component, ACCELCODEC_R1F, 0x09 | in rk1000_codec_reg_init()
382 snd_soc_component_write(component, ACCELCODEC_R17, VOLUME_CODEC_PA | in rk1000_codec_reg_init()
384 snd_soc_component_write(component, ACCELCODEC_R18, VOLUME_CODEC_PA | in rk1000_codec_reg_init()
386 snd_soc_component_write(component, ACCELCODEC_R04, ASC_INT_ACTIVE_L | in rk1000_codec_reg_init()
389 snd_soc_component_write(component, ACCELCODEC_R19, 0x7F); in rk1000_codec_reg_init()
392 static int rk1000_codec_suspend(struct snd_soc_component *component) in rk1000_codec_suspend() argument
394 spk_ctrl_fun(component, GPIO_LOW); in rk1000_codec_suspend()
395 rk1000_codec_set_bias_level(component, SND_SOC_BIAS_OFF); in rk1000_codec_suspend()
400 static int rk1000_codec_resume(struct snd_soc_component *component) in rk1000_codec_resume() argument
402 rk1000_codec_set_bias_level(component, SND_SOC_BIAS_PREPARE); in rk1000_codec_resume()
403 spk_ctrl_fun(component, GPIO_HIGH); in rk1000_codec_resume()
408 static int rk1000_codec_probe(struct snd_soc_component *component) in rk1000_codec_probe() argument
412 rk1000_codec = snd_soc_component_get_drvdata(component); in rk1000_codec_probe()
413 rk1000_codec->component = component; in rk1000_codec_probe()
418 rk1000_codec_set_bias_level(component, SND_SOC_BIAS_PREPARE); in rk1000_codec_probe()
421 rk1000_codec_reg_init(component); in rk1000_codec_probe()
426 static void rk1000_codec_remove(struct snd_soc_component *component) in rk1000_codec_remove() argument
428 rk1000_codec_set_bias_level(component, SND_SOC_BIAS_OFF); in rk1000_codec_remove()