linux/sound/pci/ac97/ac97_patch.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright (c) by Jaroslav Kysela <[email protected]>
 *  Universal interface for Audio Codec '97
 *
 *  For more details look to AC '97 component specification revision 2.2
 *  by Intel Corporation (http://developer.intel.com) and to datasheets
 *  for specific codecs.
 */

#include "ac97_local.h"
#include "ac97_patch.h"

/*
 *  Forward declarations
 */

static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97,
						    const char *name);
static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name,
				const unsigned int *tlv,
				const char * const *followers);

/*
 *  Chip specific initialization
 */

static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontrol_new *controls, int count)
{}

/* replace with a new TLV */
static void reset_tlv(struct snd_ac97 *ac97, const char *name,
		      const unsigned int *tlv)
{}

/* set to the page, update bits and restore the page */
static int ac97_update_bits_page(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value, unsigned short page)
{}

/*
 * shared line-in/mic controls
 */
static int ac97_surround_jack_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

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

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

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

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

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

#define AC97_SURROUND_JACK_MODE_CTL
/* 6ch */
#define AC97_CHANNEL_MODE_CTL
/* 4ch */
#define AC97_CHANNEL_MODE_4CH_CTL
/* 8ch */
#define AC97_CHANNEL_MODE_8CH_CTL

static inline int is_surround_on(struct snd_ac97 *ac97)
{}

static inline int is_clfe_on(struct snd_ac97 *ac97)
{}

/* system has shared jacks with surround out enabled */
static inline int is_shared_surrout(struct snd_ac97 *ac97)
{}

/* system has shared jacks with center/lfe out enabled */
static inline int is_shared_clfeout(struct snd_ac97 *ac97)
{}

/* system has shared jacks with line in enabled */
static inline int is_shared_linein(struct snd_ac97 *ac97)
{}

/* system has shared jacks with mic in enabled */
static inline int is_shared_micin(struct snd_ac97 *ac97)
{}

static inline int alc850_is_aux_back_surround(struct snd_ac97 *ac97)
{}

/* The following snd_ac97_ymf753_... items added by David Shust ([email protected]) */
/* Modified for YMF743 by Keita Maehara <[email protected]> */

/* It is possible to indicate to the Yamaha YMF7x3 the type of
   speakers being used. */

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

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

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

static const struct snd_kcontrol_new snd_ac97_ymf7x3_controls_speaker =;

/* It is possible to indicate to the Yamaha YMF7x3 the source to
   direct to the S/PDIF output. */
static int snd_ac97_ymf7x3_spdif_source_info(struct snd_kcontrol *kcontrol,
					     struct snd_ctl_elem_info *uinfo)
{}

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

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

static int patch_yamaha_ymf7x3_3d(struct snd_ac97 *ac97)
{}

static const struct snd_kcontrol_new snd_ac97_yamaha_ymf743_controls_spdif[3] =;

