ALSA: hda - Allow concurrent RIRB access in single_cmd mode

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, June 12, 2009 - 12:03 pm

Gitweb:     http://git.kernel.org/linus/8174086167d43d0fd7b21928074145ae1d15bbab
Commit:     8174086167d43d0fd7b21928074145ae1d15bbab
Parent:     20e91c575088337cb94f2ed48380efc305dcb81d
Author:     Takashi Iwai <tiwai@suse.de>
AuthorDate: Tue May 26 15:22:00 2009 +0200
Committer:  Takashi Iwai <tiwai@suse.de>
CommitDate: Tue May 26 15:22:00 2009 +0200

    ALSA: hda - Allow concurrent RIRB access in single_cmd mode
    
    In the single_cmd mode, the current driver code doesn't do any update
    for RIRB just for any safety reason.  But, actually the RIRB and
    single_cmd mode don't conflict.  Unsolicited events can be delivered
    even while using the single_cmd mode.
    
    This patch allows the handling of unsolicited events with single_cmd
    mode, just always checking RIRB independent from single_cmd flag.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/hda_intel.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 82d5218..01d8d97 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -901,8 +901,7 @@ static void azx_init_chip(struct azx *chip)
 	azx_int_enable(chip);
 
 	/* initialize the codec command I/O */
-	if (!chip->single_cmd)
-		azx_init_cmd_io(chip);
+	azx_init_cmd_io(chip);
 
 	/* program the position buffer */
 	azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr);
@@ -1018,7 +1017,7 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)
 	/* clear rirb int */
 	status = azx_readb(chip, RIRBSTS);
 	if (status & RIRB_INT_MASK) {
-		if (!chip->single_cmd && (status & RIRB_INT_RESPONSE))
+		if (status & RIRB_INT_RESPONSE)
 			azx_update_rirb(chip);
 		azx_writeb(chip, RIRBSTS, RIRB_INT_MASK);
 	}
@@ -2338,11 +2337,9 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
 		goto errout;
 	}
 	/* allocate CORB/RIRB */
-	if (!chip->single_cmd) {
-		err = azx_alloc_cmd_io(chip);
-		if (err < 0)
-			goto errout;
-	}
+	err = azx_alloc_cmd_io(chip);
+	if (err < 0)
+		goto errout;
 
 	/* initialize streams */
 	azx_init_stream(chip);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ALSA: hda - Allow concurrent RIRB access in single_cmd mode, Linux Kernel Mailing ..., (Fri Jun 12, 12:03 pm)