fix: A2DP reconnect fix

This commit is contained in:
2026-07-08 11:57:52 +02:00
parent 1fd63d8d1f
commit 1496ddba87
2 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -12,4 +12,4 @@
#pragma once
#define MONTAUK_BUILD_NUMBER 39
#define MONTAUK_BUILD_NUMBER 42
+10 -3
View File
@@ -1258,7 +1258,11 @@ namespace Drivers::USB::Bluetooth::A2dp {
rsp[3] = 6;
rsp[4] = (MEDIA_AUDIO << 4);
rsp[5] = CODEC_SBC;
rsp[6] = 0x21; // 44.1kHz | Joint Stereo
rsp[6] = 0x11; // 48kHz | Joint Stereo -- MUST match the
// encoder (fixed 48kHz) and our own
// SetConfig (oct0=0x11); advertising 44.1
// here let a remote-initiated config pick a
// rate we then don't actually send
rsp[7] = 0x15; // 16 blocks (b4) | 8 subbands (b2) | Loudness (b0)
rsp[8] = 2; // Min bitpool
rsp[9] = 53; // Max bitpool
@@ -1267,9 +1271,12 @@ namespace Drivers::USB::Bluetooth::A2dp {
}
case AVDTP_SET_CONFIGURATION: {
// Accept configuration from remote
// Accept configuration from remote. Payload after the
// 2-byte header: [ACP SEID (ours)][INT SEID (theirs)] --
// record THEIRS; our later START must address the sink's
// SEID or it rejects with BAD_ACP_SEID (0x12).
if (len >= 4) {
g_remoteSeid = (data[2] >> 2) & 0x3F;
g_remoteSeid = (data[3] >> 2) & 0x3F;
g_state = State::Configured;
SendAvdtpResponse(txLabel, AVDTP_SET_CONFIGURATION, nullptr, 0);
KernelLogStream(OK, "BT-A2DP") << "Remote configured stream, SEID="