Skip to content

7 comments

Use Wireplumber and set bitratemode (should work with pretty much all headphones) and/or LDAC quality (only works on latest Sony headphones afaict) to optimize for latency.

/etc/wireplumber/bluetooth.lua.d/51-aac-bitratemode.lua

table.insert(bluez_monitor.rules, {
  matches = {
    {
      -- This matches all cards.
      { "device.name", "matches", "bluez_card.*" },
    },
  },
  apply_properties = {
    -- AAC variable bitrate mode
    -- Available values: 0 (cbr, default), 1-5 (quality level)
    ["bluez5.a2dp.aac.bitratemode"] = 1,
  },
})

/etc/wireplumber/bluetooth.lua.d/51-set-ldac-quality.lua

table.insert(bluez_monitor.rules, {
  matches = {
    {
      -- This matches all cards.
      { "device.name", "matches", "bluez_card.*" },
    },
  },
  apply_properties = {
    -- LDAC encoding quality
    -- Available values: auto (Adaptive Bitrate, default)
    --                   hq   (High Quality, 990/909kbps)
    --                   sq   (Standard Quality, 660/606kbps)
    --                   mq   (Mobile use Quality, 330/303kbps)
    ["bluez5.a2dp.ldac.quality"] = "mq",
  },
})

And give ALSA more headroom for buffering:

/etc/wireplumber/main.lua.d/51-more-headroom.lua

table.insert(alsa_monitor.rules, {
  matches = {
    {
      -- Matches all sources.
      { "node.name", "matches", "alsa_input.*" },
    },
    {
      -- Matches all sinks.
      { "node.name", "matches", "alsa_output.*" },
    },
  },
  apply_properties = {
    ["api.alsa.headroom"] = 1024,  -- mitigate channel underflow
  },
})
3 points

Bump, also noticing this! Thought it was only me...

-1 points

What are your symptoms?

-1 points

Just normal playback, then for like 0.1 second distortion and then back to normal. Or, when starting playback, the first .2 seconds beging distorted

-1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.