3

Brief: speaker-test -c 2 -D iec958:vc4hdmi1 works just fine, so I want to make it default/persist so speaker-test also works. I'm looking for a solution that doesn't involve pulseaudio.

Details:

SW: server Ubuntu 20.10 (GNU/Linux 5.8.0-1016-raspi aarch64), ALSA k5.8.0-1016-raspi, arm64

HW: Raspberry Pi 4, audio device is a headphone plugged into a minijack of my monitor that is connected via HDMI to hdmi1 out of my raspberry. firmware/config.txt: dtoverlay=vc4-kms-v3d,audio=off; dtparam=audio=on

Config file may be either: asound.conf or .asoundrc

Disclaimer: It may be 2+2, but I couldn't find info to replicate and also couln't find any sample from 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

Pls advise. Thanks!

zoechi
  • 127
  • 1
  • 6
Pavel
  • 31
  • 3
  • `pcm.!default = plug:iec958:vc4hdmi1` should work. – CL. Mar 07 '21 at 16:54
  • @CL. That's it! Tnx, so now "speaker-test -c2" works, w/o a need to specify device. Can you please advise how can I inster "channels 2" into the config to get rid of "-c2"? Now if I run "speaker-test" w/o params, it defaults to 1 channel and fails. – Pavel Mar 08 '21 at 15:33
  • The channel count chosen by speaker-test cannot be overridden. – CL. Mar 08 '21 at 19:50
  • Thank you! I thought that if to skip "-c" parameter, speaker-test picks up what's in config files. – Pavel Mar 09 '21 at 21:21

0 Answers0