static int patch_yamaha_ymf743_build_spdif(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_yamaha_ymf743_ops =;

static int patch_yamaha_ymf743(struct snd_ac97 *ac97)
{}

/* The AC'97 spec states that the S/PDIF signal is to be output at pin 48.
   The YMF753 will output the S/PDIF signal to pin 43, 47 (EAPD), or 48.
   By default, no output pin is selected, and the S/PDIF signal is not output.
   There is also a bit to mute S/PDIF output in a vendor-specific register. */
static int snd_ac97_ymf753_spdif_output_pin_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

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

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

static const struct snd_kcontrol_new snd_ac97_ymf753_controls_spdif[3] =;

static int patch_yamaha_ymf753_post_spdif(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_yamaha_ymf753_ops =;

static int patch_yamaha_ymf753(struct snd_ac97 * ac97)
{}

/*
 * May 2, 2003 Liam Girdwood <[email protected]>
 *  removed broken wolfson00 patch.
 *  added support for WM9705,WM9708,WM9709,WM9710,WM9711,WM9712 and WM9717.
 */

static const struct snd_kcontrol_new wm97xx_snd_ac97_controls[] =;

static int patch_wolfson_wm9703_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_wolfson_wm9703_ops =;

static int patch_wolfson03(struct snd_ac97 * ac97)
{}

static const struct snd_kcontrol_new wm9704_snd_ac97_controls[] =;

static int patch_wolfson_wm9704_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_wolfson_wm9704_ops =;

static int patch_wolfson04(struct snd_ac97 * ac97)
{}

static int patch_wolfson05(struct snd_ac97 * ac97)
{}

static const char* wm9711_alc_select[] =;
static const char* wm9711_alc_mix[] =;
static const char* wm9711_out3_src[] =;
static const char* wm9711_out3_lrsrc[] =;
static const char* wm9711_rec_adc[] =;
static const char* wm9711_base[] =;
static const char* wm9711_rec_gain[] =;
static const char* wm9711_mic[] =;
static const char* wm9711_rec_sel[] =;
static const char* wm9711_ng_type[] =;

static const struct ac97_enum wm9711_enum[] =;

static const struct snd_kcontrol_new wm9711_snd_ac97_controls[] =;

static int patch_wolfson_wm9711_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_wolfson_wm9711_ops =;

static int patch_wolfson11(struct snd_ac97 * ac97)
{}

static const char* wm9713_mic_mixer[] =;
static const char* wm9713_rec_mux[] =;
static const char* wm9713_rec_src[] =;
static const char* wm9713_rec_gain[] =;
static const char* wm9713_alc_select[] =;
static const char* wm9713_mono_pga[] =;
static const char* wm9713_spk_pga[] =;
static const char* wm9713_hp_pga[] =;
static const char* wm9713_out3_pga[] =;
static const char* wm9713_out4_pga[] =;
static const char* wm9713_dac_inv[] =;
static const char* wm9713_base[] =;
static const char* wm9713_ng_type[] =;

static const struct ac97_enum wm9713_enum[] =;

static const struct snd_kcontrol_new wm13_snd_ac97_controls[] =;

static const struct snd_kcontrol_new wm13_snd_ac97_controls_3d[] =;

static int patch_wolfson_wm9713_3d (struct snd_ac97 * ac97)
{}

static int patch_wolfson_wm9713_specific(struct snd_ac97 * ac97)
{}

#ifdef CONFIG_PM
static void patch_wolfson_wm9713_suspend (struct snd_ac97 * ac97)
{}

static void patch_wolfson_wm9713_resume (struct snd_ac97 * ac97)
{}
#endif

static const struct snd_ac97_build_ops patch_wolfson_wm9713_ops =;

static int patch_wolfson13(struct snd_ac97 * ac97)
{}

/*
 * Tritech codec
 */
static int patch_tritech_tr28028(struct snd_ac97 * ac97)
{}

/*
 * Sigmatel STAC97xx codecs
 */
static int patch_sigmatel_stac9700_3d(struct snd_ac97 * ac97)
{}

static int patch_sigmatel_stac9708_3d(struct snd_ac97 * ac97)
{}

static const struct snd_kcontrol_new snd_ac97_sigmatel_4speaker =;

/* "Sigmatel " removed due to excessive name length: */
static const struct snd_kcontrol_new snd_ac97_sigmatel_phaseinvert =;

static const struct snd_kcontrol_new snd_ac97_sigmatel_controls[] =;

static int patch_sigmatel_stac97xx_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_sigmatel_stac9700_ops =;

static int patch_sigmatel_stac9700(struct snd_ac97 * ac97)
{}

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

static const struct snd_kcontrol_new snd_ac97_stac9708_bias_control =;

static int patch_sigmatel_stac9708_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_sigmatel_stac9708_ops =;

static int patch_sigmatel_stac9708(struct snd_ac97 * ac97)
{}

static int patch_sigmatel_stac9721(struct snd_ac97 * ac97)
{}

static int patch_sigmatel_stac9744(struct snd_ac97 * ac97)
{}

static int patch_sigmatel_stac9756(struct snd_ac97 * ac97)
{}

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

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

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

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

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

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

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

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

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

#define STAC9758_OUTPUT_JACK(xname, shift)
#define STAC9758_INPUT_JACK(xname, shift)
static const struct snd_kcontrol_new snd_ac97_sigmatel_stac9758_controls[] =;

static int patch_sigmatel_stac9758_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_sigmatel_stac9758_ops =;

static int patch_sigmatel_stac9758(struct snd_ac97 * ac97)
{}

/*
 * Cirrus Logic CS42xx codecs
 */
static const struct snd_kcontrol_new snd_ac97_cirrus_controls_spdif[2] =;

static int patch_cirrus_build_spdif(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_cirrus_ops =;

static int patch_cirrus_spdif(struct snd_ac97 * ac97)
{}

static int patch_cirrus_cs4299(struct snd_ac97 * ac97)
{}

/*
 * Conexant codecs
 */
static const struct snd_kcontrol_new snd_ac97_conexant_controls_spdif[1] =;

static int patch_conexant_build_spdif(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_conexant_ops =;

static int patch_conexant(struct snd_ac97 * ac97)
{}

static int patch_cx20551(struct snd_ac97 *ac97)
{}

/*
 * Analog Devices AD18xx, AD19xx codecs
 */
#ifdef CONFIG_PM
static void ad18xx_resume(struct snd_ac97 *ac97)
{}

static void ad1888_resume(struct snd_ac97 *ac97)
{}

#endif

static const struct snd_ac97_res_table ad1819_restbl[] =;

static int patch_ad1819(struct snd_ac97 * ac97)
{}

static unsigned short patch_ad1881_unchained(struct snd_ac97 * ac97, int idx, unsigned short mask)
{}

static int patch_ad1881_chained1(struct snd_ac97 * ac97, int idx, unsigned short codec_bits)
{}

static void patch_ad1881_chained(struct snd_ac97 * ac97, int unchained_idx, int cidx1, int cidx2)
{}

static const struct snd_ac97_build_ops patch_ad1881_build_ops =;

static int patch_ad1881(struct snd_ac97 * ac97)
{}

static const struct snd_kcontrol_new snd_ac97_controls_ad1885[] =;

static const DECLARE_TLV_DB_SCALE(db_scale_6bit_6db_max, -8850, 150, 0);

static int patch_ad1885_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_ad1885_build_ops =;

static int patch_ad1885(struct snd_ac97 * ac97)
{}

static int patch_ad1886_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_ad1886_build_ops =;

static int patch_ad1886(struct snd_ac97 * ac97)
{}

/* MISC bits (AD1888/AD1980/AD1985 register 0x76) */
#define AC97_AD198X_MBC
#define AC97_AD198X_MBC_20
#define AC97_AD198X_MBC_10
#define AC97_AD198X_MBC_30
#define AC97_AD198X_VREFD
#define AC97_AD198X_VREFH
#define AC97_AD198X_VREF_0
#define AC97_AD198X_VREF_MASK
#define AC97_AD198X_VREF_SHIFT
#define AC97_AD198X_SRU
#define AC97_AD198X_LOSEL
#define AC97_AD198X_2MIC
#define AC97_AD198X_SPRD
#define AC97_AD198X_DMIX0
					/*  0 = 6-to-4, 1 = 6-to-2 downmix */
#define AC97_AD198X_DMIX1
#define AC97_AD198X_HPSEL
#define AC97_AD198X_CLDIS
#define AC97_AD198X_LODIS
#define AC97_AD198X_MSPLT
#define AC97_AD198X_AC97NC
#define AC97_AD198X_DACZ

/* MISC 1 bits (AD1986 register 0x76) */
#define AC97_AD1986_MBC
#define AC97_AD1986_MBC_20
#define AC97_AD1986_MBC_10
#define AC97_AD1986_MBC_30
#define AC97_AD1986_LISEL0
#define AC97_AD1986_LISEL1
#define AC97_AD1986_LISEL_MASK
#define AC97_AD1986_LISEL_LI
#define AC97_AD1986_LISEL_SURR
#define AC97_AD1986_LISEL_MIC
#define AC97_AD1986_SRU
#define AC97_AD1986_SOSEL
#define AC97_AD1986_2MIC
#define AC97_AD1986_SPRD
#define AC97_AD1986_DMIX0
					/*  0 = 6-to-4, 1 = 6-to-2 downmix */
#define AC97_AD1986_DMIX1
#define AC97_AD1986_CLDIS
#define AC97_AD1986_SODIS
#define AC97_AD1986_MSPLT
#define AC97_AD1986_AC97NC
#define AC97_AD1986_DACZ

/* MISC 2 bits (AD1986 register 0x70) */
#define AC97_AD_MISC2

#define AC97_AD1986_CVREF0
#define AC97_AD1986_CVREF1
#define AC97_AD1986_CVREF2
#define AC97_AD1986_CVREF_MASK
#define AC97_AD1986_JSMAP
#define AC97_AD1986_MMDIS
#define AC97_AD1986_MVREF0
#define AC97_AD1986_MVREF1
#define AC97_AD1986_MVREF2
#define AC97_AD1986_MVREF_MASK

/* MISC 3 bits (AD1986 register 0x7a) */
#define AC97_AD_MISC3

#define AC97_AD1986_MMIX
#define AC97_AD1986_GPO
#define AC97_AD1986_LOHPEN
#define AC97_AD1986_LVREF0
#define AC97_AD1986_LVREF1
#define AC97_AD1986_LVREF2
#define AC97_AD1986_LVREF_MASK
#define AC97_AD1986_JSINVA
#define AC97_AD1986_LOSEL
#define AC97_AD1986_HPSEL0
					/*   input select Surround DACs */
#define AC97_AD1986_HPSEL1
					/*   select C/LFE DACs */
#define AC97_AD1986_JSINVB

/* Serial Config bits (AD1986 register 0x74) (incomplete) */
#define AC97_AD1986_OMS0
#define AC97_AD1986_OMS1
#define AC97_AD1986_OMS2
#define AC97_AD1986_OMS_MASK
#define AC97_AD1986_OMS_M
#define AC97_AD1986_OMS_L
#define AC97_AD1986_OMS_C
#define AC97_AD1986_OMS_MC
					/*   are MIC sources */
#define AC97_AD1986_OMS_ML
					/*   are MIC sources */
#define AC97_AD1986_OMS_LC
					/*   are MIC sources */
#define AC97_AD1986_OMS_MLC
					/*   are MIC sources */


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

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

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

static const struct snd_kcontrol_new snd_ac97_ad198x_spdif_source =;

static int patch_ad198x_post_spdif(struct snd_ac97 * ac97)
{}

static const struct snd_kcontrol_new snd_ac97_ad1981x_jack_sense[] =;

/* deny list to avoid HP/Line jack-sense controls
 * (SS vendor << 16 | device)
 */
static const unsigned int ad1981_jacks_denylist[] =;

static int check_list(struct snd_ac97 *ac97, const unsigned int *list)
{}

static int patch_ad1981a_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_ad1981a_build_ops =;

/* allow list to enable HP jack-sense bits
 * (SS vendor << 16 | device)
 */
static const unsigned int ad1981_jacks_allowlist[] =;

static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97)
{}

static int patch_ad1981a(struct snd_ac97 *ac97)
{}

static const struct snd_kcontrol_new snd_ac97_ad198x_2cmic =;

static int patch_ad1981b_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_ad1981b_build_ops =;

static int patch_ad1981b(struct snd_ac97 *ac97)
{}

#define snd_ac97_ad1888_lohpsel_info

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

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

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

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

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

static void ad1888_update_jacks(struct snd_ac97 *ac97)
{}

static const struct snd_kcontrol_new snd_ac97_ad1888_controls[] =;

static int patch_ad1888_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_ad1888_build_ops =;

static int patch_ad1888(struct snd_ac97 * ac97)
{}

static int patch_ad1980_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_ad1980_build_ops =;

static int patch_ad1980(struct snd_ac97 * ac97)
{}

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

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

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

static const struct snd_kcontrol_new snd_ac97_ad1985_controls[] =;

static void ad1985_update_jacks(struct snd_ac97 *ac97)
{}

static int patch_ad1985_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_ad1985_build_ops =;

static int patch_ad1985(struct snd_ac97 * ac97)
{}

#define snd_ac97_ad1986_bool_info

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

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

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

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

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

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

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

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

static const struct snd_kcontrol_new snd_ac97_ad1986_controls[] =;

static void ad1986_update_jacks(struct snd_ac97 *ac97)
{}

static int patch_ad1986_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_ad1986_build_ops =;

static int patch_ad1986(struct snd_ac97 * ac97)
{}

/*
 * realtek ALC203: use mono-out for pin 37
 */
static int patch_alc203(struct snd_ac97 *ac97)
{}

/*
 * realtek ALC65x/850 codecs
 */
static void alc650_update_jacks(struct snd_ac97 *ac97)
{}

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

static const struct snd_kcontrol_new snd_ac97_controls_alc650[] =;

static const struct snd_kcontrol_new snd_ac97_spdif_controls_alc650[] =;

static const DECLARE_TLV_DB_SCALE(db_scale_5bit_3db_max, -4350, 150, 0);

static int patch_alc650_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_alc650_ops =;

static int patch_alc650(struct snd_ac97 * ac97)
{}

static void alc655_update_jacks(struct snd_ac97 *ac97)
{}

static const struct snd_kcontrol_new snd_ac97_controls_alc655[] =;

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

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

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

static const struct snd_kcontrol_new snd_ac97_spdif_controls_alc655[] =;

static int patch_alc655_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_alc655_ops =;

static int patch_alc655(struct snd_ac97 * ac97)
{}


#define AC97_ALC850_JACK_SELECT
#define AC97_ALC850_MISC1
#define AC97_ALC850_MULTICH

static void alc850_update_jacks(struct snd_ac97 *ac97)
{}

static const struct snd_kcontrol_new snd_ac97_controls_alc850[] =;

static int patch_alc850_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_alc850_ops =;

static int patch_alc850(struct snd_ac97 *ac97)
{}

static int patch_aztech_azf3328_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_aztech_azf3328_ops =;

static int patch_aztech_azf3328(struct snd_ac97 *ac97)
{}

/*
 * C-Media CM97xx codecs
 */
static void cm9738_update_jacks(struct snd_ac97 *ac97)
{}

static const struct snd_kcontrol_new snd_ac97_cm9738_controls[] =;

static int patch_cm9738_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_cm9738_ops =;

static int patch_cm9738(struct snd_ac97 * ac97)
{}

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

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

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

static const struct snd_kcontrol_new snd_ac97_cm9739_controls_spdif[] =;

static void cm9739_update_jacks(struct snd_ac97 *ac97)
{}

static const struct snd_kcontrol_new snd_ac97_cm9739_controls[] =;

static int patch_cm9739_specific(struct snd_ac97 * ac97)
{}

static int patch_cm9739_post_spdif(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_cm9739_ops =;

static int patch_cm9739(struct snd_ac97 * ac97)
{}

#define AC97_CM9761_MULTI_CHAN
#define AC97_CM9761_FUNC
#define AC97_CM9761_SPDIF_CTRL

static void cm9761_update_jacks(struct snd_ac97 *ac97)
{}

static const struct snd_kcontrol_new snd_ac97_cm9761_controls[] =;

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

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

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

static const char * const cm9761_dac_clock[] =;
static const struct ac97_enum cm9761_dac_clock_enum =;

static const struct snd_kcontrol_new snd_ac97_cm9761_controls_spdif[] =;

static int patch_cm9761_post_spdif(struct snd_ac97 * ac97)
{}

static int patch_cm9761_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_cm9761_ops =;

static int patch_cm9761(struct snd_ac97 *ac97)
{}
       
#define AC97_CM9780_SIDE
#define AC97_CM9780_JACK
#define AC97_CM9780_MIXER
#define AC97_CM9780_MULTI_CHAN
#define AC97_CM9780_SPDIF

static const char * const cm9780_ch_select[] =;
static const struct ac97_enum cm9780_ch_select_enum =;
static const struct snd_kcontrol_new cm9780_controls[] =;

static int patch_cm9780_specific(struct snd_ac97 *ac97)
{}

static const struct snd_ac97_build_ops patch_cm9780_ops =;

static int patch_cm9780(struct snd_ac97 *ac97)
{}

/*
 * VIA VT1613 codec
 */
static const struct snd_kcontrol_new snd_ac97_controls_vt1613[] =;

static int patch_vt1613_specific(struct snd_ac97 *ac97)
{
	return patch_build_controls(ac97, &snd_ac97_controls_vt1613[0],
				    ARRAY_SIZE(snd_ac97_controls_vt1613));
};

static const struct snd_ac97_build_ops patch_vt1613_ops =;

static int patch_vt1613(struct snd_ac97 *ac97)
{}

/*
 * VIA VT1616 codec
 */
static const struct snd_kcontrol_new snd_ac97_controls_vt1616[] =;

static const char * const follower_vols_vt1616[] =;

static const char * const follower_sws_vt1616[] =;

/* find a mixer control element with the given name */
static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97,
						    const char *name)
{}

/* create a virtual master control and add followers */
static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name,
				const unsigned int *tlv,
				const char * const *followers)
{}

static int patch_vt1616_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_vt1616_ops =;

static int patch_vt1616(struct snd_ac97 * ac97)
{}

/*
 * VT1617A codec
 */

/*
 * unfortunately, the vt1617a stashes the twiddlers required for
 * noodling the i/o jacks on 2 different regs. that means that we can't
 * use the easy way provided by AC97_ENUM_DOUBLE() we have to write
 * are own funcs.
 *
 * NB: this is absolutely and utterly different from the vt1618. dunno
 * about the 1616.
 */

/* copied from ac97_surround_jack_mode_info() */
static int snd_ac97_vt1617a_smart51_info(struct snd_kcontrol *kcontrol,
					 struct snd_ctl_elem_info *uinfo)
{}

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

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

static const struct snd_kcontrol_new snd_ac97_controls_vt1617a[] =;

static int patch_vt1617a(struct snd_ac97 * ac97)
{}

/* VIA VT1618 8 CHANNEL AC97 CODEC
 *
 * VIA implements 'Smart 5.1' completely differently on the 1618 than
 * it does on the 1617a. awesome! They seem to have sourced this
 * particular revision of the technology from somebody else, it's
 * called Universal Audio Jack and it shows up on some other folk's chips
 * as well.
 *
 * ordering in this list reflects vt1618 docs for Reg 60h and
 * the block diagram, DACs are as follows:
 *
 *        OUT_O -> Front,
 *	  OUT_1 -> Surround,
 *	  OUT_2 -> C/LFE
 *
 * Unlike the 1617a, each OUT has a consistent set of mappings
 * for all bitpatterns other than 00:
 *
 *        01       Unmixed Output
 *        10       Line In
 *        11       Mic  In
 *
 * Special Case of 00:
 *
 *        OUT_0    Mixed Output
 *        OUT_1    Reserved
 *        OUT_2    Reserved
 *
 * I have no idea what the hell Reserved does, but on an MSI
 * CN700T, i have to set it to get 5.1 output - YMMV, bad
 * shit may happen.
 *
 * If other chips use Universal Audio Jack, then this code might be applicable
 * to them.
 */

struct vt1618_uaj_item {};

/* This list reflects the vt1618 docs for Vendor Defined Register 0x60. */

static const struct vt1618_uaj_item vt1618_uaj[3] =;

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

/* All of the vt1618 Universal Audio Jack twiddlers are on
 * Vendor Defined Register 0x60, page 0. The bits, and thus
 * the mask, are the only thing that changes
 */
static int snd_ac97_vt1618_UAJ_get(struct snd_kcontrol *kcontrol,
				   struct snd_ctl_elem_value *ucontrol)
{}

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

/* config aux in jack - not found on 3 jack motherboards or soundcards */

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

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

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

static const struct snd_kcontrol_new snd_ac97_controls_vt1618[] =;

static int patch_vt1618(struct snd_ac97 *ac97)
{}

/*
 */
static void it2646_update_jacks(struct snd_ac97 *ac97)
{}

static const struct snd_kcontrol_new snd_ac97_controls_it2646[] =;

static const struct snd_kcontrol_new snd_ac97_spdif_controls_it2646[] =;

static int patch_it2646_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_it2646_ops =;

static int patch_it2646(struct snd_ac97 * ac97)
{}

/*
 * Si3036 codec
 */

#define AC97_SI3036_CHIP_ID
#define AC97_SI3036_LINE_CFG

static const struct snd_kcontrol_new snd_ac97_controls_si3036[] =;

static int patch_si3036_specific(struct snd_ac97 * ac97)
{}

static const struct snd_ac97_build_ops patch_si3036_ops =;

static int mpatch_si3036(struct snd_ac97 * ac97)
{}

/*
 * LM 4550 Codec
 *
 * We use a static resolution table since LM4550 codec cannot be
 * properly autoprobed to determine the resolution via
 * check_volume_resolution().
 */

static const struct snd_ac97_res_table lm4550_restbl[] =;

static int patch_lm4550(struct snd_ac97 *ac97)
{}