iMX6 SABRE AUTO audio input issues

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

iMX6 SABRE AUTO audio input issues

2,219 Views
admin
Specialist II

I'm currently trying to get audio input working with ALSA. I am working on an iMX6q SABRE AUTO running a yocto image.

The audio output works just fine.

When I record audio with arecord and play it with aplay, I don't hear anything, for example

# arecord --format=dat --duration=5 --device=hw:0,0 test

Recording WAVE 'test' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

# aplay --format=dat --duration=5 --device=hw:0,0 test

Playing WAVE 'test' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

I also tried to record and play it via gstreamer but the result didn't change.

Anyways,

Consider what output these ALSA commands show:

# arecord -l                                            

**** List of CAPTURE Hardware Devices ****

card 0: cs42888audio [cs42888-audio], device 0: HiFi CS42888-0 []

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: imxspdif [imx-spdif], device 0: IMX SPDIF mxc-spdif-0 []

  Subdevices: 1/1

  Subdevice #0: subdevice #0

# amixer -c 0 contents

numid=7,iface=MIXER,name='ADC High-Pass Filter Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'None'

  ; Item #1 'High Pass'

  : values=0

numid=18,iface=MIXER,name='ADC Single Volume Control Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0

numid=19,iface=MIXER,name='ADC Soft Ramp and Zero Cross Control Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=4

  ; Item #0 'Immediate Change'

  ; Item #1 'Zero Cross'

  ; Item #2 'Soft Ramp'

  ; Item #3 'Soft Ramp on Zero Cross'

  : values=0

numid=5,iface=MIXER,name='ADC1 Capture Volume'

  ; type=INTEGER,access=rw---R--,values=2,min=0,max=176,step=0

  : values=128,128

  | dBscale-min=-64.00dB,step=0.50dB,mute=1

numid=12,iface=MIXER,name='ADC1 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=21,iface=MIXER,name='ADC1 Single Ended Mode Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Differential'

  ; Item #1 'Single-Ended'

  : values=0

numid=6,iface=MIXER,name='ADC2 Capture Volume'

  ; type=INTEGER,access=rw---R--,values=2,min=0,max=176,step=0

  : values=128,128

  | dBscale-min=-64.00dB,step=0.50dB,mute=1

numid=13,iface=MIXER,name='ADC2 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=22,iface=MIXER,name='ADC2 Single Ended Mode Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Differential'

  ; Item #1 'Single-Ended'

  : values=0

numid=14,iface=MIXER,name='DAC Auto Mute Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Disabled'

  ; Item #1 'AutoMute'

  : values=0

numid=20,iface=MIXER,name='DAC Deemphasis Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'No-De-Emphasis'

  ; Item #1 'De-Emphasis'

  : values=0

numid=15,iface=MIXER,name='DAC Single Volume Control Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0

numid=16,iface=MIXER,name='DAC Soft Ramp and Zero Cross Control Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=4

  ; Item #0 'Immediate Change'

  ; Item #1 'Zero Cross'

  ; Item #2 'Soft Ramp'

  ; Item #3 'Soft Ramp on Zero Cross'

  : values=2

numid=8,iface=MIXER,name='DAC1 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=1,iface=MIXER,name='DAC1 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=9,iface=MIXER,name='DAC2 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=2,iface=MIXER,name='DAC2 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=10,iface=MIXER,name='DAC3 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=3,iface=MIXER,name='DAC3 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=11,iface=MIXER,name='DAC4 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=4,iface=MIXER,name='DAC4 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=17,iface=MIXER,name='Mute ADC Serial Port Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'UnMute'

  ; Item #1 'Mute'

  : values=0

I don't fully understand the output here; it says that 'ADC1 Capture Volume' and 'ADC2 Capture Volume', which look like the elements responsible for audio input caputure, are muted ("dBscale-min=-64.00dB,step=0.50dB,mute=1").

At the same time 'DAC1 Playback Volume' are said to be muted too although audio output works fine.

Can anyone explain what this output means?

I searched the web for a command to unmute ADC1 and ADC2 and tried the following:

