linux/sound/pci/hda/patch_conexant.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * HD audio interface patch for Conexant HDA audio codec
 *
 * Copyright (c) 2006 Pototskiy Akex <[email protected]>
 * 		      Takashi Iwai <[email protected]>
 * 		      Tobin Davis  <[email protected]>
 */

#include <linux/init.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/jack.h>

#include <sound/hda_codec.h>
#include "hda_local.h"
#include "hda_auto_parser.h"
#include "hda_beep.h"
#include "hda_jack.h"
#include "hda_generic.h"

struct conexant_spec {};


#ifdef CONFIG_SND_HDA_INPUT_BEEP
/* additional beep mixers; private_value will be overwritten */
static const struct snd_kcontrol_new cxt_beep_mixer[] =;

static int set_beep_amp(struct conexant_spec *spec, hda_nid_t nid,
			int idx, int dir)
{}

static int cx_auto_parse_beep(struct hda_codec *codec)
{}
#else
#define cx_auto_parse_beep
#endif

/*
 * Automatic parser for CX20641 & co
 */

/* parse EAPDs */
static void cx_auto_parse_eapd(struct hda_codec *codec)
{}

static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins,
			      const hda_nid_t *pins, bool on)
{}

/* turn on/off EAPD according to Master switch */
static void cx_auto_vmaster_hook(void *private_data, int enabled)
{}

/* turn on/off EAPD according to Master switch (inversely!) for mute LED */
static int cx_auto_vmaster_mute_led(struct led_classdev *led_cdev,
				    enum led_brightness brightness)
{}

static void cxt_init_gpio_led(struct hda_codec *codec)
{}

static void cx_fixup_headset_recog(struct hda_codec *codec)
{}

static int cx_auto_init(struct hda_codec *codec)
{}

static void cx_auto_shutdown(struct hda_codec *codec)
{}

static void cx_auto_free(struct hda_codec *codec)
{}

static void cx_process_headset_plugin(struct hda_codec *codec)
{}

static void cx_update_headset_mic_vref(struct hda_codec *codec, struct hda_jack_callback *event)
{}

static int cx_auto_suspend(struct hda_codec *codec)
{}

static const struct hda_codec_ops cx_auto_patch_ops =;

/*
 * pin fix-up
 */
enum {};

/* for hda_fixup_thinkpad_acpi() */
#include "thinkpad_helper.c"

static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
				  const struct hda_fixup *fix, int action)
{}

static void cxt5066_increase_mic_boost(struct hda_codec *codec,
				   const struct hda_fixup *fix, int action)
{}

static void cxt_update_headset_mode(struct hda_codec *codec)
{}

static void cxt_update_headset_mode_hook(struct hda_codec *codec,
					 struct snd_kcontrol *kcontrol,
					 struct snd_ctl_elem_value *ucontrol)
{}

static void cxt_fixup_headphone_mic(struct hda_codec *codec,
				    const struct hda_fixup *fix, int action)
{}

static void cxt_fixup_headset_mic(struct hda_codec *codec,
				    const struct hda_fixup *fix, int action)
{}

/* OPLC XO 1.5 fixup */

/* OLPC XO-1.5 supports DC input mode (e.g. for use with analog sensors)
 * through the microphone jack.
 * When the user enables this through a mixer switch, both internal and
 * external microphones are disabled. Gain is fixed at 0dB. In this mode,
 * we also allow the bias to be configured through a separate mixer
 * control. */

#define update_mic_pin(codec, nid, val)

static const struct hda_input_mux olpc_xo_dc_bias =;

static void olpc_xo_update_mic_boost(struct hda_codec *codec)
{}

static void olpc_xo_update_mic_pins(struct hda_codec *codec)
{}

/* mic_autoswitch hook */
static void olpc_xo_automic(struct hda_codec *codec,
			    struct hda_jack_callback *jack)
{}

