Skip to content

Instantly share code, notes, and snippets.

View njamster's full-sized avatar

Benjamin Oesterle njamster

View GitHub Profile
@njamster
njamster / change_audio_codec.sh
Created December 27, 2025 20:08
A script that can be used (together with an udev rule) to automatically adjust the used bluetooth codec of a device.
#!/bin/bash
# A workaround for the following pulseaudio (?) issue:
# https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1400
# This script is supposed to be called via a udev rule (i.e. as root):
# ACTION=="add", ATTR{phys}=="<mac_address>", RUN+="<path_to_this_script>"
# To get the required <mac_address>:
# 1) Connect your headphones to your PC