aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-05-30 11:07:57 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-05-30 11:07:57 +0000
commit86b6b4209d0970f829fa9045f463f7ea65f2f573 (patch)
tree9510c38dc53bbf95489cd10c00d5685e4d97d70b /Demos/Device
parent7f0193feb285764ef1edcb06bd5ea9b5df630dbb (diff)
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1774 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Device')
-rw-r--r--Demos/Device/ClassDriver/AudioInput/Descriptors.c9
-rw-r--r--Demos/Device/ClassDriver/AudioInput/Descriptors.h1
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/Descriptors.c8
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/Descriptors.h1
-rw-r--r--Demos/Device/LowLevel/AudioInput/Descriptors.c9
-rw-r--r--Demos/Device/LowLevel/AudioInput/Descriptors.h1
-rw-r--r--Demos/Device/LowLevel/AudioOutput/Descriptors.c8
-rw-r--r--Demos/Device/LowLevel/AudioOutput/Descriptors.h1
8 files changed, 28 insertions, 10 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/Descriptors.c b/Demos/Device/ClassDriver/AudioInput/Descriptors.c
index 9706d550..bd31bdb0 100644
--- a/Demos/Device/ClassDriver/AudioInput/Descriptors.c
+++ b/Demos/Device/ClassDriver/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/ClassDriver/AudioInput/Descriptors.h b/Demos/Device/ClassDriver/AudioInput/Descriptors.h
index fdf48355..82dbd517 100644
--- a/Demos/Device/ClassDriver/AudioInput/Descriptors.h
+++ b/Demos/Device/ClassDriver/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;
diff --git a/Demos/Device/ClassDriver/AudioOutput/Descriptors.c b/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
index 0b1e8c11..e46c3c02 100644
--- a/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
+++ b/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
@@ -200,8 +200,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/ClassDriver/AudioOutput/Descriptors.h b/Demos/Device/ClassDriver/AudioOutput/Descriptors.h
index 2a9a6f6e..b4b8db6a 100644
--- a/Demos/Device/ClassDriver/AudioOutput/Descriptors.h
+++ b/Demos/Device/ClassDriver/AudioOutput/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;
diff --git a/Demos/Device/LowLevel/AudioInput/Descriptors.c b/Demos/Device/LowLevel/AudioInput/Descriptors.c
index f645d088..6c8323c5 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 fdf48355..82dbd517 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;
diff --git a/Demos/Device/LowLevel/AudioOutput/Descriptors.c b/Demos/Device/LowLevel/AudioOutput/Descriptors.c
index 3ac23c94..9c57a421 100644
--- a/Demos/Device/LowLevel/AudioOutput/Descriptors.c
+++ b/Demos/Device/LowLevel/AudioOutput/Descriptors.c
@@ -200,8 +200,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/AudioOutput/Descriptors.h b/Demos/Device/LowLevel/AudioOutput/Descriptors.h
index 2a9a6f6e..b4b8db6a 100644
--- a/Demos/Device/LowLevel/AudioOutput/Descriptors.h
+++ b/Demos/Device/LowLevel/AudioOutput/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;