You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd.. 2019-2020. All rights reserved.
|
|
* Description: amp common device api header file
|
|
* Author: audio
|
|
* Create: 2019-12-30
|
|
*/
|
|
|
|
#ifndef __DRV_AMP_COMMON_H__
|
|
#define __DRV_AMP_COMMON_H__
|
|
|
|
#include "td_type.h"
|
|
#include "drv_amp_platform.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
#define ENDTBL_FLAG 0xffff
|
|
#define GPIO_INVALID 0xff
|
|
#define AMP_REG_SIZE_MAX 20
|
|
|
|
#define DELAY_05_MS 5
|
|
#define DELAY_10_MS 10
|
|
#define DELAY_20_MS 20
|
|
#define DELAY_50_MS 50
|
|
|
|
typedef struct {
|
|
td_u16 addr;
|
|
td_u8 size;
|
|
td_u8 reg[AMP_REG_SIZE_MAX];
|
|
td_u8 delay_ms;
|
|
} drv_amp_reg_map;
|
|
|
|
td_void drv_amp_dev_hw_mute(const amp_platform_device *dev, td_bool mute);
|
|
td_void drv_amp_dev_hw_reset(const amp_platform_device *dev, td_bool reset);
|
|
td_void drv_amp_dev_write_reg_map(const amp_platform_device *dev,
|
|
drv_amp_reg_map *reg_map);
|
|
td_void drv_amp_dev_dump_reg_map(const amp_platform_device *dev, td_void *file,
|
|
const drv_amp_reg_map *reg_map);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __DRV_AMP_COMMON_H__ */
|