linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pauli Virtanen <noreply@github.com>
To: linux-bluetooth@vger.kernel.org
Subject: [bluez/bluez] 670409: shared/mcp: support multiple MCP, and add non-stub...
Date: Wed, 10 Dec 2025 08:47:59 -0800	[thread overview]
Message-ID: <bluez/bluez/push/refs/heads/1032051/000000-1cc4ca@github.com> (raw)

  Branch: refs/heads/1032051
  Home:   https://github.com/bluez/bluez
  Commit: 670409978b0765255e825493a8967c1d0af3afa6
      https://github.com/bluez/bluez/commit/670409978b0765255e825493a8967c1d0af3afa6
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M lib/bluetooth/uuid.h
    M src/shared/mcp.c
    M src/shared/mcp.h
    M src/shared/mcs.h

  Log Message:
  -----------
  shared/mcp: support multiple MCP, and add non-stub MCS server

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 complete implementation (OTS still
missing), and add an API the profile can use.

This is mostly a complete rewrite.


  Commit: 72e73a7e02d302a19a4372d8bce6043c55a16000
      https://github.com/bluez/bluez/commit/72e73a7e02d302a19a4372d8bce6043c55a16000
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M .gitignore
    M Makefile.am
    A unit/test-mcp.c

  Log Message:
  -----------
  test-mcp: add tests for MCP / MCS

Add tests for the Media Control Client / Server implementation.

This contains basic GGIT and state transition tests.  Not all state
transition tests are here, as they'd largely test the upper layer of the
profile which is not tested now.


  Commit: 62c3a3d4d92547be421e309a0c9fc9cc2f2be317
      https://github.com/bluez/bluez/commit/62c3a3d4d92547be421e309a0c9fc9cc2f2be317
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M profiles/audio/mcp.c

  Log Message:
  -----------
  mcp: adapt to new MCP API to support multiple remote MCS services

Rewrite to use the new shared/mcp API, adding support for multiple MCS
services on the remote side.


  Commit: 0bea9d5d4c82a89df921f5ff0f31c73c516b7daf
      https://github.com/bluez/bluez/commit/0bea9d5d4c82a89df921f5ff0f31c73c516b7daf
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M Makefile.plugins
    M profiles/audio/avctp.c
    A profiles/audio/uinput-util.c
    A profiles/audio/uinput-util.h

  Log Message:
  -----------
  avctp: move uinput utilities to uinput-util.c

Move basic uinput utilities to a separate file, so they can be reused
for MCS.


  Commit: cfae0d0084de619765eebd12299f65cdf6464270
      https://github.com/bluez/bluez/commit/cfae0d0084de619765eebd12299f65cdf6464270
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M profiles/audio/uinput-util.c

  Log Message:
  -----------
  uinput-util: fix compiler complaint about strncpy usage

Fixes:

profiles/audio/uinput-util.c: In function 'uinput_create':
profiles/audio/uinput-util.c:97:25: error: '__builtin___strncpy_chk'
    output truncated before terminating nul copying as many bytes
    from a string as its length [-Werror=stringop-truncation]
   97 |                         strncpy(dev.name + len, suffix, slen);


  Commit: a24489e7e58a3d827fbb456571315c72ccc9880d
      https://github.com/bluez/bluez/commit/a24489e7e58a3d827fbb456571315c72ccc9880d
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M profiles/audio/mcp.c

  Log Message:
  -----------
  mcp: add local GMCS service that emits uinput media keys

Implement simple GMCS service that is always inactive, and emits media
key presses via uinput for Play/Pause/Stop/Next/Prev MCS commands.

In practice, this seems to be enough to support media control keys on
headsets.  Some headsets (Creative Zen Hybrid Pro) also refuse to
connect if there is no GMCS service.


  Commit: 1cc4caaab2cef11200ceb3b34f54f6b5fda4b7d9
      https://github.com/bluez/bluez/commit/1cc4caaab2cef11200ceb3b34f54f6b5fda4b7d9
  Author: Pauli Virtanen <pav@iki.fi>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M src/shared/gatt-client.c

  Log Message:
  -----------
  shared/gatt-client: fix notify_data leak in notify_data_write_ccc

Calling bt_gatt_client_unregister_notify() when ATT has disconnected
leaks the reference to notify_data: in notify_data_write_ccc() the
bt_gatt_client_write_value() fails, the destroy is never called, and
notify_data_ref() is leaked.

Fix by balancing unref notify_data on write failure.

Log (unit/test-mcp):
Direct leak of 5760 byte(s) in 90 object(s) allocated from:
    #0 0x7fd7e2ce6f2b in malloc
    #1 0x0000004227e5 in util_malloc src/shared/util.c:46
    #2 0x00000044a81c in register_notify src/shared/gatt-client.c:1782
    #3 0x000000458367 in bt_gatt_client_register_notify src/shared/gatt-client.c:3685
    #4 0x00000049f9f5 in foreach_mcs_char src/shared/mcp.c:1834


Compare: https://github.com/bluez/bluez/compare/670409978b07%5E...1cc4caaab2ce

To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications

                 reply	other threads:[~2025-12-10 16:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bluez/bluez/push/refs/heads/1032051/000000-1cc4ca@github.com \
    --to=noreply@github.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).