Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch Linux ARM hdmi没有声音输出 #2

Closed
langyxxl opened this issue Oct 29, 2022 · 5 comments
Closed

Arch Linux ARM hdmi没有声音输出 #2

langyxxl opened this issue Oct 29, 2022 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@langyxxl
Copy link

按照教程,装好系统之后,hdmi没有声音,armbian原版系统没问题

运行speaker-test
dmesg报错:
[ 727.782286] fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[ 727.783834] fe.dai-link-0: ASoC: dpcm_fe_dai_prepare() failed (-22)

按照教程,内核和驱动应该都是armbian原来的,按理说不应该有问题,接下来不知道如何调查,先提交个issue吧

@Scirese
Copy link
Owner

Scirese commented Oct 29, 2022

我这边也有同样的问题. 完全没有排查的头绪.
可能是预构建的 Arch Linux ARM rootfs 本身的问题吧, 试试用 pacstrap 全新安装?

我这几天的使用下来发现 Arch Linux ARM 确实问题不少. HDMI 没声音是一个,还有时间不同步,WiFi 密码不保存的问题. Manjaro ARM 没有这些问题,你可以试试. 如果喜欢 Arch 也可以把 Manjaro 滚成 Arch.
先不要关闭这个 issue.

@Scirese Scirese changed the title CM311-1a-YST盒子hdmi没有声音输出 Arch Linux ARM hdmi没有声音输出 Oct 29, 2022
@7Ji
Copy link

7Ji commented Nov 25, 2022

SoC上面的声音子系统本身是工作正常的,只是没有正确的声音路径。Manjaro ARM 给 Amlogic打的包都有一个sound.service和对应的g12_sound.sh,这个包由khadas-utils提供(不要被名字误导了,包含khadas只是因为khadas是最早给Manjaro赞助开发板然后最早适配的,实际上里面的内容给所有Amlogic设备用都可以)。这个包不依赖于Manjaro的系统包,可以直接从镜像站下到

wget https://mirrors.tuna.tsinghua.edu.cn/manjaro/arm-stable/community/aarch64/khadas-utils-4-2-any.pkg.tar.zst

然后直接在alarm上用pacman就可以装(下载和安装分开,不然直接pacman -U + 地址的话要信任Manjaro的密钥,你在alarm上要从头开始整个信任,贼费时间)

pacman -U khadas-utils-4-2-any.pkg.tar.zst

然后就可以启用它提供的sound.service

systemctl enable sound.service

重启可以看下是不是正常,如果声音仍然不工作,可能是因为你的盒子用的是旧的conf对应的声音输出路线,需要在/usr/bin/g12_sound.sh里面注释掉L137-L142对应的新配置(主要是给G12B用的,也就是S922X,旧的G12A/S905X2之前,以及基于G12A的SM1/S905X3大部分用不来)

# Amlogic G12 HDMI to PCM0 - NEW CONF
# mixer $card 'FRDDR_A SINK 1 SEL' 'OUT 0'
# mixer $card 'FRDDR_A SRC 1 EN' on
# mixer $card 'TDMOUT_A SRC SEL' 'IN 0'
# mixer $card 'TOHDMITX' on
# mixer $card 'TOHDMITX I2S SRC' 'I2S A'

然后取消L130-L134对应的旧配置的注释

# Amlogic G12 HDMI to PCM0 - OLD CONF
  mixer $card 'FRDDR_A SINK 1 SEL' 'OUT 1'
  mixer $card 'FRDDR_A SRC 1 EN' on
  mixer $card 'TDMOUT_B SRC SEL' 'IN 0'
  mixer $card 'TOHDMITX I2S SRC' 'I2S B'
  mixer $card 'TOHDMITX' on

如果声音正常,因为alsa-utils包里面默认会安装alsa-restore.service并且在sound.target依赖中启用,每次关机前保存声卡配置,开机的时候恢复,这个设置正确声音路由的服务就没用了,你可以直接禁用甚至删除这个包(真实卸磨杀驴):

systemctl disable sound.service
pacman -Rcns khadas-utils

在BPi M5 (SM1, S905X3)上试验通过,HK1BOX当服务器没挪来试,其他设备应该可以照搬

@Scirese
Copy link
Owner

Scirese commented Nov 25, 2022 via email

@7Ji
Copy link

7Ji commented Nov 25, 2022 via email

@Scirese
Copy link
Owner

Scirese commented Nov 28, 2022

解决了吧,大概

probably solved (

@Scirese Scirese closed this as completed Nov 28, 2022
@Scirese Scirese added the documentation Improvements or additions to documentation label Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants