ADSP-SC589 EZ-Board with CLD Audio 2.0 with 8 input channels and 8 output channels

Hello,

I am using the ADSP-SC589 EZ-Board devkit with the example code from CLD to get the board working as a USB audio class 2.0 device, and I get everything to work perfectly when using a Linux host.

However when using a windows i get the following error

I believe this should also work under windows according to the spec https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/usb-2-0-audio-drivers

Has anyone else run into the same problem, or have any idea why i am running into this issue?

Parents
  • Hi I have run into the same problem recently. Were you able to figure out the problem? Or did you have to revert to treating it as a Vendor-specific device and communicate via WinUSB/LibUSB?

  • We got it working by making changes to the clock source descriptors.

    The bmControls field needs to be changed to 0x01 instead of 0x00. This gives following descriptor

    static const unsigned char user_audio_unit_and_terminal_descriptor[] =  /*!< USB Audio v2.0 Unit and Terminal descriptors that describe a simple audio device. */
    {
        /* Input Terminal Descriptor - USB Endpoint */
        0x11,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x02,                   /* bDescriptorSubType = Input Terminal */
        0x01,                   /* bTerminalID */
        0x01, 0x01,             /* wTerminalType = USB Streaming */
        0x00,                   /* bAssocTerminal */
        0x03,                   /* bCSourceID */
        USER_AUDIO_NUM_CHANNELS,                   /* bNRChannels */
    
        /* wChannelConfig */
        ((1 << USER_AUDIO_NUM_CHANNELS)-1) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 8) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 16) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 24) & 0xff,
    
        0x00,                   /* iChannelNames */
        0x00,0x00,              /* bmControls */
        0x00,                   /* iTerminal */
    #if (AUDIO_IN_ENABLED == 1)
        /* Input Terminal Descriptor - Microphone */
        0x11,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x02,                   /* bDescriptorSubType = Input Terminal */
        0x02,                   /* bTerminalID */
        0x01, 0x02,             /* wTerminalType = Microphone */
        0x00,                   /* bAssocTerminal */
        0x04,                   /* bCSourceID */
        USER_AUDIO_NUM_CHANNELS,                   /* bNRChannels */
    
        /* wChannelConfig */
        ((1 << USER_AUDIO_NUM_CHANNELS)-1) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 8) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 16) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 24) & 0xff,
    
        0x00,                   /* iChannelNames */
        0x00,0x00,              /* bmControls */
        0x00,                   /* iTerminal */
    #endif
        /* Output Terminal Descriptor - Speaker */
        0x0c,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x03,                   /* bDescriptorSubType = Output Terminal */
        0x06,                   /* bTerminalID */
        0x01, 0x03,             /* wTerminalType - Speaker */
        0x00,                   /* bAssocTerminal */
        0x09,                   /* bSourceID */
        0x03,                   /* bCSourceID */
        0x00, 0x00,             /* bmControls */
        0x00,                   /* iTerminal */
    #if (AUDIO_IN_ENABLED == 1)
        /* Output Terminal Descriptor - USB Endpoint */
        0x0c,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x03,                   /* bDescriptorSubType = Output Terminal */
        0x07,                   /* bTerminalID */
        0x01, 0x01,             /* wTerminalType - USB Streaming */
        0x00,                   /* bAssocTerminal */
        0x0a,                   /* bSourceID */
        0x04,                   /* bCSourceID */
        0x00, 0x00,             /* bmControls */
        0x00,                   /* iTerminal */
    #endif
        /* Feature Unit Descriptor */
        //0x2a,                   /* bLength */
        (10 + (4 * USER_AUDIO_NUM_CHANNELS)), /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x06,                   /* bDescriptorSubType = Feature Unit */
        0x09,                   /* bUnitID */
        0x01,                   /* bSourceID */
        0x00, 0x00, 0x00, 0x00, /* bmaControls - Master */
    #if (USER_AUDIO_READ_ONLY_VOLUME)
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Left */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Right */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Center */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - LFE */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Back Left */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Back Right */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - FLC */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - FRC */
    #else
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Left */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Right */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Center */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - LFE */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Back Left */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Back Right */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - FLC */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - FRC */
    #endif
        0x00,                   /* iFeature */
        /* Feature Unit Descriptor */
    #if (AUDIO_IN_ENABLED == 1)
        (10 + (4 * USER_AUDIO_NUM_CHANNELS)), /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x06,                   /* bDescriptorSubType = Feature Unit */
        0x0A,                   /* bUnitID */
        0x02,                   /* bSourceID */
        0x00, 0x00, 0x00, 0x00, /* bmaControls - Master */
    #if (USER_AUDIO_READ_ONLY_VOLUME)
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Left */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Right */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Center */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - LFE */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Back Left */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Back Right */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - FLC */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - FRC */
    #else
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Left */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Right */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Center */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - LFE */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Back Left */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Back Right */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - FLC */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - FRC */
    #endif
        0x00,                   /* iFeature */
    #endif
        /* Clock Source Descriptor */
        0x08,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x0a,                   /* bDescriptorSubType = Clock Source */
        0x03,                   /* ClockID */
        0x01,                   /* bmAttributes - Internal Fixed Clock */
        0x01,                   /* bmControls */
        0x00,                   /* bAssocTerminal */
        0x00,                   /* iClockSource */
        /* Clock Source Descriptor */
        0x08,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x0a,                   /* bDescriptorSubType = Clock Source */
        0x04,                   /* ClockID */
        0x01,                   /* bmAttributes - Internal Fixed Clock */
        0x01,                   /* bmControls */
        0x00,                   /* bAssocTerminal */
        0x00,                   /* iClockSource */
    
    };

