Hello,
You have to use the latest BSP, then get information on the sound cards
Installed devices:
# cat /proc/asound/cards
0 [wm8904audio ]: wm8904-audio - wm8904-audio
wm8904-audio
List device names for playback:
# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=wm8904audio
wm8904-audio,
Default Audio Device
Audio Playback
PulseAudio needs to be stopped to run amixer commands.
# systemctl stop pulseaudio
Set PCM volume (main volume of audio codec), range :0-63
# amixer set Headphone 35
Play audio:
# aplay /usr/share/sounds/alsa/Front_Center.wav
Example:
# systemctl stop pulseaudio;amixer set set Headphone 35
Simple mixer control 'Headphone',0
Capabilities: volume pswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 63
Front Left: 35 [56%] [-22.00dB] Playback [on]
Front Right: 35 [56%] [-22.00dB] Playback [on]
# aplay /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Audio Record and Play, Line-in Jack
PulseAudio needs to be stopped to run amixer commands.
# systemctl stop pulseaudio
Set PCM volume (main volume of audio codec), range :0-63
# amixer set Headphone 35
Set capture input source to ADC
# amixer set 'Capture Input' ADC
Set DMIC Mux to DMIC2
# amixer set 'DMIC Mux' DMIC2
Record CD quality audio for 10 seconds into file test.wav
# arecord -f cd -d 10 test.wav
Play the recorded file
# aplay test.wav
Example:
# systemctl stop pulseaudio; amixer set set Headphone 35
Simple mixer control 'Headphone',0
Capabilities: volume pswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 63
Front Left: 35 [56%] [-22.00dB] Playback [on]
Front Right: 35 [56%] [-22.00dB] Playback [on]
# amixer set 'Capture Input' ADC
Simple mixer control 'Capture Input',0
Capabilities: enum
Items: 'ADC' 'DMIC'
Item0: 'ADC'
# amixer set 'DMIC Mux' DMIC2
Simple mixer control 'DMIC Mux',0
Capabilities: enum
Items: 'DMIC1' 'DMIC2'
Item0: 'DMIC2'
# arecord -f cd -d 10 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
# aplay test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Audio Record and Play, DMIC
PulseAudio needs to be stopped to run amixer commands.
# systemctl stop pulseaudio
Set Headphones volume, range :0-63
# amixer set Headphone 35
Set capture input source to DMIC
# amixer set 'Capture Input' DMIC
Set DMIC Mux to DMIC1
# amixer set 'DMIC Mux' DMIC1
Record CD quality audio for 10 seconds into file test.wav
# arecord -f cd -d 10 test.wav
Play the recorded file
# aplay test.wav
Example:
# systemctl stop pulseaudio;amixer set set Headphone 35
Simple mixer control 'Headphone',0
Capabilities: volume pswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 63
Front Left: 35 [56%] [-22.00dB] Playback [on]
Front Right: 35 [56%] [-22.00dB] Playback [on]
# amixer set 'Capture Input' DMIC
Simple mixer control 'Capture Input',0
Capabilities: enum
Items: 'ADC' 'DMIC'
Item0: 'DMIC'
# amixer set 'DMIC Mux' DMIC1
Simple mixer control 'DMIC Mux',0
Capabilities: enum
Items: 'DMIC1' 'DMIC2'
Item0: 'DMIC1'
# arecord -f cd -d 10 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
# aplay test.wav
Playing WA
the everything works on EVK
Alfredo