Open st0ne opened 2 years ago
Ok, will try with IAD descriptor
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.
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 :-)
i also changed:
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);
after that sound was fine.
but have problems with microphone. do not get it to work that samples are sent to usb endpoint...
ah, and its only 16khz sample rate. Did not get it to work with 48khz
mic needs extra endpoint. it conficts with EP1 from Speaker
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