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

Rock64 | 3.5mm audio jack not working #2522

Closed
lupa18 opened this issue Feb 8, 2019 · 43 comments
Closed

Rock64 | 3.5mm audio jack not working #2522

lupa18 opened this issue Feb 8, 2019 · 43 comments
Labels
External bug 🐞 For bugs which are not caused by DietPi. Kernel related 🧬 ROCK64

Comments

@lupa18
Copy link

lupa18 commented Feb 8, 2019

Creating a bug report/issue

Required Information

  • DietPi version | 6.21.1
  • Distro version | stretch
  • Kernel version | Linux DietPi 4.4.77-rockchip-ayufan-136
  • SBC device | Rock64 (aarch64)
  • Power supply used | 5V 1A
  • SDcard used | SanDisk ultra

Steps to reproduce

  1. Update dietpi using: sudo dietpi-update
  2. Try to play some sound

Expected behaviour

Hear sounds

Actual behaviour

Can't hear anything

Extra details

Log says:
Feb 08 20:03 : exception: Failed to open "DietPi Alsa" [alsa]
Feb 08 20:03 : exception: nested: Failed to open ALSA device "default": Permission denied

So I try to change sound card permissions and works !
sudo chmod -R a+rw /dev/snd

But after next update, the problem appears again.

@MichaIng MichaIng added this to the v6.22 milestone Feb 9, 2019
@MichaIng
Copy link
Owner

MichaIng commented Feb 9, 2019

@lupa18
Thanks for your report.

Which sound card do you use, or native 3.5mm jack output?

@lupa18
Copy link
Author

lupa18 commented Feb 9, 2019

Native 3.5mm

thank you!

@sChUhBiDu
Copy link

This fixed it for me as well!

Why is the sound so quiet? can you make a louder somehow? Even with 100% its not loud.

@MichaIng
Copy link
Owner

MichaIng commented Feb 24, 2019

@lupa18 @sChUhBiDu
Did you try to play sound via MPD? Then it is most likely related to: https://github.com/Fourdee/DietPi/issues/2462

Solution in this case would be:

sed -Ei '/^(user|group)[[:blank:]]/d' /etc/mpd.conf
sed -i '/^Group=/d' /lib/systemd/system/mpd.service
G_CONFIG_INJECT 'User=' 'User=mpd' /lib/systemd/system/mpd.service '\[Service\]'
G_CONFIG_INJECT 'PermissionsStartOnly=' 'PermissionsStartOnly=true' /lib/systemd/system/mpd.service '^User=mpd'
usermod -a -G audio,dietpi mpd
systemctl daemon-reload
systemctl restart mpd

This is safer then chmod -R a+rw /dev/snd and of course boot persistent.

@lupa18
Copy link
Author

lupa18 commented Feb 25, 2019

Perfect ! I will try.

Only this little fix: first line, at the end should be: /etc/mpd.conf

@MichaIng MichaIng changed the title No sound after update DietPi-Software | MPD: No sound after update Mar 2, 2019
@MichaIng MichaIng removed this from the v6.22 milestone Mar 8, 2019
@MichaIng
Copy link
Owner

@lupa18
And did it solve your issue? As this is very likely I will mark this as closed. However feel free to reopen if required.

@lupa18
Copy link
Author

lupa18 commented Mar 17, 2019

yes, It works!! ... will dietpi include these changes?

@MichaIng
Copy link
Owner

@lupa18
Already included in the current Beta: https://github.com/MichaIng/DietPi/blob/beta/CHANGELOG.txt#L46
Release will be soon, as long no further bugs are reported 😃. You can help testing if you want: #2632

@MichaIng MichaIng added Solution available 🥂 Definite solution has been done Duplicate For issues that are/were already handled within another issue labels Mar 17, 2019
@MichaIng MichaIng added this to the v6.22 milestone Mar 17, 2019
@lupa18
Copy link
Author

lupa18 commented Mar 17, 2019

Sorry, I think it was solved, because mpd begin working, but sound really don't coming ount. Then I search for logs and found this:

exception: nested: Failed to open ALSA device "default": Operation not permitted

(I'm using dietpi's fresh install)

@lupa18
Copy link
Author

lupa18 commented Mar 17, 2019

I have availability to help on this, but not sure how to proceed, where is syslog and things like that.

