IMX93 WM8960 debug

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

IMX93 WM8960 debug

3,144 Views
5454ty
Contributor II

Hi

  My platform is imx93 

  Linux :6.1.22

  I am debugging the wm8960 audio codec:

  I running the command:aplay 1.wav

  It has no  sound and has no error

root@imx93evk:~# aplay 1.wav
Playing WAVE '1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

 

 My dts is as follows:

  

5454ty_0-1724652199875.png

 

 

5454ty_1-1724652235754.png

The whole dts ,and log is as follows:

 

 

0 Kudos
Reply
6 Replies

3,111 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @5454ty 

 

I hope you are doing well.

Please first check the audio devices on your board with command:

 

root@imx93evk:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: btscoaudio [bt-sco-audio], device 0: 443b0000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0 [443b0000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: imxaudioxcvr [imx-audio-xcvr], device 0: XCVR PCM snd-soc-dummy-dai-0 [XCVR PCM snd-soc-dummy-dai-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: wm8962audio [wm8962-audio], device 0: HiFi wm8962-0 [HiFi wm8962-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@imx93evk:~# 

 

 

For i.MX93EVK the wm8962 is connected to jack J1201. and the command for reproduce the audio is:

 

root@imx93evk:~# aplay -D hw:3,0 piano2.wav 
Playing WAVE 'piano2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

 

 

Also, if you want change the default playback hardware you can modify the /etc/asound.conf as follow:

 

# Global alsa-lib configuration

pcm.!default {
    type hw
    card 3
}

ctl.!default {
    type hw
    card 3
}

 

I hope this can helps to you.

 

Best regards,

Salas.

0 Kudos
Reply

3,097 Views
5454ty
Contributor II

5454ty_0-1724731340154.png

The log is above

 

root@imx93evk:~# aimxer contents
-sh: aimxer: command not found
root@imx93evk:~# amixer contents
numid=12,iface=MIXER,name='Headphone Playback ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=11,iface=MIXER,name='Headphone Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
: values=127,127
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=17,iface=MIXER,name='PCM Playback -6dB Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=57,iface=MIXER,name='Mono Output Mixer Left Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=58,iface=MIXER,name='Mono Output Mixer Right Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=41,iface=MIXER,name='ADC Data Output Select'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'Left Data = Left ADC; Right Data = Right ADC'
; Item #1 'Left Data = Left ADC; Right Data = Left ADC'
; Item #2 'Left Data = Right ADC; Right Data = Right ADC'
; Item #3 'Left Data = Right ADC; Right Data = Left ADC'
: values=1
numid=19,iface=MIXER,name='ADC High Pass Filter Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=36,iface=MIXER,name='ADC PCM Capture Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
: values=195,195
| dBscale-min=-97.50dB,step=0.50dB,mute=1
numid=18,iface=MIXER,name='ADC Polarity'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'No Inversion'
; Item #1 'Left Inverted'
; Item #2 'Right Inverted'
; Item #3 'Stereo Inversion'
: values=0
numid=2,iface=MIXER,name='Capture Volume ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=3,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=1,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
: values=35,35
| dBscale-min=-17.25dB,step=0.75dB,mute=0
numid=10,iface=MIXER,name='Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
: values=255,255
| dBscale-min=-127.50dB,step=0.50dB,mute=1
numid=23,iface=MIXER,name='3D Filter Lower Cut-Off'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'Low'
; Item #1 'High'
: values=0
numid=22,iface=MIXER,name='3D Filter Upper Cut-Off'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'High'
; Item #1 'Low'
: values=0
numid=25,iface=MIXER,name='3D Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=24,iface=MIXER,name='3D Volume'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=15
numid=33,iface=MIXER,name='ALC Attack'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=2
numid=32,iface=MIXER,name='ALC Decay'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=3
numid=26,iface=MIXER,name='ALC Function'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'Off'
; Item #1 'Right'
; Item #2 'Left'
; Item #3 'Stereo'
: values=0
numid=30,iface=MIXER,name='ALC Hold Time'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=0
numid=27,iface=MIXER,name='ALC Max Gain'
; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
: values=7
numid=29,iface=MIXER,name='ALC Min Gain'
; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
: values=0
numid=31,iface=MIXER,name='ALC Mode'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'ALC'
; Item #1 'Limiter'
: values=0
numid=28,iface=MIXER,name='ALC Target'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=4
numid=21,iface=MIXER,name='DAC Deemphasis Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=42,iface=MIXER,name='DAC Mono Mix'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'Stereo'
; Item #1 'Mono'
: values=0
numid=20,iface=MIXER,name='DAC Polarity'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'No Inversion'
; Item #1 'Left Inverted'
; Item #2 'Right Inverted'
; Item #3 'Stereo Inversion'
: values=0
numid=45,iface=MIXER,name='Left Boost Mixer LINPUT1 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=43,iface=MIXER,name='Left Boost Mixer LINPUT2 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=44,iface=MIXER,name='Left Boost Mixer LINPUT3 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=9,iface=MIXER,name='Left Input Boost Mixer LINPUT1 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=3,step=0
: values=0
| dBrange-
rangemin=0,,rangemax=1
| dBscale-min=0.00dB,step=13.00dB,mute=0
rangemin=2,,rangemax=3
| dBscale-min=20.00dB,step=9.00dB,mute=0

numid=5,iface=MIXER,name='Left Input Boost Mixer LINPUT2 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=4,iface=MIXER,name='Left Input Boost Mixer LINPUT3 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=49,iface=MIXER,name='Left Input Mixer Boost Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=53,iface=MIXER,name='Left Output Mixer Boost Bypass Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=37,iface=MIXER,name='Left Output Mixer Boost Bypass Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=2
| dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=52,iface=MIXER,name='Left Output Mixer LINPUT3 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=38,iface=MIXER,name='Left Output Mixer LINPUT3 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=2
| dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=51,iface=MIXER,name='Left Output Mixer PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=35,iface=MIXER,name='Noise Gate Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=34,iface=MIXER,name='Noise Gate Threshold'
; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
: values=0
numid=48,iface=MIXER,name='Right Boost Mixer RINPUT1 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=46,iface=MIXER,name='Right Boost Mixer RINPUT2 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=47,iface=MIXER,name='Right Boost Mixer RINPUT3 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=8,iface=MIXER,name='Right Input Boost Mixer RINPUT1 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=3,step=0
: values=0
| dBrange-
rangemin=0,,rangemax=1
| dBscale-min=0.00dB,step=13.00dB,mute=0
rangemin=2,,rangemax=3
| dBscale-min=20.00dB,step=9.00dB,mute=0

numid=7,iface=MIXER,name='Right Input Boost Mixer RINPUT2 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=6,iface=MIXER,name='Right Input Boost Mixer RINPUT3 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=50,iface=MIXER,name='Right Input Mixer Boost Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=56,iface=MIXER,name='Right Output Mixer Boost Bypass Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=39,iface=MIXER,name='Right Output Mixer Boost Bypass Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=2
| dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=54,iface=MIXER,name='Right Output Mixer PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=55,iface=MIXER,name='Right Output Mixer RINPUT3 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=40,iface=MIXER,name='Right Output Mixer RINPUT3 Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=2
| dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=16,iface=MIXER,name='Speaker AC Volume'
; type=INTEGER,access=rw------,values=1,min=0,max=5,step=0
: values=0
numid=15,iface=MIXER,name='Speaker DC Volume'
; type=INTEGER,access=rw------,values=1,min=0,max=5,step=0
: values=0
numid=13,iface=MIXER,name='Speaker Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
: values=127,127
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=14,iface=MIXER,name='Speaker Playback ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
root@imx93evk:~#

I want to play from the headphone,Can you help having a look the amixer

I run the command as follows,then has no sound

aplay -D hw:0,0 1.wav

0 Kudos
Reply

3,096 Views
5454ty
Contributor II
root@imx93evk:~# aplay -D hw:0,0 1.wav Playing WAVE '1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
0 Kudos
Reply

3,089 Views
5454ty
Contributor II

HI,

   I can play the music ,but i cann't play the music by recording

  My command as follows:

arecord -f cd -d 100 record.wav

aplay record.wav 

I can get the signal of sound ,but cann't play the sound of recording

0 Kudos
Reply

3,068 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello, 

 

How are you recording the audio?

Do you have a specific device to do it? if yes, could you please share the log of command:

root@imx93evk:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: btscoaudio [bt-sco-audio], device 0: 443b0000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0 [443b0000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: micfilaudio [micfil-audio], device 0: micfil hifi snd-soc-dummy-dai-0 [micfil hifi snd-soc-dummy-dai-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: imxaudioxcvr [imx-audio-xcvr], device 0: XCVR PCM snd-soc-dummy-dai-0 [XCVR PCM snd-soc-dummy-dai-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: wm8962audio [wm8962-audio], device 0: HiFi wm8962-0 [HiFi wm8962-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@imx93evk:~# 

 

Maybe the file is not being recorded correctly and that is the reason that there is not audio.

In i.MX93EVK the audio is recorded by micfilaudio device.

 

Also, you can specify the frequency to record and playback.

 

Best regards,

Salas.

0 Kudos
Reply

3,036 Views
5454ty
Contributor II

root@imx93evk:~#
root@imx93evk:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: micfilaudio [micfil-audio], device 0: micfil hifi snd-soc-dummy-dai-0 [micfil hifi snd-soc-dummy-dai-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: btscoaudio [bt-sco-audio], device 0: 443b0000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0 [443b0000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: wm8960audio [wm8960-audio], device 0: HiFi wm8960-hifi-0 [HiFi wm8960-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@imx93evk:~#

How i can do?

0 Kudos
Reply