From 9063695a9eeb87482b4692839757712e30b6688c Mon Sep 17 00:00:00 2001 From: Ian Leung Date: Thu, 3 Oct 2024 16:42:17 +0800 Subject: [PATCH] Orange Pi 3B: Vendor: Enable audio via headphone jack --- config/boards/orangepi3b.csc | 11 +++++++++++ .../bsp/common/usr/lib/armbian/armbian-audio-config | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/config/boards/orangepi3b.csc b/config/boards/orangepi3b.csc index af80c2503..6e6b6d62c 100644 --- a/config/boards/orangepi3b.csc +++ b/config/boards/orangepi3b.csc @@ -61,3 +61,14 @@ function post_family_tweaks__orangepi3b_enable_services() { chroot_sdcard systemctl enable orangepi3b-sprd-bluetooth.service return 0 } + +function post_family_tweaks__orangepi3b_naming_audios() { + display_alert "$BOARD" "Renaming orangepi3b audios" "info" + + mkdir -p $SDCARD/etc/udev/rules.d/ + echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi-sound", ENV{SOUND_DESCRIPTION}="HDMI Audio"' > $SDCARD/etc/udev/rules.d/90-naming-audios.rules + echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-rk809-sound", ENV{SOUND_DESCRIPTION}="RK809 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules # vendor dts + echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-sound", ENV{SOUND_DESCRIPTION}="RK809 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules # mainline dts + + return 0 +} diff --git a/packages/bsp/common/usr/lib/armbian/armbian-audio-config b/packages/bsp/common/usr/lib/armbian/armbian-audio-config index 6b35451b1..d699c0045 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-audio-config +++ b/packages/bsp/common/usr/lib/armbian/armbian-audio-config @@ -156,5 +156,9 @@ else mixer_cmds 'OUT MIXR DAC R1' on mixer_cmds 'Stereo DAC MIXL DAC L1' on mixer_cmds 'Stereo DAC MIXR DAC R1' on + + # Orange Pi 3B + mixer_cmds 'Playback Path' 'HP' + mixer_cmds 'Capture MIC Path' 'Main Mic' ) | amixer -c "$card" --stdin > /dev/null 2>&1; done fi