Skip to content

Commit

Permalink
ALSA: hda - Fix initialization of secondary headphone and speaker
Browse files Browse the repository at this point in the history
The secondary or later headphones or speakers aren't initialized preoprly
for some codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Sep 16, 2010
1 parent 3b119f6 commit 5855fb8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -10634,16 +10634,21 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
hda_nid_t pin, dac;
int i;

pin = spec->autocfg.hp_pins[0];
if (pin) {
for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
pin = spec->autocfg.hp_pins[i];
if (!pin)
break;
dac = spec->multiout.hp_nid;
if (!dac)
dac = spec->multiout.dac_nids[0]; /* to front */
alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
}
pin = spec->autocfg.speaker_pins[0];
if (pin) {
for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
pin = spec->autocfg.speaker_pins[i];
if (!pin)
break;
dac = spec->multiout.extra_out_nid[0];
if (!dac)
dac = spec->multiout.dac_nids[0]; /* to front */
Expand Down

0 comments on commit 5855fb8

Please sign in to comment.