rk2928phonepad:

fix inside headset unnot boot
This commit is contained in:
邱建斌
2012-10-23 19:14:38 +08:00
parent 0a46941df7
commit d581a088d3
2 changed files with 5 additions and 2 deletions

View File

@@ -597,6 +597,6 @@ static int __init rockchip_headsetobserve_init(void)
platform_driver_register(&rockchip_headsetobserve_driver);
return 0;
}
module_init(rockchip_headsetobserve_init);
late_initcall(rockchip_headsetobserve_init);
MODULE_DESCRIPTION("Rockchip Headset Driver");
MODULE_LICENSE("GPL");

View File

@@ -149,6 +149,8 @@ void codec_set_spk(bool on)
void call_set_spk(bool on)
{
struct snd_soc_codec *codec = rk2928_data.codec;
if(codec == NULL)
return;
if(on == 0) {
printk("%s speaker is disabled\n", __FUNCTION__);
// rk2928_write(NULL, CODEC_REG_DAC_MUTE, v_MUTE_DAC(1));
@@ -170,7 +172,8 @@ void call_set_spk(bool on)
void rk2928_codec_set_spk(bool on)
{
struct snd_soc_codec *codec = rk2928_data.codec;
if(codec == NULL)
return;
printk("%s: headset %s %s PA bias_level=%d\n",__FUNCTION__,on?"in":"out",on?"disable":"enable",codec->dapm.bias_level);
if(on) {
rk2928_data.headset_status = HP_IN;