/******************************************************************************
*
*  System Name : ARM USB Audio Class Library
*  File Name   : usb0_haudio_rza1.h
*  Contents    : Definitions for USB Mass Storage Class Driver
*  Version     : 0.00.01
*  Device      : ARM
*  Tool-Chain  :
*  OS          :
*
*  Note        :
*
*  Copyright (C) 2014 Renesas Electronics Corporation and
*  Renesas Solutions Corp. All rights reserved.
*
*  History     : Feb.12,2014 Ver..00.01
******************************************************************************/
#ifndef __USB0_HAUDIO_RZA1_H__
#define __USB0_HAUDIO_RZA1_H__


/*******************************************************************************
Includes   <System Includes> , "Project Includes"
*******************************************************************************/


/*******************************************************************************
Macro definitions
*******************************************************************************/


/*******************************************************************************
Typedef definitions
*******************************************************************************/


/*******************************************************************************
Variable Externs
*******************************************************************************/


/*******************************************************************************
Functions Prototypes
*******************************************************************************/
void        usb0_api_haudio_registration(uint16_t device_address, USB_HAUDIO_REGIST_t *regist);
int32_t     usb0_api_haudio_open(uint16_t devadr, uint16_t *config, uint16_t set_config_flag, uint16_t speed);
int32_t     usb0_api_haudio_close(uint16_t devadr);

/* Stream In Link API            */
int32_t     usb0_api_haudio_stream_in_start_link( uint16_t devadr,
                                                  uint32_t sample_rate,
                                                  uint8_t *buf_adr,
                                                  uint32_t buf_size     );
int32_t     usb0_api_haudio_stream_in_stop_link(  uint16_t devadr);
int32_t     usb0_api_haudio_stream_in_link( uint16_t devadr );
int32_t     usb0_api_haudio_stream_in_wait_link(  uint16_t devadr, int32_t index );

/* Stream In API            */
int32_t     usb0_api_haudio_stream_in_check_sample_rate( uint16_t devadr,
                                                         uint32_t sample_rate  );
int32_t     usb0_api_haudio_stream_in_start( uint16_t devadr, uint32_t sample_rate );
int32_t     usb0_api_haudio_stream_in_stop(uint16_t devadr);
int32_t     usb0_api_haudio_stream_in( uint16_t devadr,
                                       uint8_t *buf_adr,
                                       uint32_t buf_size,
                                       uint8_t *reload_buf_adr,
                                       uint32_t reload_buf_size );
int32_t usb0_api_haudio_stream_in_wait( uint16_t devadr, uint32_t *real_size,
                                        uint8_t *reload_buff, uint32_t reload_size );

/* Stream Out API            */
int32_t     usb0_api_haudio_stream_out_check_sample_rate( uint16_t devadr,
                                                          uint32_t sample_rate  );
int32_t     usb0_api_haudio_stream_out_start_link( uint16_t devadr,
                                                   uint32_t sample_rate,
                                                   uint8_t *buf_adr,
                                                   uint32_t buf_size,
                                                   uint32_t *output_format     );
int32_t     usb0_api_haudio_stream_out_stop_link( uint16_t devadr);
int32_t     usb0_api_haudio_stream_out_link( uint16_t devadr );
int32_t     usb0_api_haudio_stream_out_wait_link( uint16_t devadr, int32_t index );

/* Audio Control API        */
int32_t     usb0_api_haudio_control_GetCur(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                           uint8_t *buff, uint16_t size                       );
int32_t     usb0_api_haudio_control_GetCur_20(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                           uint8_t *buff, uint16_t size                       );
int32_t     usb0_api_haudio_control_GetMin(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                           uint8_t *buff, uint16_t size                       );
int32_t     usb0_api_haudio_control_GetMax(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                           uint8_t *buff, uint16_t size                       );
int32_t     usb0_api_haudio_control_GetRes(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                           uint8_t *buff, uint16_t size                       );
int32_t     usb0_api_haudio_control_SetCur(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                           uint8_t *buff, uint16_t size                       );
int32_t     usb0_api_haudio_control_SetMin(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                           uint8_t *buff, uint16_t size                       );
int32_t     usb0_api_haudio_control_SetMax(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                           uint8_t *buff, uint16_t size                       );
int32_t     usb0_api_haudio_control_SetRes(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                           uint8_t *buff, uint16_t size                       );

/* Audio Stream Control API        */
int32_t     usb0_api_haudio_stream_GetCur(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                          uint8_t *buff, uint16_t size                        );
int32_t     usb0_api_haudio_stream_GetMin(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                          uint8_t *buff, uint16_t size                        );
int32_t     usb0_api_haudio_stream_GetMax(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                          uint8_t *buff, uint16_t size                        );
int32_t     usb0_api_haudio_stream_GetRes(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                          uint8_t *buff, uint16_t size                        );
int32_t     usb0_api_haudio_stream_SetCur(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                          uint8_t *buff, uint16_t size                        );
int32_t     usb0_api_haudio_stream_SetMin(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                          uint8_t *buff, uint16_t size                        );
int32_t     usb0_api_haudio_stream_SetMax(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                          uint8_t *buff, uint16_t size                        );
int32_t     usb0_api_haudio_stream_SetRes(uint16_t devadr, uint16_t wValue, uint16_t wIndex,
                                          uint8_t *buff, uint16_t size                        );
int32_t     usb0_api_haudio_request(uint16_t device_address, uint16_t *ReqTable, uint8_t *buffer);

#endif /* __USB0_HAUDIO_RZA1_H__ */

/* End of file */
