-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usb audio changes #67261
usb audio changes #67261
Conversation
Hello @jzipperer-fb, and thank you very much for your first pull request to the Zephyr project! |
0680f47
to
edbe1ac
Compare
When building with CONFIG_USB_DEVICE_AUDIO, enable start of frame notifications from the mcux sdk usb middleware Signed-off-by: James Zipperer <[email protected]>
…iver When usb middleware sends a start of frame notification to this driver, call status_cb with USB_DC_SOF. Signed-off-by: James Zipperer <[email protected]>
These descriptor values can now be configured via the device tree Signed-off-by: James Zipperer <[email protected]>
audio_receive_cb is only used by headphones and headset, it is unused in microphone-only configurations. Gate compilation based on the device tree. Signed-off-by: James Zipperer <[email protected]>
edbe1ac
to
34c6148
Compare
Hi @jzipperer-fb! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
@@ -910,6 +910,9 @@ static void usb_mcux_thread_main(void *arg1, void *arg2, void *arg3) | |||
case kUSB_DeviceNotifyResume: | |||
dev_state.status_cb(USB_DC_RESUME, NULL); | |||
break; | |||
case kUSB_DeviceNotifySOF: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jzipperer-fb Where is kUSB_DeviceNotifySOF
defined. This is causing CI failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no! It's in the nxp middleware usb sdk. device/usb_device_dci.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jzipperer-fb, the NXP SDK team has to review and integrate these changes first. We can then add these changes to Zephyr. For now, I have added a PR to revert the 2 commits to the NXP drivers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. sounds good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how can i kick start that process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have followed up with the SDK team via the PR you submitted. We can keep an eye on that PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey,
this was merged to main, causing build issues:
drivers/usb/device/usb_dc_mcux.c: In function 'usb_mcux_thread_main':
drivers/usb/device/usb_dc_mcux.c:913:22: error: 'kUSB_DeviceNotifySOF' undeclared (first use in this function); did you mean 'kUSB_DeviceNotifyError'?
913 | case kUSB_DeviceNotifySOF:
| ^~~~~~~~~~~~~~~~~~~~
| kUSB_DeviceNotifyError
i believe these changes should be reverted, nxp-mcuxpresso/mcuxsdk-middleware-usb#5 patch be merged into https://github.com/zephyrproject-rtos/hal_nxp/, the manifest updated in this repo and finally revert again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, saw #67459 now.
Added device tree bindings for some addition audio usb descriptor values
Added start of frame notifications to nxp mcux usb