feat(usb_device_uac): add I2S example and volume dB callback (AEGHB-1254)#593
feat(usb_device_uac): add I2S example and volume dB callback (AEGHB-1254)#593cgreening wants to merge 2 commits intoespressif:masterfrom
Conversation
- Add set_volume_db_cb callback for decibel-based volume control - Add usb_uac_i2s example with PDM microphone and PCM amplifier support - Update documentation with new callback usage
👋 Hello cgreening, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
|
Hi, @cgreening . I'm really sorry for getting to this PR so late. I was wondering if the example part could be moved to the examples/usb/device/usb_uac routine. We can use kconfig to choose between using the default |
Description
This PR enhances the USB Device UAC component with better volume control support and adds a new example demonstrating I2S audio integration.
Closes: #586
Component Changes
Added a new
set_volume_db_cbcallback to theuac_device_config_tstructure that provides volume changes in decibels (dB), complementing the existing percentage-basedset_volume_cb. This allows applications to implement more accurate gain control using logarithmic scaling.New Example: usb_uac_i2s
Added a comprehensive example (
examples/usb/device/usb_uac_i2s) demonstrating USB Audio Class integration with I2S peripherals:Features:
Hardware Support:
Documentation Updates
Updated both English and Chinese documentation (
docs/en/usb/usb_device/usb_device_uac.rstanddocs/zh_CN/usb/usb_device/usb_device_uac.rst) with:set_volume_db_cbcallbackRelated
usb_uacexample but demonstrates I2S peripheral integrationTesting
Test Environment:
Checklist
Before submitting a Pull Request, please ensure the following: