Copyright (C) Dean Camera, 2010.
dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
+ www.lufa-lib.org
*/
/*
*
* Common definitions and declarations for the library USB Audio 1.0 Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/Audio.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassAudio
#define _AUDIO_CLASS_COMMON_H_
/* Includes: */
- #include "../../USB.h"
+ #include "../../HighLevel/StdDescriptors.h"
#include <string.h>
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_AUDIO_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/Audio.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
/* Macros: */
*/
#define AUDIO_TOTAL_SAMPLE_RATES 1
#endif
-
+
+ /** \name Audio Channel Masks */
+ //@{
/** Supported channel mask for an Audio class terminal descriptor. See the Audio class specification for more details. */
#define AUDIO_CHANNEL_LEFT_FRONT (1 << 0)
/** Supported channel mask for an Audio class terminal descriptor. See the Audio class specification for more details. */
#define AUDIO_CHANNEL_TOP (1 << 11)
+ //@}
+ /** \name Audio Feature Masks */
+ //@{
/** Supported feature mask for an Audio class feature unit descriptor. See the Audio class specification for more details. */
#define AUDIO_FEATURE_MUTE (1 << 0)
/** Supported feature mask for an Audio class feature unit descriptor. See the Audio class specification for more details. */
#define AUDIO_FEATURE_BASS_LOUDNESS (1 << 9)
+ //@}
+ /** \name Audio Terminal Types */
+ //@{
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
#define AUDIO_TERMINAL_UNDEFINED 0x0100
/** Terminal type constant for an Audio class terminal descriptor. See the Audio class specification for more details. */
#define AUDIO_TERMINAL_OUT_LOWFREQ 0x0307
+ //@}
/** Convenience macro to fill a 24-bit \ref USB_Audio_SampleFreq_t structure with the given sample rate as a 24-bit number.
*
#define AUDIO_EP_ACCEPTS_SMALL_PACKETS (0 << 7)
/* Enums: */
+ /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Audio
+ * device class.
+ */
+ enum Audio_Descriptor_ClassSubclassProtocol_t
+ {
+ AUDIO_CSCP_AudioClass = 0x01, /**< Descriptor Class value indicating that the device or
+ * interface belongs to the USB Audio 1.0 class.
+ */
+ AUDIO_CSCP_ControlSubclass = 0x01, /**< Descriptor Subclass value indicating that the device or
+ * interface belongs to the Audio Control subclass.
+ */
+ AUDIO_CSCP_ControlProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or
+ * interface belongs to the Audio Control protocol.
+ */
+ AUDIO_CSCP_AudioStreamingSubclass = 0x02, /**< Descriptor Subclass value indicating that the device or
+ * interface belongs to the MIDI Streaming subclass.
+ */
+ AUDIO_CSCP_MIDIStreamingSubclass = 0x03, /**< Descriptor Subclass value indicating that the device or
+ * interface belongs to the Audio streaming subclass.
+ */
+ AUDIO_CSCP_StreamingProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or
+ * interface belongs to the Streaming Audio protocol.
+ */
+ };
+
/** Audio class specific interface description subtypes, for the Audio Control interface. */
enum Audio_CSInterface_AC_SubTypes_t
{