diff options
| author | Ha Thach <[email protected]> | 2021-07-06 22:57:48 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-07-06 22:57:48 +0700 |
| commit | ecb100a62fa99335fc41dca3d7c85a3903a7df65 (patch) | |
| tree | 8f2cfdf71afd0eb4b1783c79859acd7857409a1f /src/class/audio/audio.h | |
| parent | 4468b14580009cccb4e62e3a52ffbd4cb65468d2 (diff) | |
| parent | 72f916423e85083a090186ecc05a6a5b8962685a (diff) | |
Merge pull request #938 from HiFiPhile/uac_example
Bug fix and Enhancements of UAC2
Diffstat (limited to 'src/class/audio/audio.h')
| -rw-r--r-- | src/class/audio/audio.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/class/audio/audio.h b/src/class/audio/audio.h index 936f09104..f99061eae 100644 --- a/src/class/audio/audio.h +++ b/src/class/audio/audio.h @@ -489,7 +489,7 @@ typedef enum AUDIO_DATA_FORMAT_TYPE_I_IEEE_FLOAT = (uint32_t) (1 << 2), AUDIO_DATA_FORMAT_TYPE_I_ALAW = (uint32_t) (1 << 3), AUDIO_DATA_FORMAT_TYPE_I_MULAW = (uint32_t) (1 << 4), - AUDIO_DATA_FORMAT_TYPE_I_RAW_DATA = 0x100000000, + AUDIO_DATA_FORMAT_TYPE_I_RAW_DATA = 0x80000000, } audio_data_format_type_I_t; /// All remaining definitions are taken from the descriptor descriptions in the UAC2 main specification @@ -823,6 +823,33 @@ typedef struct TU_ATTR_PACKED uint16_t wLockDelay ; ///< Indicates the time it takes this endpoint to reliably lock its internal clock recovery circuitry. Units used depend on the value of the bLockDelayUnits field. } audio_desc_cs_as_iso_data_ep_t; +// 5.2.2 Control Request Layout +typedef struct TU_ATTR_PACKED +{ + union + { + struct TU_ATTR_PACKED + { + uint8_t recipient : 5; ///< Recipient type tusb_request_recipient_t. + uint8_t type : 2; ///< Request type tusb_request_type_t. + uint8_t direction : 1; ///< Direction type. tusb_dir_t + } bmRequestType_bit; + + uint8_t bmRequestType; + }; + + uint8_t bRequest; ///< Request type audio_cs_req_t + uint8_t bChannelNumber; + uint8_t bControlSelector; + union + { + uint8_t bInterface; + uint8_t bEndpoint; + }; + uint8_t bEntityID; + uint16_t wLength; +} audio_control_request_t; + //// 5.2.3 Control Request Parameter Block Layout // 5.2.3.1 1-byte Control CUR Parameter Block |
