summaryrefslogtreecommitdiff
path: root/examples/device/uac2_headset/src/main.c
AgeCommit message (Collapse)Author
2026-06-18examples/uac2: drop redundant entity_id check in request helpershathach
The audio20 get/set entity dispatchers already extract entity_id from wIndex and route to the matching clock / feature-unit helper, so each helper's own entity_id re-derivation and TU_ASSERT(entity_id == ...) was dead: the helper is only ever reached for its one entity. Unknown entities are still rejected by the dispatcher's "not handled" path. Remove the redundant local, the dead assert, and the constant "entity" field from each helper's not-supported log (the message text already identifies the entity). The local is dropped entirely rather than kept for the log, since TU_LOG1 compiles out in release and would leave it unused. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-04-25fix: add BE bitfield guards for audio and fix UAC2 example endian-safe field ↵copilot-swe-agent[bot]
extraction - Add TU_BITFIELD_ORDER guards for audio10_desc_as_iso_data_ep_t.bmAttributes in audio.h - Add TU_BITFIELD_ORDER guards for audio20_control_request_t.bmRequestType_bit in audio.h - Fix cdc_uac2/src/uac2_app.c: replace alias cast with TU_U16_LOW/HIGH field extraction - Fix uac2_headset/src/main.c: replace alias cast with TU_U16_LOW/HIGH field extraction - Fix uac2_speaker_fb/src/main.c: replace alias cast with TU_U16_LOW/HIGH field extraction Addresses review comment: https://github.com/hathach/tinyusb/pull/3597#issuecomment-4320042007 Agent-Logs-Url: https://github.com/hathach/tinyusb/sessions/8b695271-74b3-4a26-b3d8-c48ecdf2e481 Co-authored-by: HiFiPhile <[email protected]>
2026-04-17remove duplicated tu_le16toh since we have converted the endian when setup.Fan DANG
2026-02-28replace board_millis() with tusb_time_millis_api()hathach
2025-10-03Update headset exampleMengsk
Signed-off-by: Mengsk <[email protected]>
2025-10-02Add UAC1 support to uac2_headset exampleHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-09-30Add UAC1 support to speaker exampleMengsk
Signed-off-by: Mengsk <[email protected]>
2025-09-30More descriptors workingHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-09-29Update UAC2 namingHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-09-17Fix board_init_after_tusbHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-08-05fix rp2 iso transfer: reset state before notify stack. since new audio ↵hathach
driver can execute xfer_is()
2025-08-02fix tud_audio_set_itf_close_EP_cb() typohathach
2025-06-14audio: update examplesHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2024-10-14change the tusb_rhport_init_t struct, exclude the rhport to make API more ↵hathach
consistent
2024-10-11change tusb_init(), tusb_rhport_init() to use init struct for expandabilityhathach
2024-10-10add new tusb_int_handler(rhport, in_isr) as common irq handlerhathach
update tusb_init() to take rhport and role, defined as macro with optional argument for backward compatible
2024-04-26Fix typo.HiFiPhile
2024-04-22fix print lu format warnings with clanghathach
2024-04-09Reduce uac2_headset max sample rate for better compatibility.HiFiPhile
2024-04-01UAC2: add interrupt volume control to uac2_headset example.HiFiPhile
2023-08-09Merge pull request #2202 from Rocky04/patch-4Ha Thach
Invoke unmounted state on configuration reset
2023-08-07Update examplesRocky04
2023-08-04Merge branch 'master' into enhance-bsphathach
2023-08-03rename hw/bsp/board.h to board_api.hhathach
2023-07-31enable USBMC for uno r4, add board_init_after_tusb() APIhathach
add BOARD_UPPERCASE for board detection
2023-03-17Merge branch 'master' into portabilityhathach
2023-03-17fix trailing space and new linehathach
temporarily disable codespell
2023-01-13examples/uac2: Fix mute and volume array lengthsMalik Enes Safak
2022-09-13Remove unreachable codeBen Avison
IAR generates warning Pe111 'statement is unreachable'. In a couple of cases, replace return statements with TU_ATTR_FALLTHROUGH; because some compilers apparently can't figure out that the return statements are unreachable but do whinge about an imagined fall-through without them!
2022-06-27fix all device examples warningshathach
2022-06-06more example updatehathach
2022-05-28Fix printf long int compiler errorLeon Loeser
2021-10-17more with -Wcast-qualhathach
2021-07-08add settings for Renesas RX familykkitayam
2021-07-04Move audio_control_request_t to audio.hMasterPhi
2021-07-04Prevent overflow noiseMasterPhi
2021-07-04Clear FIFO only if enabled...MasterPhi
Add buffer align
2021-07-04Add 24bit loopback in example.MasterPhi
2021-07-04Fix typoMasterPhi
2021-07-04Fix audiod_get_AS_interface_index in audio class.MasterPhi
Enhance uac2_headset example with multiple sample rates. Add macro to calculate EP size.
2021-05-26fix uac2_headset examplenoodlefighter
tud_audio_rx_done_cb() is departed, replace with tud_audio_rx_done_pre_read_cb()
2021-05-20fix uac2_headset example: type of bRequest should be uint8_t, not enumeratenoodlefighter
2021-04-03Fix old defines in uac2_headsetReinhard Panhuber
2021-03-13move AUDIO_SAMPLE_RATE to example main.chathach
2020-10-16audio: Add headset exampleJerzy Kasenberg
This example code creates USB Audio 2.0 headset device. Device has two audio interfaces first stereo speaker with 48kHz stereo stream. Second interface for microphone with 48kHz mono stream. This example can be used to start working on audio device. It can be also used to verify ISO endpoints for boards. Speaker adaptive clock (bound to SOF). Microphone for now has asynchronous clock. Volume and mute control while present are not used for data stream modification.