From 16ffe32c773dab387cfc5e6bdf181367ff944376 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 4 Aug 2009 13:40:54 +0200 Subject: [PATCH] ALSA: hda - Fix line-out jack handling with STAC/IDT codec When the line-out jack is plugged/unplugged, the driver needs to check the headphone plug, not only the line-out jack itself. Otherwise the headphone or the speaker may be wrongly muted/unmuted. As a result, both STAC_HP_EVENT and STAC_LO_EVENT need to call the same function, stac92xx_hp_detect(). Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 9961fe197694..edeeb5686964 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4782,10 +4782,8 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res) switch (event->type) { case STAC_HP_EVENT: - stac92xx_hp_detect(codec); - break; case STAC_LO_EVENT: - stac92xx_line_out_detect(codec, 0); + stac92xx_hp_detect(codec); break; case STAC_MIC_EVENT: stac92xx_mic_detect(codec); -- 2.39.2