Mailing List Archive

cx18: Skipped TS, buffer 84, 31 times - it must have dropped out of rotation
Hi Andy, Devin, others,

I have been running some long term/sustained testing against the cx18 driver
and wanted to report back on some console messages and get an update on
their significance or insignificance. Before I go further, let me again
thank everyone who has contributed to the cx18 driver, it works very well.

I have two cx18s in the machine. Both the analog inputs and digital tuners
of both cards (2 SD/2 HD streams total) in continuous use for the same
period of time (since boot). The digital tuners are tuned to 8VSB off air
feeds and the analog tuners are being fed from S-video/RCA.

The machine has been running (and I intend to leave it for the rest of
today):

1 day, 11:46, 1 user, load average: 0.00, 0.08, 0.25

This is essentially the only function of the box and it is CLI based.

The kernel is:

2.6.31-12 #1 SMP Thu Jan 21 13:34:12 PST 2010 i686 GNU/Linux

I believe it is running the stock kernel v4l2 tree but I need to confirm
that and report back (versus a newer pull).

The cx18s have their own interrupts:

CPU0
0: 102050411 IO-APIC-edge timer
1: 103 IO-APIC-edge i8042
8: 2 IO-APIC-edge rtc0
9: 0 IO-APIC-fasteoi acpi
16: 28957578 IO-APIC-fasteoi cx18-1
17: 29694242 IO-APIC-fasteoi cx18-0
18: 271090 IO-APIC-fasteoi eth0
19: 166655972 IO-APIC-fasteoi eth1
21: 6364 IO-APIC-fasteoi ehci_hcd:usb1, uhci_hcd:usb2,
uhci_hcd:usb3, uhci_hcd:usb4, uhci_hcd:usb5
NMI: 0 Non-maskable interrupts
LOC: 41088260 Local timer interrupts
SPU: 0 Spurious interrupts
CNT: 0 Performance counter interrupts
PND: 0 Performance pending work
RES: 0 Rescheduling interrupts
CAL: 0 Function call interrupts
TLB: 0 TLB shootdowns
ERR: 0
MIS: 0

Over the ~36 hour test period the following messages were reported by the
kernel in relation to cx18 (and anything else that is interspersed, I did
not filter after the driver load notes below):

