Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293104
b: refs/heads/master
c: 8d8bbc6
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Feb 22, 2012
1 parent cd24658 commit e19cbe1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 070cff4cfd267b9d266f4f8362ea99532234eb21
refs/heads/master: 8d8bbc6f17b2a28c58de804064dbdab036d4318e
9 changes: 8 additions & 1 deletion trunk/sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -2474,6 +2474,8 @@ static int create_mic_boost_ctls(struct hda_codec *codec)
{
struct via_spec *spec = codec->spec;
const struct auto_pin_cfg *cfg = &spec->autocfg;
const char *prev_label = NULL;
int type_idx = 0;
int i, err;

for (i = 0; i < cfg->num_inputs; i++) {
Expand All @@ -2488,8 +2490,13 @@ static int create_mic_boost_ctls(struct hda_codec *codec)
if (caps == -1 || !(caps & AC_AMPCAP_NUM_STEPS))
continue;
label = hda_get_autocfg_input_label(codec, cfg, i);
if (prev_label && !strcmp(label, prev_label))
type_idx++;
else
type_idx = 0;
prev_label = label;
snprintf(name, sizeof(name), "%s Boost Volume", label);
err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
err = __via_add_control(spec, VIA_CTL_WIDGET_VOL, name, type_idx,
HDA_COMPOSE_AMP_VAL(pin, 3, 0, HDA_INPUT));
if (err < 0)
return err;
Expand Down

0 comments on commit e19cbe1

Please sign in to comment.