I have two monitor connect to the ubuntu host (one through HDMI port, the other through DP port).
$ xrandr -q | grep -i XWAYLAND
XWAYLAND0 connected primary 2560x1440+1440+557 (normal left inverted right x axis y axis) 600mm x 340mm
XWAYLAND1 connected 1440x2560+0+0 (normal left inverted right x axis y axis) 330mm x 600mm
I need to stream the audio to the device that use DP port. But in the ubuntu setting, the HDMI/DP audio output options are a same option, like:
HDMI and DP output are in one option
It seems that it use HDMI as output port as default, when I close the HDMI connected monitor, the device connected through DP port play the sound.
There are some related ports information.(I'm not familiar with that, if more information needed, just tell me.)
$ find /sys/devices -name "edid"
/sys/devices/pci0000:00/0000:00:08.1/0000:10:00.0/drm/card0/card0-HDMI-A-1/edid
/sys/devices/pci0000:00/0000:00:08.1/0000:10:00.0/drm/card0/card0-DP-2/edid
/sys/devices/pci0000:00/0000:00:08.1/0000:10:00.0/drm/card0/card0-DP-3/edid
/sys/devices/pci0000:00/0000:00:08.1/0000:10:00.0/drm/card0/card0-DP-1/edid
Audio device information from aplay.
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC897 Analog [ALC897 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
And config in ~/.config/pulse/**-default-sink
cat ~/.config/pulse/2235aa67aade40c4b290abaf5e5b312a-default-sink
alsa_output.pci-0000_10_00.1.hdmi-stereo