/* pcm_capture hook */
static void olpc_xo_capture_hook(struct hda_pcm_stream *hinfo,
				 struct hda_codec *codec,
				 struct snd_pcm_substream *substream,
				 int action)
{}

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

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

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

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

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

static const struct snd_kcontrol_new olpc_xo_mixers[] =;

/* overriding mic boost put callback; update mic boost volume only when
 * DC mode is disabled
 */
static int olpc_xo_mic_boost_put(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_value *ucontrol)
{}

static void cxt_fixup_olpc_xo(struct hda_codec *codec,
				    const struct hda_fixup *fix, int action)
{}

static void cxt_fixup_mute_led_eapd(struct hda_codec *codec,
				    const struct hda_fixup *fix, int action)
{}

/*
 * Fix max input level on mixer widget to 0dB
 * (originally it has 0x2b steps with 0dB offset 0x14)
 */
static void cxt_fixup_cap_mix_amp(struct hda_codec *codec,
				  const struct hda_fixup *fix, int action)
{}

/*
 * Fix max input level on mixer widget to 0dB
 * (originally it has 0x1e steps with 0 dB offset 0x17)
 */
static void cxt_fixup_cap_mix_amp_5047(struct hda_codec *codec,
				  const struct hda_fixup *fix, int action)
{}

static void cxt_fixup_hp_gate_mic_jack(struct hda_codec *codec,
				       const struct hda_fixup *fix,
				       int action)
{}

/* update LED status via GPIO */
static void cxt_update_gpio_led(struct hda_codec *codec, unsigned int mask,
				bool led_on)
{}

/* turn on/off mute LED via GPIO per vmaster hook */
static int cxt_gpio_mute_update(struct led_classdev *led_cdev,
				enum led_brightness brightness)
{}

/* turn on/off mic-mute LED via GPIO per capture hook */
static int cxt_gpio_micmute_update(struct led_classdev *led_cdev,
				   enum led_brightness brightness)
{}

static void cxt_setup_mute_led(struct hda_codec *codec,
			       unsigned int mute, unsigned int mic_mute)
{}

static void cxt_fixup_mute_led_gpio(struct hda_codec *codec,
				const struct hda_fixup *fix, int action)
{}

static void cxt_fixup_hp_zbook_mute_led(struct hda_codec *codec,
					const struct hda_fixup *fix, int action)
{}

/* ThinkPad X200 & co with cxt5051 */
static const struct hda_pintbl cxt_pincfg_lenovo_x200[] =;

/* ThinkPad 410/420/510/520, X201 & co with cxt5066 */
static const struct hda_pintbl cxt_pincfg_lenovo_tp410[] =;

/* Lemote A1004/A1205 with cxt5066 */
static const struct hda_pintbl cxt_pincfg_lemote[] =;

/* SuoWoSi/South-holding JS201D with sn6140 */
static const struct hda_pintbl cxt_pincfg_sws_js201d[] =;

static const struct hda_fixup cxt_fixups[] =;

static const struct snd_pci_quirk cxt5045_fixups[] =;

static const struct hda_model_fixup cxt5045_fixup_models[] =;

static const struct snd_pci_quirk cxt5047_fixups[] =;

static const struct hda_model_fixup cxt5047_fixup_models[] =;

static const struct snd_pci_quirk cxt5051_fixups[] =;

static const struct hda_model_fixup cxt5051_fixup_models[] =;

static const struct snd_pci_quirk cxt5066_fixups[] =;

static const struct hda_model_fixup cxt5066_fixup_models[] =;

/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
 * can be created (bko#42825)
 */
static void add_cx5051_fake_mutes(struct hda_codec *codec)
{}

static int patch_conexant_auto(struct hda_codec *codec)
{}

/*
 */

static const struct hda_device_id snd_hda_id_conexant[] =;
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_conexant);

MODULE_LICENSE();
MODULE_DESCRIPTION();

static struct hda_codec_driver conexant_driver =;

module_hda_codec_driver();