linux/sound/soc/codecs/aw88399.c

// SPDX-License-Identifier: GPL-2.0-only
//
// aw88399.c --  ALSA SoC AW88399 codec support
//
// Copyright (c) 2023 AWINIC Technology CO., LTD
//
// Author: Weidong Wang <[email protected]>
//

#include <linux/crc32.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/firmware.h>
#include <linux/regmap.h>
#include <sound/soc.h>
#include "aw88399.h"
#include "aw88395/aw88395_device.h"

static const struct regmap_config aw88399_remap_config =;

static int aw_dev_dsp_write_16bit(struct aw_device *aw_dev,
		unsigned short dsp_addr, unsigned int dsp_data)
{}

static int aw_dev_dsp_read_16bit(struct aw_device *aw_dev,
		unsigned short dsp_addr, unsigned int *dsp_data)
{}

static int aw_dev_dsp_read_32bit(struct aw_device *aw_dev,
		unsigned short dsp_addr, unsigned int *dsp_data)
{}

static int aw_dev_dsp_read(struct aw_device *aw_dev,
		unsigned short dsp_addr, unsigned int *dsp_data, unsigned char data_type)
{}

static void aw_dev_pwd(struct aw_device *aw_dev, bool pwd)
{}

static void aw_dev_get_int_status(struct aw_device *aw_dev, unsigned short *int_status)
{}

static void aw_dev_clear_int_status(struct aw_device *aw_dev)
{}

static int aw_dev_get_iis_status(struct aw_device *aw_dev)
{}

static int aw_dev_check_mode1_pll(struct aw_device *aw_dev)
{}

static int aw_dev_check_mode2_pll(struct aw_device *aw_dev)
{}

static int aw_dev_check_syspll(struct aw_device *aw_dev)
{}

static int aw_dev_check_sysst(struct aw_device *aw_dev)
{}

static void aw_dev_amppd(struct aw_device *aw_dev, bool amppd)
{}

static void aw_dev_dsp_enable(struct aw_device *aw_dev, bool is_enable)
{}

static int aw88399_dev_get_icalk(struct aw88399 *aw88399, int16_t *icalk)
{}

static int aw88399_dev_get_vcalk(struct aw88399 *aw88399, int16_t *vcalk)
{}

static int aw88399_dev_get_internal_vcalk(struct aw88399 *aw88399, int16_t *vcalk)
{}

static int aw_dev_set_vcalb(struct aw88399 *aw88399)
{}

static int aw_dev_update_cali_re(struct aw_cali_desc *cali_desc)
{}

static int aw_dev_fw_crc_check(struct aw_device *aw_dev)
{}

static int aw_dev_cfg_crc_check(struct aw_device *aw_dev)
{}

static int aw_dev_hw_crc_check(struct aw88399 *aw88399)
{}

static void aw_dev_i2s_tx_enable(struct aw_device *aw_dev, bool flag)
{}

static int aw_dev_get_dsp_status(struct aw_device *aw_dev)
{}

static int aw_dev_dsp_check(struct aw_device *aw_dev)
{}

static int aw_dev_set_volume(struct aw_device *aw_dev, unsigned int value)
{}

static void aw_dev_fade_in(struct aw_device *aw_dev)
{}

static void aw_dev_fade_out(struct aw_device *aw_dev)
{}

static void aw88399_dev_mute(struct aw_device *aw_dev, bool is_mute)
{}

static void aw88399_dev_set_dither(struct aw88399 *aw88399, bool dither)
{}

static int aw88399_dev_start(struct aw88399 *aw88399)
{}

static int aw_dev_dsp_update_container(struct aw_device *aw_dev,
			unsigned char *data, unsigned int len, unsigned short base)
{}

static int aw_dev_get_ra(struct aw_cali_desc *cali_desc)
{}

static int aw_dev_dsp_update_cfg(struct aw_device *aw_dev,
			unsigned char *data, unsigned int len)
{}

static int aw_dev_dsp_update_fw(struct aw_device *aw_dev,
			unsigned char *data, unsigned int len)
{}

static int aw_dev_check_sram(struct aw_device *aw_dev)
{}

static void aw_dev_select_memclk(struct aw_device *aw_dev, unsigned char flag)
{}

static void aw_dev_get_cur_mode_st(struct aw_device *aw_dev)
{}

static int aw_dev_update_reg_container(struct aw88399 *aw88399,
				unsigned char *data, unsigned int len)
{}

static int aw_dev_reg_update(struct aw88399 *aw88399,
					unsigned char *data, unsigned int len)
{}

static int aw88399_dev_get_prof_name(struct aw_device *aw_dev, int index, char **prof_name)
{}

static int aw88399_dev_get_prof_data(struct aw_device *aw_dev, int index,
			struct aw_prof_desc **prof_desc)
{}

static int aw88399_dev_fw_update(struct aw88399 *aw88399, bool up_dsp_fw_en, bool force_up_en)
{}

static void aw88399_start_pa(struct aw88399 *aw88399)
{}

static void aw88399_startup_work(struct work_struct *work)
{}

static void aw88399_start(struct aw88399 *aw88399, bool sync_start)
{}

static int aw_dev_check_sysint(struct aw_device *aw_dev)
{}

static int aw88399_stop(struct aw_device *aw_dev)
{}

static struct snd_soc_dai_driver aw88399_dai[] =;

static int aw88399_get_fade_in_time(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_set_fade_in_time(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_get_fade_out_time(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_set_fade_out_time(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_dev_set_profile_index(struct aw_device *aw_dev, int index)
{}

static int aw88399_profile_info(struct snd_kcontrol *kcontrol,
			 struct snd_ctl_elem_info *uinfo)
{}

static int aw88399_profile_get(struct snd_kcontrol *kcontrol,
			struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_profile_set(struct snd_kcontrol *kcontrol,
		struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_volume_get(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_volume_set(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_get_fade_step(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_set_fade_step(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_re_get(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_re_set(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static int aw88399_dev_init(struct aw88399 *aw88399, struct aw_container *aw_cfg)
{}

static int aw88399_request_firmware_file(struct aw88399 *aw88399)
{}

static const struct snd_kcontrol_new aw88399_controls[] =;

static int aw88399_playback_event(struct snd_soc_dapm_widget *w,
				struct snd_kcontrol *k, int event)
{}

static const struct snd_soc_dapm_widget aw88399_dapm_widgets[] =;

static const struct snd_soc_dapm_route aw88399_audio_map[] =;

static int aw88399_codec_probe(struct snd_soc_component *component)
{}

static void aw88399_codec_remove(struct snd_soc_component *aw_codec)
{}

static const struct snd_soc_component_driver soc_codec_dev_aw88399 =;

static void aw88399_hw_reset(struct aw88399 *aw88399)
{}

static void aw88399_parse_channel_dt(struct aw_device *aw_dev)
{}

static int aw88399_init(struct aw88399 *aw88399, struct i2c_client *i2c, struct regmap *regmap)
{}

static int aw88399_i2c_probe(struct i2c_client *i2c)
{}

static const struct i2c_device_id aw88399_i2c_id[] =;
MODULE_DEVICE_TABLE(i2c, aw88399_i2c_id);

static struct i2c_driver aw88399_i2c_driver =;
module_i2c_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();