@lupa18
Copy link
Author

lupa18 commented Mar 17, 2019

And from dmesg, I got:

[    3.389176] of_get_named_gpiod_flags: can't parse 'simple-audio-card,hp-det-gpio' property of node '/spdif-sound[0]'
[    3.389187] of_get_named_gpiod_flags: can't parse 'simple-audio-card,mic-det-gpio' property of node '/spdif-sound[0]'

@MichaIng
Copy link
Owner

MichaIng commented Mar 17, 2019

@lupa18

exception: nested: Failed to open ALSA device "default": Operation not permitted

(I'm using dietpi's fresh install)

Since the error looks quite clear, just to verify:

The dmesg error is about GPIO/SPDIF, so is not related to your 3.5mm jack.

@lupa18
Copy link
Author

lupa18 commented Mar 17, 2019

I'm using: v6.21.1 | Rock64 (aarch64)

I applied comment above, but I think second line has an error. Then I tested again by adding manually Group=audio but can't reproduce nothing trough jack output.

@MichaIng
Copy link
Owner

@lupa18
The second line as desired should remove the Group= entry from the systemd unit. But adding Group=audio does not harm as well, it just has no effect since the mpd user is already member of the audio group by line 5.

Hmm and your OT solution sudo chmod -R a+rw /dev/snd does not help as well?

@lupa18
Copy link
Author

lupa18 commented Mar 17, 2019

No, that "solution" doesn't work, and no way to hear anything.

When I go to dietpi-config I see:

  • default: hw:0,0
  • hw:0,0 HDMI
  • hw:1,0 SPDIF
  • usb-dac: ..

Is correct to configure hw:1,0 SPDIF for use jack output ?

@MichaIng
Copy link
Owner

MichaIng commented Mar 17, 2019

@lupa18

Is correct to configure hw:1,0 SPDIF for use jack output ?

It depends if you need a digital (SPDIF) or analogue (default) signal. Usually if you attach a speaker directly to the jack it requires an analogue signal, but it is not listed in your case.

Just found that by default the required kernel module is not enabled. Please try:

modprobe sunxi_codec
aplay -l
aplay -L

I hope you see the 3.5mm jack (analogue output) then. If yes, do:

mkdir -p /etc/modules-load.d
echo 'sunxi_codec' > /etc/modules-load.d/sunxi_codec.conf

And you can then select this device via dietpi-config > Audio as well, respectively through MPD.

@lupa18
Copy link
Author

lupa18 commented Mar 17, 2019

@MichaIng

It seems that module is not there:

$ modprobe sunxi_codec
modprobe: FATAL: Module sunxi_codec not found in directory /lib/modules/4.4.174-rockchip64

@lupa18
Copy link
Author

lupa18 commented Apr 9, 2019

First:

# fdtget -p /boot/dtb/rockchip/rk3328-rock64.dtb sound
Error at 'sound': FDT_ERR_BADPATH

then:

# fdtget /boot/dtb/rockchip/rk3328-rock64.dtb sound status
Error at 'sound': FDT_ERR_BADPATH

and I'm not sure if any other thing is needed.

@FredericGuilbault
Copy link
Contributor

Is this solved ?

@MichaIng
Copy link
Owner

@FredericGuilbault
Not sure which kernel package is used on Rock64. If it's linux-image-rockchip64, then it should be solved. Current kernel version there is 4.4.180 and the issue was solved with 4.4.178.

@lupa18
Copy link
Author

lupa18 commented Jul 25, 2019

Upgrade will be enough? or I should download and flash DP again?

@MichaIng
Copy link
Owner

MichaIng commented Jul 25, 2019

@lupa18
apt update && apt full-upgrade should do it. Check that a kernel package update is included (linux-image-rockchip64) and reboot afterwards to load it.

I keep finger crossed, hope I interpreted the changelogs correctly 😅.

@MichaIng
Copy link
Owner

MichaIng commented Feb 4, 2020

@lupa18
Any news from your side? Meanwhile I uploaded a Buster-based testing image: #2979

@MichaIng
Copy link
Owner

I mark this as closed, especially in regards to new Buster image. Feel free to reopen if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External bug 🐞 For bugs which are not caused by DietPi. Kernel related 🧬 ROCK64
Projects
None yet
Development

No branches or pull requests

4 participants