Skip to content

media: correct conversational awareness state handling#302

Merged
kavishdevar merged 1 commit into
librepods-org:mainfrom
ozan956:fix-conversational-awareness
Nov 22, 2025
Merged

media: correct conversational awareness state handling#302
kavishdevar merged 1 commit into
librepods-org:mainfrom
ozan956:fix-conversational-awareness

Conversation

@ozan956

@ozan956 ozan956 commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

AirPods conversational awareness packets use 0x09 to indicate that the feature is enabled, not 0x01. The previous implementation always decoded the state as disabled because data[9] never equaled 0x01.

image

@kavishdevar

Copy link
Copy Markdown
Member

what anc mode are you in? a lower number (1 or 2) is usually sent when a conversation is detected.

see https://github.com/kavishdevar/librepods/blob/4737cbfc2c1a4e227e42d095c49ab43bd8d7b64a/linux-rust/src/media_controller.rs#L800-L942

Fix incorrect detection of conversational awareness events. The previous
implementation treated all non-0x01 packets as "disabled", which caused
wrong behavior when the user manually enabled/disabled the feature or when
voice-end events were received.

Adds full decoding for packet types:
 - 0x01 → voice detected
 - 0x06/others → voice ended
 - 0x08 → feature disabled
 - 0x09 → feature enabled

Signed-off-by: ozan956 <ozandurgut.2001@hotmail.com>
@ozan956 ozan956 force-pushed the fix-conversational-awareness branch from 0c2374b to 8f59499 Compare November 21, 2025 20:21
@ozan956 ozan956 changed the title media: fix conversational awareness state decoding media: correct AirPods conversational awareness state handling Nov 21, 2025
@ozan956 ozan956 changed the title media: correct AirPods conversational awareness state handling media: correct conversational awareness state handling Nov 21, 2025
@ozan956

ozan956 commented Nov 21, 2025

Copy link
Copy Markdown
Contributor Author

Yes @kavishdevar, you are right. But i think problem is something different. I did some tests and mainly, there are 4 output for conversational awareness. I have listed them in the commit but they are:

  • 0x01: voice detected
  • 0x06/others: voice ended
  • 0x08: manually disabled the mode itself
  • 0x09: manually enabled the mode itself

So previously, code outputs 'Conversational awareness disabled' everything except 0x01. However, this is not the correct information to log I think. I just added a block to fix this.

@kavishdevar

Copy link
Copy Markdown
Member

yup, the 'enabled/disabled' is a bit misleading. thank you!

@kavishdevar kavishdevar merged commit 574c193 into librepods-org:main Nov 22, 2025
kavishdevar pushed a commit that referenced this pull request May 15, 2026
media: correct AirPods conversational awareness state handling

Fix incorrect detection of conversational awareness events. The previous
implementation treated all non-0x01 packets as "disabled", which caused
wrong behavior when the user manually enabled/disabled the feature or when
voice-end events were received.

Adds full decoding for packet types:
 - 0x01 → voice detected
 - 0x06/others → voice ended
 - 0x08 → feature disabled
 - 0x09 → feature enabled

Signed-off-by: ozan956 <ozandurgut.2001@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants