diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-08-18 05:57:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:05:54 -0400 |
commit | 8ddac9ee4b6f08d7cacf79202ab882eefc55b0c0 (patch) | |
tree | 7b14520928ff9417c1ea9d0de1cbff73068dcb73 /drivers/media/video/cx88/cx88-alsa.c | |
parent | 7c03a4488bf6d28078488c70c82357d4286cacc5 (diff) |
V4L/DVB (6064): cx88: Add symbolic names for the PCI interrupt bits
Used for the PCI_INTMSK and PCI_INT_STAT registers.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-alsa.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-alsa.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index 2d666b56020..a529c0a87d1 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c | |||
@@ -149,9 +149,11 @@ static int _cx88_start_audio_dma(snd_cx88_card_t *chip) | |||
149 | /* reset counter */ | 149 | /* reset counter */ |
150 | cx_write(MO_AUDD_GPCNTRL,GP_COUNT_CONTROL_RESET); | 150 | cx_write(MO_AUDD_GPCNTRL,GP_COUNT_CONTROL_RESET); |
151 | 151 | ||
152 | dprintk(1,"Enabling IRQ, setting mask from 0x%x to 0x%x\n",chip->core->pci_irqmask,(chip->core->pci_irqmask | 0x02)); | 152 | dprintk(1, "Enabling IRQ, setting mask from 0x%x to 0x%x\n", |
153 | chip->core->pci_irqmask, | ||
154 | chip->core->pci_irqmask | PCI_INT_AUDINT); | ||
153 | /* enable irqs */ | 155 | /* enable irqs */ |
154 | cx_set(MO_PCI_INTMSK, chip->core->pci_irqmask | 0x02); | 156 | cx_set(MO_PCI_INTMSK, chip->core->pci_irqmask | PCI_INT_AUDINT); |
155 | 157 | ||
156 | 158 | ||
157 | /* Enables corresponding bits at AUD_INT_STAT */ | 159 | /* Enables corresponding bits at AUD_INT_STAT */ |
@@ -184,7 +186,7 @@ static int _cx88_stop_audio_dma(snd_cx88_card_t *chip) | |||
184 | cx_clear(MO_AUD_DMACNTRL, 0x11); | 186 | cx_clear(MO_AUD_DMACNTRL, 0x11); |
185 | 187 | ||
186 | /* disable irqs */ | 188 | /* disable irqs */ |
187 | cx_clear(MO_PCI_INTMSK, 0x02); | 189 | cx_clear(MO_PCI_INTMSK, PCI_INT_AUDINT); |
188 | cx_clear(MO_AUD_INTMSK, | 190 | cx_clear(MO_AUD_INTMSK, |
189 | (1<<16)| | 191 | (1<<16)| |
190 | (1<<12)| | 192 | (1<<12)| |
@@ -273,7 +275,8 @@ static irqreturn_t cx8801_irq(int irq, void *dev_id) | |||
273 | int loop, handled = 0; | 275 | int loop, handled = 0; |
274 | 276 | ||
275 | for (loop = 0; loop < MAX_IRQ_LOOP; loop++) { | 277 | for (loop = 0; loop < MAX_IRQ_LOOP; loop++) { |
276 | status = cx_read(MO_PCI_INTSTAT) & (core->pci_irqmask | 0x02); | 278 | status = cx_read(MO_PCI_INTSTAT) & |
279 | (core->pci_irqmask | PCI_INT_AUDINT); | ||
277 | if (0 == status) | 280 | if (0 == status) |
278 | goto out; | 281 | goto out; |
279 | dprintk( 3, "cx8801_irq\n" ); | 282 | dprintk( 3, "cx8801_irq\n" ); |
@@ -282,8 +285,7 @@ static irqreturn_t cx8801_irq(int irq, void *dev_id) | |||
282 | handled = 1; | 285 | handled = 1; |
283 | cx_write(MO_PCI_INTSTAT, status); | 286 | cx_write(MO_PCI_INTSTAT, status); |
284 | 287 | ||
285 | if (status & 0x02) | 288 | if (status & PCI_INT_AUDINT) { |
286 | { | ||
287 | dprintk( 2, " ALSA IRQ handling\n" ); | 289 | dprintk( 2, " ALSA IRQ handling\n" ); |
288 | cx8801_aud_irq(chip); | 290 | cx8801_aud_irq(chip); |
289 | } | 291 | } |
@@ -293,7 +295,7 @@ static irqreturn_t cx8801_irq(int irq, void *dev_id) | |||
293 | dprintk( 0, "clearing mask\n" ); | 295 | dprintk( 0, "clearing mask\n" ); |
294 | dprintk(1,"%s/0: irq loop -- clearing mask\n", | 296 | dprintk(1,"%s/0: irq loop -- clearing mask\n", |
295 | core->name); | 297 | core->name); |
296 | cx_clear(MO_PCI_INTMSK,0x02); | 298 | cx_clear(MO_PCI_INTMSK, PCI_INT_AUDINT); |
297 | } | 299 | } |
298 | 300 | ||
299 | out: | 301 | out: |