* [PATCH BlueZ] audio/player: Update track duration if previously set to 0
@ 2025-05-27 6:46 Frédéric Danis
2025-05-27 8:13 ` [BlueZ] " bluez.test.bot
2025-05-27 14:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Frédéric Danis @ 2025-05-27 6:46 UTC (permalink / raw)
To: linux-bluetooth
Sometimes some stacks may set the track duration to 0 in GetItemAttributes
before updating it in GetPlayStatus.
Currently the track duration is updated only if it has never been set
before. To fix the issue this also checks that the current value is
not 0.
> ACL Data RX: Handle 11 flags 0x02 dlen 102 #287 [hci0] 4.537033
Channel: 71 len 98 ctrl 0x0202 [PSM 27 mode Enhanced Retransmission (0x03)] {chan 7}
I-frame: Unsegmented TxSeq 1 ReqSeq 2
AVCTP Browsing: Response: type 0x00 label 1 PID 0x110e
AVRCP: GetItemAttributes: len 0x0058
...
AttributeID: 0x00000007 (Track duration)
CharsetID: 0x006a (UTF-8)
AttributeLength: 0x0001 (1)
AttributeValue: 0
...
> ACL Data RX: Handle 11 flags 0x02 dlen 26 #296 [hci0] 4.589649
Channel: 68 len 22 [PSM 23 mode Basic (0x00)] {chan 4}
AVCTP Control: Response: type 0x00 label 9 PID 0x110e
AV/C: Stable: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: GetPlayStatus pt Single len 0x0009
SongLength: 0x000255a8 (153000 miliseconds)
SongPosition: 0x00009256 (37462 miliseconds)
PlayStatus: 0x02 (PAUSED)
---
profiles/audio/player.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/profiles/audio/player.c b/profiles/audio/player.c
index 0f72d7601..52844c9c0 100644
--- a/profiles/audio/player.c
+++ b/profiles/audio/player.c
@@ -1320,9 +1320,9 @@ void media_player_set_duration(struct media_player *mp, uint32_t duration)
if (g_hash_table_size(mp->track) == 0)
return;
- /* Ignore if duration is already set */
+ /* Ignore if duration is already set to value > 0 */
curval = g_hash_table_lookup(mp->track, "Duration");
- if (curval != NULL)
+ if (curval != NULL && atoi(curval) != 0)
return;
value = g_strdup_printf("%u", duration);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] audio/player: Update track duration if previously set to 0
2025-05-27 6:46 [PATCH BlueZ] audio/player: Update track duration if previously set to 0 Frédéric Danis
@ 2025-05-27 8:13 ` bluez.test.bot
2025-05-27 14:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-05-27 8:13 UTC (permalink / raw)
To: linux-bluetooth, frederic.danis
[-- Attachment #1: Type: text/plain, Size: 1261 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=966556
---Test result---
Test Summary:
CheckPatch PENDING 0.36 seconds
GitLint PENDING 0.32 seconds
BuildEll PASS 20.56 seconds
BluezMake PASS 2736.73 seconds
MakeCheck PASS 20.46 seconds
MakeDistcheck PASS 200.00 seconds
CheckValgrind PASS 274.75 seconds
CheckSmatch PASS 301.36 seconds
bluezmakeextell PASS 128.05 seconds
IncrementalBuild PENDING 0.29 seconds
ScanBuild PASS 910.76 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] audio/player: Update track duration if previously set to 0
2025-05-27 6:46 [PATCH BlueZ] audio/player: Update track duration if previously set to 0 Frédéric Danis
2025-05-27 8:13 ` [BlueZ] " bluez.test.bot
@ 2025-05-27 14:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-05-27 14:00 UTC (permalink / raw)
To: =?utf-8?b?RnLDqWTDqXJpYyBEYW5pcyA8ZnJlZGVyaWMuZGFuaXNAY29sbGFib3JhLmNvbT4=?=
Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 27 May 2025 08:46:15 +0200 you wrote:
> Sometimes some stacks may set the track duration to 0 in GetItemAttributes
> before updating it in GetPlayStatus.
>
> Currently the track duration is updated only if it has never been set
> before. To fix the issue this also checks that the current value is
> not 0.
>
> [...]
Here is the summary with links:
- [BlueZ] audio/player: Update track duration if previously set to 0
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=bcababe6050d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-27 13:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27 6:46 [PATCH BlueZ] audio/player: Update track duration if previously set to 0 Frédéric Danis
2025-05-27 8:13 ` [BlueZ] " bluez.test.bot
2025-05-27 14:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox