Skip to content

Commit 75fa80c

Browse files
authored
android,linux: fix random volume jumps (#192)
* android: update feature flags packet data byte to remove adaptive volume * linux: update feature flags to prevent volume jumps
1 parent eb1b633 commit 75fa80c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

android/app/src/main/java/me/kavishdevar/librepods/utils/AACPManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class AACPManager {
389389

390390
fun createSetFeatureFlagsPacket(): ByteArray {
391391
val opcode = byteArrayOf(Opcodes.SET_FEATURE_FLAGS, 0x00)
392-
val data = byteArrayOf(0xFF.toByte(), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)
392+
val data = byteArrayOf(0xD7.toByte(), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)
393393
return opcode + data
394394
}
395395

linux/airpods_packets.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace AirPodsPackets
121121
namespace Connection
122122
{
123123
static const QByteArray HANDSHAKE = QByteArray::fromHex("00000400010002000000000000000000");
124-
static const QByteArray SET_SPECIFIC_FEATURES = QByteArray::fromHex("040004004d00ff00000000000000");
124+
static const QByteArray SET_SPECIFIC_FEATURES = QByteArray::fromHex("040004004d00d700000000000000");
125125
static const QByteArray REQUEST_NOTIFICATIONS = QByteArray::fromHex("040004000f00ffffffffff");
126126
static const QByteArray AIRPODS_DISCONNECTED = QByteArray::fromHex("00010000");
127127
}
@@ -221,4 +221,4 @@ namespace AirPodsPackets
221221
}
222222
}
223223

224-
#endif // AIRPODS_PACKETS_H
224+
#endif // AIRPODS_PACKETS_H

0 commit comments

Comments
 (0)