Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353006
b: refs/heads/master
c: bd32f78
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jan 10, 2013
1 parent ed5c79c commit 5c8be72
Show file tree
Hide file tree
Showing 2 changed files with 17 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: c2fd19c2fc3cc5e609c573f3c66711fd809f9d3c
refs/heads/master: bd32f782b956e6a3040696899a818387ecbe17bc
22 changes: 16 additions & 6 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -2672,6 +2672,10 @@ static int new_analog_input(struct hda_codec *codec, hda_nid_t pin,
struct nid_path *path;
int err, idx;

if (!nid_has_volume(codec, mix_nid, HDA_INPUT) &&
!nid_has_mute(codec, mix_nid, HDA_INPUT))
return 0; /* no need for analog loopback */

path = snd_array_new(&spec->loopback_path);
if (!path)
return -ENOMEM;
Expand All @@ -2680,14 +2684,20 @@ static int new_analog_input(struct hda_codec *codec, hda_nid_t pin,
return -EINVAL;

idx = path->idx[path->depth - 1];
err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, ctlname, ctlidx,
if (nid_has_volume(codec, mix_nid, HDA_INPUT)) {
err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, ctlname, ctlidx,
HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT));
if (err < 0)
return err;
err = __add_pb_sw_ctrl(spec, ALC_CTL_WIDGET_MUTE, ctlname, ctlidx,
if (err < 0)
return err;
}

if (nid_has_mute(codec, mix_nid, HDA_INPUT)) {
err = __add_pb_sw_ctrl(spec, ALC_CTL_WIDGET_MUTE, ctlname, ctlidx,
HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT));
if (err < 0)
return err;
if (err < 0)
return err;
}

add_loopback_list(spec, mix_nid, idx);
return 0;
}
Expand Down

0 comments on commit 5c8be72

Please sign in to comment.