Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ccrome
Copy link

@ccrome ccrome commented Jan 18, 2024

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.

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
ccrome added a commit to ccrome/Audio that referenced this pull request Jan 18, 2024
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.
ccrome added a commit to ccrome/Audio that referenced this pull request Jan 18, 2024
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.
@ccrome ccrome marked this pull request as ready for review January 18, 2024 23:27
ccrome added a commit to ccrome/Audio that referenced this pull request Feb 9, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant