Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216685
b: refs/heads/master
c: 4a4d4a6
h: refs/heads/master
i:
  216683: dc7d988
v: v3
  • Loading branch information
Takashi Iwai committed Sep 9, 2010
1 parent 56f76f8 commit 506f06a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 990061c28ab6c84e1120afb772b69d92d8965da8
refs/heads/master: 4a4d4a6985dd37a3c96534027f054be796bf95f6
19 changes: 19 additions & 0 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4383,6 +4383,23 @@ static void add_auto_cfg_input_pin(struct auto_pin_cfg *cfg, hda_nid_t nid,
}
}

/* sort inputs in the order of AUTO_PIN_* type */
static void sort_autocfg_input_pins(struct auto_pin_cfg *cfg)
{
int i, j;

for (i = 0; i < cfg->num_inputs; i++) {
for (j = i + 1; j < cfg->num_inputs; j++) {
if (cfg->inputs[i].type > cfg->inputs[j].type) {
struct auto_pin_cfg_item tmp;
tmp = cfg->inputs[i];
cfg->inputs[i] = cfg->inputs[j];
cfg->inputs[j] = tmp;
}
}
}
}

/*
* Parse all pin widgets and store the useful pin nids to cfg
*
Expand Down Expand Up @@ -4585,6 +4602,8 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
break;
}

sort_autocfg_input_pins(cfg);

/*
* debug prints of the parsed results
*/
Expand Down

0 comments on commit 506f06a

Please sign in to comment.