Bluetooth: ISO: Remove channel direction
Channel direction was actually a source of confusion since the spec does actually define the data path direction from controller point of view meaning input actually means transmit and output receive, also direction can be configured with different QoS settings. To make these APIs less confusing and allow QoS to be configured independently they are now split into RX (receiving) and TX (transmission) settings including its data path. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
0eb4bfee3f
commit
9d0fb5ec47
3 changed files with 143 additions and 90 deletions
|
@ -60,31 +60,33 @@ struct bt_iso_chan {
|
|||
struct bt_iso_chan_ops *ops;
|
||||
/** Channel QoS reference */
|
||||
struct bt_iso_chan_qos *qos;
|
||||
/** Channel data path reference*/
|
||||
struct bt_iso_chan_path *path;
|
||||
sys_snode_t node;
|
||||
uint8_t state;
|
||||
bt_security_t required_sec_level;
|
||||
};
|
||||
|
||||
/** @brief Audio QoS direction */
|
||||
enum {
|
||||
BT_ISO_CHAN_QOS_IN,
|
||||
BT_ISO_CHAN_QOS_OUT,
|
||||
BT_ISO_CHAN_QOS_INOUT
|
||||
/** @brief ISO Channel IO QoS structure. */
|
||||
struct bt_iso_chan_io_qos {
|
||||
/** Channel interval in us. Value range 0x0000FF - 0x0FFFFFF. */
|
||||
uint32_t interval;
|
||||
/** Channel Latency in ms. Value range 0x0005 - 0x0FA0. */
|
||||
uint16_t latency;
|
||||
/** Channel SDU. Value range 0x0000 - 0x0FFF. */
|
||||
uint16_t sdu;
|
||||
/** Channel PHY - See BT_GAP_LE_PHY for values.
|
||||
* Setting BT_GAP_LE_PHY_NONE is invalid.
|
||||
*/
|
||||
uint8_t phy;
|
||||
/** Channel Retransmission Number. Value range 0x00 - 0x0F. */
|
||||
uint8_t rtn;
|
||||
/** Channel data path reference.
|
||||
* Setting to NULL default to HCI data path.
|
||||
*/
|
||||
struct bt_iso_chan_path *path;
|
||||
};
|
||||
|
||||
/** @brief ISO Channel QoS structure. */
|
||||
struct bt_iso_chan_qos {
|
||||
/** @brief Channel direction
|
||||
*
|
||||
* Possible values: BT_ISO_CHAN_QOS_IN, BT_ISO_CHAN_QOS_OUT or
|
||||
* BT_ISO_CHAN_QOS_INOUT. Shall be BT_ISO_CHAN_QOS_IN for broadcast
|
||||
* transmitting, and BT_ISO_CHAN_QOS_OUT for broadcast receiver.
|
||||
*/
|
||||
uint8_t dir;
|
||||
/** Channel interval in us. Value range 0x0000FF - 0x0FFFFFF. */
|
||||
uint32_t interval;
|
||||
/** @brief Channel peripherals sleep clock accuracy Only for CIS
|
||||
*
|
||||
* Shall be worst case sleep clock accuracy of all the peripherals.
|
||||
|
@ -95,14 +97,14 @@ struct bt_iso_chan_qos {
|
|||
uint8_t packing;
|
||||
/** Channel framing mode. 0 for unframed, 1 for framed. */
|
||||
uint8_t framing;
|
||||
/** Channel Latency in ms. Value range 0x0005 - 0x0FA0. */
|
||||
uint16_t latency;
|
||||
/** Channel SDU. Value range 0x0000 0 0x0FFF. */
|
||||
uint8_t sdu;
|
||||
/** Channel PHY - See BT_GAP_LE_PHY for values. Shall not be BT_GAP_LE_PHY_NONE. */
|
||||
uint8_t phy;
|
||||
/** Channel Retransmission Number. Value range 0x00 - 0x0F. */
|
||||
uint8_t rtn;
|
||||
/** Channel Receiving QoS:
|
||||
* Setting NULL disables data path BT_HCI_DATAPATH_DIR_CTLR_TO_HOST
|
||||
*/
|
||||
struct bt_iso_chan_io_qos *rx;
|
||||
/** Channel Transmission QoS:
|
||||
* Setting NULL disables data path BT_HCI_DATAPATH_DIR_HOST_TO_CTRL
|
||||
*/
|
||||
struct bt_iso_chan_io_qos *tx;
|
||||
};
|
||||
|
||||
/** @brief ISO Channel Data Path structure. */
|
||||
|
@ -123,7 +125,6 @@ struct bt_iso_chan_path {
|
|||
uint8_t cc[0];
|
||||
};
|
||||
|
||||
|
||||
/** Opaque type representing an Broadcast Isochronous Group (BIG). */
|
||||
struct bt_iso_big;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue