]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
V4L/DVB (6066): cx88-alsa: Change order of interrupt enabling, fix spurious IRQs
authorTrent Piepho <xyzzy@speakeasy.org>
Sun, 19 Aug 2007 01:09:42 +0000 (22:09 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:05:55 +0000 (22:05 -0300)
commit59fd8f8d8ee9f7539758419965381bcccfa6f798
tree314a527b8adea2dc3460d933322832de9a58269d
parent5ba862b77e2d7f9e6e2cb133c43be32ac612aea5
V4L/DVB (6066): cx88-alsa: Change order of interrupt enabling, fix spurious IRQs

Currently the driver turns on audio interrupts, then sets the audio interrupt
mask to select which interrupts to get.  One could received unwanted
interrupts since the mask is set _after_ interrupts have already been turned
on.  Change the order of the operations, and clear any audio interrupt status
bits that are already set for good measure.

Before changing the SRAM FIFO parameters, make sure the FIFO isn't being used.
This shouldn't happen with just the ALSA driver, as it should never try to
turn on FIFO/RISC/DMA while they are already on.  However, the V4L driver
needs to turn the audio FIFO on for analog audio output to work (undocumented
cx88 bug).  The FIFO parameters are in an inconsistent state while they are
updated, and this results in many FIFO sync error IRQs if the FIFO is in use
while it's in this inconsistent state.

Also create and use a bunch of symbolic constants for audio interrupt mask
bits.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/cx88/cx88-alsa.c
drivers/media/video/cx88/cx88-reg.h