我用DM365内部带的voicecodec做实验,linux下,现在是中断无法启动,想请教各位高人是不是还有别的什么地方需要设置的?或是我的设置有错?配置如下:
REG_ARM_INTMUX|=(1<<7); //set the interrupt mux control to make the VCINT could be used
REG_PERI_CLKCTL &= (~0xFF80); //set the VC'clock
REG_PERI_CLKCTL |= ( 0x0080);
dm365_voicecodec_write(((1<<RSTDAC)|(1<<RSTADC)), DM365_VOICECODEC_CTRL); //reset the ADC/DAC
dm365_voicecodec_write(((0<<RSTDAC)|(0<<RSTADC)), DM365_VOICECODEC_CTRL); //stop reset
dm365_voicecodec_write(0x000000fd,DM365_VOICECODEC_POWER); //open the all power
dm365_voicecodec_write(0x0000003f,DM365_VOICECODEC_MUTE_ATT); //VC_REG09//set the Digital attenuation for DAC
dm365_voicecodec_write(((1<<RFIFOEN)|(1<<WFIFOEN)|(1<<RFIFOCL)|(1<<WFIFOCL)), DM365_VOICECODEC_CTRL); //set the ctl register
dm365_voicecodec_write(((1<<RDRDY)|(1<<WDREQ)),DM365_VOICECODEC_INTEN); //enable write fifo request and read fifo data read interrupt
中断申请函数如下:
err = request_irq(IRQ_DM365_VCINT, dm365_vc_interrupt, IRQF_DISABLED,VOICECODEC_DEVICE_NAME, NULL); //IRQ_DM365_VCINT=24 |