- Main Page
- Modules
- Data Structures
- Files

Functions
USB AC Functions
AC

## 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)
static CSL_AcRequestRet | AC_reqUnknown (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
static fpAC_REQ_HANDLER | AC_lookupReqHandler (Uint16 request, CSL_AcRequestStruct *pUSB_ReqTable)
static CSL_AcRequestRet | AC_reqSetAddress (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
static CSL_AcRequestRet | AC_reqSetConfiguration (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
static CSL_AcRequestRet | AC_reqClearFeature (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
static CSL_AcRequestRet | AC_reqGetStatus (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
static CSL_AcRequestRet | AC_reqSetFeature (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
static CSL_AcRequestRet | AC_reqGetConfiguration (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
static CSL_AcRequestRet | AC_reqGetMaxLUN (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)
static CSL_AcRequestRet | AC_reqGetInterface (CSL_UsbDevNum devNum, CSL_UsbSetupStruct *usbSetup, pUsbEpHandle hInEp, pUsbEpHandle hOutEp, void *pAcObj)

## Function Documentation

CSL_Status AC_Close | ( | pAcAppClassHandle | pAppClassHandle | ) |

============================================================================
AC_Close

Description
This function Closes the audio class module.

Arguments

                pAppClassHandle       Application handle to the Audio Class Obj

Return Value CSL_Status

- CSL_SOK - Returned for success
- CSL_ESYS_BADHANDLE - Invalid Audio class handle

Pre Condition
AC_Open function should be called successfully

Post Condition
Closes the Audio Class module

Modifies
Ac and Ctl handles

Example

    			CSL_AcInitStructApp    acAppHandle;
    			pAcAppClassHandle      pAppClassHandle;
    			Uint16                 acAppBuffer[420];
    			CSL_Status             status;

    			pAppClassHandle = &acAppHandle;

    			// Assign values to all the members in acAppHandle struct
    			acAppHandle.pAcObj = &acAppBuffer[0];
    			.....
    			.....
    			status = AC_Open(pAppClassHandle);
    			....
    			....
    			status = AC_Close(pAppClassHandle);

============================================================================

References CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::devNum, CSL_AcInitStructApp::pAcObj, and USB_disconnectDev().

CSL_Status AC_Ctrl | ( | void * | pAcObj | ) |

============================================================================
AC_Ctrl

Description
This function handles all USB traffic on the Control Endpoint. Detects the events on the Control Endpoint and takes the appropriate action

Arguments

                pAcObj        Handle to the Audio Class Obj

Return Value CSL_Status

- CSL_SOK - Returned for success
- CSL_ESYS_BADHANDLE - Invalid Audio class handle
- CSL_AC_INVALID_REQUEST_HANDLER - Invalid request class handler

Pre Condition
AC_Open function should be called successfully

Post Condition
Control end point events are serviced

Modifies
USB Registers.

Example

    			CSL_AcInitStructApp    acAppHandle;
    			pAcAppClassHandle      pAppClassHandle;
    			Uint16                 acAppBuffer[420];
    			CSL_Status             status;

    			pAppClassHandle = &acAppHandle;

    			// Assign values to all the members in acAppHandle struct
    			acAppHandle.pAcObj = &acAppBuffer[0];
    			.....
    			.....
    			status = AC_Open(pAppClassHandle);
    			....
    			....
                status = AC_Ctrl(pAppClassHandle->pAcObj);

============================================================================

References AC_lookupReqHandler(), AC_reqUnknown(), CSL_AcCtrlObject::acReqTable, CSL_UsbSetupStruct::bmRequestType, CSL_UsbSetupStruct::bRequest, CSL_AC_8BIT_SHIFT, CSL_AC_INVALID_REQUEST_HANDLER, CSL_USB_EVENT_RESET, CSL_USB_EVENT_RESUME, CSL_USB_EVENT_SETUP, CSL_USB_EVENT_SUSPEND, CSL_USB_IOFLAG_NONE, CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::ctrlInEpObj, CSL_AcCtrlObject::ctrlOutEpObj, CSL_AcCtrlObject::curConfigStat, CSL_AcCtrlObject::devNum, CSL_AcCtrlObject::fpRequestHandler, CSL_AcCtrlObject::hEpObjArray, CSL_UsbSetupStruct::newPacket, CSL_AcCtrlObject::suspendFlag, USB_abortAllTransaction(), USB_getEvents(), USB_getSetupPacket(), USB_postTransaction(), USB_setParams(), USB_stallEndpt(), and CSL_AcCtrlObject::usbSetup.

Uint16 AC_GetactivityFlagStatus | ( | void * | pAcObj | ) |

============================================================================
AC_GetactivityFlagStatus

Description
This function gives the status of the activity Flag

Arguments

                pAcObj        Handle to the Audio Class Obj

Return Value - Status of the activity flag

- '1' - If the activity is present
- '0' - If the activity is not present

Pre Condition
AC_Open function should be called successfully

Post Condition
Returns Activity flag status

Modifies
None

Example

    			Uint16                 activityFlagStat;
    			CSL_AcInitStructApp    acAppHandle;
    			pAcAppClassHandle      pAppClassHandle;
    			Uint16                 acAppBuffer[420];
    			CSL_Status             status;

    			pAppClassHandle = &acAppHandle;

    			// Assign values to all the members in acAppHandle struct
    			acAppHandle.pAcObj = &acAppBuffer[0];
    			.....
    			.....
    			status = AC_Open(pAppClassHandle);
    			....
    			....
    			activityFlagStat = AC_GetactivityFlagStatus(pAppClassHandle->pAcObj);

============================================================================

References CSL_AcClassStruct::acHandle, and CSL_AcObject::activityPresentFlag.

Uint16 AC_GetsuspendFlagStatus | ( | void * | pAcObj | ) |

============================================================================
AC_GetsuspendFlagStatus

Description
This function gives the status of the suspend Flag

Arguments

                pAcObj        Handle to the Audio Class Obj

Return Value - Status of the suspend flag

- '1' - If the device is suspended
- '0' - If the device is not suspended

Pre Condition
AC_Open function should be called successfully

Post Condition
Returns suspend flag status

Modifies
None

Example

    			Uint16                 suspendFlagStat;
    			CSL_AcInitStructApp    acAppHandle;
    			pAcAppClassHandle      pAppClassHandle;
    			Uint16                 acAppBuffer[420];
    			CSL_Status             status;

    			pAppClassHandle = &acAppHandle;

    			// Assign values to all the members in acAppHandle struct
    			acAppHandle.pAcObj = &acAppBuffer[0];
    			.....
    			.....
    			status = AC_Open(pAppClassHandle);
    			....
    			....
    			suspendFlagStat = AC_GetsuspendFlagStatus(pAppClassHandle->pAcObj);

============================================================================

References CSL_AcClassStruct::ctrlHandle, and CSL_AcCtrlObject::suspendFlag.

static CSL_Status AC_initAcVal | ( | CSL_AcObject * | pAcHandle | ) | `[static]`

============================================================================
AC_initAcVal

Description
This function initializes the Audio Class object

Arguments

                pAcHandle        Handle to the Audio class Object

Return Value CSL_Status

- CSL_SOK - Returned for success
- CSL_ESYS_BADHANDLE - Invalid Audio class handle

Pre Condition
None

Post Condition
Initializes Audio Class object

Modifies
Audio Class object structure

Example

                CSL_AcObject    acObj;
                CSL_Status      status;

                status = AC_initAcVal(&acObj);

============================================================================

CSL_Status AC_initDescriptors | ( | void * | pAcObj,
|  | Uint16 * | descBuf,
|  | CSL_AcDescrId | descrId,
|  | Uint16 | descrLen
| ) |  |

============================================================================
AC_initDescriptors

Description
This function initializes the descriptors used by the USB audio class

Arguments

    		    pAcObj      Audio Class object
    		    descBuf     Descriptor buffer pointer
                descrId     Id of the Descriptor to initialize
                descrLen    Length of the descriptor to initialize (in bytes)

Return Value CSL_Status

- CSL_SOK - Returned for success
- CSL_ESYS_BADHANDLE - Invalid Ctrl handle
- CSL_ESYS_INVPARAMS - Invalid parameter

Pre Condition
None

Post Condition
Initializes descriptors

Modifies
Descriptor buffers

Example

    			CSL_AcInitStructApp    acAppHandle;
    			pAcAppClassHandle      pAppClassHandle;
    			Uint16                 acAppBuffer[420];
    			CSL_Status             status;

    			pAppClassHandle = &acAppHandle;

    			// Assign values to all the members in acAppHandle struct
    			acAppHandle.pAcObj = &acAppBuffer[0];

    			status = AC_initDescriptors(pAppClassHandle->pAcObj,
    			                            CSL_AC_DEVICE_DESCR, 18);

============================================================================

References CSL_AcCtrlObject::audioClassIntDescr, CSL_AcCtrlObject::confDescr, CSL_AC_CONFIG_DESCR, CSL_AC_CONFIG_DESCR_MAX_LEN, CSL_AC_DEV_QUAL_DESCR_MAX_LEN, CSL_AC_DEVICE_DESCR, CSL_AC_DEVICE_DESCR_MAX_LEN, CSL_AC_DEVICE_QUAL_DESCR, CSL_AC_INTER_DESCR_MAX_LEN, CSL_AC_INTERFACE_DESCR, CSL_AC_STRING_DESCR_LANGID_MAX_LEN, CSL_AC_STRING_LANGID_DESC, CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::deviceDescr, CSL_AcCtrlObject::deviceQualifierDescr, and CSL_AcCtrlObject::stringDescrLangid.

CSL_Status AC_Iso | ( | void * | pAcObj | ) |

============================================================================
AC_Iso

Description
This function handles all UBS traffic on the Isochronous Endpoint This maintains the state of the Audio class application. Provides Media Access Data to the low level USB module for transfer.

Arguments

                pAcObj        Handle to the Audio Class Obj

Return Value CSL_Status

- CSL_SOK - Returned for success
- CSL_ESYS_BADHANDLE - Invalid Audio class handle
- CSL_ESYS_INVPARAMS - Returned for invalid parameters

Pre Condition
AC_Open function should be called successfully

Post Condition
Transfers data on iso end points

Modifies
USB data buffeters

Example

    			CSL_AcInitStructApp    acAppHandle;
    			pAcAppClassHandle      pAppClassHandle;
    			Uint16                 acAppBuffer[420];
    			CSL_Status             status;

    			pAppClassHandle = &acAppHandle;

    			// Assign values to all the members in acAppHandle struct
    			acAppHandle.pAcObj = &acAppBuffer[0];
    			.....
    			.....
    			status = AC_Open(pAppClassHandle);
    			....
    			....
    			status = AC_Iso(pAppClassHandle->pAcObj);

============================================================================

References CSL_AcClassStruct::acHandle, CSL_USB_EVENT_ISO_RX, CSL_USB_EVENT_WRITE_MEDIA, CSL_USB_IOFLAG_NOSHORT, CSL_AcObject::isoOutEpObj, CSL_AcObject::lbaBuffer, CSL_UsbEpObj::maxPktSiz, CSL_AcObject::playAudio, CSL_AcObject::playBackActive, USB_getEvents(), and USB_postTransaction().

static fpAC_REQ_HANDLER AC_lookupReqHandler | ( | Uint16 | request,
|  | CSL_AcRequestStruct * | pUSB_ReqTable
| ) |  | `[inline, static]`

============================================================================
AC_lookupReqHandler

Description
This functions maps the request sent by host to the Ac request table and returns the correspending request handler address

Arguments

                request        -  Request sent by the host
                pUSB_ReqTable  -  Request table structure pointer

Return Value
Request handler pointer

Pre Condition
Request table should be initialized and AC_Open function should be called successfully

Post Condition
Returns the request handler pointer

Modifies
None

Example

                 CSL_AcRequestRet       (*fpRequestHandler)(CSL_AC_REQUEST_ARGS)
                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

============================================================================

References AC_reqUnknown(), and CSL_AcRequestStruct::fpRequestHandler.

Referenced by AC_Ctrl().

CSL_Status AC_Open | ( | pAcAppClassHandle | pAppClassHandle | ) |

============================================================================
AC_Open

Description
This function Opens the Audio class module. It initializes Ac and Ctrl handles with the data given by the application

Arguments

    		    pAppClassHandle      Application handle to the Audio Class Obj

Return Value CSL_Status

- CSL_SOK - Returned for success
- CSL_ESYS_BADHANDLE - Invalid Audio class handle

Pre Condition
None

Post Condition
Initializes Ac and Ctrl handles

Modifies
Ac and Ctrl handle data

Example

    			CSL_AcInitStructApp    acAppHandle;
    			pAcAppClassHandle      pAppClassHandle;
    			Uint16                 acAppBuffer[420];
    			CSL_Status             status;

    			pAppClassHandle = &acAppHandle;

    			// Assign values to all the members in acAppHandle struct
    			acAppHandle.pAcObj = &acAppBuffer[0];
    			.....
    			.....
    			status = AC_Open(pAppClassHandle);

============================================================================

References AC_initAcVal(), CSL_AcClassStruct::acHandle, CSL_AcCtrlObject::acReqTable, CSL_AcInitStructApp::acReqTableApp, CSL_USB_CTRL, CSL_USB_EP0_PACKET_SIZE, CSL_USB_EVENT_EOT, CSL_USB_EVENT_RESET, CSL_USB_EVENT_RESUME, CSL_USB_EVENT_SETUP, CSL_USB_EVENT_SUSPEND, CSL_USB_IN_EP0, CSL_USB_ISO, CSL_USB_OUT_EP0, CSL_USB_OUT_EP2, CSL_AcClassStruct::ctrlHandle, CSL_AcInitStructApp::ctrlHandler, CSL_AcCtrlObject::ctrlInEpObj, CSL_AcCtrlObject::ctrlOutEpObj, CSL_AcCtrlObject::curConfigStat, CSL_AcCtrlObject::deviceDescr, CSL_AcCtrlObject::devNum, CSL_AcCtrlObject::getMaxBuffer, CSL_AcObject::getMediaSize, CSL_AcInitStructApp::getMediaSizeApp, CSL_AcCtrlObject::getMinBuffer, CSL_AcCtrlObject::getResBuffer, CSL_AcCtrlObject::hEpObjArray, CSL_AcInitStructApp::isoHandler, CSL_AcObject::isoInEpObj, CSL_AcObject::isoOutEpObj, CSL_AcObject::lbaBuffer, CSL_AcInitStructApp::lbaBufferApp, CSL_AcObject::mediaEject, CSL_AcInitStructApp::mediaEjectApp, CSL_AcObject::mediaGetPresentState, CSL_AcInitStructApp::mediaGetPresentStateApp, CSL_AcObject::mediaInit, CSL_AcInitStructApp::mediaInitApp, CSL_AcObject::mediaInitDone, CSL_AcObject::mediaLockUnit, CSL_AcInitStructApp::mediaLockUnitApp, CSL_AcObject::noOfLun, CSL_AcInitStructApp::numLun, CSL_AcInitStructApp::pAcObj, CSL_AcInitStructApp::pId, CSL_AcObject::playAudio, CSL_AcInitStructApp::playAudioApp, CSL_AcObject::playBackActive, CSL_AcObject::recordAudio, CSL_AcInitStructApp::recordAudioApp, CSL_AcInitStructApp::rxPktSize, CSL_AcObject::stopAudio, CSL_AcInitStructApp::stopAudioApp, CSL_AcCtrlObject::strDescr, CSL_AcInitStructApp::strDescrApp, CSL_AcCtrlObject::stringDescrLangid, CSL_AcCtrlObject::suspendFlag, USB_connectDev(), USB_initEndptObj(), USB_setParams(), and CSL_AcInitStructApp::vId.

static CSL_AcRequestRet AC_reqClearFeature | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  | `[inline, static]`

============================================================================
AC_reqClearFeature

Description
This function handles the request to clear the feature set

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_SEND_ACK - Send acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Clears the feature

Modifies
USB registers

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_AC_8BIT_MASK, CSL_USB_FEATURE_ENDPOINT_STALL, CSL_USB_FEATURE_REMOTE_WAKEUP, USB_clearEndptStall(), USB_epNumToHandle(), USB_setRemoteWakeup(), CSL_UsbSetupStruct::wIndex, and CSL_UsbSetupStruct::wValue.

static CSL_AcRequestRet AC_reqGetConfiguration | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  | `[inline, static]`

============================================================================
AC_reqGetConfiguration

Description
This function handles the request from host to get configuration

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends the configuration

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_USB_IOFLAG_NONE, CSL_USB_IOFLAG_NOSHORT, CSL_AcCtrlObject::ctrlBuffer, CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::curConfigStat, and USB_postTransaction().

CSL_AcRequestRet AC_reqGetCurrent | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  |

============================================================================
AC_reqGetCurrent

Description
This function handles the request from host to get current

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends requested current value

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_AC_8BIT_MASK, CSL_AC_8BIT_SHIFT, CSL_USB_IOFLAG_NONE, CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::leftRightVolBuf, CSL_AcCtrlObject::leftVolBuf, CSL_AcCtrlObject::muteCtrlBuf, CSL_AcCtrlObject::rightVolBuf, USB_AC_FEATURE_UNIT_LEFT_RIGHT_VOLUME, USB_AC_FEATURE_UNIT_LEFT_VOLUME, USB_AC_FEATURE_UNIT_MUTE_CTRL, USB_AC_FEATURE_UNIT_RIGHT_VOLUME, USB_AC_FEATURE_UNIT_VOLUME_CTRL, USB_postTransaction(), CSL_UsbSetupStruct::wLength, and CSL_UsbSetupStruct::wValue.

CSL_AcRequestRet AC_reqGetDescriptor | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  |

============================================================================
AC_reqGetDescriptor

Description
This function handles the request from host to get the descriptor

Arguments

                CSL_AC_REQUEST_ARGS    - AC request arguments

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request\
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends the descriptor

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAC);

============================================================================

References CSL_AcCtrlObject::confDescr, CSL_AC_8BIT_MASK, CSL_AC_8BIT_SHIFT, CSL_AC_UNICODE_SIZE, CSL_USB_CONFIGURATION_DESCRIPTOR_TYPE, CSL_USB_DEVICE_DESCRIPTOR_TYPE, CSL_USB_DEVICE_QUAL_DESCRIPTOR_TYPE, CSL_USB_IOFLAG_CAT, CSL_USB_IOFLAG_LNK, CSL_USB_IOFLAG_NONE, CSL_USB_IOFLAG_NOSHORT, CSL_USB_STRING_DESCRIPTOR_TYPE, CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::deviceDescr, CSL_AcCtrlObject::deviceQualifierDescr, CSL_AcCtrlObject::strDescr, CSL_AcCtrlObject::stringDescrLangid, USB_postTransaction(), CSL_UsbSetupStruct::wLength, and CSL_UsbSetupStruct::wValue.

static CSL_AcRequestRet AC_reqGetInterface | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  | `[inline, static]`

============================================================================
AC_reqGetInterface

Description
This function handles the request from host to get interafce unit number

Arguments

                 devNum       - USB device number
                 usbSetup     - USb setup structure
                 hInEp        - USB ISO In end point handle
                 hOutEp       - USB ISO Out end point object
                 pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request\
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends interface info

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_USB_IOFLAG_NONE, CSL_AcCtrlObject::ctrlBuffer, CSL_AcClassStruct::ctrlHandle, USB_postTransaction(), and CSL_UsbSetupStruct::wIndex.

CSL_AcRequestRet AC_reqGetMaximum | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  |

============================================================================
AC_reqGetMaximum

Description
This function handles the get maximum request from host

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends requested maximum value

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_USB_IOFLAG_NONE, CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::getMaxBuffer, USB_postTransaction(), and CSL_UsbSetupStruct::wLength.

static CSL_AcRequestRet AC_reqGetMaxLUN | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  | `[inline, static]`

============================================================================
AC_reqGetMaxLUN

Description
This function handles the request from host to send maximum logical unit number

Arguments

                 devNum       - USB device number
                 usbSetup     - USb setup structure
                 hInEp        - USB ISO In end point handle
                 hOutEp       - USB ISO Out end point object
                 pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request\
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends the max lun number

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_AcClassStruct::acHandle, CSL_USB_IOFLAG_NONE, CSL_AcCtrlObject::ctrlBuffer, CSL_AcClassStruct::ctrlHandle, CSL_AcObject::noOfLun, and USB_postTransaction().

CSL_AcRequestRet AC_reqGetMinimum | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  |

============================================================================
AC_reqGetMinimum

Description
This function handles the get minimum request from host

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends requested minimum value

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_USB_IOFLAG_NONE, CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::getMinBuffer, USB_postTransaction(), and CSL_UsbSetupStruct::wLength.

CSL_AcRequestRet AC_reqGetResolution | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  |

============================================================================
AC_reqGetResolution

Description
This function handles the get resolution request from host

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends requested resolution value

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_USB_IOFLAG_NONE, CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::getResBuffer, USB_postTransaction(), and CSL_UsbSetupStruct::wLength.

static CSL_AcRequestRet AC_reqGetStatus | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  | `[inline, static]`

============================================================================
AC_reqGetStatus

Description
This function handles the get status request from host

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends the status

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_UsbSetupStruct::bmRequestType, CSL_AC_CURRDEV_STAT, CSL_AC_REQUEST_TYPE_BASE, CSL_AC_REQUEST_TYPE_DEVICE_STATUS, CSL_AC_REQUEST_TYPE_EP_STATUS, CSL_AC_REQUEST_TYPE_INTERFACE_STATUS, CSL_USB_IOFLAG_NONE, CSL_AcCtrlObject::ctrlBuffer, CSL_AcClassStruct::ctrlHandle, USB_epNumToHandle(), USB_getEndptStall(), USB_getRemoteWakeupStat(), USB_postTransaction(), and CSL_UsbSetupStruct::wIndex.

static CSL_AcRequestRet AC_reqSetAddress | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  | `[inline, static]`

============================================================================
AC_reqSetAddress

Description
This function handles the request to set the device address

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_DONE - Request hadled successfully

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sets the device address

Modifies
USB FADDR_POWER register

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References USB_setDevAddr(), and CSL_UsbSetupStruct::wValue.

static CSL_AcRequestRet AC_reqSetConfiguration | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  | `[inline, static]`

============================================================================
AC_reqSetConfiguration

Description
This function handles the request to set the device configuration

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_SEND_ACK - Send acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sets the configuration

Modifies
USB registers

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::curConfigStat, USB_setConfiguration(), and CSL_UsbSetupStruct::wValue.

CSL_AcRequestRet AC_reqSetCurrent | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  |

============================================================================
AC_reqSetCurrent

Description
This function handles the request from host to set current

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_SEND_ACK - Send acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends acknowledgement

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_AC_8BIT_MASK, CSL_AC_8BIT_SHIFT, CSL_USB_IOFLAG_NONE, CSL_AcClassStruct::ctrlHandle, CSL_AcCtrlObject::leftRightVolBuf, CSL_AcCtrlObject::leftVolBuf, CSL_AcCtrlObject::muteCtrlBuf, CSL_AcCtrlObject::rightVolBuf, USB_AC_FEATURE_UNIT_LEFT_RIGHT_VOLUME, USB_AC_FEATURE_UNIT_LEFT_VOLUME, USB_AC_FEATURE_UNIT_MUTE_CTRL, USB_AC_FEATURE_UNIT_RIGHT_VOLUME, USB_AC_FEATURE_UNIT_VOLUME_CTRL, USB_postTransaction(), CSL_UsbSetupStruct::wLength, and CSL_UsbSetupStruct::wValue.

static CSL_AcRequestRet AC_reqSetFeature | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  | `[inline, static]`

============================================================================
AC_reqSetFeature

Description
This function handles the request from host to set feature

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_GET_ACK - Get acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sets the feature

Modifies
USB regiters

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_AC_8BIT_MASK, CSL_USB_FEATURE_ENDPOINT_STALL, CSL_USB_FEATURE_REMOTE_WAKEUP, USB_epNumToHandle(), USB_setRemoteWakeup(), USB_stallEndpt(), CSL_UsbSetupStruct::wIndex, and CSL_UsbSetupStruct::wValue.

CSL_AcRequestRet AC_reqSetInterface | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  |

============================================================================
AC_reqSetInterface

Description
This function handles the request from host to set interafce unit number

Arguments

                 devNum       - USB device number
                 usbSetup     - USb setup structure
                 hInEp        - USB ISO In end point handle
                 hOutEp       - USB ISO Out end point object
                 pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_SEND_ACK - Send acknowledgement for request
- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends acknowledgement

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

References CSL_AcClassStruct::acHandle, CSL_AC_MEDIACCESS_SUCCESS, CSL_AcObject::mediaInit, CSL_AcObject::mediaInitDone, CSL_AcObject::playBackActive, CSL_AcObject::stopAudio, CSL_UsbSetupStruct::wIndex, and CSL_UsbSetupStruct::wValue.

static CSL_AcRequestRet AC_reqUnknown | ( | CSL_UsbDevNum | devNum,
|  | CSL_UsbSetupStruct * | usbSetup,
|  | pUsbEpHandle | hInEp,
|  | pUsbEpHandle | hOutEp,
|  | void * | pAcObj
| ) |  | `[inline, static]`

============================================================================
AC_reqUnknown

Description
This function handles the case where the request sent by the host is unknown unit number

Arguments

                devNum       - USB device number
                usbSetup     - USb setup structure
                hInEp        - USB ISO In end point handle
                hOutEp       - USB ISO Out end point object
                pAcObj       - USB Audio Class object

Return Value

- CSL_AC_REQUEST_STALL - Request stall signal (Error)

Pre Condition
AC_lookupReqHandler should be called successfully

Post Condition
Sends acknowledgement

Modifies
None

Example

                 CSL_AcInitStructApp    acAppHandle;
                 CSL_AcObject           *pAcHandle;
                 CSL_AcCtrlObject       *pCtrlHandle;
                 pUsbEpHandle           hUbOutEp;
                 Uint16                 lunNum;
                 Uint16                 acAppBuffer[420];
                 CSL_Status             status;
                 Uint16                 request;

                 // Assign values to all the members in acAppHandle struct
                 acAppHandle.pAcObj = &acAppBuffer[0];
                 .....
                 .....
                 status = AC_Open(&acAppHandle);
                 ....
                 ....
                 pCtrlHandle->fpRequestHandler = AC_lookupReqHandler(request,
                                                           pCtrlHandle->acReqTable);

                 pCtrlHandle->fpRequestHandler(pCtrlHandle->devNum,
                                               &pCtrlHandle->usbSetup,hCtrlEpIn,hCtrlEpOut,pAcObj);

============================================================================

Referenced by AC_Ctrl(), and AC_lookupReqHandler().