- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Defines | Typedefs | Enumerations | Functions
csl_audioClass.h File Reference

USB Audio Class functional layer API header file. More...

`#include <cslr.h>`
`#include <csl_error.h>`
`#include <csl_types.h>`
`#include <cslr_usb.h>`
`#include <csl_usb.h>`
`#include <soc.h>`
`#include <csl_general.h>`

Go to the source code of this file.

## Data Structures
struct | CSL_AcRequestStruct
| Audio Class control request structure. More...
struct | CSL_AcInitStructApp
| Audio Class application data structure. More...
struct | CSL_AcLunAttribApp
| AC application Logical unit attribute structure. More...
struct | CSL_AcLogicalUnit
| Audio Class Logical unit structure. More...
struct | CSL_AcObject
| USB Audio Class Object structure. More...
struct | CSL_AcCtrlObject
| USB AC Control Object structure. More...
struct | CSL_AcClassStruct
| AC Control Object structure. More...
## Defines
#define | CSL_AC_DEVICE_DESCRIPTOR_TYPE (0x01)
| USB AC Descriptor Type Values.
#define | CSL_AC_CONFIGURATION_DESCRIPTOR_TYPE (0x02)
#define | CSL_AC_STRING_DESCRIPTOR_TYPE (0x03)
#define | CSL_AC_INTERFACE_DESCRIPTOR_TYPE (0x04)
#define | CSL_AC_ENDPOINT_DESCRIPTOR_TYPE (0x05)
#define | CSL_AC_POWER_DESCRIPTOR_TYPE (0x06)
#define | CSL_AC_HID_DESCRIPTOR_TYPE (0x21)
#define | CSL_AC_FEATURE_ENDPOINT_STALL (0x0000)
| USB AC Defined Feature selectors.
#define | CSL_AC_FEATURE_REMOTE_WAKEUP (0x0001)
#define | CSL_AC_DEVICE_DESCR_MAX_LEN (20)
#define | CSL_AC_DEV_QUAL_DESCR_MAX_LEN (12)
#define | CSL_AC_CONFIG_DESCR_MAX_LEN (124)
#define | CSL_AC_INTER_DESCR_MAX_LEN (12)
#define | CSL_AC_STRING_DESCR_LANGID_MAX_LEN (12)
#define | CSL_AC_AUDIO_TYPE_MONO (0x01)
#define | CSL_AC_AUDIO_TYPE_STEREO (0x02)
#define | CSL_AC_VERIFY_PASSED (0x0)
| USB AC status and size definitions.
#define | CSL_AC_VERIFY_FAILED (0x1)
#define | CSL_AC_UNIT_REMOVEABLE (0x1)
#define | CSL_AC_CURRDEV_STAT (0x01)
#define | CSL_AC_CURRINTRF_STAT (0x00)
#define | CSL_AC_NO_ENDPTOBJECT (5)
#define | CSL_AC_DEVDESC_LEN (10)
#define | CSL_AC_CONFDESC_LEN (6)
#define | CSL_AC_MS_INTDESC_LEN (6)
#define | CSL_AC_MS_ISOOUT_ENDPTDESC_LEN (5)
#define | CSL_AC_MS_ISOIN_ENDPTDESC_LEN (5)
#define | CSL_AC_STRDESC_LANGID_LEN (4)
#define | CSL_AC_SCSI_INQUIRY_LEN (50)
#define | CSL_AC_SENSEDATA_LEN (15)
#define | CSL_AC_LUN_MAX (4)
#define | CSL_AC_CBWSIZE (17)
#define | CSL_AC_CSWSIZE (8)
#define | CSL_AC_READCAP (6)
#define | CSL_AC_CTRLBUFF_LEN (5)
#define | CSL_AC_SCSI_INQUIRY_CONF_LEN (24)
#define | CSL_AC_DEVICE_CLASS_STORAGE (0x08)
#define | CSL_AC_SCSI_DATA_PROTECT (0x0007)
#define | CSL_AC_REQUEST_AUDIO_CLASS (0x20)
#define | CSL_AC_GET_BUF_LEN (0x04)
#define | CSL_AC_REQUEST_GET_STATUS (0x8000)
| Symbolic constants for USB AC requests.
#define | CSL_AC_REQUEST_CLEAR_FEATURE (0x0001)
#define | CSL_AC_REQUEST_SET_CUR (0x2001)
#define | CSL_AC_REQUEST_GET_CUR (0xA081)
#define | CSL_AC_REQUEST_SET_MIN (0x2002)
#define | CSL_AC_REQUEST_GET_MIN (0xA082)
#define | CSL_AC_REQUEST_SET_MAX (0x2003)
#define | CSL_AC_REQUEST_GET_MAX (0xA083)
#define | CSL_AC_REQUEST_SET_RES (0x2004)
#define | CSL_AC_REQUEST_GET_RES (0xA084)
#define | CSL_AC_VOLUME_CTRL_BUF_LEN (6)
#define | USB_AC_FEATURE_UNIT_MUTE_CTRL (0x01)
#define | USB_AC_FEATURE_UNIT_VOLUME_CTRL (0x02)
#define | USB_AC_FEATURE_UNIT_LEFT_RIGHT_VOLUME (0x00)
#define | USB_AC_FEATURE_UNIT_LEFT_VOLUME (0x01)
#define | USB_AC_FEATURE_UNIT_RIGHT_VOLUME (0x02)
#define | CSL_AC_REQUEST_SET_FEATURE (0x0003)
#define | CSL_AC_REQUEST_SET_ADDRESS (0x0005)
#define | CSL_AC_REQUEST_GET_DESCRIPTOR (0x8006)
#define | CSL_AC_REQUEST_SET_DESCRIPTOR (0x0007)
#define | CSL_AC_REQUEST_GET_CONFIGURATION (0x8008)
#define | CSL_AC_REQUEST_SET_CONFIGURATION (0x0009)
#define | CSL_AC_REQUEST_GET_INTERFACE (0x800A)
#define | CSL_AC_REQUEST_SET_INTERFACE (0x000B)
#define | CSL_AC_REQUEST_SYNC_FRAME (0x800C)
#define | CSL_AC_REQUEST_ISO_ONLY_RESET (0x20FF)
#define | CSL_AC_REQUEST_GET_MAX_LUN (0xA0FE)
#define | CSL_AC_REQUEST_TYPE_BASE (0x80)
#define | CSL_AC_REQUEST_TYPE_DEVICE_STATUS (0x0)
#define | CSL_AC_REQUEST_TYPE_INTERFACE_STATUS (0x1)
#define | CSL_AC_REQUEST_TYPE_EP_STATUS (0x2)
#define | CSL_AC_DEVICE_SUSPENDED (0x01)
| AC Status query API return values.
#define | CSL_AC_DEVICE_NOT_SUSPENDED (0x0)
#define | CSL_AC_LUN_LOCKED (0x01)
#define | CSL_AC_LUN_NOT_LOCKED (0x0)
#define | CSL_AC_ACTIVITY_PRESENT (0x01)
#define | CSL_AC_ACTIVITY_NOT_PRESENT (0x0)
#define | CSL_AC_16BIT_MASK (0xFFFF)
#define | CSL_AC_16BIT_SHIFT (16)
#define | CSL_AC_24BIT_SHIFT (24)
#define | CSL_AC_8BIT_MASK (0xFF)
#define | CSL_AC_8BIT_HIGH_MASK (0xFF00)
#define | CSL_AC_8BIT_SHIFT (8)
#define | CSL_AC_UNICODE_SIZE (66)
#define | CSL_AC_SENSE_DATA0_DEFVAL (26)
#define | CSL_AC_SENSE_DATA1_DEFVAL (0)
#define | CSL_AC_SENSE_DATA2_DEFVAL (0x0070)
#define | CSL_AC_SENSE_DATA3_DEFVAL (0x0000)
#define | CSL_AC_SENSE_DATA4_DEFVAL (0x0000)
#define | CSL_AC_SENSE_DATA5_DEFVAL ((11<<8) | 0)
#define | CSL_AC_READ_CAPACITY0_DEFVAL (8)
#define | CSL_AC_CSW0_DEFVAL (0)
#define | CSL_AC_CSW1_DEFVAL (0x5355)
#define | CSL_AC_CSW2_DEFVAL (0x5342)
#define | CSL_AC_ERROR_BASE (CSL_EUSB_FIRST)
#define | CSL_AC_INVALID_REQUEST_HANDLER (CSL_AC_ERROR_BASE - 1)
#define | CSL_AC_REQUEST_ARGS
| AC Request arguments.
## Typedefs
typedef struct CSL_AcRequestStruct | CSL_AcRequestStruct
| Audio Class control request structure.
typedef struct CSL_AcInitStructApp | CSL_AcInitStructApp
| Audio Class application data structure.
typedef CSL_AcInitStructApp * | pAcAppClassHandle
| Audio Class application class handle.
typedef struct CSL_AcLunAttribApp | CSL_AcLunAttribApp
| AC application Logical unit attribute structure.
typedef CSL_AcLunAttribApp * | pAcAppLunAttribHandle
| Audio Class application Lun attribute handle.
typedef CSL_AcRequestRet(* | fpAC_REQ_HANDLER )(CSL_AC_REQUEST_ARGS)
| Audio Class request handler function pointer.
typedef struct CSL_AcLogicalUnit | CSL_AcLogicalUnit
| Audio Class Logical unit structure.
typedef struct CSL_AcObject | CSL_AcObject
| USB Audio Class Object structure.
typedef struct CSL_AcCtrlObject | CSL_AcCtrlObject
| USB AC Control Object structure.
typedef struct CSL_AcClassStruct | CSL_AcClassStruct
| AC Control Object structure.
typedef CSL_AcClassStruct * | pAcClassHandle
| Audio Class class handle.
## Enumerations
enum | CSL_AcRequestRet { CSL_AC_REQUEST_DONE = 0, CSL_AC_REQUEST_STALL, CSL_AC_REQUEST_SEND_ACK, CSL_AC_REQUEST_GET_ACK, CSL_AC_REQUEST_DATA_IN, CSL_AC_REQUEST_DATA_OUT }
| This Enum defines the Audio request return values.
enum | CSL_AcMediaStatus { CSL_AC_MEDIACCESS_OVERFLOW, CSL_AC_MEDIACCESS_SUCCESS, CSL_AC_MEDIACCESS_NOTPRESENT, CSL_AC_MEDIACCESS_WRITEPROTECT, CSL_AC_MEDIACCESS_BADMEDIA }
| This Enum defines the AC media access status. More...
enum | CSL_AcMediaLockStatus { CSL_AC_UNLOCK = 0, CSL_AC_LOCK }
| This Enum defines the AC media lock status. More...
enum | CSL_AcDescrId { CSL_AC_DEVICE_DESCR = 0, CSL_AC_DEVICE_QUAL_DESCR, CSL_AC_CONFIG_DESCR, CSL_AC_INTERFACE_DESCR, CSL_AC_STRING_LANGID_DESC }
| This Enum defines types of descriptors used by the USB audio class. More...
## Functions
CSL_Status | AC_Open (pAcAppClassHandle pAppClassHandle)
CSL_Status | AC_Close (pAcAppClassHandle pAppClassHandle)
CSL_Status | AC_Ctrl (void *pAcObj)
CSL_Status | AC_Iso (void *pAcObj)
Uint16 | AC_GetactivityFlagStatus (void *pAcObj)
Uint16 | AC_GetsuspendFlagStatus (void *pAcObj)
CSL_Status | AC_initDescriptors (void *pAcObj, Uint16 *descBuf, CSL_AcDescrId descrId, Uint16 descrLen)
static CSL_Status | AC_initAcVal (CSL_AcObject *pAcHandle)
CSL_AcRequestRet | AC_reqGetDescriptor (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
CSL_AcRequestRet | AC_reqSetCurrent (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
CSL_AcRequestRet | AC_reqGetCurrent (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
CSL_AcRequestRet | AC_reqGetMinimum (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
CSL_AcRequestRet | AC_reqGetMaximum (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
CSL_AcRequestRet | AC_reqGetResolution (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
CSL_AcRequestRet | AC_reqSetInterface (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)

## Detailed Description

USB Audio Class functional layer API header file.

Path: \(CSLPATH)\ inc