public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] avrcp: fix AVRCP_STATUS_INVALID_PARAM
@ 2025-11-07  9:00 Pavel Bozhko
  2025-11-07 10:28 ` [BlueZ] " bluez.test.bot
  2025-11-10 18:36 ` [PATCH BlueZ] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 3+ messages in thread
From: Pavel Bozhko @ 2025-11-07  9:00 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pavel Bozhko

The first AVRCP_EVENT_VOLUME_CHANGED event triggers
an AVRCP_STATUS_INVALID_PARAM response.

When pairing, the org.bluez.MediaTransport1 instance
may not have time to be created, but the org.bluez.Device1
instance has already been created.
avrcp_handle_register_notification receives an
AVRCP_EVENT_VOLUME_CHANGED event and
media_transport_get_device_volume will return a Volume
of -1 from the org.bluez.Device1 object, resulting in
an AVRCP_STATUS_INVALID_PARAM being sent to the audio source.
After receiving the first AVRCP_STATUS_INVALID_PARAM,
the Audio-Source will consider volume changes
from the Audio-Sink unsupported.
Relevant for all iPhone models as Audio Source.
---
 src/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index 91b6cc0c6..352323167 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4818,7 +4818,7 @@ static struct btd_device *device_new(struct btd_adapter *adapter,
 		return NULL;
 
 	device->tx_power = 127;
-	device->volume = -1;
+	device->volume = 0;
 	device->wake_id = -1U;
 
 	device->db = gatt_db_new();
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ] avrcp: fix AVRCP_STATUS_INVALID_PARAM
  2025-11-07  9:00 [PATCH BlueZ] avrcp: fix AVRCP_STATUS_INVALID_PARAM Pavel Bozhko
@ 2025-11-07 10:28 ` bluez.test.bot
  2025-11-10 18:36 ` [PATCH BlueZ] " Luiz Augusto von Dentz
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-11-07 10:28 UTC (permalink / raw)
  To: linux-bluetooth, pvbozhko

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1020791

---Test result---

Test Summary:
CheckPatch                    PENDING   0.35 seconds
GitLint                       PENDING   0.26 seconds
BuildEll                      PASS      20.64 seconds
BluezMake                     PASS      2717.04 seconds
MakeCheck                     PASS      20.58 seconds
MakeDistcheck                 PASS      187.25 seconds
CheckValgrind                 PASS      238.81 seconds
CheckSmatch                   PASS      310.37 seconds
bluezmakeextell               PASS      130.12 seconds
IncrementalBuild              PENDING   0.33 seconds
ScanBuild                     PASS      925.28 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ] avrcp: fix AVRCP_STATUS_INVALID_PARAM
  2025-11-07  9:00 [PATCH BlueZ] avrcp: fix AVRCP_STATUS_INVALID_PARAM Pavel Bozhko
  2025-11-07 10:28 ` [BlueZ] " bluez.test.bot
@ 2025-11-10 18:36 ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-11-10 18:36 UTC (permalink / raw)
  To: Pavel Bozhko; +Cc: linux-bluetooth

Hi Pavel,

On Fri, Nov 7, 2025 at 4:07 AM Pavel Bozhko <pvbozhko@salutedevices.com> wrote:
>
> The first AVRCP_EVENT_VOLUME_CHANGED event triggers
> an AVRCP_STATUS_INVALID_PARAM response.
>
> When pairing, the org.bluez.MediaTransport1 instance
> may not have time to be created, but the org.bluez.Device1
> instance has already been created.
> avrcp_handle_register_notification receives an
> AVRCP_EVENT_VOLUME_CHANGED event and
> media_transport_get_device_volume will return a Volume
> of -1 from the org.bluez.Device1 object, resulting in
> an AVRCP_STATUS_INVALID_PARAM being sent to the audio source.
> After receiving the first AVRCP_STATUS_INVALID_PARAM,
> the Audio-Source will consider volume changes
> from the Audio-Sink unsupported.
> Relevant for all iPhone models as Audio Source.
> ---
>  src/device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/device.c b/src/device.c
> index 91b6cc0c6..352323167 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -4818,7 +4818,7 @@ static struct btd_device *device_new(struct btd_adapter *adapter,
>                 return NULL;
>
>         device->tx_power = 127;
> -       device->volume = -1;
> +       device->volume = 0;

But this will indicate volume is always supported, and worse set to 0,
what we should probably do is initialize it to 0, so we might need a
better way to detect that volume is supported and then perhaps set it
to 0 until the transport is setup.

>         device->wake_id = -1U;
>
>         device->db = gatt_db_new();
> --
> 2.43.0
>
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-10 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07  9:00 [PATCH BlueZ] avrcp: fix AVRCP_STATUS_INVALID_PARAM Pavel Bozhko
2025-11-07 10:28 ` [BlueZ] " bluez.test.bot
2025-11-10 18:36 ` [PATCH BlueZ] " Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox