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.
Signed-off-by: Chengu Wang wangchengu@gmail.com
---
sound/pci/hda/patch_sigmatel.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 8c48f86..3857add 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -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;
--
1.6.0.4
--001636457ed0b1bcc70470129999
Content-Type: text/x-patch; charset=US-ASCII;
name="0001--ALSA-hda-Correct-EAPD-for-Dell-Inspiron-1525.patch"
Content-Disposition: attachment;
filename="0001--ALSA-hda-Correct-EAPD-for-Dell-Inspiron-1525.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_fxu8s8l10
RnJvbSAzZGZiNTQ2NjZkMDk0MGJmZjQ3NGJlOWRiNzkxNjAzZjgxYzQ2MzAzIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBDaGVuZ3UgV2FuZyA8d2FuZ2NoZW5ndUBnbWFpbC5jb20+CkRh
dGU6IFRodSwgMzAgSnVsIDIwMDkgMTk6NDM6NTUgKzA4MDAKU3ViamVjdDogW1BBVENIXSBbQUxT
QV0gaGRhOiBDb3JyZWN0IEVBUEQgZm9yIERlbGwgSW5zcGlyb24gMTUyNQoKVGhlIGNvbW1pdCAy
NDkxOGI2MWI1NWMyMWUwOWEzZTA3Y2Q4MmUxYjNhODE1NDc4MmRjIHN0YXRpY2FsbHkgY2hhbmdl
cwp0aGUgbW9kZWwgZnJvbSBkZWxsLWJpb3MgdG8gZGVsbC0zc3RhY2sgdG8gc29sdmUgdGhlIHNv
dW5kIGRlY3JlYXNpbmcKcmVncmVzc2lvbiAoaHR0cDovL2xrbWwub3JnL2xrbWwvMjAwOC85LzEy
LzIwMyksIGhvd2V2ZXIgaXQgbGVhZHMgdG8gYW5vdGhlcgpwcm9ibGVtI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