/*
* Dave/<nova_wangwenbo@126.com>
*/
调试声卡ALC5631Q
设备树信息:
rockchip-rt5631 {
compatible = "rockchip-rt5631";
dais {
dai0 {
audio-codec = <&rt5631>;
audio-controller = <&i2s>;
format = "i2s";
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
//bitclock-master;
//frame-master;
};
};
};
rt5631: rt5631@1a {
compatible = "rt5631";
reg = <0x1a>;
reset_gpio = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
};
log输出:
[ 1.337835] RT5631 Audio Codec 0.01 alsa 1.0.26
[ 1.337880] rt5631_i2c_probe : reset_pin : 1
[ 1.338139] rt5631_i2c_probe get phone_det_level error
[ 1.471135] rt5631 2-001a: ASoC: DAPM unknown pin HP_L
[ 1.471158] rt5631 2-001a: ASoC: DAPM unknown pin HP_R
[ 1.475063] rockchip-rt5631 rockchip-rt5631.30: rt5631-hifi <-> ff890000.rockchip-i2s mapping ok
[ 1.500786] #0: RK_RT5631
在sound/soc/codecs/rt5631.c 屏蔽rt5631_i2c_probe函数中解决error
#ifdef CONFIG_OF
ret = of_property_read_u32(node,"phone_det_level",&rt5631->phone_det_level);
if (ret < 0)
printk("%s get phone_det_level error\n",__func__);
else
printk("RT5631 codec: phone_det_level %s",rt5631->phone_det_level ? "HIGH":"LOW");
#endif