I.mx 7 dual, SAI with Stereo ADC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.mx 7 dual, SAI with Stereo ADC

494 Views
ezra2
Contributor I

I try to connect Stereo ADC  (streamer) to i.mx 7 dual SAI.

The Stereo ADC  is master and the SAI is the slave.

The Stereo ADC  format is I2S, the frequency of BCK is constant at 64 BCK/frame (left and right as 32 clocks per frame).

The active audio data is 24 bit.

The SAI drive is config as asynchronous, msb (MF); using kernel 5.4.24.

When I config the SYWD, W0W, WNW, and FBT to 32 (31) and ALSA format to S32_LE all work OK. I capture frame with 4 bytes when the least significant byte has no data.

I what to capture only 16 bits (most significant bit, 31-16).
Is there any way to config the SAI driver to capture only 16 bits?

Or is there a way to config ALSA to do this? (when I used ALSA format S16_LE or S16_BE I get the least significant bits; 15-0).

 

Ezra

 

0 Kudos
2 Replies

483 Views
igorpadykov
NXP Employee
NXP Employee

Hi ezra2

 

16 bits capture can be configured with WNW field register RCR5.

(SAI Receive Configuration 5 Register).

For ALSA option one can consider Audio Mixer "Output Width" controls

described in sect.7.5.4.1 User Interface  i.MX Linux Reference Manual​

 

Best regards
igor

0 Kudos

473 Views
ezra2
Contributor I

Hello Igor,

Thank you for your answer, but the solution was to set FBT to 16 (15) and leave SYWD, W0W, and WNW with 32 (31).

Now all working with 16 bites.

Ezra

0 Kudos