Merge pull request #384 from ed-xmos/feature/correct_ep_for_in_only

Fix for wrong in EP count
This commit is contained in:
Ed
2024-05-07 11:06:15 +01:00
committed by GitHub
3 changed files with 13 additions and 2 deletions

View File

@@ -7,6 +7,8 @@ UNRELEASED
* FIXED: Device fails to enumerate when ADAT and S/PDIF transmit are enabled
* CHANGED: Enable only the minimum number of ADAT input formats based for the
supported sample frequencies
* FIXED: Incorrect internal input EP count for input only devices
* ADDED: MIDI unit and subsystem tests
* FIXED: ADAT Tx called too frequently
4.0.0

View File

@@ -1273,7 +1273,9 @@ enum USBEndpointNumber_In
#if (NUM_USB_CHAN_IN == 0) || defined (UAC_FORCE_FEEDBACK_EP)
ENDPOINT_NUMBER_IN_FEEDBACK,
#endif
#if (NUM_USB_CHAN_IN != 0)
ENDPOINT_NUMBER_IN_AUDIO,
#endif
#if (XUA_SPDIF_RX_EN) || (XUA_ADAT_RX_EN)
ENDPOINT_NUMBER_IN_INTERRUPT, /* Audio interrupt/status EP */
#endif

View File

@@ -1,4 +1,4 @@
// Copyright 2011-2023 XMOS LIMITED.
// Copyright 2011-2024 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/**
* @brief Implements endpoint zero for an USB Audio 1.0/2.0 device
@@ -814,7 +814,14 @@ void XUA_Endpoint0_loop(XUD_Result_t result, USB_SetupPacket_t sp, chanend c_ep0
{
unsigned epNum = sp.wIndex & 0xff;
if ((epNum == ENDPOINT_ADDRESS_OUT_AUDIO) || (epNum == ENDPOINT_ADDRESS_IN_AUDIO))
// Ensure we only check for AUDIO EPs if enabled
#if (NUM_USB_CHAN_IN != 0 && NUM_USB_CHAN_OUT == 0)
if (epNum == ENDPOINT_ADDRESS_IN_AUDIO)
#elif (NUM_USB_CHAN_IN == 0 && NUM_USB_CHAN_OUT != 0)
if (epNum == ENDPOINT_ADDRESS_OUT_AUDIO)
#elif (NUM_USB_CHAN_IN != 0 && NUM_USB_CHAN_OUT != 0)
if ((epNum == ENDPOINT_ADDRESS_IN_AUDIO) || (epNum == ENDPOINT_ADDRESS_OUT_AUDIO))
#endif
{
#if (AUDIO_CLASS == 2) && (AUDIO_CLASS_FALLBACK)
if(g_curUsbSpeed == XUD_SPEED_FS)