Commit 81740861 authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 20e91c57
...@@ -901,8 +901,7 @@ static void azx_init_chip(struct azx *chip) ...@@ -901,8 +901,7 @@ static void azx_init_chip(struct azx *chip)
azx_int_enable(chip); azx_int_enable(chip);
/* initialize the codec command I/O */ /* initialize the codec command I/O */
if (!chip->single_cmd) azx_init_cmd_io(chip);
azx_init_cmd_io(chip);
/* program the position buffer */ /* program the position buffer */
azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr); azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr);
...@@ -1018,7 +1017,7 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id) ...@@ -1018,7 +1017,7 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)
/* clear rirb int */ /* clear rirb int */
status = azx_readb(chip, RIRBSTS); status = azx_readb(chip, RIRBSTS);
if (status & RIRB_INT_MASK) { if (status & RIRB_INT_MASK) {
if (!chip->single_cmd && (status & RIRB_INT_RESPONSE)) if (status & RIRB_INT_RESPONSE)
azx_update_rirb(chip); azx_update_rirb(chip);
azx_writeb(chip, RIRBSTS, RIRB_INT_MASK); azx_writeb(chip, RIRBSTS, RIRB_INT_MASK);
} }
...@@ -2338,11 +2337,9 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, ...@@ -2338,11 +2337,9 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
goto errout; goto errout;
} }
/* allocate CORB/RIRB */ /* allocate CORB/RIRB */
if (!chip->single_cmd) { err = azx_alloc_cmd_io(chip);
err = azx_alloc_cmd_io(chip); if (err < 0)
if (err < 0) goto errout;
goto errout;
}
/* initialize streams */ /* initialize streams */
azx_init_stream(chip); azx_init_stream(chip);
......
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