SAI1 audio interface fails in slave mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SAI1 audio interface fails in slave mode

862件の閲覧回数
matkattanek
Contributor III

Just bringing up another variant of our new imx6ull custom board. The previous version was using the SAI2 interface to route I2S and DSPA (PCM) style audio. The new board switches the same functionality to SAI1. The difference primarily is just the DTS modification. Note the NXP side is setup in slave mode, meaning the auxiliary connected device is setup as Master and is driving the clock and sync.

When I select I2S style audio transfer:  TX and RX audio transfer just works fine (using aplay and arecord)

Selecting DSPA style audio transfer:   Both playback and recording fails.

  # aplay -D hw:1 audio_samples/audio8k16m.wav
Playing WAVE 'audio_samples/audio8k16m.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
aplay: pcm_write:2023: write error: Input/output error

 => Question why would I2S work ok, but DSPA transfer fail?

2)

For verification I switched back to the SAI2 interface and the same tests above just work fine.

   => I2S style and DSPA transfer are fully functional!

3) 

for testing I set the SAI1 into master mode.

   => Now playback works fine for both I2S and PCM style.

Very puzzling.

What's wrong with SAI1 in slave mode sending audio data in DSPA (PCM) ?

Anybody ran into similar issues?

Mat

ラベル(3)
0 件の賞賛
返信
2 返答(返信)

655件の閲覧回数
matkattanek
Contributor III

Thanks for your response.

I finally figured. I got it to work after switching the sync polarity.  I missed that. Probably stared at the at the LA traces for too long ;-). 

It was either coincidence or dependent on the development setup (longer leads), that I saw it working with the inverted Sync too, which then gave me a wrong data point.

0 件の賞賛
返信

655件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Mat,

pcm_write return EIO error, that means I/O is not setup. And master mode can wok but slave mode not.

Can you check if bit clock is generated with DSP_A and slave mode? Check if any message from kernel log.

Have a nice day!

Best regards,

Weidong

0 件の賞賛
返信