aplay: pcm_write:2057: write error: Input/output error in wm8960 on imx8mp

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

aplay: pcm_write:2057: write error: Input/output error in wm8960 on imx8mp

2,188 Views
supraja
Contributor I

Hi,

Board Name = phyboard-pollux-imx8mp-2

wm8960 soundcard is detecting ,but when I play  wav file ,I'm getting this error.

root@phyboard-pollux-imx8mp-2:~# aplay -D hw:1,0 file_example_WAV_5MG.wav 
Playing WAVE 'file_example_WAV_5MG.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: pcm_write:2057: write error: Input/output error

for arecord also 

root@phyboard-pollux-imx8mp-2:~# arecord -D hw:1,0 -r 44100 -f S16_LE -c 2 -d 5 record.wav -vvv
Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Hardware PCM card 1 'wm8960-audio' device 0 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 4096
  period_time  : 92879
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 4096
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
  appl_ptr     : 0
  hw_ptr       : 0
arecord: pcm_read:2149: read error: Input/output error

 

 

 

 

0 Kudos
Reply
3 Replies

2,150 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @supraja,

I hope you are doing well.

"pcm_write:2057: write error: Input/output error" could occur due to incorrect clock settings.
Please try probing MCLK and check with the oscilloscope.
 
Please make sure that you have referred to /arch/arm64/boot/dts/freescale/imx8mp-evk.dts for defining 
codec wm8960 and SAI nodes.
 
One can test with unit tests and commands mentioned in 8.3.3 Audio Front End (AFE) in i.MX Linux User's Guide
 
Please provide me with boot logs and a device tree if the issue still persists.
 
Thanks & Regards,
Dhruvit Vasavada
0 Kudos
Reply

2,142 Views
supraja
Contributor I

Hi @Dhruvit 

1)Which dts file(imx8mp-evk.dts or imx8mp-phyboard-pollux-rdk.dts) we need to modify for imx8mp-phyboard-pollux board?

2)How to Generate MCLK as i don't know!

3)Please tell about the GPIO also like which Gpio have to select!!

I'm attaching my modified dts file through that changes i'm able to detect soundcard!

I attached the Pin configuration also!!

please help me out!! 

 

 

0 Kudos
Reply

2,112 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @supraja,

I hope you are doing well.

Which dts file(imx8mp-evk.dts or imx8mp-phyboard-pollux-rdk.dts) we need to modify for the imx8mp-phyboard-pollux board?
[Ans]: One can refer to  /arch/arm64/boot/dts/freescale/imx8mp-evk.dts where wm8960 configurations are defined to edit custom device tree file( imx8mp-phyboard-pollux-rdk.dts) 

It seems that MCLK is not connected as seen in the screenshot attached (Screenshot from 2023-03-30 11-10-03.png)

Please refer to i.MX 8M Plus EVK Base Board Design Files (SPF-46370_B1.pdf : Page 16), where Wm8960 - SAI pin connections are shown.

Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply