Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257729
b: refs/heads/master
c: b89596a
h: refs/heads/master
i:
  257727: d7474e1
v: v3
  • Loading branch information
Lydia Wang authored and Takashi Iwai committed Jul 4, 2011
1 parent af89f60 commit 9cb3b68
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 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: c4394f5b807289c180a486df70c1a9b1f192f1cb
refs/heads/master: b89596a160dc63043be3fda8babbca9a935af0aa
25 changes: 20 additions & 5 deletions trunk/sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,9 @@ static void activate_output_path(struct hda_codec *codec, struct nid_path *path,
if (enable && path->multi[i])
snd_hda_codec_write(codec, dst, 0,
AC_VERB_SET_CONNECT_SEL, idx);
if (get_wcaps_type(get_wcaps(codec, src)) == AC_WID_AUD_OUT &&
get_wcaps_type(get_wcaps(codec, dst)) == AC_WID_AUD_MIX)
if (!force
&& get_wcaps_type(get_wcaps(codec, src)) == AC_WID_AUD_OUT
&& get_wcaps_type(get_wcaps(codec, dst)) == AC_WID_AUD_MIX)
continue;
if (have_mute(codec, dst, HDA_INPUT)) {
int val = enable ? AMP_IN_UNMUTE(idx) :
Expand Down Expand Up @@ -490,8 +491,8 @@ static void via_auto_init_output(struct hda_codec *codec,
{
struct via_spec *spec = codec->spec;
unsigned int caps;
hda_nid_t pin, nid;
int i, idx;
hda_nid_t pin, nid, pre_nid;
int i, idx, j, num;

if (!path->depth)
return;
Expand All @@ -513,12 +514,26 @@ static void via_auto_init_output(struct hda_codec *codec,
return;
for (i = path->depth - 1; i > 0; i--) {
nid = path->path[i];
pre_nid = path->path[i - 1];
idx = get_connection_index(codec, nid, spec->aa_mix_nid);
if (idx >= 0) {
if (have_mute(codec, nid, HDA_INPUT))
if (have_mute(codec, nid, HDA_INPUT)) {
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_AMP_GAIN_MUTE,
AMP_IN_UNMUTE(idx));
if (pre_nid == spec->multiout.dac_nids[0]) {
num = snd_hda_get_conn_list(codec, nid,
NULL);
for (j = 0; j < num; j++) {
if (j == idx)
continue;
snd_hda_codec_write(codec,
nid, 0,
AC_VERB_SET_AMP_GAIN_MUTE,
AMP_IN_MUTE(j));
}
}
}
break;
}
}
Expand Down

0 comments on commit 9cb3b68

Please sign in to comment.