Commit 7376d013 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jaroslav Kysela

[ALSA] intel_hda: MSI support

Simple patch to enable Message Signalled Interrupts for the HDA Intel
audio controller.  Tested with:
 Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03)
MSI is better because it means audio doesn't end up sharing IRQ with USB.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 93f09c4c
...@@ -55,6 +55,7 @@ static char *model; ...@@ -55,6 +55,7 @@ static char *model;
static int position_fix; static int position_fix;
static int probe_mask = -1; static int probe_mask = -1;
static int single_cmd; static int single_cmd;
static int disable_msi;
module_param(index, int, 0444); module_param(index, int, 0444);
MODULE_PARM_DESC(index, "Index value for Intel HD audio interface."); MODULE_PARM_DESC(index, "Index value for Intel HD audio interface.");
...@@ -68,6 +69,8 @@ module_param(probe_mask, int, 0444); ...@@ -68,6 +69,8 @@ module_param(probe_mask, int, 0444);
MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1)."); MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1).");
module_param(single_cmd, bool, 0444); module_param(single_cmd, bool, 0444);
MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs (for debugging only)."); MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs (for debugging only).");
module_param(disable_msi, int, 0);
MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
/* just for backward compatibility */ /* just for backward compatibility */
...@@ -1418,8 +1421,10 @@ static int azx_free(struct azx *chip) ...@@ -1418,8 +1421,10 @@ static int azx_free(struct azx *chip)
msleep(1); msleep(1);
} }
if (chip->irq >= 0) if (chip->irq >= 0) {
pci_disable_msi(chip->pci);
free_irq(chip->irq, (void*)chip); free_irq(chip->irq, (void*)chip);
}
if (chip->remap_addr) if (chip->remap_addr)
iounmap(chip->remap_addr); iounmap(chip->remap_addr);
...@@ -1502,6 +1507,9 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, ...@@ -1502,6 +1507,9 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
goto errout; goto errout;
} }
if (!disable_msi)
pci_enable_msi(pci);
if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED, if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
"HDA Intel", (void*)chip)) { "HDA Intel", (void*)chip)) {
snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq); snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment