Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353189
b: refs/heads/master
c: 9314a58
h: refs/heads/master
i:
  353187: 431bdd3
v: v3
  • Loading branch information
Takashi Iwai committed Jan 21, 2013
1 parent 7eb31ee commit dce1bac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 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: a769409cf325b697c439acef5d7c0dc4b6a591ba
refs/heads/master: 9314a5813f62e85c8173adf7fd7e088af3b58942
30 changes: 15 additions & 15 deletions trunk/sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,6 @@ static int fill_and_eval_dacs(struct hda_codec *codec,
struct hda_gen_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg;
int i, err, badness;
unsigned int val;

/* set num_dacs once to full for look_for_dac() */
spec->multiout.num_dacs = cfg->line_outs;
Expand Down Expand Up @@ -1489,20 +1488,6 @@ static int fill_and_eval_dacs(struct hda_codec *codec,
spec->multiout.extra_out_nid,
spec->speaker_paths);

/* set initial pinctl targets */
if (spec->prefer_hp_amp || cfg->line_out_type == AUTO_PIN_HP_OUT)
val = PIN_HP;
else
val = PIN_OUT;
set_pin_targets(codec, cfg->line_outs, cfg->line_out_pins, val);
if (cfg->line_out_type != AUTO_PIN_HP_OUT)
set_pin_targets(codec, cfg->hp_outs, cfg->hp_pins, PIN_HP);
if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) {
val = spec->prefer_hp_amp ? PIN_HP : PIN_OUT;
set_pin_targets(codec, cfg->speaker_outs,
cfg->speaker_pins, val);
}

return badness;
}

Expand Down Expand Up @@ -1604,6 +1589,7 @@ static int parse_output_paths(struct hda_codec *codec)
struct hda_gen_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg;
struct auto_pin_cfg *best_cfg;
unsigned int val;
int best_badness = INT_MAX;
int badness;
bool fill_hardwired = true, fill_mio_first = true;
Expand Down Expand Up @@ -1693,6 +1679,20 @@ static int parse_output_paths(struct hda_codec *codec)
HDA_OUTPUT, spec->vmaster_tlv);
}

/* set initial pinctl targets */
if (spec->prefer_hp_amp || cfg->line_out_type == AUTO_PIN_HP_OUT)
val = PIN_HP;
else
val = PIN_OUT;
set_pin_targets(codec, cfg->line_outs, cfg->line_out_pins, val);
if (cfg->line_out_type != AUTO_PIN_HP_OUT)
set_pin_targets(codec, cfg->hp_outs, cfg->hp_pins, PIN_HP);
if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) {
val = spec->prefer_hp_amp ? PIN_HP : PIN_OUT;
set_pin_targets(codec, cfg->speaker_outs,
cfg->speaker_pins, val);
}

kfree(best_cfg);
return 0;
}
Expand Down

0 comments on commit dce1bac

Please sign in to comment.