Skip to content

Instantly share code, notes, and snippets.

@zeroby0
Created August 14, 2021 12:43
Show Gist options
  • Select an option

  • Save zeroby0/1c075eea1a3491b8087ea94de13b2c83 to your computer and use it in GitHub Desktop.

Select an option

Save zeroby0/1c075eea1a3491b8087ea94de13b2c83 to your computer and use it in GitHub Desktop.
Pipewire Bluetooth Headphones configuration file.
# Bluez monitor config file by Aravind Voggu @ zeroby0
# /etc/pipewire/media-session.d
# Disables all codecs except aac, so microphone on your
# Bluetooth headphones will not work. But if it can save
# me from ever hearing gravel voices at 5000Hz sampling rate
# on SBC, it's all worth it.
properties = {
bluez5.msbc-support = false
bluez5.sbc-xq-support = false
bluez5.codecs = [ aac ]
# Properties for the A2DP codec configuration
#bluez5.default.rate = 48000
#bluez5.default.channels = 2
}
rules = [
{
matches = [
{
# This matches all cards.
device.name = "~bluez_card.*"
}
]
actions = {
update-props = {
bluez5.reconnect-profiles = [ a2dp_sink ]
bluez5.msbc-support = false
# AAC variable bitrate mode
# Available values: 0 (cbr, default), 1-5 (quality level)
bluez5.a2dp.aac.bitratemode = 0
# Profile connected first
# Available values: a2dp-sink (default), headset-head-unit
device.profile = a2dp-sink
}
}
}
{
matches = [
{
# Matches all sources.
node.name = "~bluez_input.*"
}
{
# Matches all sinks.
node.name = "~bluez_output.*"
}
]
actions = {
update-props = {
#node.nick = "My Node"
#node.nick = null
#priority.driver = 100
#priority.session = 100
node.pause-on-idle = false
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = false
session.suspend-timeout-seconds = 0 # 0 disables suspend
# A2DP source role, "input" or "playback"
# Defaults to "playback", playing stream to speakers
# Set to "input" to use as an input for apps
bluez5.a2dp-source-role = playback
}
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment