Skip to contentSkip to conversation

media: cx88-mpeg: clear interrupt status register before streaming video

PATCH Superseded Daniel González Cabanelas 1 participant 1 message Feb 13, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: cx88-mpeg: clear interrupt status register before streaming video

Some cx88 video cards may have transport stream status interrupts set to 1 from cold start. This may lead to errors like this one after initializing the video card:

cx88xx: cx88_print_irqbits: core:irq mpeg [0x100000] ts_err?*
cx8802: cx8802_mpeg_irq: mpeg:general errors: 0x00100000

According to CX2388x datasheet the interrupt status register should be cleared before enabling IRQs to stream video.

Fix it clearing the status register matching the transport stream interrupt mask in the cx8802_start_dma function.

---
 drivers/media/pci/cx88/cx88-mpeg.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/media/pci/cx88/cx88-mpeg.c +3 -0
index 680e1e3fe..9e25fd585 100644
@@ -162,6 +162,9 @@ int cx8802_start_dma(struct cx8802_dev    *dev,
 	cx_write(MO_TS_GPCNTRL, GP_COUNT_CONTROL_RESET);
 	q->count = 0;
 
+	/* clear interrupt status register */
+	cx_write(MO_TS_INTSTAT,  0x1f0011);
+
 	/* enable irqs */
 	dprintk(1, "setting the interrupt mask\n");
 	cx_set(MO_PCI_INTMSK, core->pci_irqmask | PCI_INT_TSINT);
Signature · 1 line
2.35.1