amixer -c 0 sset ADC1,0 200,200 unmute cap

  Simple mixer control 'ADC1',0

  Capabilities: cvolume

  Capture channels: Front Left - Front Right

  Limits: Capture 0 - 176

  Front Left: Capture 176 [100%] [24.00dB]

  Front Right: Capture 176 [100%] [24.00dB]

But that didn't do what I was hoping for:

# amixer -c 0 contents             

numid=7,iface=MIXER,name='ADC High-Pass Filter Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'None'

  ; Item #1 'High Pass'

  : values=0

numid=18,iface=MIXER,name='ADC Single Volume Control Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0

numid=19,iface=MIXER,name='ADC Soft Ramp and Zero Cross Control Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=4

  ; Item #0 'Immediate Change'

  ; Item #1 'Zero Cross'

  ; Item #2 'Soft Ramp'

  ; Item #3 'Soft Ramp on Zero Cross'

  : values=0

numid=5,iface=MIXER,name='ADC1 Capture Volume'

  ; type=INTEGER,access=rw---R--,values=2,min=0,max=176,step=0

  : values=176,176

  | dBscale-min=-64.00dB,step=0.50dB,mute=1

numid=12,iface=MIXER,name='ADC1 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=21,iface=MIXER,name='ADC1 Single Ended Mode Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Differential'

  ; Item #1 'Single-Ended'

  : values=0

numid=6,iface=MIXER,name='ADC2 Capture Volume'

  ; type=INTEGER,access=rw---R--,values=2,min=0,max=176,step=0

  : values=128,128

  | dBscale-min=-64.00dB,step=0.50dB,mute=1

numid=13,iface=MIXER,name='ADC2 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=22,iface=MIXER,name='ADC2 Single Ended Mode Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Differential'

  ; Item #1 'Single-Ended'

  : values=0

numid=14,iface=MIXER,name='DAC Auto Mute Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Disabled'

  ; Item #1 'AutoMute'

  : values=0

numid=20,iface=MIXER,name='DAC Deemphasis Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'No-De-Emphasis'

  ; Item #1 'De-Emphasis'

  : values=0

numid=15,iface=MIXER,name='DAC Single Volume Control Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0

numid=16,iface=MIXER,name='DAC Soft Ramp and Zero Cross Control Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=4

  ; Item #0 'Immediate Change'

  ; Item #1 'Zero Cross'

  ; Item #2 'Soft Ramp'

  ; Item #3 'Soft Ramp on Zero Cross'

  : values=2

numid=8,iface=MIXER,name='DAC1 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=1,iface=MIXER,name='DAC1 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=9,iface=MIXER,name='DAC2 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=2,iface=MIXER,name='DAC2 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=10,iface=MIXER,name='DAC3 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=3,iface=MIXER,name='DAC3 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=11,iface=MIXER,name='DAC4 Invert Switch'

  ; type=ENUMERATED,access=rw------,values=2,items=2

  ; Item #0 'Disabled'

  ; Item #1 'Enabled'

  : values=0,0

numid=4,iface=MIXER,name='DAC4 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=17,iface=MIXER,name='Mute ADC Serial Port Switch'

  ; type=ENUMERATED,access=rw------,values=1,items=2

  ; Item #0 'UnMute'

  ; Item #1 'Mute'

  : values=0

When I only try to unmute amixer doesn't event recognize the command:

# amixer -c 0 sset ADC1,0 unmute cap

amixer: Invalid command!

# amixer -c 0 sset ADC1,0mute cap

amixer: Invalid command!

# amixer -c 0 sset ADC1,0 cap

amixer: Invalid command!

Does anyone have an idea how to resolve this?

Thank you in advance!

Labels (2)
0 Kudos
Reply
2 Replies

699 Views
mustafa_ozcelik
Contributor I

Could you please tell others how have you been able to solve this problem, if you were able to solve it?
I have iMX8QM, also have the same problem with audio recording using CS42888. All voices are unmuted, but yet I cannot hear the recorded file, when played with aplay.

0 Kudos
Reply

699 Views
jimmychan
NXP TechSupport
NXP TechSupport

Please try to use alsamixer to configure capture / record parameters

0 Kudos
Reply