Commit Graph

4 Commits

Author SHA1 Message Date
Bastien Nocera 363957df71 Bluetooth: Fix support for Read Local Supported Codecs V2
JIRA: https://issues.redhat.com/browse/RHEL-2530

commit 828cea2b71de501827f62d3c92d149f6052ad01e
Author: Chethan T N <chethan.tumkur.narayan@intel.com>
Date:   Tue Nov 22 14:32:57 2022 +0530

    Bluetooth: Fix support for Read Local Supported Codecs V2

    Handling of Read Local Supported Codecs was broken during the
    HCI serialization design change patches.

    Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
    Signed-off-by: Chethan T N <chethan.tumkur.narayan@intel.com>
    Signed-off-by: Kiran K <kiran.k@intel.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Signed-off-by: Bastien Nocera <bnocera@redhat.com>
2023-10-23 09:05:21 +02:00
Gopal Tiwari c672c8dc4f Bluetooth: Read codec capabilities only if supported
Bugzilla: http://bugzilla.redhat.com/2066188

commit 107fe0482b549a0e43a971e5fd104719c6e495ef
Author: Kiran K <kiran.k@intel.com>
Date:   Tue Oct 5 20:15:56 2021 +0530

    Bluetooth: Read codec capabilities only if supported

    Read codec capabilities only if HCI_READ_LOCAL_CODEC_CAPABILITIES
    command is supported. If capablities are not supported, then
    cache codec data without caps.

    Signed-off-by: Kiran K <kiran.k@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

Signed-off-by: Gopal Tiwari <gtiwari@redhat.com>
2022-04-27 11:48:57 +05:30
Gopal Tiwari 4a596ff13f Bluetooth: Add support for Read Local Supported Codecs V2
Bugzilla: http://bugzilla.redhat.com/2066188

commit 9ae664028a9ea838827d6c4bc3428bdd9105f138
Author: Kiran K <kiran.k@intel.com>
Date:   Tue Sep 7 15:42:38 2021 +0530

    Bluetooth: Add support for Read Local Supported Codecs V2

    Use V2 version of read local supported command is controller
    supports

    snoop:
    > HCI Event: Command Complete (0x0e) plen 20
          Read Local Supported Codecs V2 (0x04|0x000d) ncmd 1
            Status: Success (0x00)
            Number of supported codecs: 7
              Codec: u-law log (0x00)
              Logical Transport Type: 0x02
                Codec supported over BR/EDR SCO and eSCO
              Codec: A-law log (0x01)
              Logical Transport Type: 0x02
                Codec supported over BR/EDR SCO and eSCO
              Codec: CVSD (0x02)
              Logical Transport Type: 0x02
                Codec supported over BR/EDR SCO and eSCO
              Codec: Transparent (0x03)
              Logical Transport Type: 0x02
                Codec supported over BR/EDR SCO and eSCO
              Codec: Linear PCM (0x04)
              Logical Transport Type: 0x02
                Codec supported over BR/EDR SCO and eSCO
              Codec: Reserved (0x08)
              Logical Transport Type: 0x03
                Codec supported over BR/EDR ACL
                Codec supported over BR/EDR SCO and eSCO
              Codec: mSBC (0x05)
              Logical Transport Type: 0x03
                Codec supported over BR/EDR ACL
                Codec supported over BR/EDR SCO and eSCO
            Number of vendor codecs: 0
    ......
    < HCI Command: Read Local Suppor.. (0x04|0x000e) plen 7
            Codec: mSBC (0x05)
            Logical Transport Type: 0x00
            Direction: Input (Host to Controller) (0x00)
    > HCI Event: Command Complete (0x0e) plen 12
          Read Local Supported Codec Capabilities (0x04|0x000e) ncmd 1
            Status: Success (0x00)
            Number of codec capabilities: 1
             Capabilities #0:
            00 00 11 15 02 33

    Signed-off-by: Kiran K <kiran.k@intel.com>
    Signed-off-by: Chethan T N <chethan.tumkur.narayan@intel.com>
    Signed-off-by: Srivatsa Ravishankar <ravishankar.srivatsa@intel.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Signed-off-by: Gopal Tiwari <gtiwari@redhat.com>
2022-04-27 11:48:54 +05:30
Gopal Tiwari 8a47c6d8d1 Bluetooth: Enumerate local supported codec and cache details
Bugzilla: http://bugzilla.redhat.com/2066188

commit 8961987f3f5fa2f2618e72304d013c8dd5e604a6
Author: Kiran K <kiran.k@intel.com>
Date:   Tue Sep 7 15:42:37 2021 +0530

    Bluetooth: Enumerate local supported codec and cache details

    Move reading of supported local codecs into a separate init function,
    query codecs capabilities and cache the data

    Signed-off-by: Kiran K <kiran.k@intel.com>
    Signed-off-by: Chethan T N <chethan.tumkur.narayan@intel.com>
    Signed-off-by: Srivatsa Ravishankar <ravishankar.srivatsa@intel.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Signed-off-by: Gopal Tiwari <gtiwari@redhat.com>
2022-04-27 11:48:54 +05:30