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

DietPi-Config | Add Allwinner H3 analogue 3.5mm onboard audio #6093

Closed
eurya opened this issue Jan 25, 2023 · 7 comments · Fixed by #6447
Closed

DietPi-Config | Add Allwinner H3 analogue 3.5mm onboard audio #6093

eurya opened this issue Jan 25, 2023 · 7 comments · Fixed by #6447

Comments

@eurya
Copy link

eurya commented Jan 25, 2023

Creating a bug report/issue

Required Information

  • DietPi version |
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=13
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'
    G_LIVE_PATCH_STATUS[0]='applied'
    G_LIVE_PATCH_STATUS[1]='not applicable'

  • Distro version | bullseye

  • Kernel version | Linux DietPi 5.15.89-sunxi #22.11.4 SMP Mon Jan 23 21:58:30 UTC 2023 armv7l GNU/Linux

  • SBC model | NanoPi NEO (armv7l)

  • Power supply used | 5V 1A

  • SD card used | SanDisk ultra

Steps to reproduce

  1. Install latest Dietpi image for Nanopi NEO (version DietPi v8.13.2)
  2. Enable sound in dietpi-config
  3. No soundcards listed or found:
root@DietPi:~# aplay -l
aplay: device_list:274: no soundcards found...

Expected behaviour

  • sound board listed to play sound

Actual behaviour

No soundcards listed or found:

root@DietPi:~# aplay -l
aplay: device_list:274: no soundcards found...
@MichaIng
Copy link
Owner

Please add analog-codec space separated to the end of the overlays= line in /boot/dietpiEnv.txt, reboot and try again.

@eurya
Copy link
Author

eurya commented Jan 25, 2023

Please add analog-codec space separated to the end of the overlays= line in /boot/dietpiEnv.txt, reboot and try again.

Thanks for the fast reply, after adding "analog-codec":

root@DietPi:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

@MichaIng
Copy link
Owner

Great. You should now be able to set it up as default sound card, e.g. via dietpi-config.

@eurya
Copy link
Author

eurya commented Jan 26, 2023

Great. You should now be able to set it up as default sound card, e.g. via dietpi-config.

Yes, I can play some sound, it works. Thank you again.

But, the sound quality is quite poor, there is a lot of hissing in the background. It seems driver related as with the exact same hardware, with the FriendlyARM Ubuntu 20.04 image, I don't have any sound issue. Maybe I can open another issue for that?

@MichaIng
Copy link
Owner

Possibly a limitation of the driver with mainline kernel. Can you try to adjust the CPU governor, set it to powersave to stop voltage/power changes? Probably this affects the analogue signal negatively. Also how do you play sound? Can you try to adjust audio parameters, like sampling rate? Probably the sound card supports more than what the software is passing by default.

@MichaIng MichaIng modified the milestones: v8.14, v8.15 Feb 11, 2023
@MichaIng
Copy link
Owner

@eurya
Probably tweaking IRQ (hardware interrupt) affinities enhances sound quality. Could you show the output of:

cat /proc/interrupts

@MichaIng MichaIng modified the milestones: v8.15, v8.16 Mar 11, 2023
@MichaIng MichaIng modified the milestones: v8.16, v8.17 Apr 7, 2023
@MichaIng MichaIng changed the title Nanopi NEO | No soundcards found DietPi-Config | Add Allwinner H3 analogue 3.5mm onboard audio Apr 12, 2023
@MichaIng MichaIng modified the milestones: v8.17, v8.18 May 6, 2023
@MichaIng MichaIng removed this from the v8.18 milestone Jun 3, 2023
@MichaIng MichaIng added this to the v8.19 milestone Jun 3, 2023
MichaIng added a commit that referenced this issue Jun 28, 2023
- Allwinner H3 SBCs | The analogue 3.5mm audio jack can now be enabled as intended via dietpi-config audio options. As it is done via kernel device tree overlay, a reboot is required when switching to or from analogue audio. Many thanks to @eurya and others for reporting this issue: #6093
MichaIng added a commit that referenced this issue Jun 28, 2023
- Allwinner H3 SBCs | The analogue 3.5mm audio jack can now be enabled as intended via dietpi-config audio options. As it is done via kernel device tree overlay, a reboot is required when switching to or from analogue audio. Many thanks to @eurya and others for reporting this issue: #6093
MichaIng added a commit that referenced this issue Jun 28, 2023
- Allwinner H3 SBCs | The analogue 3.5mm audio jack can now be enabled as intended via dietpi-config audio options. As it is done via kernel device tree overlay, a reboot is required when switching to or from analogue audio. Many thanks to @eurya and others for reporting this issue: #6093
@MichaIng
Copy link
Owner

Implemented with: #6447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants