|
@@ -240,6 +240,10 @@ struct alc_spec {
|
|
/* for pin sensing */
|
|
/* for pin sensing */
|
|
unsigned int sense_updated: 1;
|
|
unsigned int sense_updated: 1;
|
|
unsigned int jack_present: 1;
|
|
unsigned int jack_present: 1;
|
|
|
|
+
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ struct hda_loopback_check loopback;
|
|
|
|
+#endif
|
|
};
|
|
};
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -264,6 +268,9 @@ struct alc_config_preset {
|
|
const struct hda_input_mux *input_mux;
|
|
const struct hda_input_mux *input_mux;
|
|
void (*unsol_event)(struct hda_codec *, unsigned int);
|
|
void (*unsol_event)(struct hda_codec *, unsigned int);
|
|
void (*init_hook)(struct hda_codec *);
|
|
void (*init_hook)(struct hda_codec *);
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ struct hda_amp_list *loopbacks;
|
|
|
|
+#endif
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
@@ -621,6 +628,9 @@ static void setup_preset(struct alc_spec *spec,
|
|
|
|
|
|
spec->unsol_event = preset->unsol_event;
|
|
spec->unsol_event = preset->unsol_event;
|
|
spec->init_hook = preset->init_hook;
|
|
spec->init_hook = preset->init_hook;
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ spec->loopback.amplist = preset->loopbacks;
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
|
|
|
|
/* Enable GPIO mask and set output */
|
|
/* Enable GPIO mask and set output */
|
|
@@ -1287,11 +1297,13 @@ static struct hda_verb alc880_volume_init_verbs[] = {
|
|
* panel mic (mic 2)
|
|
* panel mic (mic 2)
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)},
|
|
|
|
|
|
/*
|
|
/*
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
@@ -1836,8 +1848,8 @@ static struct hda_verb alc880_lg_init_verbs[] = {
|
|
{0x09, 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 */
|
|
/* 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(5)},
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(6)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(7)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)},
|
|
/* line-in to input */
|
|
/* line-in to input */
|
|
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
|
|
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
|
|
{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
|
|
{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
|
|
@@ -1939,7 +1951,7 @@ static struct hda_verb alc880_lg_lw_init_verbs[] = {
|
|
{0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(7)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)},
|
|
/* speaker-out */
|
|
/* speaker-out */
|
|
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
|
|
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
|
|
{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
|
|
{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
|
|
@@ -1979,6 +1991,24 @@ static void alc880_lg_lw_unsol_event(struct hda_codec *codec, unsigned int res)
|
|
alc880_lg_lw_automute(codec);
|
|
alc880_lg_lw_automute(codec);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+static struct hda_amp_list alc880_loopbacks[] = {
|
|
|
|
+ { 0x0b, HDA_INPUT, 0 },
|
|
|
|
+ { 0x0b, HDA_INPUT, 1 },
|
|
|
|
+ { 0x0b, HDA_INPUT, 2 },
|
|
|
|
+ { 0x0b, HDA_INPUT, 3 },
|
|
|
|
+ { 0x0b, HDA_INPUT, 4 },
|
|
|
|
+ { } /* end */
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct hda_amp_list alc880_lg_loopbacks[] = {
|
|
|
|
+ { 0x0b, HDA_INPUT, 1 },
|
|
|
|
+ { 0x0b, HDA_INPUT, 6 },
|
|
|
|
+ { 0x0b, HDA_INPUT, 7 },
|
|
|
|
+ { } /* end */
|
|
|
|
+};
|
|
|
|
+#endif
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Common callbacks
|
|
* Common callbacks
|
|
*/
|
|
*/
|
|
@@ -2005,6 +2035,14 @@ static void alc_unsol_event(struct hda_codec *codec, unsigned int res)
|
|
spec->unsol_event(codec, res);
|
|
spec->unsol_event(codec, res);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+static int alc_check_power_status(struct hda_codec *codec, hda_nid_t nid)
|
|
|
|
+{
|
|
|
|
+ struct alc_spec *spec = codec->spec;
|
|
|
|
+ return snd_hda_check_amp_list_power(codec, &spec->loopback, nid);
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Analog playback callbacks
|
|
* Analog playback callbacks
|
|
*/
|
|
*/
|
|
@@ -2236,6 +2274,9 @@ static struct hda_codec_ops alc_patch_ops = {
|
|
.init = alc_init,
|
|
.init = alc_init,
|
|
.free = alc_free,
|
|
.free = alc_free,
|
|
.unsol_event = alc_unsol_event,
|
|
.unsol_event = alc_unsol_event,
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ .check_power_status = alc_check_power_status,
|
|
|
|
+#endif
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
@@ -2860,6 +2901,9 @@ static struct alc_config_preset alc880_presets[] = {
|
|
.input_mux = &alc880_lg_capture_source,
|
|
.input_mux = &alc880_lg_capture_source,
|
|
.unsol_event = alc880_lg_unsol_event,
|
|
.unsol_event = alc880_lg_unsol_event,
|
|
.init_hook = alc880_lg_automute,
|
|
.init_hook = alc880_lg_automute,
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ .loopbacks = alc880_lg_loopbacks,
|
|
|
|
+#endif
|
|
},
|
|
},
|
|
[ALC880_LG_LW] = {
|
|
[ALC880_LG_LW] = {
|
|
.mixers = { alc880_lg_lw_mixer },
|
|
.mixers = { alc880_lg_lw_mixer },
|
|
@@ -3343,6 +3387,10 @@ static int patch_alc880(struct hda_codec *codec)
|
|
codec->patch_ops = alc_patch_ops;
|
|
codec->patch_ops = alc_patch_ops;
|
|
if (board_config == ALC880_AUTO)
|
|
if (board_config == ALC880_AUTO)
|
|
spec->init_hook = alc880_auto_init;
|
|
spec->init_hook = alc880_auto_init;
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ if (!spec->loopback.amplist)
|
|
|
|
+ spec->loopback.amplist = alc880_loopbacks;
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -3691,12 +3739,12 @@ static struct hda_verb alc260_init_verbs[] = {
|
|
/* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
|
|
/* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
|
|
* Line In 2 = 0x03
|
|
* Line In 2 = 0x03
|
|
*/
|
|
*/
|
|
- /* mute CD */
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
- /* mute Line In */
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- /* mute Mic */
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
|
|
+ /* mute analog inputs */
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
/* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
|
|
/* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
|
|
/* mute Front out path */
|
|
/* mute Front out path */
|
|
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
@@ -3741,12 +3789,12 @@ static struct hda_verb alc260_hp_init_verbs[] = {
|
|
/* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
|
|
/* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
|
|
* Line In 2 = 0x03
|
|
* Line In 2 = 0x03
|
|
*/
|
|
*/
|
|
- /* unmute CD */
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))},
|
|
|
|
- /* unmute Line In */
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))},
|
|
|
|
- /* unmute Mic */
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
|
|
|
|
|
|
+ /* mute analog inputs */
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
/* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
|
|
/* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
|
|
/* Unmute Front out path */
|
|
/* Unmute Front out path */
|
|
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
|
|
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
|
|
@@ -3791,12 +3839,12 @@ static struct hda_verb alc260_hp_3013_init_verbs[] = {
|
|
/* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
|
|
/* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
|
|
* Line In 2 = 0x03
|
|
* Line In 2 = 0x03
|
|
*/
|
|
*/
|
|
- /* unmute CD */
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))},
|
|
|
|
- /* unmute Line In */
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))},
|
|
|
|
- /* unmute Mic */
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
|
|
|
|
|
|
+ /* mute analog inputs */
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
/* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
|
|
/* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
|
|
/* Unmute Front out path */
|
|
/* Unmute Front out path */
|
|
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
|
|
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
|
|
@@ -4418,11 +4466,12 @@ static struct hda_verb alc260_volume_init_verbs[] = {
|
|
* front panel mic (mic 2)
|
|
* front panel mic (mic 2)
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ /* mute analog inputs */
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
|
|
/*
|
|
/*
|
|
* Set up output mixers (0x08 - 0x0a)
|
|
* Set up output mixers (0x08 - 0x0a)
|
|
@@ -4499,6 +4548,17 @@ static void alc260_auto_init(struct hda_codec *codec)
|
|
alc260_auto_init_analog_input(codec);
|
|
alc260_auto_init_analog_input(codec);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+static struct hda_amp_list alc260_loopbacks[] = {
|
|
|
|
+ { 0x07, HDA_INPUT, 0 },
|
|
|
|
+ { 0x07, HDA_INPUT, 1 },
|
|
|
|
+ { 0x07, HDA_INPUT, 2 },
|
|
|
|
+ { 0x07, HDA_INPUT, 3 },
|
|
|
|
+ { 0x07, HDA_INPUT, 4 },
|
|
|
|
+ { } /* end */
|
|
|
|
+};
|
|
|
|
+#endif
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* ALC260 configurations
|
|
* ALC260 configurations
|
|
*/
|
|
*/
|
|
@@ -4698,6 +4758,10 @@ static int patch_alc260(struct hda_codec *codec)
|
|
codec->patch_ops = alc_patch_ops;
|
|
codec->patch_ops = alc_patch_ops;
|
|
if (board_config == ALC260_AUTO)
|
|
if (board_config == ALC260_AUTO)
|
|
spec->init_hook = alc260_auto_init;
|
|
spec->init_hook = alc260_auto_init;
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ if (!spec->loopback.amplist)
|
|
|
|
+ spec->loopback.amplist = alc260_loopbacks;
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -5223,17 +5287,17 @@ static struct hda_verb alc882_auto_init_verbs[] = {
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
|
|
- /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
|
|
|
|
+ /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
* mixer widget
|
|
* mixer widget
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* front panel mic (mic 2)
|
|
* front panel mic (mic 2)
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
|
|
/*
|
|
/*
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
@@ -5322,6 +5386,10 @@ static struct snd_kcontrol_new alc882_capture_mixer[] = {
|
|
{ } /* end */
|
|
{ } /* end */
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+#define alc882_loopbacks alc880_loopbacks
|
|
|
|
+#endif
|
|
|
|
+
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
#define alc882_pcm_analog_playback alc880_pcm_analog_playback
|
|
#define alc882_pcm_analog_playback alc880_pcm_analog_playback
|
|
#define alc882_pcm_analog_capture alc880_pcm_analog_capture
|
|
#define alc882_pcm_analog_capture alc880_pcm_analog_capture
|
|
@@ -5659,6 +5727,10 @@ static int patch_alc882(struct hda_codec *codec)
|
|
codec->patch_ops = alc_patch_ops;
|
|
codec->patch_ops = alc_patch_ops;
|
|
if (board_config == ALC882_AUTO)
|
|
if (board_config == ALC882_AUTO)
|
|
spec->init_hook = alc882_auto_init;
|
|
spec->init_hook = alc882_auto_init;
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ if (!spec->loopback.amplist)
|
|
|
|
+ spec->loopback.amplist = alc882_loopbacks;
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -6242,11 +6314,12 @@ static struct hda_verb alc883_init_verbs[] = {
|
|
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ /* mute analog input loopbacks */
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
|
|
/* Front Pin: output 0 (0x0c) */
|
|
/* Front Pin: output 0 (0x0c) */
|
|
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
|
|
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
|
|
@@ -6515,17 +6588,17 @@ static struct hda_verb alc883_auto_init_verbs[] = {
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
|
|
- /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
|
|
|
|
+ /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
* mixer widget
|
|
* mixer widget
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* front panel mic (mic 2)
|
|
* front panel mic (mic 2)
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
|
|
/*
|
|
/*
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
@@ -6588,6 +6661,10 @@ static struct snd_kcontrol_new alc883_capture_mixer[] = {
|
|
{ } /* end */
|
|
{ } /* end */
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+#define alc883_loopbacks alc880_loopbacks
|
|
|
|
+#endif
|
|
|
|
+
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
#define alc883_pcm_analog_playback alc880_pcm_analog_playback
|
|
#define alc883_pcm_analog_playback alc880_pcm_analog_playback
|
|
#define alc883_pcm_analog_capture alc880_pcm_analog_capture
|
|
#define alc883_pcm_analog_capture alc880_pcm_analog_capture
|
|
@@ -7029,6 +7106,10 @@ static int patch_alc883(struct hda_codec *codec)
|
|
codec->patch_ops = alc_patch_ops;
|
|
codec->patch_ops = alc_patch_ops;
|
|
if (board_config == ALC883_AUTO)
|
|
if (board_config == ALC883_AUTO)
|
|
spec->init_hook = alc883_auto_init;
|
|
spec->init_hook = alc883_auto_init;
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ if (!spec->loopback.amplist)
|
|
|
|
+ spec->loopback.amplist = alc883_loopbacks;
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -7186,17 +7267,17 @@ static struct hda_verb alc262_init_verbs[] = {
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
|
|
- /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
|
|
|
|
+ /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
* mixer widget
|
|
* mixer widget
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* front panel mic (mic 2)
|
|
* front panel mic (mic 2)
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
|
|
/*
|
|
/*
|
|
* Set up output mixers (0x0c - 0x0e)
|
|
* Set up output mixers (0x0c - 0x0e)
|
|
@@ -7565,17 +7646,17 @@ static struct hda_verb alc262_volume_init_verbs[] = {
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
|
|
- /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
|
|
|
|
+ /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
* mixer widget
|
|
* mixer widget
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* front panel mic (mic 2)
|
|
* front panel mic (mic 2)
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
|
|
/*
|
|
/*
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
@@ -7626,19 +7707,19 @@ static struct hda_verb alc262_HP_BPC_init_verbs[] = {
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
|
|
- /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
|
|
|
|
+ /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
* mixer widget
|
|
* mixer widget
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* Note: PASD motherboards uses the Line In 2 as the input for
|
|
* front panel mic (mic 2)
|
|
* front panel mic (mic 2)
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
- {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_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)},
|
|
|
|
|
|
/*
|
|
/*
|
|
* Set up output mixers (0x0c - 0x0e)
|
|
* Set up output mixers (0x0c - 0x0e)
|
|
@@ -7713,20 +7794,20 @@ static struct hda_verb alc262_HP_BPC_WildWest_init_verbs[] = {
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
|
|
- /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
|
|
|
|
+ /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
|
|
* mixer widget
|
|
* mixer widget
|
|
* Note: PASD motherboards uses the Line In 2 as the input for front
|
|
* Note: PASD motherboards uses the Line In 2 as the input for front
|
|
* panel mic (mic 2)
|
|
* panel mic (mic 2)
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
- {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)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)},
|
|
/*
|
|
/*
|
|
* Set up output mixers (0x0c - 0x0e)
|
|
* Set up output mixers (0x0c - 0x0e)
|
|
*/
|
|
*/
|
|
@@ -7796,6 +7877,10 @@ static struct hda_verb alc262_HP_BPC_WildWest_init_verbs[] = {
|
|
{ }
|
|
{ }
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+#define alc262_loopbacks alc880_loopbacks
|
|
|
|
+#endif
|
|
|
|
+
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
#define alc262_pcm_analog_playback alc880_pcm_analog_playback
|
|
#define alc262_pcm_analog_playback alc880_pcm_analog_playback
|
|
#define alc262_pcm_analog_capture alc880_pcm_analog_capture
|
|
#define alc262_pcm_analog_capture alc880_pcm_analog_capture
|
|
@@ -8098,6 +8183,10 @@ static int patch_alc262(struct hda_codec *codec)
|
|
codec->patch_ops = alc_patch_ops;
|
|
codec->patch_ops = alc_patch_ops;
|
|
if (board_config == ALC262_AUTO)
|
|
if (board_config == ALC262_AUTO)
|
|
spec->init_hook = alc262_auto_init;
|
|
spec->init_hook = alc262_auto_init;
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ if (!spec->loopback.amplist)
|
|
|
|
+ spec->loopback.amplist = alc262_loopbacks;
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -8507,6 +8596,10 @@ static void alc268_auto_init(struct hda_codec *codec)
|
|
alc268_auto_init_analog_input(codec);
|
|
alc268_auto_init_analog_input(codec);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+#define alc883_loopbacks alc880_loopbacks
|
|
|
|
+#endif
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* configuration and preset
|
|
* configuration and preset
|
|
*/
|
|
*/
|
|
@@ -9556,6 +9649,16 @@ static void alc861_auto_init(struct hda_codec *codec)
|
|
alc861_auto_init_analog_input(codec);
|
|
alc861_auto_init_analog_input(codec);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+static struct hda_amp_list alc861_loopbacks[] = {
|
|
|
|
+ { 0x15, HDA_INPUT, 0 },
|
|
|
|
+ { 0x15, HDA_INPUT, 1 },
|
|
|
|
+ { 0x15, HDA_INPUT, 2 },
|
|
|
|
+ { 0x15, HDA_INPUT, 3 },
|
|
|
|
+ { } /* end */
|
|
|
|
+};
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
|
|
/*
|
|
/*
|
|
* configuration and preset
|
|
* configuration and preset
|
|
@@ -9753,6 +9856,10 @@ static int patch_alc861(struct hda_codec *codec)
|
|
codec->patch_ops = alc_patch_ops;
|
|
codec->patch_ops = alc_patch_ops;
|
|
if (board_config == ALC861_AUTO)
|
|
if (board_config == ALC861_AUTO)
|
|
spec->init_hook = alc861_auto_init;
|
|
spec->init_hook = alc861_auto_init;
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ if (!spec->loopback.amplist)
|
|
|
|
+ spec->loopback.amplist = alc861_loopbacks;
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -10035,11 +10142,11 @@ static struct hda_verb alc861vd_volume_init_verbs[] = {
|
|
* the analog-loopback mixer widget
|
|
* the analog-loopback mixer widget
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
|
|
/* Capture mixer: unmute Mic, F-Mic, Line, CD inputs */
|
|
/* Capture mixer: unmute Mic, F-Mic, Line, CD inputs */
|
|
{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
@@ -10266,6 +10373,10 @@ static void alc861vd_dallas_unsol_event(struct hda_codec *codec, unsigned int re
|
|
alc861vd_dallas_automute(codec);
|
|
alc861vd_dallas_automute(codec);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+#define alc861vd_loopbacks alc880_loopbacks
|
|
|
|
+#endif
|
|
|
|
+
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
#define alc861vd_pcm_analog_playback alc880_pcm_analog_playback
|
|
#define alc861vd_pcm_analog_playback alc880_pcm_analog_playback
|
|
#define alc861vd_pcm_analog_capture alc880_pcm_analog_capture
|
|
#define alc861vd_pcm_analog_capture alc880_pcm_analog_capture
|
|
@@ -10688,6 +10799,10 @@ static int patch_alc861vd(struct hda_codec *codec)
|
|
|
|
|
|
if (board_config == ALC861VD_AUTO)
|
|
if (board_config == ALC861VD_AUTO)
|
|
spec->init_hook = alc861vd_auto_init;
|
|
spec->init_hook = alc861vd_auto_init;
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ if (!spec->loopback.amplist)
|
|
|
|
+ spec->loopback.amplist = alc861vd_loopbacks;
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -10968,11 +11083,11 @@ static struct hda_verb alc662_init_verbs[] = {
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
|
|
/* Front mixer: unmute input/output amp left and right (volume = 0) */
|
|
/* Front mixer: unmute input/output amp left and right (volume = 0) */
|
|
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
|
|
{0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
{0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
{0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
@@ -11041,11 +11156,11 @@ static struct hda_verb alc662_auto_init_verbs[] = {
|
|
* panel mic (mic 2)
|
|
* panel mic (mic 2)
|
|
*/
|
|
*/
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
/* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
|
|
|
|
- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
|
|
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
|
|
|
|
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
|
|
|
|
|
|
/*
|
|
/*
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
* Set up output mixers (0x0c - 0x0f)
|
|
@@ -11132,6 +11247,10 @@ static void alc662_lenovo_101e_unsol_event(struct hda_codec *codec,
|
|
alc662_lenovo_101e_ispeaker_automute(codec);
|
|
alc662_lenovo_101e_ispeaker_automute(codec);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+#define alc662_loopbacks alc880_loopbacks
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
/* pcm configuration: identiacal with ALC880 */
|
|
#define alc662_pcm_analog_playback alc880_pcm_analog_playback
|
|
#define alc662_pcm_analog_playback alc880_pcm_analog_playback
|
|
@@ -11534,6 +11653,10 @@ static int patch_alc662(struct hda_codec *codec)
|
|
codec->patch_ops = alc_patch_ops;
|
|
codec->patch_ops = alc_patch_ops;
|
|
if (board_config == ALC662_AUTO)
|
|
if (board_config == ALC662_AUTO)
|
|
spec->init_hook = alc662_auto_init;
|
|
spec->init_hook = alc662_auto_init;
|
|
|
|
+#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
|
|
+ if (!spec->loopback.amplist)
|
|
|
|
+ spec->loopback.amplist = alc662_loopbacks;
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|