Reply
  • We got it working by making changes to the clock source descriptors.

    The bmControls field needs to be changed to 0x01 instead of 0x00. This gives following descriptor

    static const unsigned char user_audio_unit_and_terminal_descriptor[] =  /*!< USB Audio v2.0 Unit and Terminal descriptors that describe a simple audio device. */
    {
        /* Input Terminal Descriptor - USB Endpoint */
        0x11,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x02,                   /* bDescriptorSubType = Input Terminal */
        0x01,                   /* bTerminalID */
        0x01, 0x01,             /* wTerminalType = USB Streaming */
        0x00,                   /* bAssocTerminal */
        0x03,                   /* bCSourceID */
        USER_AUDIO_NUM_CHANNELS,                   /* bNRChannels */
    
        /* wChannelConfig */
        ((1 << USER_AUDIO_NUM_CHANNELS)-1) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 8) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 16) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 24) & 0xff,
    
        0x00,                   /* iChannelNames */
        0x00,0x00,              /* bmControls */
        0x00,                   /* iTerminal */
    #if (AUDIO_IN_ENABLED == 1)
        /* Input Terminal Descriptor - Microphone */
        0x11,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x02,                   /* bDescriptorSubType = Input Terminal */
        0x02,                   /* bTerminalID */
        0x01, 0x02,             /* wTerminalType = Microphone */
        0x00,                   /* bAssocTerminal */
        0x04,                   /* bCSourceID */
        USER_AUDIO_NUM_CHANNELS,                   /* bNRChannels */
    
        /* wChannelConfig */
        ((1 << USER_AUDIO_NUM_CHANNELS)-1) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 8) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 16) & 0xff,
        (((1 << USER_AUDIO_NUM_CHANNELS)-1) >> 24) & 0xff,
    
        0x00,                   /* iChannelNames */
        0x00,0x00,              /* bmControls */
        0x00,                   /* iTerminal */
    #endif
        /* Output Terminal Descriptor - Speaker */
        0x0c,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x03,                   /* bDescriptorSubType = Output Terminal */
        0x06,                   /* bTerminalID */
        0x01, 0x03,             /* wTerminalType - Speaker */
        0x00,                   /* bAssocTerminal */
        0x09,                   /* bSourceID */
        0x03,                   /* bCSourceID */
        0x00, 0x00,             /* bmControls */
        0x00,                   /* iTerminal */
    #if (AUDIO_IN_ENABLED == 1)
        /* Output Terminal Descriptor - USB Endpoint */
        0x0c,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x03,                   /* bDescriptorSubType = Output Terminal */
        0x07,                   /* bTerminalID */
        0x01, 0x01,             /* wTerminalType - USB Streaming */
        0x00,                   /* bAssocTerminal */
        0x0a,                   /* bSourceID */
        0x04,                   /* bCSourceID */
        0x00, 0x00,             /* bmControls */
        0x00,                   /* iTerminal */
    #endif
        /* Feature Unit Descriptor */
        //0x2a,                   /* bLength */
        (10 + (4 * USER_AUDIO_NUM_CHANNELS)), /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x06,                   /* bDescriptorSubType = Feature Unit */
        0x09,                   /* bUnitID */
        0x01,                   /* bSourceID */
        0x00, 0x00, 0x00, 0x00, /* bmaControls - Master */
    #if (USER_AUDIO_READ_ONLY_VOLUME)
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Left */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Right */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Center */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - LFE */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Back Left */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Back Right */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - FLC */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - FRC */
    #else
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Left */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Right */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Center */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - LFE */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Back Left */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Back Right */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - FLC */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - FRC */
    #endif
        0x00,                   /* iFeature */
        /* Feature Unit Descriptor */
    #if (AUDIO_IN_ENABLED == 1)
        (10 + (4 * USER_AUDIO_NUM_CHANNELS)), /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x06,                   /* bDescriptorSubType = Feature Unit */
        0x0A,                   /* bUnitID */
        0x02,                   /* bSourceID */
        0x00, 0x00, 0x00, 0x00, /* bmaControls - Master */
    #if (USER_AUDIO_READ_ONLY_VOLUME)
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Left */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Right */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Front Center */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - LFE */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Back Left */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - Back Right */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - FLC */
        0x05, 0x00, 0x00, 0x00, /* bmaControls - FRC */
    #else
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Left */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Right */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Front Center */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - LFE */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Back Left */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - Back Right */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - FLC */
        0x0d, 0x00, 0x00, 0x00, /* bmaControls - FRC */
    #endif
        0x00,                   /* iFeature */
    #endif
        /* Clock Source Descriptor */
        0x08,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x0a,                   /* bDescriptorSubType = Clock Source */
        0x03,                   /* ClockID */
        0x01,                   /* bmAttributes - Internal Fixed Clock */
        0x01,                   /* bmControls */
        0x00,                   /* bAssocTerminal */
        0x00,                   /* iClockSource */
        /* Clock Source Descriptor */
        0x08,                   /* bLength */
        0x24,                   /* bDescriptorType = Class Specific Interface */
        0x0a,                   /* bDescriptorSubType = Clock Source */
        0x04,                   /* ClockID */
        0x01,                   /* bmAttributes - Internal Fixed Clock */
        0x01,                   /* bmControls */
        0x00,                   /* bAssocTerminal */
        0x00,                   /* iClockSource */
    
    };

Children