diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2015-12-22 13:09:05 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-01-12 15:05:16 -0500 |
commit | de65360be0239a63268de589c4189f8ee52dad6c (patch) | |
tree | c7fe0f3b2d33e3e487b6e875826198dae7574ed8 /sound | |
parent | 3567eb6af614dac436c4b16a8d426f9faed639b3 (diff) |
ALSA: hda_intel: add card number to irq description
Currently the info in /proc/interrupts doesn't allow to figure out which
interrupt belongs to which card (HDMI, PCH, ..).
Therefore add card details to the interrupt description.
With the patch the info in /proc/interrupts looks like this:
PCI-MSI 442368-edge snd_hda_intel:card1
PCI-MSI 49152-edge snd_hda_intel:card0
NOTE: this patch adds the new irq_descr field snd_card struct that is
filled automatically at a card object creation. This can be used
generically for other drivers as well. The changes for others will
follow later -- tiwai
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/init.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sound/core/init.c b/sound/core/init.c index 20f37fb3800e..6bda8436d765 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
@@ -268,6 +268,9 @@ int snd_card_new(struct device *parent, int idx, const char *xid, | |||
268 | if (err < 0) | 268 | if (err < 0) |
269 | goto __error; | 269 | goto __error; |
270 | 270 | ||
271 | snprintf(card->irq_descr, sizeof(card->irq_descr), "%s:%s", | ||
272 | dev_driver_string(card->dev), dev_name(&card->card_dev)); | ||
273 | |||
271 | /* the control interface cannot be accessed from the user space until */ | 274 | /* the control interface cannot be accessed from the user space until */ |
272 | /* snd_cards_bitmask and snd_cards are set with snd_card_register */ | 275 | /* snd_cards_bitmask and snd_cards are set with snd_card_register */ |
273 | err = snd_ctl_create(card); | 276 | err = snd_ctl_create(card); |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 83800ac6ebd7..c0bef11afa7e 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -725,7 +725,7 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect) | |||
725 | 725 | ||
726 | if (request_irq(chip->pci->irq, azx_interrupt, | 726 | if (request_irq(chip->pci->irq, azx_interrupt, |
727 | chip->msi ? 0 : IRQF_SHARED, | 727 | chip->msi ? 0 : IRQF_SHARED, |
728 | KBUILD_MODNAME, chip)) { | 728 | chip->card->irq_descr, chip)) { |
729 | dev_err(chip->card->dev, | 729 | dev_err(chip->card->dev, |
730 | "unable to grab IRQ %d, disabling device\n", | 730 | "unable to grab IRQ %d, disabling device\n", |
731 | chip->pci->irq); | 731 | chip->pci->irq); |