linux/sound/i2c/other/ak4xxx-adda.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *   ALSA driver for AK4524 / AK4528 / AK4529 / AK4355 / AK4358 / AK4381
 *   AD and DA converters
 *
 *	Copyright (c) 2000-2004 Jaroslav Kysela <[email protected]>,
 *				Takashi Iwai <[email protected]>
 */

#include <linux/io.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/tlv.h>
#include <sound/ak4xxx-adda.h>
#include <sound/info.h>

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

/* write the given register and save the data to the cache */
void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg,
		       unsigned char val)
{}

EXPORT_SYMBOL();

/* reset procedure for AK4524 and AK4528 */
static void ak4524_reset(struct snd_akm4xxx *ak, int state)
{}

/* reset procedure for AK4355 and AK4358 */
static void ak435X_reset(struct snd_akm4xxx *ak, int state)
{}

/* reset procedure for AK4381 */
static void ak4381_reset(struct snd_akm4xxx *ak, int state)
{}

/*
 * reset the AKM codecs
 * @state: 1 = reset codec, 0 = restore the registers
 *
 * assert the reset operation and restores the register values to the chips.
 */
void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state)
{}

EXPORT_SYMBOL();


/*
 * Volume conversion table for non-linear volumes
 * from -63.5dB (mute) to 0dB step 0.5dB
 *
 * Used for AK4524/AK4620 input/ouput attenuation, AK4528, and
 * AK5365 input attenuation
 */
static const unsigned char vol_cvt_datt[128] =;

/*
 * dB tables
 */
static const DECLARE_TLV_DB_SCALE(db_scale_vol_datt, -6350, 50, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_8bit, -12750, 50, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_7bit, -6350, 50, 1);
static const DECLARE_TLV_DB_LINEAR(db_scale_linear, TLV_DB_GAIN_MUTE, 0);

/*
 * initialize all the ak4xxx chips
 */
void snd_akm4xxx_init(struct snd_akm4xxx *ak)
{}

EXPORT_SYMBOL();

/*
 * Mixer callbacks
 */
#define AK_IPGA
#define AK_VOL_CVT
#define AK_NEEDSMSB
#define AK_INVERT
#define AK_GET_CHIP(val)
#define AK_GET_ADDR(val)
#define AK_GET_SHIFT(val)
#define AK_GET_VOL_CVT(val)
#define AK_GET_IPGA(val)
#define AK_GET_NEEDSMSB(val)
#define AK_GET_INVERT(val)
#define AK_GET_MASK(val)
#define AK_COMPOSE(chip,addr,shift,mask)

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

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

static int put_ak_reg(struct snd_kcontrol *kcontrol, int addr,
		      unsigned char nval)
{}

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

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

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

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

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

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

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

#define ak4xxx_switch_info

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

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

#define AK5365_NUM_INPUTS

static int ak4xxx_capture_num_inputs(struct snd_akm4xxx *ak, int mixer_ch)
{}

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

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

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

/*
 * build AK4xxx controls
 */

static int build_dac_controls(struct snd_akm4xxx *ak)
{}

static int build_adc_controls(struct snd_akm4xxx *ak)
{}

static int build_deemphasis(struct snd_akm4xxx *ak, int num_emphs)
{}

static void proc_regs_read(struct snd_info_entry *entry,
		struct snd_info_buffer *buffer)
{}

static int proc_init(struct snd_akm4xxx *ak)
{}

int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak)
{}
EXPORT_SYMBOL();