Why does the .wav files from ALSA sounds like they are recorded under water?
Hi!
I have a custom board with STM32MP257F. I have the same electrical setup for HDMI as STM32MP257-DK board have. Hence, the HDMI output is working.
But playing sound through HDMI does not work very well. It sounds like the mono .wav files from /etc/share/sound/alsa are recorded under water.
I play these sounds by using instructions from https://wiki.st.com/stm32mpu/wiki/How_to_play_audio
Here is my sound card. I can play test sounds like pink noise, PWM and sine waves from speaker-test.
Here is my hardware setup. I'm using the same HDMI and I2S Device Tree setup as STM32MP257-DK.
(No, in mobile view, I cannot post this as a code block because the button "..." is not available)
root@watermelon-wine-1aunknown:/usr/share/sounds/alsa# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: STM32MP25DK [STM32MP25-DK], device 0: 400b0000.audio-controller-i2s-hifi i2s-hifi-0 [400b0000.audio-controller-i2s-hifi i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@watermelon-wine-1aunknown:/usr/share/sounds/alsa# cat /etc/asound.conf
pcm.!playback_hdmi {
type hw
card STM32MP25DK
device 0
}
pcm.!record_dmic0 {
type hw
card STM32MP25DK
device 1
}
pcm.!record_dmic1 {
type hw
card STM32MP25DK
device 2
}
root@watermelon-wine-1aunknown:/usr/share/sounds/alsa# pactl list sinks
Sink #60
State: SUSPENDED
Name: alsa_output.platform-sound.hdmi-stereo
Description: Built-in Audio Digital Stereo (HDMI)
Driver: PipeWire
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 41958 / 64% / -11.62 dB, front-right: 41302 / 63% / -12.03 dB
balance -0.02
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.platform-sound.hdmi-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS
Properties:
alsa.card = "0"
alsa.card_name = "STM32MP25-DK"
alsa.class = "generic"
alsa.device = "0"
alsa.driver_name = "snd_soc_audio_graph_card"
alsa.id = "STM32MP25DK"
alsa.long_card_name = "STM32MP25-DK"
alsa.name = "400b0000.audio-controller-i2s-hifi i2s-hifi-0"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.sync.id = "00000000:00000000:00000000:00000000"
api.alsa.card.longname = "STM32MP25-DK"
api.alsa.card.name = "STM32MP25-DK"
api.alsa.headroom = "8192"
api.alsa.path = "hdmi:0"
api.alsa.pcm.card = "0"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "1"
device.api = "alsa"
device.class = "sound"
device.id = "48"
device.profile.description = "Digital Stereo (HDMI)"
device.profile.name = "hdmi-stereo"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Built-in Audio"
node.name = "alsa_output.platform-sound.hdmi-stereo"
node.nick = "400b0000.audio-controller-i2s-hifi i2s-hifi-0"
node.pause-on-idle = "false"
object.path = "alsa:acp:STM32MP25DK:1:playback"
port.group = "playback"
priority.driver = "1000"
priority.session = "1000"
factory.id = "19"
clock.quantum-limit = "8192"
client.id = "47"
node.driver = "true"
node.loop.name = "data-loop.0"
library.name = "audioconvert/libspa-audioconvert"
object.id = "45"
object.serial = "60"
api.acp.auto-port = "false"
api.alsa.card = "0"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio0"
api.dbus.ReserveDevice1.Priority = "-20"
device.bus_path = "platform-sound"
device.enum.api = "udev"
device.form_factor = "internal"
device.icon_name = "audio-card-analog"
device.name = "alsa_card.platform-sound"
device.nick = "STM32MP25-DK"
device.plugged.usec = "34320631"
device.subsystem = "sound"
sysfs.path = "/devices/platform/sound/sound/card0"
device.string = "0"
Ports:
hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, availability unknown)
Active Port: hdmi-output-0
Formats:
pcm
root@watermelon-wine-1aunknown:/usr/share/sounds/alsa# ls
Front_Center.wav Front_Left.wav Front_Right.wav Noise.wav Rear_Center.wav Rear_Left.wav Rear_Right.wav Side_Left.wav Side_Right.wav
root@watermelon-wine-1aunknown:/usr/share/sounds/alsa#
