audio play error!!

Started by aron, May 17, 2023, 01:19:03 PM

Previous topic - Next topic

aron

Hi.

A problem occurred while running STMP1-SOM.

Audio play does not work.
Do you have any idea how to fix this?

console message:
root@stm32mp1-olinuxino-som:~# aplay sign_return.wav
Playing WAVE 'sign_return.wav' : Signed 16[  185.711736] es8328 0-0010: ASoC: error at snd_soc_dai_set_sysclk on es8328-hifi-analog: -22
[  185.719538]  4400b004.audio-controller-es8328-hifi-analog: ASoC: error at snd_soc_link_hw_params on 4400b004.audio-controller-es8328-hifi-analog: -22
 bit Little Endian, Rate 22050 Hz, Mono
aplay: set_params:1407: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 22050
PERIOD_TIME: (46439 46440)
PERIOD_SIZE: 1024
PERIOD_BYTES: 2048
PERIODS: 8
BUFFER_TIME: (371519 371520)
BUFFER_SIZE: 8192
BUFFER_BYTES: 16384
TICK_TIME: 0
root@stm32mp1-olinuxino-som:~#

LubOlimex

Audio play back should work in the official images. Both aplay and mplayer should work, maybe try mplayer sign_return.wav

Try another format or audio file. Edit the settings in alsamixer maybe, sometimes channels can be muted and some terminals make it hard to notice that these channels are muted. Try to unmute with "m" key.
Technical support and documentation manager at Olimex

aron

Hi.
Try again with "STM32MP1-OLinuXino-SOM-bullseye-minimal-20220928-143706.img" for the image.

But I got apply error on "ASoC: error at snd_soc_dai_set_sysclk on es8328-hifi-analog: -22".

I think the reason for this error is the kernel driver.

aron

Audio play was successful by modifying the es8328 driver code.

There is a problem with the kernel driver on the site below, so please modify it and use it.

https://github.com/OLIMEX/linux-olimex/tree/release-20230217-v5.10.105/sound/soc

LubOlimex

Thank you for the update, glad you got it figured out but can you be more specific about how you fixed this issue?

What was wrong wit the es8328 driver code? Your link point to a directory with many sub-folders.
Technical support and documentation manager at Olimex

gberi

Hello Team,

I just bought the "STMP157-BASE-SOM-EVB" and I, unfortunately, face the same issue as above when I am trying to play a MP3. I tried both images, full and minimal, but without success.

Has somebody found the issue in the ES8388 driver or is there another solution to this problem?

BR
Gabe

LubOlimex

I guess the alsamixer settings are not alright. Some of the channels are initially muted (like the volume was up but the whole channel was muted). You can change whether it is muted or unmuted with key "M" on the keyboard. Each mixer should have "OO" at the bottom if it says "MM" it is muted. However, I have a suggestion - for terminal use TeraTerm, alsamixer gets visualized much better with TaraTerm.

See how it looks here:

https://i.imgur.com/gJINyBL.png

This is what my asound.state looks like:

state.STM32MP1 {
control.1 {
iface MIXER
name 'Capture Digital Volume'
value.0 114
value.1 114
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9600
dbmax 0
dbvalue.0 -3900
dbvalue.1 -3900
}
}
control.2 {
iface MIXER
name 'Capture ZC Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.3 {
iface MIXER
name 'DAC Deemphasis Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.4 {
iface MIXER
name 'Capture Polarity'
value Normal
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Normal
item.1 'L Invert'
item.2 'R Invert'
item.3 'L + R Invert'
}
}
control.5 {
iface MIXER
name 'Left Mixer Left Bypass Volume'
value 4
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -1500
dbmax 600
dbvalue.0 -300
}
}
control.6 {
iface MIXER
name 'Left Mixer Right Bypass Volume'
value 4
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -1500
dbmax 600
dbvalue.0 -300
}
}
control.7 {
iface MIXER
name 'Right Mixer Left Bypass Volume'
value 4
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -1500
dbmax 600
dbvalue.0 -300
}
}
control.8 {
iface MIXER
name 'Right Mixer Right Bypass Volume'
value 4
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -1500
dbmax 600
dbvalue.0 -300
}
}
control.9 {
iface MIXER
name 'PCM Volume'
value.0 167
value.1 167
comment {
access 'read write'
type INTEGER
count 2
range '0 - 192'
dbmin -9600
dbmax 0
dbvalue.0 -1250
dbvalue.1 -1250
}
}
control.10 {
iface MIXER
name 'Output 1 Playback Volume'
value.0 27
value.1 27
comment {
access 'read write'
type INTEGER
count 2
range '0 - 36'
dbmin -3000
dbmax 600
dbvalue.0 -300
dbvalue.1 -300
}
}
control.11 {
iface MIXER
name 'Output 2 Playback Volume'
value.0 27
value.1 27
comment {
access 'read write'
type INTEGER
count 2
range '0 - 36'
dbmin -3000
dbmax 600
dbvalue.0 -300
dbvalue.1 -300
}
}
control.12 {
iface MIXER
name 'Mic PGA Volume'
value.0 5
value.1 5
comment {
access 'read write'
type INTEGER
count 2
range '0 - 8'
dbmin 0
dbmax 2400
dbvalue.0 1500
dbvalue.1 1500
}
}
control.13 {
iface MIXER
name 'Differential Mux'
value 'Line 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'Line 1'
item.1 'Line 2'
}
}
control.14 {
iface MIXER
name Route
value Stereo
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Stereo
item.1 'Mono (Left)'
item.2 'Mono (Right)'
item.3 'Digital Mono'
}
}
control.15 {
iface MIXER
name 'Left PGA Mux'
value 'Line 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'Line 1'
item.1 'Line 2'
item.2 'Line 3'
item.3 Differential
}
}
control.16 {
iface MIXER
name 'Right PGA Mux'
value 'Line 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'Line 1'
item.1 'Line 2'
item.2 'Line 3'
item.3 Differential
}
}
control.17 {
iface MIXER
name 'Left Line Mux'
value 'Line 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'Line 1'
item.1 'Line 2'
item.2 PGA
item.3 Differential
}
}
control.18 {
iface MIXER
name 'Right Line Mux'
value 'Line 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'Line 1'
item.1 'Line 2'
item.2 PGA
item.3 Differential
}
}
control.19 {
iface MIXER
name 'Left Mixer Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.20 {
iface MIXER
name 'Left Mixer Left Bypass Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.21 {
iface MIXER
name 'Left Mixer Right Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.22 {
iface MIXER
name 'Left Mixer Right Bypass Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.23 {
iface MIXER
name 'Right Mixer Left Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.24 {
iface MIXER
name 'Right Mixer Left Bypass Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.25 {
iface MIXER
name 'Right Mixer Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.26 {
iface MIXER
name 'Right Mixer Right Bypass Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
}

I was able to get both my wav playing with:

aplay test.wav

and mp3 with mplayer with:

mplayer test.mp3
Technical support and documentation manager at Olimex