2020-03-04 17:33:20

by Alain Michaud

[permalink] [raw]
Subject: [BlueZ PATCH v1] Adding definitions for Wide Band Speech configuration

This change adds the corresponding user space definition for wide band
speech.

---

doc/mgmt-api.txt | 30 ++++++++++++++++++++++++++++++
lib/mgmt.h | 5 ++++-
2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index 5c23268a1..ecdfd9b95 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -3052,6 +3052,36 @@ Load Blocked Keys Command
Possible errors: Invalid Parameters
Invalid Index

+Set Wide Band Speech Command
+======================
+
+ Command Code: 0x0047
+ Controller Index: <controller id>
+ Command Parameters: wide_band_speech_enabled (1 Octet)
+ Return Parameters: Current_Settings (4 Octets)
+
+ This command is used to enable/disable Wide Band Speech support for a
+ controller. The allowed values of the wide_band_speech_enabled command
+ parameter are 0x00 and 0x01. All other values will return
+ Invalid Parameters.
+
+ This command is only available for Wide Band Speech capable controllers and
+ will yield in a Not Supported error otherwise.
+
+ This command can be used when the controller is not powered and
+ all settings will be programmed once powered.
+
+ In case the kernel subsystem does not support Wide Band Speech or the
+ controller does not either, the command will fail regardless.
+
+ This command generates a Command Complete event on success or
+ a Command Status event on failure.
+
+ Possible errors: Busy
+ Not Supported
+ Invalid Parameters
+ Invalid Index
+

Command Complete Event
======================
diff --git a/lib/mgmt.h b/lib/mgmt.h
index 101cf5f95..d1f0a6053 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -101,7 +101,8 @@ struct mgmt_rp_read_index_list {
#define MGMT_SETTING_PRIVACY 0x00002000
#define MGMT_SETTING_CONFIGURATION 0x00004000
#define MGMT_SETTING_STATIC_ADDRESS 0x00008000
-#define MGMT_SETTING_PHY_CONFIGURATION 0x00010000
+#define MGMT_SETTING_PHY_CONFIGURATION 0x00010000
+#define MGMT_SETTING_WIDE_BAND_SPEECH 0x00020000

#define MGMT_OP_READ_INFO 0x0004
struct mgmt_rp_read_info {
@@ -599,6 +600,8 @@ struct mgmt_cp_set_blocked_keys {
struct mgmt_blocked_key_info keys[0];
} __packed;

+#define MGMT_OP_SET_WIDE_BAND_SPEECH 0x0047
+
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
uint16_t opcode;
--
2.25.1.481.gfbce0eb801-goog


2020-03-04 18:38:36

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [BlueZ PATCH v1] Adding definitions for Wide Band Speech configuration

Hi Alain,

> This change adds the corresponding user space definition for wide band
> speech.
>
> ---
>
> doc/mgmt-api.txt | 30 ++++++++++++++++++++++++++++++
> lib/mgmt.h | 5 ++++-
> 2 files changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
> index 5c23268a1..ecdfd9b95 100644
> --- a/doc/mgmt-api.txt
> +++ b/doc/mgmt-api.txt
> @@ -3052,6 +3052,36 @@ Load Blocked Keys Command
> Possible errors: Invalid Parameters
> Invalid Index
>
> +Set Wide Band Speech Command
> +======================
> +
> + Command Code: 0x0047
> + Controller Index: <controller id>
> + Command Parameters: wide_band_speech_enabled (1 Octet)
> + Return Parameters: Current_Settings (4 Octets)
> +
> + This command is used to enable/disable Wide Band Speech support for a
> + controller. The allowed values of the wide_band_speech_enabled command
> + parameter are 0x00 and 0x01. All other values will return
> + Invalid Parameters.
> +
> + This command is only available for Wide Band Speech capable controllers and
> + will yield in a Not Supported error otherwise.
> +
> + This command can be used when the controller is not powered and
> + all settings will be programmed once powered.
> +
> + In case the kernel subsystem does not support Wide Band Speech or the
> + controller does not either, the command will fail regardless.
> +
> + This command generates a Command Complete event on success or
> + a Command Status event on failure.
> +
> + Possible errors: Busy
> + Not Supported
> + Invalid Parameters
> + Invalid Index
> +

I already committed the mgmt-api.txt change since I was fixing a few things in the document.

Regards

Marcel

2020-03-04 20:18:52

by Alain Michaud

[permalink] [raw]
Subject: Re: [BlueZ PATCH v1] Adding definitions for Wide Band Speech configuration

Hi Marcel

Thanks, I will rebase and send a v2 with just the header changes.

Thanks,
Alain

On Wed, Mar 4, 2020 at 1:37 PM Marcel Holtmann <[email protected]> wrote:
>
> Hi Alain,
>
> > This change adds the corresponding user space definition for wide band
> > speech.
> >
> > ---
> >
> > doc/mgmt-api.txt | 30 ++++++++++++++++++++++++++++++
> > lib/mgmt.h | 5 ++++-
> > 2 files changed, 34 insertions(+), 1 deletion(-)
> >
> > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
> > index 5c23268a1..ecdfd9b95 100644
> > --- a/doc/mgmt-api.txt
> > +++ b/doc/mgmt-api.txt
> > @@ -3052,6 +3052,36 @@ Load Blocked Keys Command
> > Possible errors: Invalid Parameters
> > Invalid Index
> >
> > +Set Wide Band Speech Command
> > +======================
> > +
> > + Command Code: 0x0047
> > + Controller Index: <controller id>
> > + Command Parameters: wide_band_speech_enabled (1 Octet)
> > + Return Parameters: Current_Settings (4 Octets)
> > +
> > + This command is used to enable/disable Wide Band Speech support for a
> > + controller. The allowed values of the wide_band_speech_enabled command
> > + parameter are 0x00 and 0x01. All other values will return
> > + Invalid Parameters.
> > +
> > + This command is only available for Wide Band Speech capable controllers and
> > + will yield in a Not Supported error otherwise.
> > +
> > + This command can be used when the controller is not powered and
> > + all settings will be programmed once powered.
> > +
> > + In case the kernel subsystem does not support Wide Band Speech or the
> > + controller does not either, the command will fail regardless.
> > +
> > + This command generates a Command Complete event on success or
> > + a Command Status event on failure.
> > +
> > + Possible errors: Busy
> > + Not Supported
> > + Invalid Parameters
> > + Invalid Index
> > +
>
> I already committed the mgmt-api.txt change since I was fixing a few things in the document.
>
> Regards
>
> Marcel
>