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

CDC + AUDIO Composite not working together #8

Open
st0ne opened this issue Jan 15, 2022 · 6 comments
Open

CDC + AUDIO Composite not working together #8

st0ne opened this issue Jan 15, 2022 · 6 comments

Comments

@st0ne
Copy link

st0ne commented Jan 15, 2022

i still working on getting CDC + AUDIO working.

so i found this:
https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Composite-USB-CDC-and-Audio-Class/m-p/486885#M4306

@alambe94
Copy link
Owner

Ok, will try with IAD descriptor

@st0ne
Copy link
Author

st0ne commented Jan 16, 2022

Currently i look at the descriptor table at the teensy project:
https://github.com/PaulStoffregen/cores/blob/ee3a0ada4af8338bc24f1cf12eb696dc6aa02b3b/teensy3/usb_desc.c

But be careful. Windows does not like a wrong descriptor. At the moment its crashing as soon i connect the usb cable!
On Linux there is no problem, it gives a wrong descriptor length of 0.

@st0ne
Copy link
Author

st0ne commented Mar 15, 2022

hi, found the issue now.

yes its the missing IAD. I added it to MIC and SPKR.
changed the size of descriptor of both +8 and also changed USBD_Update_Audio_SPKR_DESC and USBD_Update_Audio_MIC_DESC.

Windows is detecting audio devices correct but i have to test if everything is working. but looks good at the moment :-)

@st0ne
Copy link
Author

st0ne commented Mar 22, 2022

i also changed:

#if (USBD_USE_UAC_SPKR == 1)
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef *)pdev->pData, AUDIO_SPKR_EP, PCD_DBL_BUF, (pma_track + AUDIO_OUT_PACKET) | ((pma_track + AUDIO_OUT_PACKET) << 16));
pma_track += ((128 + AUDIO_OUT_PACKET) * 2);
#endif

after that sound was fine.

but have problems with microphone. do not get it to work that samples are sent to usb endpoint...

@st0ne
Copy link
Author

st0ne commented Mar 22, 2022

ah, and its only 16khz sample rate. Did not get it to work with 48khz

@st0ne
Copy link
Author

st0ne commented Mar 28, 2022

mic needs extra endpoint. it conficts with EP1 from Speaker

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

No branches or pull requests

2 participants