Initial commit: TXW82x FPV v2.7.0.7-42229 SDK + project sources
This commit is contained in:
181
sdk/include/dev/audio/components/alaw/aualaw.h
Normal file
181
sdk/include/dev/audio/components/alaw/aualaw.h
Normal file
@@ -0,0 +1,181 @@
|
||||
#ifndef _AUALAW_H
|
||||
#define _AUALAW_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief AUALAW irq_flag type
|
||||
*/
|
||||
enum aualaw_irq_flag {
|
||||
|
||||
/*!
|
||||
* @brief:
|
||||
*
|
||||
*/
|
||||
AUALAW_IRQ_FLAG_HALF = BIT(0),
|
||||
|
||||
/*!
|
||||
* @brief:
|
||||
*
|
||||
*/
|
||||
AUALAW_IRQ_FLAG_FULL = BIT(1),
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief AUALAW ioctl_cmd type
|
||||
*/
|
||||
enum aualaw_ioctl_cmd {
|
||||
|
||||
/*!
|
||||
* @brief:
|
||||
*
|
||||
*/
|
||||
AUALAW_IOCTL_CMD_NONE,
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* User interrupt handle */
|
||||
typedef void (*aualaw_irq_hdl)(uint32 irq, uint32 irq_data);
|
||||
|
||||
/* AUALAW api for user */
|
||||
|
||||
struct aualaw_device {
|
||||
struct dev_obj dev;
|
||||
};
|
||||
|
||||
struct aualaw_hal_ops {
|
||||
struct devobj_ops ops;
|
||||
int32(*open)(struct aualaw_device *aualaw);
|
||||
int32(*close)(struct aualaw_device *aualaw);
|
||||
int32(*encode)(struct aualaw_device *aualaw, void* dat_buf, uint32 bytes, void* result_buf);
|
||||
int32(*decode)(struct aualaw_device *aualaw, void* dat_buf, uint32 bytes, void* result_buf);
|
||||
int32(*ioctl)(struct aualaw_device *aualaw, enum aualaw_ioctl_cmd ioctl_cmd, uint32 param1, uint32 param2);
|
||||
int32(*request_irq)(struct aualaw_device *aualaw, enum aualaw_irq_flag irq_flag, aualaw_irq_hdl irq_hdl, uint32 irq_data);
|
||||
int32(*release_irq)(struct aualaw_device *aualaw, enum aualaw_irq_flag irq_flag);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* AUALAW API functions */
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief aualaw_open
|
||||
*
|
||||
*
|
||||
* @note .
|
||||
*
|
||||
* @param aualaw The address of aualaw device in the RTOS.
|
||||
* @param .
|
||||
* @param .
|
||||
*
|
||||
* @return
|
||||
* - RET_OK Success
|
||||
* - RET_ERR Fail
|
||||
*/
|
||||
int32 aualaw_open(struct aualaw_device *aualaw);
|
||||
|
||||
/**
|
||||
* @brief aualaw_close
|
||||
*
|
||||
*
|
||||
* @note .
|
||||
*
|
||||
* @param aualaw The address of aualaw device in the RTOS.
|
||||
* @param .
|
||||
* @param .
|
||||
*
|
||||
* @return
|
||||
* - RET_OK Success
|
||||
* - RET_ERR Fail
|
||||
*/
|
||||
int32 aualaw_close(struct aualaw_device *aualaw);
|
||||
|
||||
/**
|
||||
* @brief aualaw_encode
|
||||
*
|
||||
*
|
||||
* @note .
|
||||
*
|
||||
* @param aualaw The address of aualaw device in the RTOS.
|
||||
* @param .
|
||||
* @param .
|
||||
*
|
||||
* @return
|
||||
* - RET_OK Success
|
||||
* - RET_ERR Fail
|
||||
*/
|
||||
int32 aualaw_encode(struct aualaw_device *aualaw, void* dat_buf, uint32 bytes, void* result_buf);
|
||||
|
||||
/**
|
||||
* @brief aualaw_decode
|
||||
*
|
||||
*
|
||||
* @note .
|
||||
*
|
||||
* @param aualaw The address of aualaw device in the RTOS.
|
||||
* @param .
|
||||
* @param .
|
||||
*
|
||||
* @return
|
||||
* - RET_OK Success
|
||||
* - RET_ERR Fail
|
||||
*/
|
||||
int32 aualaw_decode(struct aualaw_device *aualaw, void* dat_buf, uint32 bytes, void* result_buf);
|
||||
|
||||
/**
|
||||
* @brief aualaw_ioctl
|
||||
*
|
||||
*
|
||||
* @note .
|
||||
*
|
||||
* @param aualaw The address of aualaw device in the RTOS.
|
||||
* @param .
|
||||
* @param .
|
||||
*
|
||||
* @return
|
||||
* - RET_OK Success
|
||||
* - RET_ERR Fail
|
||||
*/
|
||||
int32 aualaw_ioctl(struct aualaw_device *aualaw, enum aualaw_ioctl_cmd ioctl_cmd, uint32 param1, uint32 param2);
|
||||
|
||||
/**
|
||||
* @brief aualaw_request_irq
|
||||
*
|
||||
*
|
||||
* @note .
|
||||
*
|
||||
* @param aualaw The address of aualaw device in the RTOS.
|
||||
* @param .
|
||||
* @param .
|
||||
*
|
||||
* @return
|
||||
* - RET_OK Success
|
||||
* - RET_ERR Fail
|
||||
*/
|
||||
int32 aualaw_request_irq(struct aualaw_device *aualaw, enum aualaw_irq_flag irq_flag, aualaw_irq_hdl irq_hdl, uint32 irq_data);
|
||||
|
||||
/**
|
||||
* @brief aualaw_release_irq
|
||||
*
|
||||
*
|
||||
* @note .
|
||||
*
|
||||
* @param aualaw The address of aualaw device in the RTOS.
|
||||
* @param .
|
||||
* @param .
|
||||
*
|
||||
* @return
|
||||
* - RET_OK Success
|
||||
* - RET_ERR Fail
|
||||
*/
|
||||
int32 aualaw_release_irq(struct aualaw_device *aualaw, enum aualaw_irq_flag irq_flag);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
22
sdk/include/dev/audio/components/alaw/hg_aualaw_v0.h
Normal file
22
sdk/include/dev/audio/components/alaw/hg_aualaw_v0.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef _HG_AUALAW_V0_H_
|
||||
#define _HG_AUALAW_V0_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
int32 hg_aualaw_v0_init(void);
|
||||
int32 hg_aualaw_v0_open(struct aualaw_device *aualaw);
|
||||
int32 hg_aualaw_v0_close(struct aualaw_device *aualaw);
|
||||
int32 hg_aualaw_v0_encode(struct aualaw_device *aualaw, void* dat_buf, uint32 bytes, void* result_buf);
|
||||
int32 hg_aualaw_v0_decode(struct aualaw_device *aualaw, void* dat_buf, uint32 bytes, void* result_buf);
|
||||
int32 hg_aualaw_v0_ioctl(struct aualaw_device *aualaw, enum aualaw_ioctl_cmd ioctl_cmd, uint32 param1, uint32 param2);
|
||||
int32 hg_aualaw_v0_request_irq(struct aualaw_device *aualaw, enum aualaw_irq_flag irq_flag, aualaw_irq_hdl irq_hdl, uint32 irq_data);
|
||||
int32 hg_aualaw_v0_release_irq(struct aualaw_device *aualaw, enum aualaw_irq_flag irq_flag);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _HGI2S_V0_H_ */
|
||||
Reference in New Issue
Block a user