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

rockchip: fix tinkerboard out-of-the-box pulseaudio configuration #7796

Merged
merged 2 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions config/sources/families/rockchip.conf
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,6 @@ fi

family_tweaks() {

if [[ $BOARD == tinkerboard ]]; then
chroot_sdcard_apt_get_install rfkill bluetooth bluez bluez-tools
if [[ -f "$SDCARD/etc/pulse/default.pa" ]]; then
sed -i -e "/#load-module module-alsa-sink/r $SRC/packages/bsp/rockchip/pulseaudio.txt" "$SDCARD/etc/pulse/default.pa" 2>&1
else
display_alert "Can't find pulseaudio config" "${BOARD} - family_tweaks" "warn"
fi
fi

# Create gpio and i2c groups on the build rootfs; they are matched against
# udev rules to allow non-root user access to these resources
chroot_sdcard addgroup --system --quiet --gid 900 gpio
Expand Down Expand Up @@ -240,7 +231,11 @@ family_tweaks_bsp() {

# Sound
cp $SRC/packages/bsp/rockchip/asound.conf $destination/etc/
cp $SRC/packages/bsp/rockchip/89-pulseaudio-usb.rules $destination/etc/udev/rules.d
if [[ "$BOARD" == "tinkerboard" ]]; then
mkdir -p $destination/etc/pulse/default.pa.d
cp $SRC/packages/bsp/rockchip/89-pulseaudio-usb.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/tinkerboard-usb-audio.pa $destination/etc/pulse/default.pa.d
fi

# AP6330 (BCM4330) firmware initramfs hook for in-kernel btbcm driver
mkdir -p $destination/etc/initramfs-tools/hooks
Expand Down
5 changes: 4 additions & 1 deletion packages/bsp/rockchip/89-pulseaudio-usb.rules
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="481a", ENV{PULSE_IGNORE}="1"
# Specific rule for ASUS Tinkerboard/S to avoid Pulseaudio autodetect
# the card because it will behave faulty
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="481a", ENV{PULSE_IGNORE}="1"

8 changes: 0 additions & 8 deletions packages/bsp/rockchip/pulseaudio.txt

This file was deleted.

9 changes: 9 additions & 0 deletions packages/bsp/rockchip/tinkerboard-usb-audio.pa
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ALC4040 Output sinks
load-module module-alsa-sink device=hw:OnBoard,2 sink_properties=device.description="ALC4040-Analog"
load-module module-alsa-sink device=hw:OnBoard,0 sink_properties=device.description="ALC4040-BT-VOIP"
load-module module-alsa-sink device=hw:OnBoard,1 sink_properties=device.description="ALC4040-SPDIF"

# ALC4040 Input sources
load-module module-alsa-source device=hw:OnBoard,1 source_properties=device.description="ALC4040-Analog"
load-module module-alsa-source device=hw:OnBoard,0 source_properties=device.description="ALC4040-BT-VOIP"

Loading