All of lore.kernel.org
 help / color / mirror / Atom feed
From: "K, Kiran" <kiran.k@intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"Srivatsa, Ravishankar" <ravishankar.srivatsa@intel.com>,
	"Tumkur Narayan, Chethan" <chethan.tumkur.narayan@intel.com>,
	"Von Dentz, Luiz" <luiz.von.dentz@intel.com>
Subject: RE: [PATCH v2 1/9] adapter: Enable MSFT a2dp offload codec when Experimental is set
Date: Fri, 19 Nov 2021 10:10:06 +0000	[thread overview]
Message-ID: <DM8PR11MB5573C323C7A90D177E0EB4A7F59C9@DM8PR11MB5573.namprd11.prod.outlook.com> (raw)
In-Reply-To: <089A59F0-C858-43BF-80AC-0C384799A87F@holtmann.org>

Hi Marcel,

> -----Original Message-----
> From: Marcel Holtmann <marcel@holtmann.org>
> Sent: Friday, November 19, 2021 3:36 PM
> To: K, Kiran <kiran.k@intel.com>
> Cc: linux-bluetooth@vger.kernel.org; Srivatsa, Ravishankar
> <ravishankar.srivatsa@intel.com>; Tumkur Narayan, Chethan
> <chethan.tumkur.narayan@intel.com>; Von Dentz, Luiz
> <luiz.von.dentz@intel.com>
> Subject: Re: [PATCH v2 1/9] adapter: Enable MSFT a2dp offload codec when
> Experimental is set
> 
> Hi Kiran,
> 
> > This enables codec offload experimental feature if its UUIDs has been
> > enabled by main.conf:Experimental or -E has been passed in the command
> > line.
> > ---
> > src/adapter.c | 43 +++++++++++++++++++++++++++++++++++++++++++
> > src/main.c    |  1 +
> > src/main.conf |  1 +
> > 3 files changed, 45 insertions(+)
> >
> > diff --git a/src/adapter.c b/src/adapter.c index
> > 309956bbb5be..1627cc127057 100644
> > --- a/src/adapter.c
> > +++ b/src/adapter.c
> > @@ -142,6 +142,13 @@ static const struct mgmt_exp_uuid
> codec_offload_uuid = {
> > 	.str = "a6695ace-ee7f-4fb9-881a-5fac66c629af"
> > };
> >
> > +/* 0cc2131f-96f0-4cd1-b313-b97e7cbc8335 */ static const struct
> > +mgmt_exp_uuid msft_a2dp_offload_codecs_uuid = {
> > +	.val = { 0x35, 0x83, 0xbc, 0x7c, 0x7e, 0xb9, 0x13, 0xb3,
> > +		0xd1, 0x4c, 0xf0, 0x96, 0x1f, 0x13, 0xc2, 0x0c},
> > +	.str = "0cc2131f-96f0-4cd1-b313-b97e7cbc8335"
> > +};
> > +
> > static DBusConnection *dbus_conn = NULL;
> >
> > static uint32_t kernel_features = 0;
> > @@ -9789,6 +9796,41 @@ static void codec_offload_func(struct
> btd_adapter *adapter, uint8_t action)
> > 	btd_error(adapter->dev_id, "Failed to set Codec Offload"); }
> >
> > +static void msft_a2dp_offload_complete(uint8_t status, uint16_t len,
> > +				       const void *param, void *user_data) {
> > +	struct btd_adapter *adapter = user_data;
> > +	uint8_t action = btd_opts.experimental ? 0x01 : 0x00;
> > +
> > +	if (status != 0) {
> > +		error("Set MSFT a2dp offload codec failed with status 0x%02x
> (%s)",
> > +		       status, mgmt_errstr(status));
> > +		return;
> > +	}
> > +
> > +	DBG("MSFT a2dp offload codecs successfully set");
> 
> we need to switch to using btd_debug or DBG_IDX to include the index
> number in the traces.

Ok.
> 
> > +
> > +	if (action)
> > +		queue_push_tail(adapter->exps,
> > +				(void *)msft_a2dp_offload_codecs_uuid.val);
> > +}
> > +
> > +static void msft_a2dp_offload_func(struct btd_adapter *adapter,
> > +uint8_t action) {
> > +	struct mgmt_cp_set_exp_feature cp;
> > +
> > +	memset(&cp, 0, sizeof(cp));
> > +	memcpy(cp.uuid, msft_a2dp_offload_codecs_uuid.val, 16);
> > +	cp.action = action;
> > +
> > +	if (mgmt_send(adapter->mgmt, MGMT_OP_SET_EXP_FEATURE,
> > +		      adapter->dev_id, sizeof(cp), &cp,
> > +		      msft_a2dp_offload_complete, adapter, NULL) > 0)
> > +		return;
> > +
> > +	btd_error(adapter->dev_id, "Failed to set RPA Resolution"); }
> 
> We are no longer dealing with the blunt copy-and-paste mistakes, please do
> a proper review before sending any patch.

My bad. I will address in the next patchset.
> 
> Regards
> 
> Marcel

Thanks,
Kiran



      reply	other threads:[~2021-11-19 10:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  9:42 [PATCH v2 1/9] adapter: Enable MSFT a2dp offload codec when Experimental is set Kiran K
2021-11-19  9:42 ` [PATCH v2 2/9] shared/util: Decode MSFT offload codec UUID Kiran K
2021-11-19  9:42 ` [PATCH v2 3/9] mgmt: Set MSFT offload codec feature Kiran K
2021-11-19  9:42 ` [PATCH v2 4/9] adapter: API to check if MSFT a2dp codec is enabled Kiran K
2021-11-19  9:42 ` [PATCH v2 5/9] avdtp: Add a flag in struct avdtp to control MSFT a2dp offload Kiran K
2021-11-19  9:42 ` [PATCH v2 6/9] avdtp: Add support for offload MSFT open command Kiran K
2021-11-19  9:42 ` [PATCH v2 7/9] avdtp: Add support for MSFT offload start command Kiran K
2021-11-19  9:42 ` [PATCH v2 8/9] avdtp: Add support for MSFT offload suspend command Kiran K
2021-11-19  9:42 ` [PATCH v2 9/9] avdtp: Add support for MSFT offload close command Kiran K
2021-11-19  9:55 ` [v2,1/9] adapter: Enable MSFT a2dp offload codec when Experimental is set bluez.test.bot
2021-11-19 10:06 ` [PATCH v2 1/9] " Marcel Holtmann
2021-11-19 10:10   ` K, Kiran [this message]

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=DM8PR11MB5573C323C7A90D177E0EB4A7F59C9@DM8PR11MB5573.namprd11.prod.outlook.com \
    --to=kiran.k@intel.com \
    --cc=chethan.tumkur.narayan@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.von.dentz@intel.com \
    --cc=marcel@holtmann.org \
    --cc=ravishankar.srivatsa@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.