Skip to contentSkip to conversation

hda: Correct EAPD for Dell Inspiron 1525

PATCH In review Chengu Wang 2 participants 2 messages Aug 1, 2009 – Aug 3, 2009 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hda: Correct EAPD for Dell Inspiron 1525

Quoted 1 line

From 3dfb54666d0940bff474be9db791603f81c46303 Mon Sep 17 00:00:00 2001

From: Chengu Wang <[email protected]>
Date: Thu, 30 Jul 2009 19:43:55 +0800
Subject: [PATCH] [ALSA] hda: Correct EAPD for Dell Inspiron 1525

The commit 24918b61b55c21e09a3e07cd82e1b3a8154782dc statically changes the model from dell-bios to dell-3stack to solve the sound decreasing regression (http://lkml.org/lkml/2008/9/12/203), however it leads to another problem that the 2nd headphone jack doesn't work
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3987). So I think the commit 249**2dc is just a workaround. I would like to give a true solution here.

The datasheet for STAC9228 says, GPIO2 is the same pin as VOL DOWN, and the EAPD pin is GPIO0. This is why the sound decreases if we set EAPD as GPIO2. This patch changes EAPD to GPIO0 to solve the problem.

---
 sound/pci/hda/patch_sigmatel.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
sound/pci/hda/patch_sigmatel.c +0 -0
index 8c48f86..3857add 100644
@@ -2264,7 +2264,7 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = {
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x01f3, "Dell Inspiron 1420",

STAC_DELL_BIOS),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ",
STAC_DELL_BIOS),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS),
- SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525",
STAC_DELL_3ST),
+ SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525",
STAC_DELL_BIOS),

 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x0242, "Dell     ", STAC_DELL_BIOS),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x0243, "Dell     ", STAC_DELL_BIOS),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x02ff, "Dell     ", STAC_DELL_BIOS),

@@ -5659,6 +5659,13 @@ static int patch_stac927x(struct hda_codec *codec)
/* GPIO2 High = Enable EAPD */
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; spec->gpio_data = 0x04;
+ switch (codec->subsystem_id) {
+ case 0x1028022f:
+ /* correct EAPD to be GPIO0 */
+ spec->eapd_mask = spec->gpio_mask = 0x01;
+ spec->gpio_dir = spec->gpio_data = 0x01;
+ break;
+ };
spec->dmic_nids = stac927x_dmic_nids; spec->num_dmics = STAC927X_NUM_DMICS;

Signature · 1 line
1.6.0.4

From 3dfb54666d0940bff474be9db791603f81c46303 Mon Sep 17 00:00:00 2001
From: Chengu Wang <[email protected]>
Date: Thu, 30 Jul 2009 19:43:55 +0800
Subject: [PATCH] [ALSA] hda: Correct EAPD for Dell Inspiron 1525

The commit 24918b61b55c21e09a3e07cd82e1b3a8154782dc statically changes the model from dell-bios to dell-3stack to solve the sound decreasing regression (http://lkml.org/lkml/2008/9/12/203), however it leads to another problem that the 2nd headphone jack doesn't work
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3987). So I think the commit 249**2dc is just a workaround. I would like to give a true solution here.

The datasheet for STAC9228 says, GPIO2 is the same pin as VOL DOWN, and the EAPD pin is GPIO0. This is why the sound decreases if we set EAPD as GPIO2. This patch changes EAPD to GPIO0 to solve the problem.

---
 sound/pci/hda/patch_sigmatel.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
sound/pci/hda/patch_sigmatel.c +8 -1
index 8c48f86..3857add 100644
@@ -2264,7 +2264,7 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = {
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x0227, "Dell Vostro 1400  ", STAC_DELL_BIOS),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x022e, "Dell     ", STAC_DELL_BIOS),
-	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x022f, "Dell Inspiron 1525", STAC_DELL_3ST),
+	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x022f, "Dell Inspiron 1525", STAC_DELL_BIOS),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x0242, "Dell     ", STAC_DELL_BIOS),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x0243, "Dell     ", STAC_DELL_BIOS),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x02ff, "Dell     ", STAC_DELL_BIOS),
@@ -5659,6 +5659,13 @@ static int patch_stac927x(struct hda_codec *codec)
 		/* GPIO2 High = Enable EAPD */
 		spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04;
 		spec->gpio_data = 0x04;
+		switch (codec->subsystem_id) {
+		case 0x1028022f:
+			/* correct EAPD to be GPIO0 */
+			spec->eapd_mask = spec->gpio_mask = 0x01;
+			spec->gpio_dir = spec->gpio_data = 0x01;
+			break;
+		};
 		spec->dmic_nids = stac927x_dmic_nids;
 		spec->num_dmics = STAC927X_NUM_DMICS;
 
Signature · 1 line
1.6.0.4

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

At Sat, 1 Aug 2009 19:11:17 +0800,

Quoted 14 lines · Chengu Wang
Quoted 2 lines

From 3dfb54666d0940bff474be9db791603f81c46303 Mon Sep 17 00:00:00 2001

From: Chengu Wang <[email protected]>
Date: Thu, 30 Jul 2009 19:43:55 +0800
Subject: [PATCH] [ALSA] hda: Correct EAPD for Dell Inspiron 1525

The commit 24918b61b55c21e09a3e07cd82e1b3a8154782dc statically changes the model from dell-bios to dell-3stack to solve the sound decreasing regression (http://lkml.org/lkml/2008/9/12/203), however it leads to another problem that the 2nd headphone jack doesn't work
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3987). So I think the commit 249**2dc is just a workaround. I would like to give a true solution here.

Quoted 5 lines

The datasheet for STAC9228 says, GPIO2 is the same pin as VOL DOWN, and the EAPD pin is GPIO0. This is why the sound decreases if we set EAPD as GPIO2. This patch changes EAPD to GPIO0 to solve the problem.

Applied now. Thanks.

Takashi