UDA1341有两个音频输入通道,选择哪个通道作为输入是不是可以通过控制寄存器来配制?
比如我要用VINL1和VINR1,控制字该是多少
若要用VINL2和VINR2,控制字又该是多少
下面这个程序是用的VINL1和VINR1输入的,我想把它改成VINL2和VINR2输入,如何修改啊
FPGA NIOS 程序
void Init_Audio(void) //初始化Audio { IOWR_ALTERA_AVALON_PIO_DATA(L3_MODE_BASE, 1); IOWR_ALTERA_AVALON_PIO_DATA(L3_CLK_BASE, 1); IOWR_ALTERA_AVALON_PIO_DATA(L3_DATA_BASE, 1); usleep(10000); L3_Write(ADDR, 0x14 | 0x02); //STATUS L3_Write(DATA, 0x60); //Reset usleep(10000); L3_Write(ADDR, 0x14 | 0x02); //STATUS L3_Write(DATA, 0x20); //256fs, IIS, DC-filtering usleep(1); L3_Write(ADDR, 0x14 | 0x02); //STATUS L3_Write(DATA, 0xe3); //Gain of DAC:0dB, Gain of ADC:0dB, //ADC and DAC is non-inverting, Single speed play back //ADC and DAC is all on usleep(1); L3_Write(ADDR, 0x14 | 0x00); //DATA0 L3_Write(DATA, 0xc2); L3_Write(DATA, 0x4d); }
英文资料看不懂,还请大家帮下忙,谢谢了 |