From 66cdd164aca80fc9ab640cad02c92696e6cc9fae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= <dev@felschr.com>
Date: Thu, 13 Feb 2025 23:27:07 +0100
Subject: [PATCH] fix(sound): restrict bluetooth codecs for better performance
 with Sonos Ace

---
 system/sound.nix | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/system/sound.nix b/system/sound.nix
index f9e47cd..75a1b7b 100644
--- a/system/sound.nix
+++ b/system/sound.nix
@@ -27,6 +27,18 @@
         "hfp_hf"
         "hfp_ag"
       ];
+      # aptX HD causes problems with Sonos Ace
+      "bluez5.codecs" = [
+        "sbc"
+        "sbc_xq"
+        "aac"
+        "ldac"
+        "aptx"
+        "aptx_ll"
+        "aptx_ll_duplex"
+        "lc3"
+        "lc3plus_h3"
+      ];
     };
   };
 }