Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257732
b: refs/heads/master
c: bac4b92
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jul 4, 2011
1 parent a5a880f commit 7ec1456
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18bd2c44b9c7f0ee775e756dd59e12e0939f7ab9
refs/heads/master: bac4b92cf7a444c0af8dd7b269c8791595c44052
23 changes: 16 additions & 7 deletions trunk/sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ static void init_output_pin(struct hda_codec *codec, hda_nid_t pin,

static void via_auto_init_output(struct hda_codec *codec,
struct nid_path *path, int pin_type,
bool force)
bool with_aa_mix, bool force)
{
struct via_spec *spec = codec->spec;
unsigned int caps;
Expand Down Expand Up @@ -520,9 +520,12 @@ static void via_auto_init_output(struct hda_codec *codec,
idx = get_connection_index(codec, nid, spec->aa_mix_nid);
if (idx >= 0) {
if (have_mute(codec, nid, HDA_INPUT)) {
unsigned int mute = with_aa_mix ?
AMP_IN_UNMUTE(idx) : AMP_IN_MUTE(idx);
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_AMP_GAIN_MUTE,
AMP_IN_UNMUTE(idx));
mute);
/* exclusively via aa-mix for front */
if (pre_nid == spec->multiout.dac_nids[0]) {
num = snd_hda_get_conn_list(codec, nid,
NULL);
Expand All @@ -547,23 +550,28 @@ static void via_auto_init_multi_out(struct hda_codec *codec)
int i;

for (i = 0; i < spec->autocfg.line_outs + spec->smart51_nums; i++)
via_auto_init_output(codec, &spec->out_path[i], PIN_OUT, true);
/* enable aa-mute only for the front channel */
via_auto_init_output(codec, &spec->out_path[i], PIN_OUT,
i == 0, true);
}

static void via_auto_init_hp_out(struct hda_codec *codec)
{
struct via_spec *spec = codec->spec;

if (!spec->hp_dac_nid) {
via_auto_init_output(codec, &spec->hp_dep_path, PIN_HP, true);
via_auto_init_output(codec, &spec->hp_dep_path, PIN_HP,
true, true);
return;
}
if (spec->hp_independent_mode) {
activate_output_path(codec, &spec->hp_dep_path, false, false);
via_auto_init_output(codec, &spec->hp_path, PIN_HP, true);
via_auto_init_output(codec, &spec->hp_path, PIN_HP,
true, true);
} else {
activate_output_path(codec, &spec->hp_path, false, false);
via_auto_init_output(codec, &spec->hp_dep_path, PIN_HP, true);
via_auto_init_output(codec, &spec->hp_dep_path, PIN_HP,
true, true);
}
}

Expand All @@ -572,7 +580,8 @@ static void via_auto_init_speaker_out(struct hda_codec *codec)
struct via_spec *spec = codec->spec;

if (spec->autocfg.speaker_outs)
via_auto_init_output(codec, &spec->speaker_path, PIN_OUT, true);
via_auto_init_output(codec, &spec->speaker_path, PIN_OUT,
true, true);
}

static bool is_smart51_pins(struct hda_codec *codec, hda_nid_t pin);
Expand Down

0 comments on commit 7ec1456

Please sign in to comment.