Commit eb995a8c82dba4a8e027c99ac5001fbc287a115c
Committed by
Jaroslav Kysela
1 parent
5c79b1f887
Exists in
master
and in
7 other branches
[ALSA] hda-codec - Fix headphone auto-toggle on sigmatel codec
Fix/optimize the headphone auto-toggle function on sigmatel codecs. The headphone pins are kept as output. When headhpones are unplugged, you cannot hear anyway ;) Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Showing 1 changed file with 1 additions and 10 deletions Side-by-side Diff
sound/pci/hda/patch_sigmatel.c
... | ... | @@ -1432,12 +1432,9 @@ |
1432 | 1432 | for (i = 0; i < cfg->hp_outs; i++) |
1433 | 1433 | enable_pin_detect(codec, cfg->hp_pins[i], |
1434 | 1434 | STAC_HP_EVENT); |
1435 | + stac92xx_auto_init_hp_out(codec); | |
1435 | 1436 | /* fake event to set up pins */ |
1436 | 1437 | codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26); |
1437 | - /* enable the headphones by default. | |
1438 | - * If/when unsol_event detection works, this will be ignored | |
1439 | - */ | |
1440 | - stac92xx_auto_init_hp_out(codec); | |
1441 | 1438 | } else { |
1442 | 1439 | stac92xx_auto_init_multi_out(codec); |
1443 | 1440 | stac92xx_auto_init_hp_out(codec); |
... | ... | @@ -1539,9 +1536,6 @@ |
1539 | 1536 | for (i = 0; i < cfg->speaker_outs; i++) |
1540 | 1537 | stac92xx_reset_pinctl(codec, cfg->speaker_pins[i], |
1541 | 1538 | AC_PINCTL_OUT_EN); |
1542 | - for (i = 0; i < cfg->hp_outs; i++) | |
1543 | - stac92xx_set_pinctl(codec, cfg->hp_pins[i], | |
1544 | - AC_PINCTL_OUT_EN); | |
1545 | 1539 | } else { |
1546 | 1540 | /* enable lineouts, disable hp */ |
1547 | 1541 | for (i = 0; i < cfg->line_outs; i++) |
... | ... | @@ -1550,9 +1544,6 @@ |
1550 | 1544 | for (i = 0; i < cfg->speaker_outs; i++) |
1551 | 1545 | stac92xx_set_pinctl(codec, cfg->speaker_pins[i], |
1552 | 1546 | AC_PINCTL_OUT_EN); |
1553 | - for (i = 0; i < cfg->hp_outs; i++) | |
1554 | - stac92xx_reset_pinctl(codec, cfg->hp_pins[i], | |
1555 | - AC_PINCTL_OUT_EN); | |
1556 | 1547 | } |
1557 | 1548 | } |
1558 | 1549 |