Skip to content

Commit de65360

Browse files
hkallweittiwai
authored andcommitted
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>
1 parent 3567eb6 commit de65360

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎include/sound/core.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ struct snd_card {
9999
char driver[16]; /* driver name */
100100
char shortname[32]; /* short name of this soundcard */
101101
char longname[80]; /* name of this soundcard */
102+
char irq_descr[32]; /* Interrupt description */
102103
char mixername[80]; /* mixer name */
103104
char components[128]; /* card components delimited with
104105
space */

‎sound/core/init.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
268268
if (err < 0)
269269
goto __error;
270270

271+
snprintf(card->irq_descr, sizeof(card->irq_descr), "%s:%s",
272+
dev_driver_string(card->dev), dev_name(&card->card_dev));
273+
271274
/* the control interface cannot be accessed from the user space until */
272275
/* snd_cards_bitmask and snd_cards are set with snd_card_register */
273276
err = snd_ctl_create(card);

‎sound/pci/hda/hda_intel.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect)
725725

726726
if (request_irq(chip->pci->irq, azx_interrupt,
727727
chip->msi ? 0 : IRQF_SHARED,
728-
KBUILD_MODNAME, chip)) {
728+
chip->card->irq_descr, chip)) {
729729
dev_err(chip->card->dev,
730730
"unable to grab IRQ %d, disabling device\n",
731731
chip->pci->irq);

0 commit comments

Comments
 (0)