Skip to content

mcp: support multiple MCP and implement local GMCS

Pauli Virtanen linux-bluetooth 6 versions – Applied

Status from this message: This series was applied to bluetooth/bluez.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest9 patches 1 replyApplied
  2. v69 patches 1 replySuperseded
  3. v57 patches 6 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v47 patches1 replySuperseded
v37 patches2 repliesSuperseded
v17 patches2 repliesSuperseded

Changes in v7 from the cover letter

- fix -Werror=unused-result

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/9shared/mcp, mcp: support multiple MCP, and add non-stub MCS serverlib/bluetooth/uuid.h profiles/audio/mcp.c src/shared/mcp.c +2 more+2362 -16341 reply
2/9test-mcp: add tests for MCP / MCS.gitignore Makefile.am unit/test-mcp.c+1814 -00 replies
3/9mcp: add support for Repeat & Shuffle for remote playerprofiles/audio/mcp.c+118 -00 replies
4/9shared/uinput: add uinput utility functionsMakefile.am src/shared/uinput.c src/shared/uinput.h+238 -10 replies
5/9avctp: use uinput utilities from src/sharedprofiles/audio/avctp.c+40 -1260 replies
6/9mcp: add local GMCS service that emits uinput media keysprofiles/audio/mcp.c+180 -00 replies
7/9shared/mcp: on track changed, re-read values if notify not availablesrc/shared/mcp.c+14 -140 replies
8/9test-mcp: check attributes are reread on track change if no notifyunit/test-mcp.c+52 -00 replies
9/9shared/mcp: complete CCID read before considering other attributessrc/shared/mcp.c+4 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.

Read the v7 thread

Cover letter [PATCH BlueZ v7 0/9] mcp: support multiple MCP and implement local GMCS

v7:
- fix -Werror=unused-result

v6:
- use only rewritten bt_uinput to be able to change license
- make all patches buildable, combining commits
- in that, split out mcp: add support for Repeat & Shuffle
- fixup: re-read of values on track change if remote doesn't notify
- fixup: make sure other values are read only after CCID

v5:
- fix -D_FORTIFY_SOURCE false positive vs. strncpy in the old avctp code in testbot environment

v4:
- move uinput-util.h to src/shared + adapt accordingly
- improve debug logs in profile

v3:
- add missing #include to fix build in the test environment

v2:
- fix compilation issues
- remove unnecessary code in get_media_cp_op_supported

***

For Media Control Client, add support for multiple GMCS / MCS services on the server. Revise the API accordingly.

For Media Control Server, make it a non-stub implementation (OTS still missing), and add an API the profile can use.

Add tests.

This changes the design of the previous MCP code, so it's mostly a rewrite.

The shared/mcp: commit doesn't fix the API in profiles/audio, that's done in the later mcp: commit, as it's a rewrite of the API.

TODO (for later): OTP/OTS parts -- requires design for OTP/OTS implementation first

TODO (for later): MPRIS integration to GMCS server -- this needs some redesign in media.c as it's hardcoded to AVRCP there.

Tested devices (MCS):
- Creative Zen Hybrid Pro (doesn't even connect without GMCS)
- Samsung Galaxy Buds Pro2
- Creative Aurvana Ace 2

Tested devices (MCP):
- Samsung Galaxy A56

Pauli Virtanen (9):
shared/mcp, mcp: support multiple MCP, and add non-stub MCS server
test-mcp: add tests for MCP / MCS
mcp: add support for Repeat & Shuffle for remote player shared/uinput: add uinput utility functions
avctp: use uinput utilities from src/shared
mcp: add local GMCS service that emits uinput media keys shared/mcp: on track changed, re-read values if notify not available
test-mcp: check attributes are reread on track change if no notify shared/mcp: complete CCID read before considering other attributes

 .gitignore             |    1 +
 Makefile.am            |    9 +-
 lib/bluetooth/uuid.h   |   27 +-
 profiles/audio/avctp.c |  166 +--
 profiles/audio/mcp.c   |  808 +++++++---
 src/shared/mcp.c       | 3216 +++++++++++++++++++++++-----------------
 src/shared/mcp.h       |  186 ++-
 src/shared/mcs.h       |   51 +-
 src/shared/uinput.c    |  204 +++
 src/shared/uinput.h    |   32 +
 unit/test-mcp.c        | 1859 +++++++++++++++++++++++
 11 files changed, 4802 insertions(+), 1757 deletions(-)
 create mode 100644 src/shared/uinput.c
 create mode 100644 src/shared/uinput.h
 create mode 100644 unit/test-mcp.c
Signature · 1 line
2.51.1