imx8qxp i2s play stereo wav file but only have one channel data

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

imx8qxp i2s play stereo wav file but only have one channel data

1,426 Views
caoyk
Contributor I

we use aplay -c 2 1.wav -v to play

log below:

root@imx8qxpc0mek:~# aplay -c 2 sanrenyou.wav -v
[ 1851.457653] fsl_sai_hw_params channels=2 slots=2
Playing WAVE 'sanrenyou.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Plug PCM: Direct Stream Mixing PCM
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 5292
period_size : 1764
period_time : 40000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 1764
period_event : 0
start_threshold : 5292
stop_threshold : 5292
silence_threshold: 0
silence_size : 0
boundary : 5958262307011166208
Hardware PCM card 0 'fm1388-front-audio' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 5292
period_size : 1764
period_time : 40000
tstamp_mode : ENABLE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 1764
period_event : 0
start_threshold : 1
stop_threshold : 5958262307011166208
silence_threshold: 0
silence_size : 5958262307011166208
boundary : 5958262307011166208
appl_ptr : 0
hw_ptr : 0

but i2s only have one channel data.

dts:

sound-FM1388 {
compatible = "fsl,imx-audio-fm1388";

audio-cpu = <&sai0>;
audio-codec = <&fm1388>;
codec-master;

audio-routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"LINE1L", "Line In Jack",
"LINE1R", "Line In Jack";
//"Right ADC", "LINE2R",
//"Left ADC", "LINE2L",
//"Playback", "CPU-Playback",
//"CPU-Capture", "Capture";
status = "okay";
};

 

&sai0 {
assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>,
<&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>,
<&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>,
<&sai0_lpcg 0>;
assigned-clock-rates = <786432000>, <49152000>, <12288000>, <49152000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai0>;
status = "okay";
};

wave png in attach,yellow line is SAI0_TXFS,green line is SAI0_TXD.

 

thanks for your help.

Tags (1)
0 Kudos
Reply
0 Replies