[ 24.196178] Linux video capture interface: v2.00
[ 24.528572] cx18: Start initialization, version 1.2.0
[ 24.528776] cx18-0: Initializing card 0
[ 24.528879] cx18-0: Autodetected Hauppauge card
[ 24.572167] cx18 0000:00:08.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 24.572281] cx18-0: Unreasonably low latency timer, setting to 64 (was
32)
[ 24.574743] cx18-0: cx23418 revision 01010000 (B)
[ 25.165208] tveeprom 0-0050: Hauppauge model 74541, rev C6B6, serial#
5117034
[ 25.165313] tveeprom 0-0050: MAC address is 00-0D-FE-4E-14-6A
[ 25.165403] tveeprom 0-0050: tuner model is Philips FM1236 MK5 (idx 116,
type 43)
[ 25.165530] tveeprom 0-0050: TV standards NTSC(M) (eeprom 0x08)
[ 25.165620] tveeprom 0-0050: audio processor is CX23418 (idx 38)
[ 25.165710] tveeprom 0-0050: decoder processor is CX23418 (idx 31)
[ 25.165799] tveeprom 0-0050: has radio
[ 25.165885] cx18-0: Autodetected Hauppauge HVR-1600
[ 25.165972] cx18-0: Simultaneous Digital and Analog TV capture supported
[ 25.531382] IRQ 17/cx18-0: IRQF_DISABLED is not guaranteed on shared IRQs
[ 25.705515] tuner 1-0043: chip found @ 0x86 (cx18 i2c driver #0-1)
[ 25.705622] tda9887 1-0043: creating new instance
[ 25.705712] tda9887 1-0043: tda988[5/6/7] found
[ 25.743605] tuner 1-0061: chip found @ 0xc2 (cx18 i2c driver #0-1)
[ 25.759160] cs5345 0-004c: chip found @ 0x98 (cx18 i2c driver #0-0)
[ 25.761324] tuner-simple 1-0061: creating new instance
[ 25.761416] tuner-simple 1-0061: type set to 43 (Philips NTSC MK3
(FM1236MK3 or FM1236/F))
[ 25.763952] cx18-0: Registered device video0 for encoder MPEG (64 x 32
kB)
[ 25.764095] DVB: registering new adapter (cx18)
[ 25.879907] MXL5005S: Attached at address 0x63
[ 25.891437] DVB: registering adapter 0 frontend 0 (Samsung S5H1409
QAM/8VSB Frontend)...
[ 25.891749] cx18-0: DVB Frontend registered
[ 25.891836] cx18-0: Registered DVB adapter0 for TS (32 x 32 kB)
[ 25.891976] cx18-0: Registered device video32 for encoder YUV (16 x 128
kB)
[ 25.892161] cx18-0: Registered device vbi0 for encoder VBI (20 x 51984
bytes)
[ 25.892298] cx18-0: Registered device video24 for encoder PCM audio (256
x 4 kB)
[ 25.892462] cx18-0: Registered device radio0 for encoder radio
[ 25.892551] cx18-0: Initialized card: Hauppauge HVR-1600
[ 25.897187] cx18-1: Initializing card 1
[ 25.897287] cx18-1: Autodetected Hauppauge card
[ 25.900800] cx18 0000:00:0d.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 25.900914] cx18-1: Unreasonably low latency timer, setting to 64 (was
32)
[ 25.903384] cx18-1: cx23418 revision 01010000 (B)
[ 26.177182] tveeprom 3-0050: Hauppauge model 74541, rev C6B6, serial#
5117196
[ 26.177286] tveeprom 3-0050: MAC address is 00-0D-FE-4E-15-0C
[ 26.177377] tveeprom 3-0050: tuner model is Philips FM1236 MK5 (idx 116,
type 43)
[ 26.177506] tveeprom 3-0050: TV standards NTSC(M) (eeprom 0x08)
[ 26.177597] tveeprom 3-0050: audio processor is CX23418 (idx 38)
[ 26.177688] tveeprom 3-0050: decoder processor is CX23418 (idx 31)
[ 26.177778] tveeprom 3-0050: has radio
[ 26.177863] cx18-1: Autodetected Hauppauge HVR-1600
[ 26.177951] cx18-1: Simultaneous Digital and Analog TV capture supported
[ 26.271257] IRQ 16/cx18-1: IRQF_DISABLED is not guaranteed on shared IRQs
[ 26.299320] tuner 4-0043: chip found @ 0x86 (cx18 i2c driver #1-1)
[ 26.299425] tda9887 4-0043: creating new instance
[ 26.299512] tda9887 4-0043: tda988[5/6/7] found
[ 26.312108] tuner 4-0061: chip found @ 0xc2 (cx18 i2c driver #1-1)
[ 26.321132] cs5345 3-004c: chip found @ 0x98 (cx18 i2c driver #1-0)
[ 26.323210] tuner-simple 4-0061: creating new instance
[ 26.323301] tuner-simple 4-0061: type set to 43 (Philips NTSC MK3
(FM1236MK3 or FM1236/F))
[ 26.325931] cx18-1: Registered device video1 for encoder MPEG (64 x 32
kB)
[ 26.326031] DVB: registering new adapter (cx18)
[ 26.378406] MXL5005S: Attached at address 0x63
[ 26.378510] DVB: registering adapter 1 frontend 0 (Samsung S5H1409
QAM/8VSB Frontend)...
[ 26.383031] cx18-1: DVB Frontend registered
[ 26.383131] cx18-1: Registered DVB adapter1 for TS (32 x 32 kB)
[ 26.384229] cx18-1: Registered device video33 for encoder YUV (16 x 128
kB)
[ 26.385296] cx18-1: Registered device vbi1 for encoder VBI (20 x 51984
bytes)
[ 26.386359] cx18-1: Registered device video25 for encoder PCM audio (256
x 4 kB)
[ 26.387456] cx18-1: Registered device radio1 for encoder radio
[ 26.387557] cx18-1: Initialized card: Hauppauge HVR-1600
[ 26.391022] cx18: End initialization
[ 29.105914] f71805f: Found F71805F/FG chip at 0x290, revision 19
[ 29.106112] ACPI: I/O resource f71805f [0x290-0x297] conflicts with ACPI
region IP__ [0x295-0x296]
[ 29.106239] ACPI: This conflict may cause random problems and system
instability
[ 29.106364] ACPI: If an ACPI driver is available for this device, you
should use it instead of the native driver
[ 69.155517] warning: `ntpd' uses 32-bit capabilities (legacy support in
use)
[ 69.894725] r8169: eth1: link up
[ 71.384063] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-cpu.fw
[ 71.499573] cx18-0: loaded v4l-cx23418-cpu.fw firmware (158332 bytes)
[ 71.526541] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-apu.fw
[ 71.631332] cx18-0: loaded v4l-cx23418-apu.fw firmware V00120000 (141200
bytes)
[ 71.638409] cx18-0: FW version: 0.0.74.0 (Release 2007/03/12)
[ 71.848043] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-cpu.fw
[ 71.989501] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-apu.fw
[ 72.305707] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-dig.fw
[ 72.505865] cx18-0 843: loaded v4l-cx23418-dig.fw firmware (16382 bytes)
[ 72.524287] cx18-0 843: verified load of v4l-cx23418-dig.fw firmware
(16382 bytes)
[ 74.088057] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-cpu.fw
[ 74.204120] cx18-1: loaded v4l-cx23418-cpu.fw firmware (158332 bytes)
[ 74.239605] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-apu.fw
[ 74.348652] cx18-1: loaded v4l-cx23418-apu.fw firmware V00120000 (141200
bytes)
[ 74.355165] cx18-1: FW version: 0.0.74.0 (Release 2007/03/12)
[ 74.564044] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-cpu.fw
[ 74.713418] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-apu.fw
[ 75.033721] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-dig.fw
[ 75.238313] cx18-1 843: loaded v4l-cx23418-dig.fw firmware (16382 bytes)
[ 75.256845] cx18-1 843: verified load of v4l-cx23418-dig.fw firmware
(16382 bytes)
[ 4197.142213] cx18-1: Fell behind! Ignoring stale mailbox with
inconsistent data. Lost buffer for mailbox seq no 469417
[ 4197.558551] cx18-1: Skipped TS, buffer 83, 31 times - it must have
dropped out of rotation
[ 9909.916910] cx18-1: Could not find buf 61 for stream encoder MPEG
[ 9910.335032] cx18-1: Skipped TS, buffer 92, 31 times - it must have
dropped out of rotation
[15105.750537] cx18-1: Could not find buf 29 for stream TS
[15106.155436] cx18-1: Skipped TS, buffer 94, 31 times - it must have
dropped out of rotation
[16793.846072] cx18-1: Could not find buf 3 for stream TS
[16794.250056] cx18-1: Skipped TS, buffer 82, 31 times - it must have
dropped out of rotation
[17572.982507] cx18-1: Skipped TS, buffer 91, 31 times - it must have
dropped out of rotation
[23984.563140] cx18-1: Fell behind! Ignoring stale mailbox with
inconsistent data. Lost buffer for mailbox seq no 2694933
[23984.981430] cx18-1: Skipped TS, buffer 80, 31 times - it must have
dropped out of rotation
[33632.560953] cx18-1: Could not find buf 29 for stream TS
[33632.965604] cx18-1: Skipped TS, buffer 75, 31 times - it must have
dropped out of rotation
[43284.124275] cx18-1: Skipped encoder MPEG, buffer 0, 62 times - it must
have dropped out of rotation
[44655.809227] cx18-1: Fell behind! Ignoring stale mailbox with
inconsistent data. Lost buffer for mailbox seq no 5010444
[44656.226448] cx18-1: Skipped TS, buffer 78, 31 times - it must have
dropped out of rotation
[47348.870312] cx18-1: Could not find buf 47 for stream TS
[47349.274013] cx18-1: Skipped TS, buffer 78, 31 times - it must have
dropped out of rotation
[48523.968101] cx18-1: Could not find buf 28 for stream encoder MPEG
[48524.386717] cx18-1: Skipped TS, buffer 67, 31 times - it must have
dropped out of rotation
[54808.828854] cx18-1: Could not find buf 33 for stream encoder MPEG
[54809.245866] cx18-1: Skipped TS, buffer 86, 31 times - it must have
dropped out of rotation
[55626.087582] cx18-1: Could not find buf 55 for stream encoder MPEG
[55626.503956] cx18-1: Skipped TS, buffer 66, 31 times - it must have
dropped out of rotation
[56177.621914] cx18-1: Could not find buf 45 for stream TS
[56178.025514] cx18-1: Skipped TS, buffer 70, 31 times - it must have
dropped out of rotation
[60946.553292] cx18-1: Could not find buf 36 for stream encoder MPEG
[60946.970452] cx18-1: Skipped TS, buffer 75, 31 times - it must have
dropped out of rotation
[61578.160743] cx18-1: Could not find buf 4 for stream encoder MPEG
[61578.578147] cx18-1: Skipped TS, buffer 79, 31 times - it must have
dropped out of rotation
[64291.856103] cx18-0: Fell behind! Ignoring stale mailbox with
inconsistent data. Lost buffer for mailbox seq no 7406174
[64292.274876] cx18-0: Skipped TS, buffer 79, 31 times - it must have
dropped out of rotation
[65071.900959] cx18-1: Could not find buf 17 for stream encoder MPEG
[65072.317733] cx18-1: Skipped TS, buffer 79, 31 times - it must have
dropped out of rotation
[74245.029039] cx18-1: Could not find buf 20 for stream encoder MPEG
[74245.446238] cx18-1: Skipped TS, buffer 72, 31 times - it must have
dropped out of rotation
[79116.088216] cx18-1: Could not find buf 7 for stream encoder MPEG
[79117.660924] cx18-1: Skipped encoder MPEG, buffer 6, 62 times - it must
have dropped out of rotation
[85787.681367] cx18-1: Could not find buf 91 for stream TS
[85789.218643] cx18-1: Skipped encoder MPEG, buffer 6, 61 times - it must
have dropped out of rotation
[86552.050998] cx18-1: Could not find buf 94 for stream TS
[86553.690293] cx18-1: Skipped encoder MPEG, buffer 33, 62 times - it must
have dropped out of rotation
[89534.829896] cx18-1: Fell behind! Ignoring stale mailbox with
inconsistent data. Lost buffer for mailbox seq no 10057972
[89535.247072] cx18-1: Skipped TS, buffer 84, 31 times - it must have
dropped out of rotation
[100201.762851] cx18-1: Skipped TS, buffer 64, 31 times - it must have
dropped out of rotation
[100494.564111] cx18-1: Could not find buf 20 for stream encoder MPEG
[100494.981764] cx18-1: Skipped TS, buffer 94, 31 times - it must have
dropped out of rotation
[109336.383351] cx18-1: Skipped encoder MPEG, buffer 57, 60 times - it must
have dropped out of rotation
[109357.905012] cx18-1: Fell behind! Ignoring stale mailbox with
inconsistent data. Lost buffer for mailbox seq no 12287627
[109358.322565] cx18-1: Skipped TS, buffer 81, 31 times - it must have
dropped out of rotation
[109614.120079] cx18-1: Could not find buf 51 for stream encoder MPEG
[109615.653318] cx18-1: Skipped encoder MPEG, buffer 50, 61 times - it must
have dropped out of rotation
[113699.952949] cx18-1: Could not find buf 89 for stream encoder MPEG
[113701.526278] cx18-1: Skipped encoder MPEG, buffer 9, 61 times - it must
have dropped out of rotation
[118893.330393] cx18-1: Could not find buf 32 for stream encoder MPEG
[118893.747765] cx18-1: Skipped TS, buffer 67, 31 times - it must have
dropped out of rotation

So the questions:

Are these errors of concern? (It seems like a very modest amount of errors
given the sustained 36 hour test of 4 simultaneous streams and mostly on
cx18-1).

What can be done to mitigate the conditions causing them?

Can the error logging be enhanced to report which input (analog or digital)
was the source of the error condition?

Thanks,

-Jeff
Re: cx18: Skipped TS, buffer 84, 31 times - it must have dropped out of rotation [ In reply to ]
On Sun, 2010-03-21 at 09:36 -0700, Jeff Campbell wrote:
> Hi Andy, Devin, others,
>
> I have been running some long term/sustained testing against the cx18
> driver and wanted to report back on some console messages and get an
> update on their significance or insignificance. Before I go further,
> let me again thank everyone who has contributed to the cx18 driver, it
> works very well.
>
> I have two cx18s in the machine. Both the analog inputs and digital
> tuners of both cards (2 SD/2 HD streams total) in continuous use for
> the same period of time (since boot). The digital tuners are tuned to
> 8VSB off air feeds and the analog tuners are being fed from
> S-video/RCA.
>
> The machine has been running (and I intend to leave it for the rest of
> today):
>
> 1 day, 11:46, 1 user, load average: 0.00, 0.08, 0.25
>
> This is essentially the only function of the box and it is CLI based.
>
> The kernel is:
>
> 2.6.31-12 #1 SMP Thu Jan 21 13:34:12 PST 2010 i686 GNU/Linux
>
> I believe it is running the stock kernel v4l2 tree but I need to
> confirm that and report back (versus a newer pull).
>
> The cx18s have their own interrupts:
>
> CPU0
> 0: 102050411 IO-APIC-edge timer
> 1: 103 IO-APIC-edge i8042
> 8: 2 IO-APIC-edge rtc0
> 9: 0 IO-APIC-fasteoi acpi
> 16: 28957578 IO-APIC-fasteoi cx18-1
> 17: 29694242 IO-APIC-fasteoi cx18-0
> 18: 271090 IO-APIC-fasteoi eth0
> 19: 166655972 IO-APIC-fasteoi eth1
> 21: 6364 IO-APIC-fasteoi ehci_hcd:usb1, uhci_hcd:usb2,
> uhci_hcd:usb3, uhci_hcd:usb4, uhci_hcd:usb5
> NMI: 0 Non-maskable interrupts
> LOC: 41088260 Local timer interrupts
> SPU: 0 Spurious interrupts
> CNT: 0 Performance counter interrupts
> PND: 0 Performance pending work
> RES: 0 Rescheduling interrupts
> CAL: 0 Function call interrupts
> TLB: 0 TLB shootdowns
> ERR: 0
> MIS: 0
>
> Over the ~36 hour test period the following messages were reported by
> the kernel in relation to cx18 (and anything else that is
> interspersed, I did not filter after the driver load notes below):
>
> [ 24.196178] Linux video capture interface: v2.00
> [ 24.528572] cx18: Start initialization, version 1.2.0
> [ 24.528776] cx18-0: Initializing card 0
> [ 24.528879] cx18-0: Autodetected Hauppauge card
> [ 24.572167] cx18 0000:00:08.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
> [ 24.572281] cx18-0: Unreasonably low latency timer, setting to 64 (was 32)
> [ 24.574743] cx18-0: cx23418 revision 01010000 (B)
> [ 25.165208] tveeprom 0-0050: Hauppauge model 74541, rev C6B6, serial# 5117034
> [ 25.165313] tveeprom 0-0050: MAC address is 00-0D-FE-4E-14-6A
> [ 25.165403] tveeprom 0-0050: tuner model is Philips FM1236 MK5 (idx 116, type 43)
> [ 25.165530] tveeprom 0-0050: TV standards NTSC(M) (eeprom 0x08)
> [ 25.165620] tveeprom 0-0050: audio processor is CX23418 (idx 38)
> [ 25.165710] tveeprom 0-0050: decoder processor is CX23418 (idx 31)
> [ 25.165799] tveeprom 0-0050: has radio
> [ 25.165885] cx18-0: Autodetected Hauppauge HVR-1600
> [ 25.165972] cx18-0: Simultaneous Digital and Analog TV capture supported
> [ 25.531382] IRQ 17/cx18-0: IRQF_DISABLED is not guaranteed on shared IRQs
> [ 25.705515] tuner 1-0043: chip found @ 0x86 (cx18 i2c driver #0-1)
> [ 25.705622] tda9887 1-0043: creating new instance
> [ 25.705712] tda9887 1-0043: tda988[5/6/7] found
> [ 25.743605] tuner 1-0061: chip found @ 0xc2 (cx18 i2c driver #0-1)
> [ 25.759160] cs5345 0-004c: chip found @ 0x98 (cx18 i2c driver #0-0)
> [ 25.761324] tuner-simple 1-0061: creating new instance
> [ 25.761416] tuner-simple 1-0061: type set to 43 (Philips NTSC MK3 (FM1236MK3 or FM1236/F))
> [ 25.763952] cx18-0: Registered device video0 for encoder MPEG (64 x 32 kB)
> [ 25.764095] DVB: registering new adapter (cx18)
> [ 25.879907] MXL5005S: Attached at address 0x63
> [ 25.891437] DVB: registering adapter 0 frontend 0 (Samsung S5H1409 QAM/8VSB Frontend)...
> [ 25.891749] cx18-0: DVB Frontend registered
> [ 25.891836] cx18-0: Registered DVB adapter0 for TS (32 x 32 kB)
> [ 25.891976] cx18-0: Registered device video32 for encoder YUV (16 x 128 kB)
> [ 25.892161] cx18-0: Registered device vbi0 for encoder VBI (20 x 51984 bytes)
> [ 25.892298] cx18-0: Registered device video24 for encoder PCM audio (256 x 4 kB)
> [ 25.892462] cx18-0: Registered device radio0 for encoder radio
> [ 25.892551] cx18-0: Initialized card: Hauppauge HVR-1600
> [ 25.897187] cx18-1: Initializing card 1
> [ 25.897287] cx18-1: Autodetected Hauppauge card
> [ 25.900800] cx18 0000:00:0d.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [ 25.900914] cx18-1: Unreasonably low latency timer, setting to 64 (was 32)
> [ 25.903384] cx18-1: cx23418 revision 01010000 (B)
> [ 26.177182] tveeprom 3-0050: Hauppauge model 74541, rev C6B6, serial# 5117196
> [ 26.177286] tveeprom 3-0050: MAC address is 00-0D-FE-4E-15-0C
> [ 26.177377] tveeprom 3-0050: tuner model is Philips FM1236 MK5 (idx 116, type 43)
> [ 26.177506] tveeprom 3-0050: TV standards NTSC(M) (eeprom 0x08)
> [ 26.177597] tveeprom 3-0050: audio processor is CX23418 (idx 38)
> [ 26.177688] tveeprom 3-0050: decoder processor is CX23418 (idx 31)
> [ 26.177778] tveeprom 3-0050: has radio
> [ 26.177863] cx18-1: Autodetected Hauppauge HVR-1600
> [ 26.177951] cx18-1: Simultaneous Digital and Analog TV capture supported
> [ 26.271257] IRQ 16/cx18-1: IRQF_DISABLED is not guaranteed on shared IRQs
> [ 26.299320] tuner 4-0043: chip found @ 0x86 (cx18 i2c driver #1-1)
> [ 26.299425] tda9887 4-0043: creating new instance
> [ 26.299512] tda9887 4-0043: tda988[5/6/7] found
> [ 26.312108] tuner 4-0061: chip found @ 0xc2 (cx18 i2c driver #1-1)
> [ 26.321132] cs5345 3-004c: chip found @ 0x98 (cx18 i2c driver #1-0)
> [ 26.323210] tuner-simple 4-0061: creating new instance
> [ 26.323301] tuner-simple 4-0061: type set to 43 (Philips NTSC MK3 (FM1236MK3 or FM1236/F))
> [ 26.325931] cx18-1: Registered device video1 for encoder MPEG (64 x 32 kB)
> [ 26.326031] DVB: registering new adapter (cx18)
> [ 26.378406] MXL5005S: Attached at address 0x63
> [ 26.378510] DVB: registering adapter 1 frontend 0 (Samsung S5H1409 QAM/8VSB Frontend)...
> [ 26.383031] cx18-1: DVB Frontend registered
> [ 26.383131] cx18-1: Registered DVB adapter1 for TS (32 x 32 kB)
> [ 26.384229] cx18-1: Registered device video33 for encoder YUV (16 x 128 kB)
> [ 26.385296] cx18-1: Registered device vbi1 for encoder VBI (20 x 51984 bytes)
> [ 26.386359] cx18-1: Registered device video25 for encoder PCM audio (256 x 4 kB)
> [ 26.387456] cx18-1: Registered device radio1 for encoder radio
> [ 26.387557] cx18-1: Initialized card: Hauppauge HVR-1600
> [ 26.391022] cx18: End initialization
> [ 29.105914] f71805f: Found F71805F/FG chip at 0x290, revision 19
> [ 29.106112] ACPI: I/O resource f71805f [0x290-0x297] conflicts with ACPI region IP__ [0x295-0x296]
> [ 29.106239] ACPI: This conflict may cause random problems and system instability
> [ 29.106364] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
> [ 69.155517] warning: `ntpd' uses 32-bit capabilities (legacy support in use)
> [ 69.894725] r8169: eth1: link up
> [ 71.384063] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-cpu.fw
> [ 71.499573] cx18-0: loaded v4l-cx23418-cpu.fw firmware (158332 bytes)
> [ 71.526541] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-apu.fw
> [ 71.631332] cx18-0: loaded v4l-cx23418-apu.fw firmware V00120000 (141200 bytes)
> [ 71.638409] cx18-0: FW version: 0.0.74.0 (Release 2007/03/12)
> [ 71.848043] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-cpu.fw
> [ 71.989501] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-apu.fw
> [ 72.305707] cx18 0000:00:08.0: firmware: requesting v4l-cx23418-dig.fw
> [ 72.505865] cx18-0 843: loaded v4l-cx23418-dig.fw firmware (16382 bytes)
> [ 72.524287] cx18-0 843: verified load of v4l-cx23418-dig.fw firmware (16382 bytes)
> [ 74.088057] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-cpu.fw
> [ 74.204120] cx18-1: loaded v4l-cx23418-cpu.fw firmware (158332 bytes)
> [ 74.239605] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-apu.fw
> [ 74.348652] cx18-1: loaded v4l-cx23418-apu.fw firmware V00120000 (141200 bytes)
> [ 74.355165] cx18-1: FW version: 0.0.74.0 (Release 2007/03/12)
> [ 74.564044] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-cpu.fw
> [ 74.713418] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-apu.fw
> [ 75.033721] cx18 0000:00:0d.0: firmware: requesting v4l-cx23418-dig.fw
> [ 75.238313] cx18-1 843: loaded v4l-cx23418-dig.fw firmware (16382 bytes)
> [ 75.256845] cx18-1 843: verified load of v4l-cx23418-dig.fw firmware (16382 bytes)
> [ 4197.142213] cx18-1: Fell behind! Ignoring stale mailbox with inconsistent data. Lost buffer for mailbox seq no 469417
> [ 4197.558551] cx18-1: Skipped TS, buffer 83, 31 times - it must have dropped out of rotation
> [ 9909.916910] cx18-1: Could not find buf 61 for stream encoder MPEG
> [ 9910.335032] cx18-1: Skipped TS, buffer 92, 31 times - it must have dropped out of rotation
> [15105.750537] cx18-1: Could not find buf 29 for stream TS
> [15106.155436] cx18-1: Skipped TS, buffer 94, 31 times - it must have dropped out of rotation
> [16793.846072] cx18-1: Could not find buf 3 for stream TS
> [16794.250056] cx18-1: Skipped TS, buffer 82, 31 times - it must have dropped out of rotation
> [17572.982507] cx18-1: Skipped TS, buffer 91, 31 times - it must have dropped out of rotation
> [23984.563140] cx18-1: Fell behind! Ignoring stale mailbox with inconsistent data. Lost buffer for mailbox seq no 2694933
> [23984.981430] cx18-1: Skipped TS, buffer 80, 31 times - it must have dropped out of rotation
> [33632.560953] cx18-1: Could not find buf 29 for stream TS
> [33632.965604] cx18-1: Skipped TS, buffer 75, 31 times - it must have dropped out of rotation
> [43284.124275] cx18-1: Skipped encoder MPEG, buffer 0, 62 times - it must have dropped out of rotation
> [44655.809227] cx18-1: Fell behind! Ignoring stale mailbox with inconsistent data. Lost buffer for mailbox seq no 5010444
> [44656.226448] cx18-1: Skipped TS, buffer 78, 31 times - it must have dropped out of rotation
> [47348.870312] cx18-1: Could not find buf 47 for stream TS
> [47349.274013] cx18-1: Skipped TS, buffer 78, 31 times - it must have dropped out of rotation
> [48523.968101] cx18-1: Could not find buf 28 for stream encoder MPEG
> [48524.386717] cx18-1: Skipped TS, buffer 67, 31 times - it must have dropped out of rotation
> [54808.828854] cx18-1: Could not find buf 33 for stream encoder MPEG
> [54809.245866] cx18-1: Skipped TS, buffer 86, 31 times - it must have dropped out of rotation
> [55626.087582] cx18-1: Could not find buf 55 for stream encoder MPEG
> [55626.503956] cx18-1: Skipped TS, buffer 66, 31 times - it must have dropped out of rotation
> [56177.621914] cx18-1: Could not find buf 45 for stream TS
> [56178.025514] cx18-1: Skipped TS, buffer 70, 31 times - it must have dropped out of rotation
> [60946.553292] cx18-1: Could not find buf 36 for stream encoder MPEG
> [60946.970452] cx18-1: Skipped TS, buffer 75, 31 times - it must have dropped out of rotation
> [61578.160743] cx18-1: Could not find buf 4 for stream encoder MPEG
> [61578.578147] cx18-1: Skipped TS, buffer 79, 31 times - it must have dropped out of rotation
> [64291.856103] cx18-0: Fell behind! Ignoring stale mailbox with inconsistent data. Lost buffer for mailbox seq no 7406174
> [64292.274876] cx18-0: Skipped TS, buffer 79, 31 times - it must have dropped out of rotation
> [65071.900959] cx18-1: Could not find buf 17 for stream encoder MPEG
> [65072.317733] cx18-1: Skipped TS, buffer 79, 31 times - it must have dropped out of rotation
> [74245.029039] cx18-1: Could not find buf 20 for stream encoder MPEG
> [74245.446238] cx18-1: Skipped TS, buffer 72, 31 times - it must have dropped out of rotation
> [79116.088216] cx18-1: Could not find buf 7 for stream encoder MPEG
> [79117.660924] cx18-1: Skipped encoder MPEG, buffer 6, 62 times - it must have dropped out of rotation
> [85787.681367] cx18-1: Could not find buf 91 for stream TS
> [85789.218643] cx18-1: Skipped encoder MPEG, buffer 6, 61 times - it must have dropped out of rotation
> [86552.050998] cx18-1: Could not find buf 94 for stream TS
> [86553.690293] cx18-1: Skipped encoder MPEG, buffer 33, 62 times - it must have dropped out of rotation
> [89534.829896] cx18-1: Fell behind! Ignoring stale mailbox with inconsistent data. Lost buffer for mailbox seq no 10057972
> [89535.247072] cx18-1: Skipped TS, buffer 84, 31 times - it must have dropped out of rotation
> [100201.762851] cx18-1: Skipped TS, buffer 64, 31 times - it must have dropped out of rotation
> [100494.564111] cx18-1: Could not find buf 20 for stream encoder MPEG
> [100494.981764] cx18-1: Skipped TS, buffer 94, 31 times - it must have dropped out of rotation
> [109336.383351] cx18-1: Skipped encoder MPEG, buffer 57, 60 times - it must have dropped out of rotation
> [109357.905012] cx18-1: Fell behind! Ignoring stale mailbox with inconsistent data. Lost buffer for mailbox seq no 12287627
> [109358.322565] cx18-1: Skipped TS, buffer 81, 31 times - it must have dropped out of rotation
> [109614.120079] cx18-1: Could not find buf 51 for stream encoder MPEG
> [109615.653318] cx18-1: Skipped encoder MPEG, buffer 50, 61 times - it must have dropped out of rotation
> [113699.952949] cx18-1: Could not find buf 89 for stream encoder MPEG
> [113701.526278] cx18-1: Skipped encoder MPEG, buffer 9, 61 times - it must have dropped out of rotation
> [118893.330393] cx18-1: Could not find buf 32 for stream encoder MPEG
> [118893.747765] cx18-1: Skipped TS, buffer 67, 31 times - it must have dropped out of rotation
>
> So the questions:
>
> Are these errors of concern? (It seems like a very modest amount of
> errors given the sustained 36 hour test of 4 simultaneous streams and
> mostly on cx18-1).

These errors mean for the stream in question (MPEG ==> analog, TS ==>
digital TV), you have lost a data buffer. The log messages indicate the
driver detected the condition and swept things up to keep the driver
state sane.

These messages are due to only having 1 notification mailbox from the
firmware to the cx18 driver. The firmware can have a very short delay
waiting for the driver to pick up a notification, before the firmware
decides to overwrite the mailbox with the next notification.

Note in your setup, for each card:

Buffers 0-63 belong to the MPEG stream
Buffers 64-95 belong to the TS stream

If you see a mismatch in the above messages, it means the cx18 driver
read the mailbox while it was in the process of being overwritten by the
firmware. E.g.:

[113699.952949] cx18-1: Could not find buf 89 for stream encoder MPEG


The "Fell behind" messages is the same root cause of an partially
overwritten mailbox, but the cx18 driver caught the problem a little
earlier. E.g.:

[23984.563140] cx18-1: Fell behind! Ignoring stale mailbox with inconsistent data. Lost buffer for mailbox seq no 2694933


A "dropped out of rotation" means a "clean-miss" of a buffer
notification. The cx18 driver notices this condition as routinely looks
through the buffer queue for the stream. If there is a buffer that the
cx18 driver thinks the firmware "owns", that keeps getting skipped over
when searching for buffer matches, it means the firmware doesn't think
it "owns" the buffer - the cx18 driver must have missed it coming back.
E.g:

[ 9910.335032] cx18-1: Skipped TS, buffer 92, 31 times - it must have dropped out of rotation


All of these mean the the CPU took too long to respond and service the
interrupt from the respective CX23418 chip.


> What can be done to mitigate the conditions causing them?

Decrease interrupt service latency for the CX23418 IRQ lines. That's a
system level issue. You need to get your single CPU system to run with
interrupts disabled a little as possible.

The cx18 driver itself does very little in its hard interrupt handler -
it has interrupts disabled for a minimum of time.

That probably means taking a hard look at the interrupt handlers for the
modules that handle the eth0 and eth0 devices in your system. Look to
make sure they don't have a code path that sometimes takes a long time
to execute.


In fact you may want to profile all the interrupt handlers in your
system using the kernel's built in tracing. Here's an example of
tracing the ivtv module:

http://www.mail-archive.com/linux-media@vger.kernel.org/msg15282.html

and some articles that may help:

http://lwn.net/Articles/322666/
http://lwn.net/Articles/322731/
http://lwn.net/Articles/366796/
http://lwn.net/Articles/365835/

Getting what you want out of tracing is an iterative process. I didn't
quite know the right thing to trace, until I traced something and saw
what sort of output I got.



I suppose maybe going ot an RT-kernel might help, but I have no
experience with that.


> Can the error logging be enhanced to report which input (analog or
> digital) was the source of the error condition?

The answer is that both are the cause. Run only a single MPEG or TS
(DTV) stream on a card and the problem will be very infrequent.

Changing the logging won't help, since for some of the notifications,
the cx18 driver figured out the buffer was missed much later.

You can make some deductions:

1. A TS buffer dropping out of rotation was likely caused by an MPEG
buffer notification - and vice versa.

2. From examination of the CX23418 firmware binary, I know that when the
firmware sends an EPU_DMA_DONE notification, it fills in the "task
handle" (aka. stream type MPEG or TS) in the mailbox *last*. When you
have a mismatch message like this:

[113699.952949] cx18-1: Could not find buf 89 for stream encoder MPEG

It means that a TS stream buffer notification was in the process of
overwriting an MPEG buffer notification which the cx18 driver was late
in servicing.

Regards,
Andy

> Thanks,
>
> -Jeff



_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel