Browse Source

ALSA: hda - Add a warning if pending IRQ is found

The pending IRQ handling is a very hackish workaround and should be
avoided as much as possible via a larger bdl_pos_adj option value.
Put a warning message if this situation occurs so that the user may have
a chance to notice that something is wrong.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Takashi Iwai 17 years ago
parent
commit
a6a950a8a8
1 changed files with 9 additions and 0 deletions
  1. 9 0
      sound/pci/hda/hda_intel.c

+ 9 - 0
sound/pci/hda/hda_intel.c

@@ -374,6 +374,7 @@ struct azx {
 	unsigned int single_cmd :1;
 	unsigned int single_cmd :1;
 	unsigned int polling_mode :1;
 	unsigned int polling_mode :1;
 	unsigned int msi :1;
 	unsigned int msi :1;
+	unsigned int irq_pending_warned :1;
 
 
 	/* for debugging */
 	/* for debugging */
 	unsigned int last_cmd;	/* last issued command (to sync) */
 	unsigned int last_cmd;	/* last issued command (to sync) */
@@ -1562,6 +1563,14 @@ static void azx_irq_pending_work(struct work_struct *work)
 	struct azx *chip = container_of(work, struct azx, irq_pending_work);
 	struct azx *chip = container_of(work, struct azx, irq_pending_work);
 	int i, pending;
 	int i, pending;
 
 
+	if (!chip->irq_pending_warned) {
+		printk(KERN_WARNING
+		       "hda-intel: IRQ timing workaround is activated "
+		       "for card #%d. Suggest a bigger bdl_pos_adj.\n",
+		       chip->card->number);
+		chip->irq_pending_warned = 1;
+	}
+
 	for (;;) {
 	for (;;) {
 		pending = 0;
 		pending = 0;
 		spin_lock_irq(&chip->reg_lock);
 		spin_lock_irq(&chip->reg_lock);