public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Iulia Tanasescu <iulia.tanasescu@nxp.com>
To: linux-bluetooth@vger.kernel.org
Cc: Iulia Tanasescu <iulia.tanasescu@nxp.com>
Subject: [PATCH BlueZ 2/8] client/player: Use unicast structure for ISO QoS options
Date: Mon, 20 Mar 2023 16:37:07 +0200	[thread overview]
Message-ID: <20230320143713.25449-3-iulia.tanasescu@nxp.com> (raw)
In-Reply-To: <20230320143713.25449-1-iulia.tanasescu@nxp.com>

Convert the generic bt_iso_qos structure into the dedicated unicast
structure for ISO QoS options.

---
 client/player.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/client/player.c b/client/player.c
index 63e11db09..83b6092a4 100644
--- a/client/player.c
+++ b/client/player.c
@@ -4,6 +4,7 @@
  *  BlueZ - Bluetooth protocol stack for Linux
  *
  *  Copyright (C) 2020  Intel Corporation. All rights reserved.
+ *  Copyright 2023 NXP
  *
  *
  */
@@ -3506,7 +3507,7 @@ static int transport_send_seq(struct transport *transport, int fd, uint32_t num)
 static bool transport_timer_read(struct io *io, void *user_data)
 {
 	struct transport *transport = user_data;
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 	socklen_t len;
 	int ret, fd;
 	uint32_t num;
@@ -3526,9 +3527,10 @@ static bool transport_timer_read(struct io *io, void *user_data)
 	/* Read QoS if available */
 	memset(&qos, 0, sizeof(qos));
 	len = sizeof(qos);
-	if (getsockopt(transport->sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos,
+	if (getsockopt(transport->sk, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
 							&len) < 0) {
-		bt_shell_printf("Failed to getsockopt(BT_ISO_QOS): %s (%d)\n",
+		bt_shell_printf("Failed to getsockopt(BT_ISO_UNICAST_QOS):"
+					"%s (%d)\n",
 					strerror(errno), -errno);
 		return false;
 	}
@@ -3552,7 +3554,7 @@ static bool transport_timer_read(struct io *io, void *user_data)
 }
 
 static int transport_send(struct transport *transport, int fd,
-					struct bt_iso_qos *qos)
+					struct bt_iso_unicast_qos *qos)
 {
 	struct itimerspec ts;
 	int timer_fd;
@@ -3591,7 +3593,7 @@ static void cmd_send_transport(int argc, char *argv[])
 	GDBusProxy *proxy;
 	struct transport *transport;
 	int fd = -1, err;
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 	socklen_t len;
 	int i;
 
@@ -3626,8 +3628,8 @@ static void cmd_send_transport(int argc, char *argv[])
 		/* Read QoS if available */
 		memset(&qos, 0, sizeof(qos));
 		len = sizeof(qos);
-		if (getsockopt(transport->sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos,
-							&len) < 0)
+		if (getsockopt(transport->sk, SOL_BLUETOOTH,
+				BT_ISO_UNICAST_QOS, &qos, &len) < 0)
 			err = transport_send(transport, fd, NULL);
 		else
 			err = transport_send(transport, fd, &qos);
-- 
2.34.1


  parent reply	other threads:[~2023-03-20 14:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 1/8] btio: Use unicast structure for ISO QoS options Iulia Tanasescu
2023-03-20 15:11   ` Split bt_iso_qos into dedicated structures bluez.test.bot
2023-03-20 14:37 ` Iulia Tanasescu [this message]
2023-03-20 14:37 ` [PATCH BlueZ 3/8] emulator/bthost: pass unicast QoS structure to bthost_set_cig_params Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 4/8] lib: split bt_iso_qos into dedicated structures Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 5/8] profiles/audio/bap: Use unicast structure for ISO QoS options Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 6/8] tools/btiotest: Use unicast QoS structure for ISO io Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 7/8] tools/isotest: Use dedicated ISO QoS options for unicast and broadcast Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 8/8] tools/iso-tester: " Iulia Tanasescu

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=20230320143713.25449-3-iulia.tanasescu@nxp.com \
    --to=iulia.tanasescu@nxp.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