List Info

Thread: Fix initialization and routing for Realtek ALC* family HDA codecs




Fix initialization and routing for Realtek ALC* family HDA codecs
user name
2006-03-10 11:32:49
UpstreamStatus: Added in upstream pci/hda/patch_realtek.c
r1.32-r1.59

This gigantenormous patch properly fixes numerous bugs
reported in
Malone (#6608, #18964, #21256, #27122, #28443, #28994,
#33719) related
to Realtek HDA codecs. Users on ubuntuforums have also
reported
difficulties in booting or getting audible output from their
ALC* HDA
hardware[0]. This codec family is the most popular among new
HDA sound
chipsets.

Significant changes to the initialization and routing for
ALC* HDA
codecs, resulting in audible sound on affected hardware,
necessitates
the invasiveness of these changes.

The xxx_t typedefs have been retained, as with the other HDA
patches,
for compatibility.

[0] h
ttp://www.ubuntuforums.org/showthread.php?t=138120 ,
    h
ttp://www.ubuntuforums.org/showthread.php?t=138019 ,
    h
ttp://www.ubuntuforums.org/showthread.php?t=137994 ,
    h
ttp://www.ubuntuforums.org/showthread.php?t=133325 ,
    h
ttp://www.ubuntuforums.org/showthread.php?t=132188 ,
    h
ttp://www.ubuntuforums.org/showthread.php?t=126686 ,
    ht
tp://www.ubuntuforums.org/showthread.php?t=76307 ,
    ht
tp://www.ubuntuforums.org/showthread.php?t=76019 , ...

Signed-off-by: Daniel T Chen <crimsunubuntu.com>

---

 sound/pci/hda/patch_realtek.c | 3925
+++++++++++++++++++++++++++++++++++------
 1 files changed, 3371 insertions(+), 554 deletions(-)

8db18c04daa88b86833dfc3982be45afa331db6c
diff --git a/sound/pci/hda/patch_realtek.c
b/sound/pci/hda/patch_realtek.c
index a0ba2e8..24c9867 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
 -3,8
+3,10 
  *
  * HD audio interface patch for ALC 260/880/882 codecs
  *
- * Copyright (c) 2004 PeiSen Hou <pshourealtek.com.tw>
+ * Copyright (c) 2004 Kailang Yang <kailangrealtek.com.tw>
+ *                    PeiSen Hou <pshourealtek.com.tw>
  *                    Takashi Iwai <tiwaisuse.de>
+ *                    Jonathan Woithe <jwoithephysics.adelaide.edu.au>
  *
  *  This driver is free software; you can redistribute it
and/or modify
  *  it under the terms of the GNU General Public License as
published by
 -39,17
+41,21  enum {
 	ALC880_5ST_DIG,
 	ALC880_W810,
 	ALC880_Z71V,
-	ALC880_AUTO,
 	ALC880_6ST,
 	ALC880_6ST_DIG,
 	ALC880_F1734,
 	ALC880_ASUS,
 	ALC880_ASUS_DIG,
 	ALC880_ASUS_W1V,
+	ALC880_ASUS_DIG2,
 	ALC880_UNIWILL_DIG,
+	ALC880_CLEVO,
+	ALC880_TCL_S700,
+	ALC880_LG,
 #ifdef CONFIG_SND_DEBUG
 	ALC880_TEST,
 #endif
+	ALC880_AUTO,
 	ALC880_MODEL_LAST /* last tag */
 };
 
 -57,30
+63,50  enum {
 enum {
 	ALC260_BASIC,
 	ALC260_HP,
-	ALC260_FUJITSU_S702x,
+	ALC260_HP_3013,
+	ALC260_FUJITSU_S702X,
+	ALC260_ACER,
+#ifdef CONFIG_SND_DEBUG
+	ALC260_TEST,
+#endif
+	ALC260_AUTO,
 	ALC260_MODEL_LAST /* last tag */
 };
 
-/* amp values */
-#define AMP_IN_MUTE(idx)	(0x7080 | ((idx)<<8))
-#define AMP_IN_UNMUTE(idx)	(0x7000 | ((idx)<<8))
-#define AMP_OUT_MUTE	0xb080
-#define AMP_OUT_UNMUTE	0xb000
-#define AMP_OUT_ZERO	0xb000
-/* pinctl values */
-#define PIN_IN		0x20
-#define PIN_VREF80	0x24
-#define PIN_VREF50	0x21
-#define PIN_OUT		0x40
-#define PIN_HP		0xc0
-#define PIN_HP_AMP	0x80
+/* ALC262 models */
+enum {
+	ALC262_BASIC,
+	ALC262_FUJITSU,
+	ALC262_AUTO,
+	ALC262_MODEL_LAST /* last tag */
+};
+
+/* ALC861 models */
+enum {
+	ALC861_3ST,
+	ALC861_3ST_DIG,
+	ALC861_6ST_DIG,
+	ALC861_AUTO,
+	ALC861_MODEL_LAST,
+};
+
+/* ALC882 models */
+enum {
+	ALC882_3ST_DIG,
+	ALC882_6ST_DIG,
+	ALC882_AUTO,
+	ALC882_MODEL_LAST,
+};
+
+/* for GPIO Poll */
+#define GPIO_MASK	0x03
 
 struct alc_spec {
 	/* codec parameterization */
-	snd_kcontrol_new_t *mixers[3];	/* mixer arrays */
+	snd_kcontrol_new_t *mixers[5];	/* mixer arrays */
 	unsigned int num_mixers;
 
-	const struct hda_verb *init_verbs[3];	/* initialization
verbs
+	const struct hda_verb *init_verbs[5];	/* initialization
verbs
 						 * don't forget NULL termination!
 						 */
 	unsigned int num_init_verbs;
 -109,18
+135,46  struct alc_spec {
 	unsigned int cur_mux[3];
 
 	/* channel model */
-	const struct alc_channel_mode *channel_mode;
+	const struct hda_channel_mode *channel_mode;
 	int num_channel_mode;
 
 	/* PCM information */
-	struct hda_pcm pcm_rec[2];	/* used in alc_build_pcms() */
+	struct hda_pcm pcm_rec[3];	/* used in alc_build_pcms() */
 
 	/* dynamic controls, init_verbs and input_mux */
 	struct auto_pin_cfg autocfg;
 	unsigned int num_kctl_alloc, num_kctl_used;
 	snd_kcontrol_new_t *kctl_alloc;
 	struct hda_input_mux private_imux;
-	hda_nid_t private_dac_nids[4];
+	hda_nid_t private_dac_nids[5];
+
+	/* hooks */
+	void (*init_hook)(struct hda_codec *codec);
+	void (*unsol_event)(struct hda_codec *codec, unsigned int
res);
+
+	/* for pin sensing */
+	unsigned int sense_updated: 1;
+	unsigned int jack_present: 1;
+};
+
+/*
+ * configuration template - to be copied to the spec
instance
+ */
+struct alc_config_preset {
+	snd_kcontrol_new_t *mixers[5]; /* should be identical size
with spec */
+	const struct hda_verb *init_verbs[5];
+	unsigned int num_dacs;
+	hda_nid_t *dac_nids;
+	hda_nid_t dig_out_nid;		/* optional */
+	hda_nid_t hp_nid;		/* optional */
+	unsigned int num_adc_nids;
+	hda_nid_t *adc_nids;
+	hda_nid_t dig_in_nid;
+	unsigned int num_channel_mode;
+	const struct hda_channel_mode *channel_mode;
+	const struct hda_input_mux *input_mux;
+	void (*unsol_event)(struct hda_codec *, unsigned int);
+	void (*init_hook)(struct hda_codec *);
 };
 
 
 -157,114
+211,287  static int alc_mux_enum_put(snd_kcontrol
 /*
  * channel mode setting
  */
-struct alc_channel_mode {
-	int channels;
-	const struct hda_verb *sequence;
-};
+static int alc_ch_mode_info(snd_kcontrol_t *kcontrol,
snd_ctl_elem_info_t *uinfo)
+{
+	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+	struct alc_spec *spec = codec->spec;
+	return snd_hda_ch_mode_info(codec, uinfo,
spec->channel_mode,
+				    spec->num_channel_mode);
+}
+
+static int alc_ch_mode_get(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
+{
+	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+	struct alc_spec *spec = codec->spec;
+	return snd_hda_ch_mode_get(codec, ucontrol,
spec->channel_mode,
+				   spec->num_channel_mode,
spec->multiout.max_channels);
+}
 
-static int alc880_ch_mode_info(snd_kcontrol_t *kcontrol,
snd_ctl_elem_info_t *uinfo)
+static int alc_ch_mode_put(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
 {
 	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
 	struct alc_spec *spec = codec->spec;
-	int items = kcontrol->private_value ?
(int)kcontrol->private_value : 2;
+	return snd_hda_ch_mode_put(codec, ucontrol,
spec->channel_mode,
+				   spec->num_channel_mode,
&spec->multiout.max_channels);
+}
+
+/*
+ * Control the mode of pin widget settings via the mixer. 
"pc" is used
+ * instead of "%" to avoid consequences of
accidently treating the % as 
+ * being part of a format specifier.  Maximum allowed
length of a value is
+ * 63 characters plus NULL terminator.
+ *
+ * Note: some retasking pin complexes seem to ignore
requests for input
+ * states other than HiZ (eg: PIN_VREFxx) and revert to HiZ
if any of these
+ * are requested.  Therefore order this list so that this
behaviour will not
+ * cause problems when mixer clients move through the enum
sequentially.
+ * NIDs 0x0f and 0x10 have been observed to have this
behaviour.
+ */
+static char *alc_pin_mode_names[] = {
+	"Mic 50pc bias", "Mic 80pc bias",
+	"Line in", "Line out",
"Headphone out",
+};
+static unsigned char alc_pin_mode_values[] = {
+	PIN_VREF50, PIN_VREF80, PIN_IN, PIN_OUT, PIN_HP,
+};
+/* The control can present all 5 options, or it can limit
the options based
+ * in the pin being assumed to be exclusively an input or
an output pin.
+ */
+#define ALC_PIN_DIR_IN    0x00
+#define ALC_PIN_DIR_OUT   0x01
+#define ALC_PIN_DIR_INOUT 0x02
+
+/* Info about the pin modes supported by the three
different pin directions. 
+ * For each direction the minimum and maximum values are
given.
+ */
+static signed char alc_pin_mode_dir_info[3][2] = {
+	{ 0, 2 },    /* ALC_PIN_DIR_IN */
+	{ 3, 4 },    /* ALC_PIN_DIR_OUT */
+	{ 0, 4 },    /* ALC_PIN_DIR_INOUT */
+};
+#define alc_pin_mode_min(_dir)
(alc_pin_mode_dir_info[_dir][0])
+#define alc_pin_mode_max(_dir)
(alc_pin_mode_dir_info[_dir][1])
+#define alc_pin_mode_n_items(_dir) \
+	(alc_pin_mode_max(_dir)-alc_pin_mode_min(_dir)+1)
+
+static int alc_pin_mode_info(snd_kcontrol_t *kcontrol,
snd_ctl_elem_info_t *uinfo)
+{
+	unsigned int item_num = uinfo->value.enumerated.item;
+	unsigned char dir = (kcontrol->private_value >>
16) & 0xff;
 
-	snd_assert(spec->channel_mode, return -ENXIO);
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
-	uinfo->value.enumerated.items = items;
-	if (uinfo->value.enumerated.item >= items)
-		uinfo->value.enumerated.item = items - 1;
-	sprintf(uinfo->value.enumerated.name,
"%dch",
-		spec->channel_mode[uinfo->value.enumerated.item].ch
annels);
+	uinfo->value.enumerated.items =
alc_pin_mode_n_items(dir);
+
+	if (item_num<alc_pin_mode_min(dir) ||
item_num>alc_pin_mode_max(dir))
+		item_num = alc_pin_mode_min(dir);
+	strcpy(uinfo->value.enumerated.name,
alc_pin_mode_names[item_num]);
 	return 0;
 }
 
-static int alc880_ch_mode_get(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
+static int alc_pin_mode_get(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
 {
+	unsigned int i;
 	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct alc_spec *spec = codec->spec;
-	int items = kcontrol->private_value ?
(int)kcontrol->private_value : 2;
-	int i;
+	hda_nid_t nid = kcontrol->private_value & 0xffff;
+	unsigned char dir = (kcontrol->private_value >>
16) & 0xff;
+	long *valp = ucontrol->value.integer.value;
+	unsigned int pinctl =
snd_hda_codec_read(codec,nid,0,AC_VERB_GET_PIN_WIDGET_CONTRO
L,0x00);
 
-	snd_assert(spec->channel_mode, return -ENXIO);
-	for (i = 0; i < items; i++) {
-		if (spec->multiout.max_channels ==
spec->channel_mode[i].channels) {
-			ucontrol->value.enumerated.item[0] = i;
-			break;
-		}
-	}
+	/* Find enumerated value for current pinctl setting */
+	i = alc_pin_mode_min(dir);
+	while (alc_pin_mode_values[i]!=pinctl &&
i<=alc_pin_mode_max(dir))
+		i++;
+	*valp =
i<=alc_pin_mode_max(dir)?i:alc_pin_mode_min(dir);
 	return 0;
 }
 
-static int alc880_ch_mode_put(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
+static int alc_pin_mode_put(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
 {
+	signed int change;
 	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct alc_spec *spec = codec->spec;
-	int mode;
+	hda_nid_t nid = kcontrol->private_value & 0xffff;
+	unsigned char dir = (kcontrol->private_value >>
16) & 0xff;
+	long val = *ucontrol->value.integer.value;
+	unsigned int pinctl =
snd_hda_codec_read(codec,nid,0,AC_VERB_GET_PIN_WIDGET_CONTRO
L,0x00);
 
-	snd_assert(spec->channel_mode, return -ENXIO);
-	mode = ucontrol->value.enumerated.item[0] ? 1 : 0;
-	if (spec->multiout.max_channels ==
spec->channel_mode[mode].channels &&
-	    ! codec->in_resume)
-		return 0;
+	if (val<alc_pin_mode_min(dir) ||
val>alc_pin_mode_max(dir)) 
+		val = alc_pin_mode_min(dir);
 
-	/* change the current channel setting */
-	spec->multiout.max_channels =
spec->channel_mode[mode].channels;
-	if (spec->channel_mode[mode].sequence)
-		snd_hda_sequence_write(codec,
spec->channel_mode[mode].sequence);
+	change = pinctl != alc_pin_mode_values[val];
+	if (change) {
+		/* Set pin mode to that requested */
+		snd_hda_codec_write(codec,nid,0,AC_VERB_SET_PIN_WIDGET_CO
NTROL,
+			alc_pin_mode_values[val]);
 
-	return 1;
+		/* Also enable the retasking pin's input/output as
required 
+		 * for the requested pin mode.  Enum values of 2 or less
are
+		 * input modes.
+		 *
+		 * Dynamically switching the input/output buffers
probably
+		 * reduces noise slightly, particularly on input. 
However,
+		 * havingboth input and output buffers enabled
+		 * simultaneously doesn't seem to be problematic.
+		 */
+		if (val <= 2) {
+			snd_hda_codec_write(codec,nid,0,AC_VERB_SET_AMP_GAIN_MUT
E,
+				AMP_OUT_MUTE);
+			snd_hda_codec_write(codec,nid,0,AC_VERB_SET_AMP_GAIN_MUT
E,
+				AMP_IN_UNMUTE(0));
+		} else {
+			snd_hda_codec_write(codec,nid,0,AC_VERB_SET_AMP_GAIN_MUT
E,
+				AMP_IN_MUTE(0));
+			snd_hda_codec_write(codec,nid,0,AC_VERB_SET_AMP_GAIN_MUT
E,
+				AMP_OUT_UNMUTE);
+		}
+	}
+	return change;
 }
 
-
-/*
- * Control of pin widget settings via the mixer.  Only
boolean settings are
- * supported, so VrefEn can't be controlled using these
functions as they
- * stand.
+#define ALC_PIN_MODE(xname, nid, dir) \
+	{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,
.index = 0,  \
+	  .info = alc_pin_mode_info, \
+	  .get = alc_pin_mode_get, \
+	  .put = alc_pin_mode_put, \
+	  .private_value = nid | (dir<<16) }
+
+/* A switch control for ALC260 GPIO pins.  Multiple GPIOs
can be ganged
+ * together using a mask with more than one bit set.  This
control is
+ * currently used only by the ALC260 test model.  At this
stage they are not
+ * needed for any "production" models.
  */
-static int alc_pinctl_switch_info(snd_kcontrol_t *kcontrol,
snd_ctl_elem_info_t *uinfo)
+#ifdef CONFIG_SND_DEBUG
+static int alc_gpio_data_info(snd_kcontrol_t *kcontrol,
snd_ctl_elem_info_t *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
 	uinfo->value.integer.min = 0;
 	uinfo->value.integer.max = 1;
 	return 0;
-}
-
-static int alc_pinctl_switch_get(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
+}                                
+static int alc_gpio_data_get(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
 {
 	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
 	hda_nid_t nid = kcontrol->private_value & 0xffff;
-	long mask = (kcontrol->private_value >> 16) &
0xff;
+	unsigned char mask = (kcontrol->private_value >>
16) & 0xff;
 	long *valp = ucontrol->value.integer.value;
+	unsigned int val =
snd_hda_codec_read(codec,nid,0,AC_VERB_GET_GPIO_DATA,0x00);
 
-	*valp = 0;
-	if
(snd_hda_codec_read(codec,nid,0,AC_VERB_GET_PIN_WIDGET_CONTR
OL,0x00) & mask)
-		*valp = 1;
+	*valp = (val & mask) != 0;
 	return 0;
 }
+static int alc_gpio_data_put(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
+{
+	signed int change;
+	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+	hda_nid_t nid = kcontrol->private_value & 0xffff;
+	unsigned char mask = (kcontrol->private_value >>
16) & 0xff;
+	long val = *ucontrol->value.integer.value;
+	unsigned int gpio_data =
snd_hda_codec_read(codec,nid,0,AC_VERB_GET_GPIO_DATA,0x00);
+
+	/* Set/unset the masked GPIO bit(s) as needed */
+	change = (val==0?0:mask) != (gpio_data & mask);
+	if (val==0)
+		gpio_data &= ~mask;
+	else
+		gpio_data |= mask;
+	snd_hda_codec_write(codec,nid,0,AC_VERB_SET_GPIO_DATA,gpio
_data);
 
-static int alc_pinctl_switch_put(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
+	return change;
+}
+#define ALC_GPIO_DATA_SWITCH(xname, nid, mask) \
+	{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,
.index = 0,  \
+	  .info = alc_gpio_data_info, \
+	  .get = alc_gpio_data_get, \
+	  .put = alc_gpio_data_put, \
+	  .private_value = nid | (mask<<16) }
+#endif   /* CONFIG_SND_DEBUG */
+
+/* A switch control to allow the enabling of the digital IO
pins on the
+ * ALC260.  This is incredibly simplistic; the intention of
this control is
+ * to provide something in the test model allowing digital
outputs to be
+ * identified if present.  If models are found which can
utilise these
+ * outputs a more complete mixer control can be devised for
those models if
+ * necessary.
+ */
+#ifdef CONFIG_SND_DEBUG
+static int alc_spdif_ctrl_info(snd_kcontrol_t *kcontrol,
snd_ctl_elem_info_t *uinfo)
+{
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+	uinfo->count = 1;
+	uinfo->value.integer.min = 0;
+	uinfo->value.integer.max = 1;
+	return 0;
+}                                
+static int alc_spdif_ctrl_get(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
 {
 	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
 	hda_nid_t nid = kcontrol->private_value & 0xffff;
-	long mask = (kcontrol->private_value >> 16) &
0xff;
+	unsigned char mask = (kcontrol->private_value >>
16) & 0xff;
 	long *valp = ucontrol->value.integer.value;
-	unsigned int pinctl =
snd_hda_codec_read(codec,nid,0,AC_VERB_GET_PIN_WIDGET_CONTRO
L,0x00);
-	int change = ((pinctl & mask)!=0) != *valp;
+	unsigned int val =
snd_hda_codec_read(codec,nid,0,AC_VERB_GET_DIGI_CONVERT,0x00
);
 
-	if (change)
-		snd_hda_codec_write(codec,nid,0,AC_VERB_SET_PIN_WIDGET_CO
NTROL,
-			*valp?(pinctl|mask):(pinctl&~mask));
-	return change;
+	*valp = (val & mask) != 0;
+	return 0;
 }
+static int alc_spdif_ctrl_put(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
+{
+	signed int change;
+	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+	hda_nid_t nid = kcontrol->private_value & 0xffff;
+	unsigned char mask = (kcontrol->private_value >>
16) & 0xff;
+	long val = *ucontrol->value.integer.value;
+	unsigned int ctrl_data =
snd_hda_codec_read(codec,nid,0,AC_VERB_GET_DIGI_CONVERT,0x00
);
+
+	/* Set/unset the masked control bit(s) as needed */
+	change = (val==0?0:mask) != (ctrl_data & mask);
+	if (val==0)
+		ctrl_data &= ~mask;
+	else
+		ctrl_data |= mask;
+	snd_hda_codec_write(codec,nid,0,AC_VERB_SET_DIGI_CONVERT_1
,ctrl_data);
 
-#define ALC_PINCTL_SWITCH(xname, nid, mask) \
+	return change;
+}
+#define ALC_SPDIF_CTRL_SWITCH(xname, nid, mask) \
 	{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,
.index = 0,  \
-	  .info = alc_pinctl_switch_info, \
-	  .get = alc_pinctl_switch_get, \
-	  .put = alc_pinctl_switch_put, \
-	  .private_value = (nid) | (mask<<16) }
+	  .info = alc_spdif_ctrl_info, \
+	  .get = alc_spdif_ctrl_get, \
+	  .put = alc_spdif_ctrl_put, \
+	  .private_value = nid | (mask<<16) }
+#endif   /* CONFIG_SND_DEBUG */
+
+/*
+ * set up from the preset table
+ */
+static void setup_preset(struct alc_spec *spec, const
struct alc_config_preset *preset)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(preset->mixers)
&& preset->mixers[i]; i++)
+		spec->mixers[spec->num_mixers++] =
preset->mixers[i];
+	for (i = 0; i < ARRAY_SIZE(preset->init_verbs)
&& preset->init_verbs[i]; i++)
+		spec->init_verbs[spec->num_init_verbs++] =
preset->init_verbs[i];
+	
+	spec->channel_mode = preset->channel_mode;
+	spec->num_channel_mode = preset->num_channel_mode;
+
+	spec->multiout.max_channels =
spec->channel_mode[0].channels;
+
+	spec->multiout.num_dacs = preset->num_dacs;
+	spec->multiout.dac_nids = preset->dac_nids;
+	spec->multiout.dig_out_nid = preset->dig_out_nid;
+	spec->multiout.hp_nid = preset->hp_nid;
+	
+	spec->input_mux = preset->input_mux;
+
+	spec->num_adc_nids = preset->num_adc_nids;
+	spec->adc_nids = preset->adc_nids;
+	spec->dig_in_nid = preset->dig_in_nid;
+
+	spec->unsol_event = preset->unsol_event;
+	spec->init_hook = preset->init_hook;
+}
 
 /*
  * ALC880 3-stack model
 -286,6
+513,7  static hda_nid_t alc880_adc_nids[3] = {
 
 /* The datasheet says the node 0x07 is connected from
inputs,
  * but it shows zero connection in the real implementation
on some devices.
+ * Note: this is a 915GAV bug, fixed on 915GLV
  */
 static hda_nid_t alc880_adc_nids_alt[2] = {
 	/* ADC1-2 */
 -328,7
+556,7  static struct hda_verb alc880_threestack
 	{ } /* end */
 };
 
-static struct alc_channel_mode alc880_threestack_modes[2] =
{
+static struct hda_channel_mode alc880_threestack_modes[2] =
{
 	{ 2, alc880_threestack_ch2_init },
 	{ 6, alc880_threestack_ch6_init },
 };
 -356,9
+584,9  static snd_kcontrol_new_t alc880_three_s
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Channel Mode",
-		.info = alc880_ch_mode_info,
-		.get = alc880_ch_mode_get,
-		.put = alc880_ch_mode_put,
+		.info = alc_ch_mode_info,
+		.get = alc_ch_mode_get,
+		.put = alc_ch_mode_put,
 	},
 	{ } /* end */
 };
 -443,7
+671,7  static struct hda_verb alc880_fivestack_
 	{ } /* end */
 };
 
-static struct alc_channel_mode alc880_fivestack_modes[2] =
{
+static struct hda_channel_mode alc880_fivestack_modes[2] =
{
 	{ 6, alc880_fivestack_ch6_init },
 	{ 8, alc880_fivestack_ch8_init },
 };
 -473,7
+701,7  static struct hda_input_mux alc880_6stac
 };
 
 /* fixed 8-channels */
-static struct alc_channel_mode alc880_sixstack_modes[1] = {
+static struct hda_channel_mode alc880_sixstack_modes[1] = {
 	{ 8, NULL },
 };
 
 -501,9
+729,9  static snd_kcontrol_new_t alc880_six_sta
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Channel Mode",
-		.info = alc880_ch_mode_info,
-		.get = alc880_ch_mode_get,
-		.put = alc880_ch_mode_put,
+		.info = alc_ch_mode_info,
+		.get = alc_ch_mode_get,
+		.put = alc_ch_mode_put,
 	},
 	{ } /* end */
 };
 -540,7
+768,7  static hda_nid_t alc880_w810_dac_nids[3]
 };
 
 /* fixed 6 channels */
-static struct alc_channel_mode alc880_w810_modes[1] = {
+static struct hda_channel_mode alc880_w810_modes[1] = {
 	{ 6, NULL }
 };
 
 -572,7
+800,7  static hda_nid_t alc880_z71v_dac_nids[1]
 #define ALC880_Z71V_HP_DAC	0x03
 
 /* fixed 2 channels */
-static struct alc_channel_mode alc880_2_jack_modes[1] = {
+static struct hda_channel_mode alc880_2_jack_modes[1] = {
 	{ 2, NULL }
 };
 
 -645,9
+873,9  static snd_kcontrol_new_t alc880_asus_mi
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Channel Mode",
-		.info = alc880_ch_mode_info,
-		.get = alc880_ch_mode_get,
-		.put = alc880_ch_mode_put,
+		.info = alc_ch_mode_info,
+		.get = alc_ch_mode_get,
+		.put = alc_ch_mode_put,
 	},
 	{ } /* end */
 };
 -675,6
+903,33  static snd_kcontrol_new_t alc880_pcbeep_
 	{ } /* end */
 };
 
+/* TCL S700 */
+static snd_kcontrol_new_t alc880_tcl_s700_mixer[] = {
+	HDA_CODEC_VOLUME("Front Playback Volume",
0x0c, 0x0, HDA_OUTPUT),
+	HDA_CODEC_MUTE("Front Playback Switch", 0x1b,
0x0, HDA_OUTPUT),
+	HDA_CODEC_MUTE("Headphone Playback Switch",
0x14, 0x0, HDA_OUTPUT),
+	HDA_CODEC_VOLUME("CD Playback Volume", 0x0B,
0x04, HDA_INPUT),
+	HDA_CODEC_MUTE("CD Playback Switch", 0x0B,
0x04, HDA_INPUT),
+	HDA_CODEC_VOLUME("Mic Playback Volume", 0x0B,
0x0, HDA_INPUT),
+	HDA_CODEC_MUTE("Mic Playback Switch", 0x0B,
0x0, HDA_INPUT),
+	HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0,
HDA_INPUT),
+	HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0,
HDA_INPUT),
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		/* The multiple "Capture Source" controls
confuse alsamixer
+		 * So call somewhat different..
+		 * FIXME: the controls appear in the
"playback" view!
+		 */
+		/* .name = "Capture Source", */
+		.name = "Input Source",
+		.count = 1,
+		.info = alc_mux_enum_info,
+		.get = alc_mux_enum_get,
+		.put = alc_mux_enum_put,
+	},
+	{ } /* end */
+};
+
 /*
  * build control elements
  */
 -974,6
+1229,8  static struct hda_verb alc880_gpio1_init
 	{0x01, AC_VERB_SET_GPIO_MASK, 0x01},
 	{0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01},
 	{0x01, AC_VERB_SET_GPIO_DATA, 0x01},
+
+	{ }
 };
 
 /* Enable GPIO mask and set output */
 -981,10
+1238,196  static struct hda_verb alc880_gpio2_init
 	{0x01, AC_VERB_SET_GPIO_MASK, 0x02},
 	{0x01, AC_VERB_SET_GPIO_DIRECTION, 0x02},
 	{0x01, AC_VERB_SET_GPIO_DATA, 0x02},
+
+	{ }
+};
+
+/* Clevo m520g init */
+static struct hda_verb alc880_pin_clevo_init_verbs[] = {
+	/* headphone output */
+	{0x11, AC_VERB_SET_CONNECT_SEL, 0x01},
+	/* line-out */
+	{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+	{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* Line-in */
+	{0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+	{0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* CD */
+	{0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+	{0x1c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* Mic1 (rear panel) */
+	{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+	{0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* Mic2 (front panel) */
+	{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+	{0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* headphone */
+	{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+	{0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+        /* change to EAPD mode */
+	{0x20, AC_VERB_SET_COEF_INDEX, 0x07},
+	{0x20, AC_VERB_SET_PROC_COEF,  0x3060},
+
+	{ }
+};
+
+static struct hda_verb alc880_pin_tcl_S700_init_verbs[] = {
+	/* Headphone output */
+	{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+	/* Front output*/
+	{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+	{0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
+
+	/* Line In pin widget for input */
+	{0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+	/* CD pin widget for input */
+	{0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+	/* Mic1 (rear panel) pin widget for input and vref at 80%
*/
+	{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+
+	/* change to EAPD mode */
+	{0x20, AC_VERB_SET_COEF_INDEX, 0x07},
+	{0x20, AC_VERB_SET_PROC_COEF,  0x3070},
+
+	{ }
+};
+
+/*
+ * LG m1 express dual
+ *
+ * Pin assignment:
+ *   Rear Line-In/Out (blue): 0x14
+ *   Build-in Mic-In: 0x15
+ *   Speaker-out: 0x17
+ *   HP-Out (green): 0x1b
+ *   Mic-In/Out (red): 0x19
+ *   SPDIF-Out: 0x1e
+ */
+
+/* To make 5.1 output working (green=Front, blue=Surr,
red=CLFE) */
+static hda_nid_t alc880_lg_dac_nids[3] = {
+	0x05, 0x02, 0x03
+};
+
+/* seems analog CD is not working */
+static struct hda_input_mux alc880_lg_capture_source = {
+	.num_items = 3,
+	.items = {
+		{ "Mic", 0x1 },
+		{ "Line", 0x5 },
+		{ "Internal Mic", 0x6 },
+	},
+};
+
+/* 2,4,6 channel modes */
+static struct hda_verb alc880_lg_ch2_init[] = {
+	/* set line-in and mic-in to input */
+	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
+	{ 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
+	{ }
+};
+
+static struct hda_verb alc880_lg_ch4_init[] = {
+	/* set line-in to out and mic-in to input */
+	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
+	{ 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
+	{ }
+};
+
+static struct hda_verb alc880_lg_ch6_init[] = {
+	/* set line-in and mic-in to output */
+	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
+	{ 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
+	{ }
+};
+
+static struct hda_channel_mode alc880_lg_ch_modes[3] = {
+	{ 2, alc880_lg_ch2_init },
+	{ 4, alc880_lg_ch4_init },
+	{ 6, alc880_lg_ch6_init },
+};
+
+static snd_kcontrol_new_t alc880_lg_mixer[] = {
+	/* FIXME: it's not really "master" but front
channels */
+	HDA_CODEC_VOLUME("Master Playback Volume",
0x0f, 0x0, HDA_OUTPUT),
+	HDA_BIND_MUTE("Master Playback Switch", 0x0f,
2, HDA_INPUT),
+	HDA_CODEC_VOLUME("Surround Playback Volume",
0x0c, 0x0, HDA_OUTPUT),
+	HDA_BIND_MUTE("Surround Playback Switch",
0x0c, 2, HDA_INPUT),
+	HDA_CODEC_VOLUME_MONO("Center Playback
Volume", 0x0d, 1, 0x0, HDA_OUTPUT),
+	HDA_CODEC_VOLUME_MONO("LFE Playback Volume",
0x0d, 2, 0x0, HDA_OUTPUT),
+	HDA_BIND_MUTE_MONO("Center Playback Switch",
0x0d, 1, 2, HDA_INPUT),
+	HDA_BIND_MUTE_MONO("LFE Playback Switch",
0x0d, 2, 2, HDA_INPUT),
+	HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b,
0x1, HDA_INPUT),
+	HDA_CODEC_MUTE("Mic Playback Switch", 0x0b,
0x1, HDA_INPUT),
+	HDA_CODEC_VOLUME("Line Playback Volume", 0x0b,
0x06, HDA_INPUT),
+	HDA_CODEC_MUTE("Line Playback Switch", 0x0b,
0x06, HDA_INPUT),
+	HDA_CODEC_VOLUME("Internal Mic Playback
Volume", 0x0b, 0x07, HDA_INPUT),
+	HDA_CODEC_MUTE("Internal Mic Playback Switch",
0x0b, 0x07, HDA_INPUT),
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = "Channel Mode",
+		.info = alc_ch_mode_info,
+		.get = alc_ch_mode_get,
+		.put = alc_ch_mode_put,
+	},
+	{ } /* end */
+};
+
+static struct hda_verb alc880_lg_init_verbs[] = {
+	/* set capture source to mic-in */
+	{0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+	{0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+	{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+	/* mute all amp mixer inputs */
+	{0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5)},
+	{0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(6)},
+	{0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(7)},
+	/* line-in to input */
+	{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+	{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* built-in mic */
+	{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+	{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* speaker-out */
+	{0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+	{0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* mic-in to input */
+	{0x11, AC_VERB_SET_CONNECT_SEL, 0x01},
+	{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+	{0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* HP-out */
+	{0x13, AC_VERB_SET_CONNECT_SEL, 0x03},
+	{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+	{0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+	/* jack sense */
+	{0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | 0x1},
+	{ }
 };
 
+/* toggle speaker-output according to the hp-jack state */
+static void alc880_lg_automute(struct hda_codec *codec)
+{
+	unsigned int present;
+
+	present = snd_hda_codec_read(codec, 0x1b, 0,
+				     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+	snd_hda_codec_amp_update(codec, 0x17, 0, HDA_OUTPUT, 0,
+				 0x80, present ? 0x80 : 0);
+	snd_hda_codec_amp_update(codec, 0x17, 1, HDA_OUTPUT, 0,
+				 0x80, present ? 0x80 : 0);
+}
+
+static void alc880_lg_unsol_event(struct hda_codec *codec,
unsigned int res)
+{
+	/* Looks like the unsol event is incompatible with the
standard
+	 * definition.  4bit tag is placed at 28 bit!
+	 */
+	if ((res >> 28) == 0x01)
+		alc880_lg_automute(codec);
+}
 
 /*
+ * Common callbacks
  */
 
 static int alc_init(struct hda_codec *codec)
 -994,9
+1437,21  static int alc_init(struct hda_codec *co
 
 	for (i = 0; i < spec->num_init_verbs; i++)
 		snd_hda_sequence_write(codec, spec->init_verbs[i]);
+
+	if (spec->init_hook)
+		spec->init_hook(codec);
+
 	return 0;
 }
 
+static void alc_unsol_event(struct hda_codec *codec,
unsigned int res)
+{
+	struct alc_spec *spec = codec->spec;
+
+	if (spec->unsol_event)
+		spec->unsol_event(codec, res);
+}
+
 #ifdef CONFIG_PM
 /*
  * resume
 -1137,6
+1592,13  static struct hda_pcm_stream alc880_pcm_
 	/* NID is set in alc_build_pcms */
 };
 
+/* Used by alc_build_pcms to flag that a PCM has no
playback stream */
+static struct hda_pcm_stream alc_pcm_null_playback = {
+	.substreams = 0,
+	.channels_min = 0,
+	.channels_max = 0,
+};
+
 static int alc_build_pcms(struct hda_codec *codec)
 {
 	struct alc_spec *spec = codec->spec;
 -1147,15
+1609,40  static int alc_build_pcms(struct hda_cod
 	codec->pcm_info = info;
 
 	info->name = spec->stream_name_analog;
-	info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
*(spec->stream_analog_playback);
-	info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid =
spec->multiout.dac_nids[0];
-	info->stream[SNDRV_PCM_STREAM_CAPTURE] =
*(spec->stream_analog_capture);
-	info->stream[SNDRV_PCM_STREAM_CAPTURE].nid =
spec->adc_nids[0];
-
-	info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max =
0;
-	for (i = 0; i < spec->num_channel_mode; i++) {
-		if (spec->channel_mode[i].channels >
info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max) {
-		   
info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max =
spec->channel_mode[i].channels;
+	if (spec->stream_analog_playback) {
+		snd_assert(spec->multiout.dac_nids, return -EINVAL);
+		info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
*(spec->stream_analog_playback);
+		info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid =
spec->multiout.dac_nids[0];
+	}
+	if (spec->stream_analog_capture) {
+		snd_assert(spec->adc_nids, return -EINVAL);
+		info->stream[SNDRV_PCM_STREAM_CAPTURE] =
*(spec->stream_analog_capture);
+		info->stream[SNDRV_PCM_STREAM_CAPTURE].nid =
spec->adc_nids[0];
+	}
+
+	if (spec->channel_mode) {
+		info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max =
0;
+		for (i = 0; i < spec->num_channel_mode; i++) {
+			if (spec->channel_mode[i].channels >
info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max) {
+				info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max
= spec->channel_mode[i].channels;
+			}
+		}
+	}
+
+	/* If the use of more than one ADC is requested for the
current
+	 * model, configure a second analog capture-only PCM.
+	 */
+	if (spec->num_adc_nids > 1) {
+		codec->num_pcms++;
+		info++;
+		info->name = spec->stream_name_analog;
+		/* No playback stream for second PCM */
+		info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
alc_pcm_null_playback;
+		info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = 0;
+		if (spec->stream_analog_capture) {
+			snd_assert(spec->adc_nids, return -EINVAL);
+			info->stream[SNDRV_PCM_STREAM_CAPTURE] =
*(spec->stream_analog_capture);
+			info->stream[SNDRV_PCM_STREAM_CAPTURE].nid =
spec->adc_nids[1];
 		}
 	}
 
 -1163,11
+1650,13  static int alc_build_pcms(struct hda_cod
 		codec->num_pcms++;
 		info++;
 		info->name = spec->stream_name_digital;
-		if (spec->multiout.dig_out_nid) {
+		if (spec->multiout.dig_out_nid &&
+		    spec->stream_digital_playback) {
 			info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
*(spec->stream_digital_playback);
 			info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid =
spec->multiout.dig_out_nid;
 		}
-		if (spec->dig_in_nid) {
+		if (spec->dig_in_nid &&
+		    spec->stream_digital_capture) {
 			info->stream[SNDRV_PCM_STREAM_CAPTURE] =
*(spec->stream_digital_capture);
 			info->stream[SNDRV_PCM_STREAM_CAPTURE].nid =
spec->dig_in_nid;
 		}
 -1199,6
+1688,7  static struct hda_codec_ops alc_patch_op
 	.build_pcms = alc_build_pcms,
 	.init = alc_init,
 	.free = alc_free,
+	.unsol_event = alc_unsol_event,
 #ifdef CONFIG_PM
 	.resume = alc_resume,
 #endif
 -1217,17
+1707,19  static hda_nid_t alc880_test_dac_nids[4]
 };
 
 static struct hda_input_mux alc880_test_capture_source = {
-	.num_items = 5,
+	.num_items = 7,
 	.items = {
 		{ "In-1", 0x0 },
 		{ "In-2", 0x1 },
 		{ "In-3", 0x2 },
 		{ "In-4", 0x3 },
 		{ "CD", 0x4 },
+		{ "Front", 0x5 },
+		{ "Surround", 0x6 },
 	},
 };
 
-static struct alc_channel_mode alc880_test_modes[4] = {
+static struct hda_channel_mode alc880_test_modes[4] = {
 	{ 2, NULL },
 	{ 4, NULL },
 	{ 6, NULL },
 -1393,9
+1885,9  static snd_kcontrol_new_t alc880_test_mi
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Channel Mode",
-		.info = alc880_ch_mode_info,
-		.get = alc880_ch_mode_get,
-		.put = alc880_ch_mode_put,
+		.info = alc_ch_mode_info,
+		.get = alc_ch_mode_get,
+		.put = alc_ch_mode_put,
 	},
 	{ } /* end */
 };
 -1491,6
+1983,8  static struct hda_board_config alc880_cf
 	{ .pci_subvendor = 0x107b, .pci_subdevice = 0x4038,
.config = ALC880_3ST },
 	{ .pci_subvendor = 0x107b, .pci_subdevice = 0x4040,
.config = ALC880_3ST },
 	{ .pci_subvendor = 0x107b, .pci_subdevice = 0x4041,
.config = ALC880_3ST },
+	/* TCL S700 */
+	{ .pci_subvendor = 0x19db, .pci_subdevice = 0x4188,
.config = ALC880_TCL_S700 },
 
 	/* Back 3 jack, front 2 jack (Internal add Aux-In) */
 	{ .pci_subvendor = 0x1025, .pci_subdevice = 0xe310,
.config = ALC880_3ST },
 -1501,6
+1995,8  static struct hda_board_config alc880_cf
 	{ .modelname = "3stack-digout", .config =
ALC880_3ST_DIG },
 	{ .pci_subvendor = 0x8086, .pci_subdevice = 0xe308,
.config = ALC880_3ST_DIG },
 	{ .pci_subvendor = 0x1025, .pci_subdevice = 0x0070,
.config = ALC880_3ST_DIG },
+	/* Clevo m520G NB */
+	{ .pci_subvendor = 0x1558, .pci_subdevice = 0x0520,
.config = ALC880_CLEVO },
 
 	/* Back 3 jack plus 1 SPDIF out jack, front 2 jack
(Internal add Aux-In)*/
 	{ .pci_subvendor = 0x8086, .pci_subdevice = 0xe305,
.config = ALC880_3ST_DIG },
 -1538,13
+2034,21  static struct hda_board_config alc880_cf
 	{ .pci_subvendor = 0x1043, .pci_subdevice = 0x1964,
.config = ALC880_Z71V },
 
 	{ .modelname = "6stack", .config = ALC880_6ST
},
+	{ .pci_subvendor = 0x1043, .pci_subdevice = 0x8196,
.config = ALC880_6ST }, /* ASUS P5GD1-HVM */
+	{ .pci_subvendor = 0x1043, .pci_subdevice = 0x81b4,
.config = ALC880_6ST },
 	{ .pci_subvendor = 0x1019, .pci_subdevice = 0xa884,
.config = ALC880_6ST }, /* Acer APFV */
+	{ .pci_subvendor = 0x1458, .pci_subdevice = 0xa102,
.config = ALC880_6ST }, /* Gigabyte K8N51 */
 
 	{ .modelname = "6stack-digout", .config =
ALC880_6ST_DIG },
 	{ .pci_subvendor = 0x2668, .pci_subdevice = 0x8086,
.config = ALC880_6ST_DIG },
 	{ .pci_subvendor = 0x8086, .pci_subdevice = 0x2668,
.config = ALC880_6ST_DIG },
 	{ .pci_subvendor = 0x1462, .pci_subdevice = 0x1150,
.config = ALC880_6ST_DIG },
 	{ .pci_subvendor = 0xe803, .pci_subdevice = 0x1019,
.config = ALC880_6ST_DIG },
+	{ .pci_subvendor = 0x1039, .pci_subdevice = 0x1234,
.config = ALC880_6ST_DIG },
+	{ .pci_subvendor = 0x1025, .pci_subdevice = 0x0077,
.config = ALC880_6ST_DIG },
+	{ .pci_subvendor = 0x1025, .pci_subdevice = 0x0078,
.config = ALC880_6ST_DIG },
+	{ .pci_subvendor = 0x1025, .pci_subdevice = 0x0087,
.config = ALC880_6ST_DIG },
+	{ .pci_subvendor = 0x1297, .pci_subdevice = 0xc790,
.config = ALC880_6ST_DIG }, /* Shuttle ST20G5 */
 
 	{ .modelname = "asus", .config = ALC880_ASUS
},
 	{ .pci_subvendor = 0x1043, .pci_subdevice = 0x1964,
.config = ALC880_ASUS_DIG },
 -1558,37
+2062,29  static struct hda_board_config alc880_cf
 	{ .pci_subvendor = 0x1043, .pci_subdevice = 0x1123,
.config = ALC880_ASUS_DIG },
 	{ .pci_subvendor = 0x1043, .pci_subdevice = 0x1143,
.config = ALC880_ASUS },
 	{ .pci_subvendor = 0x1043, .pci_subdevice = 0x10b3,
.config = ALC880_ASUS_W1V },
+	{ .pci_subvendor = 0x1558, .pci_subdevice = 0x5401,
.config = ALC880_ASUS_DIG2 },
 
 	{ .modelname = "uniwill", .config =
ALC880_UNIWILL_DIG },
 	{ .pci_subvendor = 0x1584, .pci_subdevice = 0x9050,
.config = ALC880_UNIWILL_DIG },	
 
 	{ .modelname = "F1734", .config = ALC880_F1734
},
 	{ .pci_subvendor = 0x1734, .pci_subdevice = 0x107c,
.config = ALC880_F1734 },
+	{ .pci_subvendor = 0x1584, .pci_subdevice
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )