-
Notifications
You must be signed in to change notification settings - Fork 376
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
Multichannel USB audio play and record #732
base: master
Are you sure you want to change the base?
Conversation
Update USB descriptors to have variable number of channels on TX and RX Added support for defining multiple data pins. This allows use of more than one TX and/or RX pin. Allow for choosing different USB sample rates
This allows you use use more than one TX or RX pin in TDM mode, allowing for up to 64 channels of record or playback data This fix goes hand-in-hand with the multi-channel USB support. PaulStoffregen/cores#732 input_tdm: every odd channel had every other sample swapped In every odd channel in TDM input (1, 3, 5, 7, 9, 11, 13, 15), every other word was swapped due to an incorrect copy from 32-bits to 16-bits. This fix corrects the odd channels. The Shift-by zeros and the extraneous logical ands are there for clarity, and I verified they don't end up affecting final code optimization as long as optimization is turned on.
This allows you use use more than one TX or RX pin in TDM mode, allowing for up to 64 channels of record or playback data This fix goes hand-in-hand with the multi-channel USB support. PaulStoffregen/cores#732 input_tdm: every odd channel had every other sample swapped In every odd channel in TDM input (1, 3, 5, 7, 9, 11, 13, 15), every other word was swapped due to an incorrect copy from 32-bits to 16-bits. This fix corrects the odd channels. The Shift-by zeros and the extraneous logical ands are there for clarity, and I verified they don't end up affecting final code optimization as long as optimization is turned on.
This allows you use use more than one TX or RX pin in TDM mode, allowing for up to 64 channels of record or playback data This fix goes hand-in-hand with the multi-channel USB support. PaulStoffregen/cores#732 input_tdm: every odd channel had every other sample swapped In every odd channel in TDM input (1, 3, 5, 7, 9, 11, 13, 15), every other word was swapped due to an incorrect copy from 32-bits to 16-bits. This fix corrects the odd channels. The Shift-by zeros and the extraneous logical ands are there for clarity, and I verified they don't end up affecting final code optimization as long as optimization is turned on.
As noted in this forum post , this multi-channel USB PR does not appear to work. The OP seems uninterested in fixing the issue. The updates discussed on this thread do seem to be satisfactory. If Paul gives us a word of encouragement on that thread, and maybe a hint of how to package up a slightly complex set of changes, we can definitely rustle up a set of PRs pretty fast, I'd think :) |
@h4yn0nnym0u5e - Right now I'm merging only bug fixes in prep for 1.60-beta1. Will merge new features for 1.60-beta2, but to start the path to 1.60, I want the first beta to focus on fixes without adding stuff. |
Completely understand. Just wanted to flag that this PR is not (AFAIK) worth spending time on, and that IF you wanted to include the alternate one at some stage in the 1.60 beta program, some discussion and preparation would probably make your job easier - I'm sure alex6679 and I are willing to put some time in to get it to an acceptable state! |
Hi, I'm interested in any work that would bring Teensy multi-channel audio over USB, I just checked the 1.60 beta 1, 2, and 3 threads on PJRC's forum and did not see anything related to this. Is it still planned to get it in 1.60? |
As noted previously, this PR is non-functional; don't bother trying it. The work on this thread does seem promising, though we have one Mac user who's experiencing issues that are unresolved as of this date. Not having a Mac I can't help much with that, but other Mac users are OK so it's not a problem for all. Obviously anyone who has success with this alternative and posts to that effect will boost the chances of it being rolled in to Teensyduino at some point. Paul's focus for TD1.60 is currently on other things - MTP, I think at the moment. One person can only spread themselves so thin! With a tiny bit of engagement this could be a candidate for TD1.60, as long as Paul doesn't see the Mac issues as a show-stopper. |
Update USB descriptors to have variable number of channels on TX and RX
Added support for defining multiple data pins. This allows use of more than one TX and/or RX pin.
Allow for choosing different USB sample rates.
this commit goes hand-in hand with PaulStoffregen/Audio#470
I have also created a patch that applies to the 1.58 release as opposed to the master. It's available here
https://github.com/ccrome/cores/tree/ccrome/add-multi-channel-usb-1.58
The point of that one is because I don't know how to compile the current cores/master because of the c++17 updates.