diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2013-03-14 10:41:29 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2013-03-14 10:41:29 +0100 |
commit | eb880f7c9a3cf7c6ce440c662c84449840e0b64b (patch) | |
tree | f8ac0b91c78605a2a45b3dd36e54c3e4443d1c11 /sound | |
parent | 78aeecd7bb86f199ea85987413922a9b866aaf5a (diff) |
apalis_t30: Realtek HDA hackApalis_T30_LinuxImageV2.0Alpha1_20130315
Hack for Realtek HDA driver not to crash due to PCI structure not being
initialised as expected.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index cb4d30305059..80a520b1ff4b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1188,7 +1188,10 @@ static int alc_auto_parse_customize_define(struct hda_codec *codec) } ass = codec->subsystem_id & 0xffff; +#ifndef CONFIG_MACH_APALIS_T30 +/* Hack: avoid crash due to codec->bus->pci being NULL */ if (ass != codec->bus->pci->subsystem_device && (ass & 1)) +#endif goto do_sku; nid = 0x1d; @@ -1268,7 +1271,10 @@ static int alc_subsystem_id(struct hda_codec *codec, } ass = codec->subsystem_id & 0xffff; +#ifndef CONFIG_MACH_APALIS_T30 +/* Hack: avoid crash due to codec->bus->pci being NULL */ if ((ass != codec->bus->pci->subsystem_device) && (ass & 1)) +#endif goto do_sku; /* invalid SSID, check the special NID pin defcfg instead */ @@ -1503,7 +1509,12 @@ static void alc_pick_fixup(struct hda_codec *codec, } } if (id < 0) { +#ifdef CONFIG_MACH_APALIS_T30 +/* Hack: avoid crash due to codec->bus->pci being NULL */ + quirk = NULL; +#else quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk); +#endif if (quirk) { id = quirk->value; #ifdef CONFIG_SND_DEBUG_VERBOSE |