phonepad: add codec chip id for consumer.

This commit is contained in:
宋秀杰
2012-09-28 12:22:58 +08:00
parent c1b7a0d946
commit 329dd6fc84

View File

@@ -3003,12 +3003,16 @@ static int rt3261_probe(struct snd_soc_codec *codec)
}
snd_soc_write(codec, RT3261_GEN_CTRL2, 0x4040);
ret = snd_soc_read(codec, RT3261_VENDOR_ID);
printk("read 0x%x=0x%x\n",RT3261_VENDOR_ID,ret);
printk("read codec chip id is 0x%x\n",ret);
if(0x5==ret) {
snd_soc_update_bits(codec, RT3261_JD_CTRL,
RT3261_JD1_IN4P_MASK | RT3261_JD2_IN4N_MASK,
RT3261_JD1_IN4P_EN | RT3261_JD2_IN4N_EN);
}
else if(0x3==ret)
{
printk("you use an old chip, please use a new one\n");
}
snd_soc_update_bits(codec, RT3261_PWR_ANLG1,
RT3261_PWR_HP_L | RT3261_PWR_HP_R,
0<<7 | 0<<6 );