From 2a26efc6912badfff9e798f5dbac57ba85ce6dd1 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 30 May 2011 11:07:57 +0000 Subject: Altered the definition of the USB_Audio_Descriptor_Format_t descriptor so that the user is now responsible for supplying the supported audio sampling rates, to allow for multiple audio interfaces with different numbers of supported rates and/or continuous sample rates. --- Demos/Device/LowLevel/AudioInput/Descriptors.c | 9 ++++++--- Demos/Device/LowLevel/AudioInput/Descriptors.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'Demos/Device/LowLevel/AudioInput') diff --git a/Demos/Device/LowLevel/AudioInput/Descriptors.c b/Demos/Device/LowLevel/AudioInput/Descriptors.c index f645d088e..6c8323c56 100644 --- a/Demos/Device/LowLevel/AudioInput/Descriptors.c +++ b/Demos/Device/LowLevel/AudioInput/Descriptors.c @@ -199,9 +199,12 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .SubFrameSize = 0x02, .BitResolution = 16, - .SampleFrequencyType = AUDIO_TOTAL_SAMPLE_RATES, - - .SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)} + .TotalDiscreteSampleRates = 1, + }, + + .Audio_AudioFormatSampleRates = + { + AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY) }, .Audio_StreamEndpoint = diff --git a/Demos/Device/LowLevel/AudioInput/Descriptors.h b/Demos/Device/LowLevel/AudioInput/Descriptors.h index fdf48355f..82dbd517f 100644 --- a/Demos/Device/LowLevel/AudioInput/Descriptors.h +++ b/Demos/Device/LowLevel/AudioInput/Descriptors.h @@ -70,6 +70,7 @@ USB_Descriptor_Interface_t Audio_StreamInterface_Alt1; USB_Audio_Descriptor_Interface_AS_t Audio_StreamInterface_SPC; USB_Audio_Descriptor_Format_t Audio_AudioFormat; + USB_Audio_SampleFreq_t Audio_AudioFormatSampleRates[1]; USB_Audio_Descriptor_StreamEndpoint_Std_t Audio_StreamEndpoint; USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC; } USB_Descriptor_Configuration_t; -- cgit v1.2.3