我调试音频驱动,加载驱动时,调试信息显示:
Failed to get supply 'IOVDD': -19
什么原因啊?
[ 1.475982] usbhid: USB HID core driver [ 1.480590] usbcore: registered new interface driver snd-usb-audio
[ 1.488128] tlv320aic3x-codec 3-001b: —wxj—aic3x_i2c_probe()
[ 1.494445] tlv320aic3x-codec 3-001b: —wxj—aic3x->control_type = SND_SOC_I2C
[ 1.502197] tlv320aic3x-codec 3-001b: —wxj—snd_soc_register_codec return 0
[ 1.510833] —wxj—soc-core.c soc_bind_dai_link(), binding TLV320AIC3X at idx 0
[ 1.518768] tlv320aic3x-codec 3-001b: —wxj—tlv320aic3x.c aic3x_probe()
[ 1.526000] tlv320aic3x-codec 3-001b: Failed to get supply 'IOVDD': -19
[ 1.532928] tlv320aic3x-codec 3-001b: Failed to request supplies: -19
[ 1.539642] tlv320aic3x-codec 3-001b: asoc: failed to probe CODEC tlv320aic3x-codec.3-001b: -19
[ 1.548767] asoc: failed to instantiate card AM335X EVM: -19
[ 1.554718] ALSA device list:
[ 1.557800] No soundcards found.
Yaoming Qin:
请问您的音频芯片是哪个?
eric wangxj:
回复 Yaoming Qin:
TLV3106
完整名字:TLV320AIC3106RGZ
Yaoming Qin:
回复 eric wangxj:
从log来看,建议您查下您的电路,尤其是音频芯片的供电部分是否正确
eric wangxj:
回复 Yaoming Qin:
音频芯片的供电部分,测试正常3.3伏
Yaoming Qin:
回复 eric wangxj:
看log应该是i2c没有正确找到i2c,codec和335x这边是怎么连的,多看看了。
eric wangxj:
回复 Yaoming Qin:
这个是我们的硬件工程师,提供的连接图。
eric wangxj:
回复 eric wangxj:
问题应该出在I2C的控制上,测试I2C的时钟线,发现没有时钟信号
那么,为什么I2C的时钟线上没有时钟信号呢?
Yaoming Qin:
回复 eric wangxj:
你用的i2c和evm板上是一个么,如果不是,需要修改驱动
eric wangxj:
回复 Yaoming Qin:
不是同一个。
那么,您说的驱动,是改什么地方呢。
我已经对pin-mux等地方,做了修改,包括I2C总线的ID对应关系。
eric wangxj:
回复 eric wangxj:
我已经修改的地方:
首先,修改board-support/linux-3.2-psp04.06.00.07.sdk/arch/arm/mach-omap2/board-am33txevm.c增加以下代码
/* Module pin mux for mcasp0 */static struct pinmux_config mcasp0_pin_mux[] = { {"mcasp0_aclkx.mcasp0_aclkx", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, {"mcasp0_fsx.mcasp0_fsx", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, {"mcasp0_axr0.mcasp0_axr0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, {"mcasp0_ahclkr.mcasp0_axr2", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, {NULL, 0},};
static u8 am335x_iis_serializer_direction0[] = { TX_MODE, INACTIVE_MODE, RX_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,};
static struct snd_platform_data am335x_evm_snd_data0 = { .tx_dma_offset = 0x46000000, /* McASP0 */ .rx_dma_offset = 0x46000000, .op_mode = DAVINCI_MCASP_IIS_MODE, .num_serializer = ARRAY_SIZE(am335x_iis_serializer_direction0), .tdm_slots = 2, .serial_dir = am335x_iis_serializer_direction0, .asp_chan_q = EVENTQ_2, .version = MCASP_VERSION_3, .txnumevt = 1, .rxnumevt = 1,};
static void mcasp0_init(int evm_id, int profile){ /* Configure McASP */ setup_pin_mux(mcasp0_pin_mux); am335x_register_mcasp(&am335x_evm_snd_data0, 0); return;}
static struct evm_dev_cfg beaglebone_dev_cfg[] = { …… {mcasp0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, ….}
其次修改:sound/soc/davinci/davinci-evm.cstatic struct snd_soc_dai_link am335x_evm_dai = { .name = "TLV320AIC3X", .stream_name = "AIC3X", .cpu_dai_name = "davinci-mcasp.0", //1–>0 .codec_dai_name = "tlv320aic3x-hifi", .codec_name = "tlv320aic3x-codec.3-001b", //2–>1 .platform_name = "davinci-pcm-audio", .init = evm_aic3x_init, .ops = &evm_ops,};