mbox series

[BlueZ,v2,0/1] client/player: Fix transport.send command's transfer of packets

Message ID 20240419145805.46263-1-vlad.pruteanu@nxp.com
Headers show
Series client/player: Fix transport.send command's transfer of packets | expand

Message

Vlad Pruteanu April 19, 2024, 2:58 p.m. UTC
The transport.send command sends a number num of packets at intervals of
transport latency.

Num is defined as qos.ucast.out.latency * 1000 / qos.ucast.out.interval.

Since this latency could be smaller than the SDU interval, the resulting
num could be 0, causing the file transfer to stop after the first packet.
In this case num will be set to 1 so that at least 1 packet is always sent.

It the transport send timer is set to a value smaller than that of SDU
interval, the available buffers for ISO Data will eventually become full.
Thus, if a packet can't be sent due to resource temporarily being
unavailable decrease the fd offset so that next time the same packet will
be sent.

This patch is a temporary fix until the appropriate solution that uses
number of completed packets to control the flow of ISO Data packets is
implemented.

Since both Unicast and Broadcast scenarios use the same transport functions
differentiate between the 2 cases when accessing the qos structures to get
the transport latency.

Vlad Pruteanu (1):
  client/player: Fix transport.send command's transfer of packets

 client/player.c | 55 +++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 49 insertions(+), 6 deletions(-)