Joshua-Riek / ubuntu-rockchip

Ubuntu for Rockchip RK35XX Devices
https://joshua-riek.github.io/ubuntu-rockchip-download/
GNU General Public License v3.0
2.29k stars 249 forks source link

Bug Report: IEC958 (Audio Passthrough) not working - Ubuntu24.04 #1077

Open Tiemichael opened 1 week ago

Tiemichael commented 1 week ago

What happened?

I have been struggling for quite some time to get Audio Passthrough (IEC958) on KODI working using a NanoPC-T6 with Ubuntu24.04. After several tests and support from the[ Kodi-Forum](https://forum.kodi.tv/showthread.php?tid=378982), I doubt it's related to my KODI, Pipewire and Wireplumber setup, as also ALSA 'aplay -l' and 'aplay -L' don't show any sign of this feature.

No sure if the following is relevant at all: 1) I wonder if this could be somewhere disabled or even be a Kernel-issue: when 'zgrep ROCKCHIP /proc/config.gz', I see: 'CONFIG_SND_SOC_ROCKCHIP=y' but nothing like 'CONFIG_SND_SOC_HDMI_CODEC=m'

2) Another finding: There seems no UCM/UCM2 configuration for my device available, but Pulseaudio (and Pipewire) depend on UCM-topology (https://github.com/alsa-project/alsa-ucm-conf/issues/420#issuecomment-2155118752)

Thank you!

Kernel version

6.1.0-1025-rockchip

SBC model

FriendlyElec NanoPC-T6

What operating system are you seeing this problem on?

Ubuntu 24.04 LTS (Noble Nombat)

Relevant logs

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: realtekrt5616co [realtek,rt5616-codec], device 0: fe470000.i2s-rt5616-aif1 rt5616-aif1-0 [fe470000.i2s-rt5616-aif1 rt5616-aif1-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: rockchipdp0 [rockchip-dp0], device 0: rockchip-dp0 spdif-hifi-0 [rockchip-dp0 spdif-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 4: rockchiphdmi1 [rockchip-hdmi1], device 0: rockchip-hdmi1 i2s-hifi-0 [rockchip-hdmi1 i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pipewire
    PipeWire Sound Server
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
default
    Default ALSA Output (currently PipeWire Media Server)
usbstream:CARD=rockchiphdmiin
    rockchip-hdmiin
    USB Stream Output
hw:CARD=realtekrt5616co,DEV=0
    realtek,rt5616-codec, fe470000.i2s-rt5616-aif1 rt5616-aif1-0
    Direct hardware device without any conversions
plughw:CARD=realtekrt5616co,DEV=0
    realtek,rt5616-codec, fe470000.i2s-rt5616-aif1 rt5616-aif1-0
    Hardware device with all software conversions
sysdefault:CARD=realtekrt5616co
    realtek,rt5616-codec, fe470000.i2s-rt5616-aif1 rt5616-aif1-0
    Default Audio Device
dmix:CARD=realtekrt5616co,DEV=0
    realtek,rt5616-codec, fe470000.i2s-rt5616-aif1 rt5616-aif1-0
    Direct sample mixing device
usbstream:CARD=realtekrt5616co
    realtek,rt5616-codec
    USB Stream Output
hw:CARD=rockchiphdmi0,DEV=0
    rockchip-hdmi0, rockchip-hdmi0 i2s-hifi-0
    Direct hardware device without any conversions
plughw:CARD=rockchiphdmi0,DEV=0
    rockchip-hdmi0, rockchip-hdmi0 i2s-hifi-0
    Hardware device with all software conversions
sysdefault:CARD=rockchiphdmi0
    rockchip-hdmi0, rockchip-hdmi0 i2s-hifi-0
    Default Audio Device
dmix:CARD=rockchiphdmi0,DEV=0
    rockchip-hdmi0, rockchip-hdmi0 i2s-hifi-0
    Direct sample mixing device
usbstream:CARD=rockchiphdmi0
    rockchip-hdmi0
    USB Stream Output
hw:CARD=rockchipdp0,DEV=0
    rockchip-dp0, rockchip-dp0 spdif-hifi-0
    Direct hardware device without any conversions
plughw:CARD=rockchipdp0,DEV=0
    rockchip-dp0, rockchip-dp0 spdif-hifi-0
    Hardware device with all software conversions
sysdefault:CARD=rockchipdp0
    rockchip-dp0, rockchip-dp0 spdif-hifi-0
    Default Audio Device
dmix:CARD=rockchipdp0,DEV=0
    rockchip-dp0, rockchip-dp0 spdif-hifi-0
    Direct sample mixing device
usbstream:CARD=rockchipdp0
    rockchip-dp0
    USB Stream Output
hw:CARD=rockchiphdmi1,DEV=0
    rockchip-hdmi1, rockchip-hdmi1 i2s-hifi-0
    Direct hardware device without any conversions
plughw:CARD=rockchiphdmi1,DEV=0
    rockchip-hdmi1, rockchip-hdmi1 i2s-hifi-0
    Hardware device with all software conversions
sysdefault:CARD=rockchiphdmi1
    rockchip-hdmi1, rockchip-hdmi1 i2s-hifi-0
    Default Audio Device
dmix:CARD=rockchiphdmi1,DEV=0
    rockchip-hdmi1, rockchip-hdmi1 i2s-hifi-0
    Direct sample mixing device
usbstream:CARD=rockchiphdmi1
    rockchip-hdmi1
    USB Stream Output

dmesg | grep -E 'pipewire|wireplumber|alsa|sound'
[    9.535301] input: rockchip-hdmiin rockchip-hdmiin as /devices/platform/hdmiin-sound/sound/card0/input2
[    9.912789] asoc-simple-card rt5616-sound: ASoC: DAPM unknown pin Headphones
[    9.914252] input: realtek,rt5616-codec Headphones as /devices/platform/rt5616-sound/sound/card1/input3
[    9.915880] input: rockchip-dp0 rockchip-dp0 as /devices/platform/dp0-sound/sound/card3/input4
[   10.064044] asoc-simple-card rt5616-sound: ASoC: DAPM unknown pin Headphones
Xeue commented 4 days ago

I think you may be having the same issue as me: https://github.com/Joshua-Riek/ubuntu-rockchip/issues/1006