espressif / idf-extra-components

Additional components for ESP-IDF, maintained by Espressif
143 stars 86 forks source link

feat(usb/esp_tinyusb): Add AUDIO Device Class configuration to Konfig #282

Closed roma-jam closed 8 months ago

roma-jam commented 8 months ago

Checklist

v1.4.3 Change description

Closes https://github.com/espressif/esp-idf/issues/12774

github-actions[bot] commented 8 months ago

Unit Test Results

  11 files    11 suites   14m 56s :stopwatch:   27 tests   27 :heavy_check_mark: 0 :zzz: 0 :x: 252 runs  252 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit dc771d67.

:recycle: This comment has been updated with latest results.

roma-jam commented 8 months ago

Closed as to fully support AUDIO class driver configuration there is a necessity to provide clearer API and be able to support all the configs options.

Regarding the idea that some of that changes should be closely tied to the hardware microphone configuration and changes were made in that MR are nut fully fulfill the AUDIO class driver support, seems that in case of AUDIO class driver right now the better option is to use tinyUSB directly.

akumpf commented 7 months ago

I've verified that these changes allow audio to work on ESP32-S3. Tested on OSX. Can also work alongside MIDI and CDC/Serial for quite a fantastic mix of USB capabilities and projects.

Would love for this to get merged into the main branch, even if it's just a small step toward full audio support. As more people experiment, the specific features to support would also become more clear. Thank you @roma-jam!

tore-espressif commented 7 months ago

@akumpf Thank you very much for your feedback! We decided not to merge this PR in its current form for following reasons:

  1. This PR only exposes TinyUSB API that can be used even without this change. (you can follow instructions here in section 'Use TinyUSB only, without the additions')
  2. The configuration in tusb_config. is fixed and does not allow the flexibility audio applications typically need (various sample rates, bit widths, channel numbers...)
  3. In this PR, there is no biding to ESP's audio peripherals, such as I2S, or more abstract SW components as esp_codec_dev

We will revisit this topic after we are ready to provide fully-fledged USB Audio solutions