Skip to content

Commit

Permalink
ALSA: hda/realtek - Choose more cleverly the primary outputs
Browse files Browse the repository at this point in the history
When the speaker outputs are more than the headphone outputs, it implies
that the system has surround speakers while the headphones are only for
monitoring the front.  In such a case, it's better to put speakers as
the primary outputs so that the driver can build up and keep the
surround setup.  Otherwise the system will pick up the headphone as
primary, and offers less channels than the speakers do support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Oct 6, 2011
1 parent f71ff0d commit 0650367
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -3731,7 +3731,8 @@ static int alc_parse_auto_config(struct hda_codec *codec,
return 0; /* can't find valid BIOS pin config */
}

if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT && cfg->hp_outs > 0) {
if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT &&
cfg->line_outs <= cfg->hp_outs) {
/* use HP as primary out */
cfg->speaker_outs = cfg->line_outs;
memcpy(cfg->speaker_pins, cfg->line_out_pins,
Expand Down

0 comments on commit 0650367

Please sign in to comment.