]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Takashi Iwai <tiwai@suse.de> |
2 | Subject: ALSA: hda - Allow concurrent RIRB access in single_cmd mode | |
3 | Patch-mainline: | |
4 | References: bnc#502903 | |
5 | ||
6 | In the single_cmd mode, the current driver code doesn't do any update | |
7 | for RIRB just for any safety reason. But, actually the RIRB and | |
8 | single_cmd mode don't conflict. Unsolicited events can be delivered | |
9 | even while using the single_cmd mode. | |
10 | ||
11 | This patch allows the handling of unsolicited events with single_cmd | |
12 | mode, just always checking RIRB independent from single_cmd flag. | |
13 | ||
14 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
15 | ||
16 | --- | |
17 | sound/pci/hda/hda_intel.c | 13 +++++-------- | |
18 | 1 file changed, 5 insertions(+), 8 deletions(-) | |
19 | ||
20 | --- a/sound/pci/hda/hda_intel.c | |
21 | +++ b/sound/pci/hda/hda_intel.c | |
22 | @@ -868,8 +868,7 @@ static void azx_init_chip(struct azx *ch | |
23 | azx_int_enable(chip); | |
24 | ||
25 | /* initialize the codec command I/O */ | |
26 | - if (!chip->single_cmd) | |
27 | - azx_init_cmd_io(chip); | |
28 | + azx_init_cmd_io(chip); | |
29 | ||
30 | /* program the position buffer */ | |
31 | azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr); | |
32 | @@ -989,7 +988,7 @@ static irqreturn_t azx_interrupt(int irq | |
33 | /* clear rirb int */ | |
34 | status = azx_readb(chip, RIRBSTS); | |
35 | if (status & RIRB_INT_MASK) { | |
36 | - if (!chip->single_cmd && (status & RIRB_INT_RESPONSE)) | |
37 | + if (status & RIRB_INT_RESPONSE) | |
38 | azx_update_rirb(chip); | |
39 | azx_writeb(chip, RIRBSTS, RIRB_INT_MASK); | |
40 | } | |
41 | @@ -2272,11 +2271,9 @@ static int __devinit azx_create(struct s | |
42 | goto errout; | |
43 | } | |
44 | /* allocate CORB/RIRB */ | |
45 | - if (!chip->single_cmd) { | |
46 | - err = azx_alloc_cmd_io(chip); | |
47 | - if (err < 0) | |
48 | - goto errout; | |
49 | - } | |
50 | + err = azx_alloc_cmd_io(chip); | |
51 | + if (err < 0) | |
52 | + goto errout; | |
53 | ||
54 | /* initialize streams */ | |
55 | azx_init_stream(chip); |