linux/sound/soc/codecs/aw88395/aw88395_device.h

// SPDX-License-Identifier: GPL-2.0-only
//
// aw88395_device.h --  AW88395 function for ALSA Audio Driver
//
// Copyright (c) 2022-2023 AWINIC Technology CO., LTD
//
// Author: Bruce zhao <[email protected]>
//

#ifndef __AW88395_DEVICE_FILE_H__
#define __AW88395_DEVICE_FILE_H__

#include "aw88395.h"
#include "aw88395_data_type.h"
#include "aw88395_lib.h"

#define AW88395_DEV_DEFAULT_CH
#define AW88395_DEV_DSP_CHECK_MAX
#define AW88395_DSP_I2C_WRITES
#define AW88395_MAX_RAM_WRITE_BYTE_SIZE
#define AW88395_DSP_ODD_NUM_BIT_TEST
#define AW88395_DSP_EVEN_NUM_BIT_TEST
#define AW88395_DSP_ST_CHECK_MAX
#define AW88395_FADE_IN_OUT_DEFAULT
#define AW88395_CALI_RE_MAX
#define AW88395_CALI_RE_MIN
#define AW88395_CALI_DELAY_CACL(value)

#define AW88395_DSP_RE_TO_SHOW_RE(re, shift)
#define AW88395_SHOW_RE_TO_DSP_RE(re, shift)

#define AW88395_ACF_FILE
#define AW88395_DEV_SYSST_CHECK_MAX

enum {};

enum {};

enum {};

enum {};

enum {};

enum {};


enum AW88395_DEV_STATUS {};

enum AW88395_DEV_FW_STATUS {};

enum AW88395_DEV_MEMCLK {};

enum AW88395_DEV_DSP_CFG {};

enum {};

enum {};

struct aw_profctrl_desc {};

struct aw_volume_desc {};

struct aw_dsp_mem_desc {};

struct aw_vmax_desc {};

struct aw_cali_delay_desc {};

struct aw_cali_desc {};

struct aw_container {};

struct aw_device {};

int aw88395_init(struct aw_device **aw_dev, struct i2c_client *i2c, struct regmap *regmap);
int aw88395_dev_init(struct aw_device *aw_dev, struct aw_container *aw_cfg);
int aw88395_dev_start(struct aw_device *aw_dev);
int aw88395_dev_stop(struct aw_device *aw_dev);
int aw88395_dev_fw_update(struct aw_device *aw_dev, bool up_dsp_fw_en, bool force_up_en);

void aw88395_dev_set_volume(struct aw_device *aw_dev, unsigned short set_vol);
int aw88395_dev_get_prof_data(struct aw_device *aw_dev, int index,
			struct aw_prof_desc **prof_desc);
int aw88395_dev_get_prof_name(struct aw_device *aw_dev, int index, char **prof_name);
int aw88395_dev_set_profile_index(struct aw_device *aw_dev, int index);
int aw88395_dev_get_profile_index(struct aw_device *aw_dev);
int aw88395_dev_get_profile_count(struct aw_device *aw_dev);
int aw88395_dev_load_acf_check(struct aw_device *aw_dev, struct aw_container *aw_cfg);
int aw88395_dev_cfg_load(struct aw_device *aw_dev, struct aw_container *aw_cfg);
void aw88395_dev_mute(struct aw_device *aw_dev, bool is_mute);

#endif