Joshua-Riek / ubuntu-rockchip

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

Bug Report: radxa ROCK 5B+ no sound input device #1057

Open jhcho-hanvision opened 1 month ago

jhcho-hanvision commented 1 month ago

What happened?

With ROCK 5B+, there is no audio input device(hdmi in). For orange pi 5 plus and ROCK 5B, it's ok. Screenshot from 2024-09-23 23-07-48

Here is the output with arecord -l

root@5Bplus:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: rockchipes8316 [rockchip-es8316], device 0: dailink-multicodecs ES8316 HiFi-0 [dailink-multicodecs ES8316 HiFi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: rockchiphdmiin [rockchip-hdmiin], device 0: fddf8000.i2s-dummy_codec dummy_codec-0 [fddf8000.i2s-dummy_codec dummy_codec-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@5Bplus:~#

Kernel version

6.1.0-1025-rockchip

SBC model

Radxa ROCK 5B Plus

What operating system are you seeing this problem on?

Ubuntu 24.04 LTS (Noble Nombat)

Relevant logs

Here are some logs copied from /var/log/dmesg

[   22.123618] kernel: clk_i2s7_8ch_rx_frac p_rate(131071999), rate(0), maybe invalid frequency setting!
[   22.123652] kernel: clk_i2s7_8ch_rx_frac p_rate(131071999), rate(0), maybe invalid frequency setting!
[   22.123669] kernel: rockchip-i2s-tdm fddf8000.i2s: ASoC: error at snd_soc_dai_hw_params on fddf8000.i2s: -22
[   22.123701] kernel:  fddf8000.i2s-dummy_codec: ASoC: error at __soc_pcm_hw_params on fddf8000.i2s-dummy_codec: -22
[   22.123729] kernel: clk_i2s7_8ch_rx_frac p_rate(131071999), rate(0), maybe invalid frequency setting!
[   22.123745] kernel: clk_i2s7_8ch_rx_frac p_rate(131071999), rate(0), maybe invalid frequency setting!
[   22.123759] kernel: rockchip-i2s-tdm fddf8000.i2s: ASoC: error at snd_soc_dai_hw_params on fddf8000.i2s: -22
[   22.123765] kernel:  fddf8000.i2s-dummy_codec: ASoC: error at __soc_pcm_hw_params on fddf8000.i2s-dummy_codec: -22
[   22.123787] kernel: clk_i2s7_8ch_rx_frac p_rate(131071999), rate(0), maybe invalid frequency setting!
[   22.123800] kernel: clk_i2s7_8ch_rx_frac p_rate(131071999), rate(0), maybe invalid frequency setting!
[   22.123812] kernel: rockchip-i2s-tdm fddf8000.i2s: ASoC: error at snd_soc_dai_hw_params on fddf8000.i2s: -22
[   22.123818] kernel:  fddf8000.i2s-dummy_codec: ASoC: error at __soc_pcm_hw_params on fddf8000.i2s-dummy_codec: -22
[   22.123835] kernel: clk_i2s7_8ch_rx_frac p_rate(131071999), rate(0), maybe invalid frequency setting!
[   22.123848] kernel: clk_i2s7_8ch_rx_frac p_rate(131071999), rate(0), maybe invalid frequency setting!
[   22.123861] kernel: rockchip-i2s-tdm fddf8000.i2s: ASoC: error at snd_soc_dai_hw_params on fddf8000.i2s: -22
[   22.123866] kernel:  fddf8000.i2s-dummy_codec: ASoC: error at __soc_pcm_hw_params on fddf8000.i2s-dummy_codec: -22
......
hanvinke commented 1 month ago

@jhcho-hanvision

To have the input device detected like this:

Screenshot from 2024-10-01 22-44-46

..you need to enable the capture device in alsamixer. Click on F5 and choose ¨Capture¨. Then click on the spacebar.

When enabled the ¨--------" will change like this:

Screenshot from 2024-10-01 22-49-57

jhcho-hanvision commented 1 month ago

Thank you for your reply. Here is the snapshot from radxa 5B+ image

I can enable Headset Microphone as your explanation.

But, what i want to have is hdmi input device. Here is the same snapshot with orange pi 5+ with hdmi input device. image

jhcho-hanvision commented 1 month ago

I compared the dts files for rock-5b and rock-5b-plus from these links. https://github.com/radxa/kernel/blob/linux-6.1-stan-rkr1/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts https://github.com/radxa/kernel/blob/linux-6.1-stan-rkr1/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts https://github.com/armbian/linux-rockchip/blob/rk-6.1-rkr3/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts https://github.com/Joshua-Riek/linux-rockchip/blob/noble/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts https://github.com/Joshua-Riek/linux-rockchip/blob/noble/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts no dts file for rock-5b-plus at armbian.

I don't know well about linux kernel, but i guess rock-5b-plus.dts file is the reason for no hdmi-in audio. Hope this search can fix this problem. Thanks.

vtv3000 commented 1 month ago

I have the same problem ! No hdmi input audio in system

vtv3000 commented 1 month ago

And I don't have analog audio input too

jhcho-hanvision commented 1 month ago

And I don't have analog audio input too

You can try your audio jack plugged.

vtv3000 commented 1 month ago

Ok I will try to plugin audio jack

But hdmi cable was plug in and no audio . In alsamixer I can see hdmi input but not have control . Gstreamer cannot have sound from hdmi

May be need EDDID file ?

jhcho-hanvision commented 1 month ago

https://github.com/Joshua-Riek/linux-rockchip/blob/noble/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts

I have the same problem with hdmi input. I am waiting for Joshua-Riek's update for hdmi audio input problem.

vtv3000 commented 1 month ago

https://github.com/Joshua-Riek/linux-rockchip/blob/noble/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts

I have the same problem with hdmi input.

I am waiting for Joshua-Riek's update for hdmi audio input problem.

I compare .dts files and see some different

image

vtv3000 commented 3 weeks ago

Today fresh install Ubuntu and I see audio input from analog input

But audio from hdmi input not work ..