Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275293
b: refs/heads/master
c: dccc181
h: refs/heads/master
i:
  275291: 1329b57
v: v3
  • Loading branch information
Takashi Iwai committed Nov 8, 2011
1 parent 894c5ad commit 0d101f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 5a9a51799b23142d2fc3ef94894d3b5ac00d05a5
refs/heads/master: dccc1810f41b42773a2e359907f05a7fd10910bd
13 changes: 7 additions & 6 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static int alc_mux_select(struct hda_codec *codec, unsigned int adc_idx,
struct alc_spec *spec = codec->spec;
const struct hda_input_mux *imux;
unsigned int mux_idx;
int i, type;
int i, type, num_conns;
hda_nid_t nid;

mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx;
Expand All @@ -307,16 +307,17 @@ static int alc_mux_select(struct hda_codec *codec, unsigned int adc_idx,
spec->capsrc_nids[adc_idx] : spec->adc_nids[adc_idx];

/* no selection? */
if (snd_hda_get_conn_list(codec, nid, NULL) <= 1)
num_conns = snd_hda_get_conn_list(codec, nid, NULL);
if (num_conns <= 1)
return 1;

type = get_wcaps_type(get_wcaps(codec, nid));
if (type == AC_WID_AUD_MIX) {
/* Matrix-mixer style (e.g. ALC882) */
for (i = 0; i < imux->num_items; i++) {
unsigned int v = (i == idx) ? 0 : HDA_AMP_MUTE;
snd_hda_codec_amp_stereo(codec, nid, HDA_INPUT,
imux->items[i].index,
int active = imux->items[idx].index;
for (i = 0; i < num_conns; i++) {
unsigned int v = (i == active) ? 0 : HDA_AMP_MUTE;
snd_hda_codec_amp_stereo(codec, nid, HDA_INPUT, i,
HDA_AMP_MUTE, v);
}
} else {
Expand Down

0 comments on commit 0d101f7

Please sign in to comment.