On rPi4 bookworm only one HDMI card is showing in REWs list of output devices

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
REW: V5.30.5

How do I get both rPi4 HDMIs to show up in REWs output list?

After fresh install I see only one hdmi device listed in REWs output list:

Code:
PCM:hdmi

Selecting this outputs sound to HDMI0.

ALSA sees both HDMI devices as expected:

Code:
$ aplay -L | grep hdmi:
hdmi:CARD=vc4hdmi0,DEV=0
hdmi:CARD=vc4hdmi1,DEV=0

Pipewire is new to me, but it seems to know something of them:

Code:
$ pw-cli list-objects | grep node.name | grep hdmi
         node.name = "alsa_output.platform-fef00700.hdmi.hdmi-stereo"
         node.name = "alsa_output.platform-fef05700.hdmi.hdmi-stereo"

So how do I get both HDMIs mapped so that REW can see them?

P.S. Speaker-test outputs to hdmi1 just fine:

Code:
$ speaker-test -c2 -D hdmi:vc4hdmi1
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
IMO the problem is with listing the devices. The code in aplay -L uses a different method for listing than the javasound PCM library (which has the same method as Portaudio does - e.g. in Audacity prefs will list the same devices).

But you may have plughw:X device listed in REW by the stock java javasound provider (where X are ids of your hdmi cards).
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
Update: The list of REW outputs gets even smaller with JRE 17.0.9, rather than JRE 8. Now only the following outputs show up:

Bash:
Default device
default [default]
Headphones [plughw:2,0]

No HDMI at all!

Is there an rPi4/REW/OS/Desktop/Java combination that is known to work (including 2 x HDMI outputs)?
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
Do you have the HDMI device disabled in pulseaudio/pipewire? Is it perhaps used by that, blocking REW access to it?
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
Update: A workaround is to set the desktop default to "HDMI-A-2". But this is nasty unless you want system sounds on that output as well!
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
There is no reason why the stock java javasound should not see all alsa soundcards which are not used by other processes (typically PA/PW). The reason for not seeing PCM devices is discussed in the other thread.
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
Do you have the HDMI device disabled in pulseaudio/pipewire?
Both HDMIs are listed in the GUI speaker control widget, and correctly control where REW and speaker-test sends output by default (for example). So both HDMI devices are "working", but somehow hidden from REW.
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
That GUI speaker control widget is almost certainly pulseaudio/pipewire feature. You need to tell PA/PW to ignore those soundcards first. E.g. https://forum.endeavouros.com/t/disabling-audio-devices-entirely/7738 - the off option, could be "disable" in other GUIs.

In most distributions with PA/PW the default device is configured to be the pulse plugin, passing all streams to PA/PW. Unless you set a specific device in speaker-test -D DEVICE_NAME
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
You need to tell PA/PW to ignore those soundcards
Why do you think that would help? Surely REW must either be adapting to PA/PW or going direct to ALSA devices like "speaker-test -D"?

"Speak-test -D" works in all cases so far - whether I turn "HDMI-A-2" off or not in the PW GUI.

If REW is direct to ALSA why can it not see what speaker-test sees?

In any case I turned "HDMI-A-2" "off" in the PW GUI as suggested and it made no difference to the outputs displayed in REW. (I.e. I still don't see either HDMI listed in REW)
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
Update: I spoke too soon: Speaker-test appears to work via PW (default) - but in fact the channels are swapped around w.r.t. the raw ALSA device.
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
Why do you think that would help?
Because it helps in many many cases. PA randomly opens devices it has allowed, which blocks any other application from access over alsa.
Surely REW must either be adapting to PA/PW or going direct to ALSA devices like "speaker-test -D"?
REW uses java which has several audio connectors for linux:
* javasound supplied with all JVMs - this enumerates only hw cards and wraps them with plug plugin (plughw:XX)
* my csjsound-pcm connector supplied with REW - this enumerates PCM devices that are really defined. Unlike aplay -L which lists also hints (suggestions) what combinations of plugins could be used on the hw cards (plughw:xxx, hdmi:xxx, dmix:xxx)
* pulseaudio javasound by IcedTea JDK supplied with some distribution JVMs

There is no adaptation in REW - whatever output you choose, that one is used. No hidden decisions switching output connectors behind.

If REW is direct to ALSA why can it not see what speaker-test sees?
Do not use speaker-test for diagnostics in this case as it has no debug capabilities. Use aplay -v -D devicename /dev/zero which will tell you details about the whole path down to the hw device (or to the pulse plugin).

In any case I turned "HDMI-A-2" "off" in the PW GUI as suggested and it made no difference to the outputs displayed in REW. (I.e. I still don't see either HDMI listed in REW)
The first rule of thumb when using alsa devices directly (such as in java unless the pulseaudio javasound is used - we talked about it in https://www.avnirvana.com/threads/rew-fails-to-output-audio-to-linux-pulseaudio_dnla-device.12982/ ) is to disable the corresponding devices in PA/PW. Even if the device is accessible now, it may not be next try as PA/maybe PW opens the device at unexpected times. It's the first fundamental step, no reason to troubleshoot if the device is enabled in PA/PW.

If the device is disabled, REW still may not offer the device in the selection list, eventhough java "sees" it. The reason is typically some mismatch in samplerates/channels/formats. Such issue is logged into REW log. Its path is listed in Help → About REW window. Please post the file here.

Edit: the verbose parameter of aplay is lower-case -v: aplay -v
 
Last edited:
Top Bottom