Showing results for 
Search instead for 
Did you mean: 

CS43L22 Passthrough

Associate II

Hi everyone,

Can I use CS43L22 just like a audio switch? In my project has a AUX input and want to switch this analog input via passthrough to the hp output. Is it possible? If yes, how? I have tried to call the following commands in main, but not get any sound.

	WriteRegister(0x02, 0x01);
	WriteRegister(0x04, 0xAF); 
	WriteRegister(0x05, 0x81);
	WriteRegister(0x06, 0x04);
	WriteRegister(0x08, 0x01);
	WriteRegister(0x09, 0x01);
	WriteRegister(0x0D, 0x70);
	WriteRegister(0x0E, 0xC0);
	WriteRegister(0x14, 0x05);
	WriteRegister(0x15, 0x05);
	WriteRegister(0x1A, 0x0A);
	WriteRegister(0x1B, 0x0A);
	WriteRegister(0x02, 0x9E);


By AUX you mean AIN1A/AIN1B? If yes, and WriteRegister() does what it promises, the above code looks reasonable.

Can you play back data from the DAC when not in passthrough mode?


Associate II

Yes, I mean AIN1A and AIN1B.

I think that it should start playing the song once the WriteRegister(0x02, 0x9E) command, but it deosn't play.

I noticed it needs sending dummy data via I2S DMA to play an analog input. However I don't understand why it needs this?

> I noticed it needs sending dummy data via I2S DMA to play an analog input.

I don't think it does.

Do you have a custom-built board, or some of the DISCOs?


Associate II

I use custom design refers to F4Disco. After sent the above commands, in main transferring dummy via Dma, then it plays the song. When stopped the transfer, it doesn’t play.

The only reason which comes into my mind is that the headphones amplifier needs the charge pump running, and that is driven from the I2S clocks The CS43L22 datasheet is not very clear in this, but maybe besides MCLK the charge pump needs also the LRCK to be present?


Associate II

Yes,it's possible. However, it's a problem to play an analog input.