简要:speaker-test -c 2 -D iec958:vc4hdmi1
运行良好,所以我想将其设为默认/持久,这样speaker-test
也能正常工作。我正在寻找一种不涉及 pulseaudio 的解决方案。
细节:
软件:服务器 Ubuntu 20.10(GNU/Linux 5.8.0-1016-raspi aarch64)、ALSA k5.8.0-1016-raspi、arm64
HW:Raspberry Pi 4,音频设备是插入显示器迷你插孔的耳机,该插孔通过 HDMI 连接到树莓派的 hdmi1。firmware/config.txt:dtoverlay=vc4-kms-v3d,audio=off; dtparam=audio=on
配置文件可以是:asound.conf 或 .asoundrc
免责声明:它可能是 2+2,但我找不到要复制的信息,也找不到来自 ALSA wiki 的任何示例。
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi [vc4-hdmi], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: vc4hdmi1 [vc4-hdmi1], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
Default Audio Device
sysdefault
Default Audio Device
iec958
IEC958 (S/PDIF) Digital Audio Output
hw:CARD=vc4hdmi,DEV=0
vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
Direct hardware device without any conversions
plughw:CARD=vc4hdmi,DEV=0
vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
Hardware device with all software conversions
default:CARD=vc4hdmi
vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
Default Audio Device
sysdefault:CARD=vc4hdmi
vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
Default Audio Device
front:CARD=vc4hdmi,DEV=0
vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
Front output / input
iec958:CARD=vc4hdmi,DEV=0
vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=vc4hdmi,DEV=0
vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
Direct sample mixing device
hw:CARD=vc4hdmi1,DEV=0
vc4-hdmi1, MAI PCM vc4-hdmi-hifi-0
Direct hardware device without any conversions
plughw:CARD=vc4hdmi1,DEV=0
vc4-hdmi1, MAI PCM vc4-hdmi-hifi-0
Hardware device with all software conversions
default:CARD=vc4hdmi1
vc4-hdmi1, MAI PCM vc4-hdmi-hifi-0
Default Audio Device
sysdefault:CARD=vc4hdmi1
vc4-hdmi1, MAI PCM vc4-hdmi-hifi-0
Default Audio Device
front:CARD=vc4hdmi1,DEV=0
vc4-hdmi1, MAI PCM vc4-hdmi-hifi-0
Front output / input
iec958:CARD=vc4hdmi1,DEV=0
vc4-hdmi1, MAI PCM vc4-hdmi-hifi-0
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=vc4hdmi1,DEV=0
vc4-hdmi1, MAI PCM vc4-hdmi-hifi-0
Direct sample mixing device
请提供建议。谢谢!