* [bluez/bluez] 1a1288: adapter: Set Audio service class bit for A2DP sink
@ 2026-09-18 14:04 MathGrelck
0 siblings, 0 replies; only message in thread
From: MathGrelck @ 2026-09-18 14:04 UTC (permalink / raw)
To: linux-bluetooth
Branch: refs/heads/1168672
Home: https://github.com/bluez/bluez
Commit: 1a128855ec2c235da9df6eaf2f99da27fd9ed4c7
https://github.com/bluez/bluez/commit/1a128855ec2c235da9df6eaf2f99da27fd9ed4c7
Author: Mathias Johnsen <majo@bang-olufsen.dk>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M src/adapter.c
Log Message:
-----------
adapter: Set Audio service class bit for A2DP sink
Problem: The Nintendo Switch refuses to connect to a device that does
not advertise the CoD 'Audio' (0x20) service class bit. It completes
pairing, takes the link key, then terminates the ACL with reason 0x13
without ever authenticating, encrypting, or connecting AVDTP on PSM 25.
Cause: get_uuid_mask() currently only grants the Audio service class
bit to HEADSET and HANDSFREE, so a device implementing A2DP sink
without HFP or HSP advertises 'Rendering' with no Audio bit set.
Fix: Report 'Audio' in addition to 'Rendering' (0x04) for
AUDIO_SINK_SVCLASS_ID in get_uuid_mask().
Tested on a Yocto-based speaker running bluez 5.65 with this change
backported and compile-tested on current master. Note get_uuid_mask()
is unchanged between 5.65 and current master. The speaker under test is
purely an A2DP sink; the patch changes the CoD from 0x040414 to
0x240414, after which the Switch connects and streams normally.
Note that A2DP v1.4 section 5.5.1 mandates only the 'Rendering' bit for
a sink, so the current behavior is conformant as it stands. Conversely,
adding the bit is not a violation either: Assigned Numbers section
2.8.1 defines bit 21 as 'Audio (Speaker, Microphone, Headset service,
...)', which a loudspeaker A2DP sink fits.
This is the same kind of device-specific workaround as the
HANDSFREE_AGW telephony bit for Nokia 616 carkit also present in the
get_uuid_mask() switch-statement.
Assisted-by: Claude:claude-opus-5
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-18 14:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 14:04 [bluez/bluez] 1a1288: adapter: Set Audio service class bit for A2DP sink MathGrelck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox