<br><br><div class="gmail_quote">On Wed, Nov 19, 2008 at 12:10 AM, Andy Walls <span dir="ltr"><<a href="mailto:awalls@radix.net">awalls@radix.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
cx18 driver users:<br>
<br>
I have implemented quite a few cx18 driver changes in my current<br>
experimental repo at<br>
<br>
<a href="http://linuxtv.org/hg/%7Eawalls/cx18-bugfix" target="_blank">http://linuxtv.org/hg/~awalls/cx18-bugfix</a><br>
<br>
The goal behind these changes is to fix problems with simultaneous<br>
analog and digital capture causing the driver to quit after a while.<br>
And to fix related problems with buffers getting lost and falling out of<br>
the driver<->firmware transfer rotation.<br>
<br>
To achieve that result, I had to do extensive rework of how interrupts<br>
were handled and some buffer handling tweaks. I'm looking for (brave)<br>
testers to give this stuff a try, or an inspection, before I ask Mauro<br>
to pull it. I also plan to do testing on my other two machines in a day<br>
or two.<br>
<br>
Please test the debug parameter with at least info and warn set:<br>
<br>
# modprobe cx18 debug=3<br>
<br>
<br>
I am especially interested in<br>
<br>
<br>
1. How often you get messages like the following on your system?<br>
<br>
cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. nnnn)<br>
<br>
I need to get a feel for if I need to have the cx18 driver not request a<br>
shared IRQ line for most user applications.<br>
<br>
On my system where irq balance/migration is turned off, and the HVR-1600<br>
shares an interrupt with the SATA controller, I get them quite a bit<br>
doing simultaneous analog and digital capture with MythTV (I've<br>
approximated a busy, single CPU machine with that setup).<br>
<br>
BTW, the current cx18 driver software processes these self-ack'ed and<br>
potentially incoherent mailboxes which the firmware has timed out and<br>
potentially started to overwrite. This change is just nice enough to<br>
tell you about them, and it also does something more robust than just<br>
blindly process them. :)<br>
<br>
<br>
2. If the cx18 driver still works on older machines?<br>
<br>
I got rid of PCI MMIO read retries, as they never seemed to do anything<br>
useful and wasted time. I needed to get the irq top half handler<br>
timeline down to as little time as possible. PCI MMIO write retries<br>
still occur, because those actually get things to work in older<br>
machines, AFAICT.<br>
<br>
I will also be testing in my one older machine later this week.<br>
<br>
<br>
Thanks.<br>
<br>
Regards,<br>
Andy<br>
<br>
N.B. If replying to this message, you may wish to prune list email<br>
addresses for lists for which you are not subscribed.<br>
</blockquote></div><br><br><br>For the following system:<br><br>
<br>
<br>
<br>
$ cat /proc/cpuinfo<br>
processor : 0<br>
vendor_id : AuthenticAMD<br>
cpu family : 15<br>
model : 28<br>
model name : AMD Sempron(tm) Processor 2800+<br>
stepping : 0<br>
cpu MHz : 1607.382<br>
cache size : 256 KB<br>
fdiv_bug : no<br>
hlt_bug : no<br>
f00f_bug : no<br>
coma_bug : no<br>
fpu : yes<br>
fpu_exception : yes<br>
cpuid level : 1<br>
wp : yes<br>
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt
3dnowext 3dnow up lahf_lm<br>
bogomips : 3214.76<br>
clflush size : 64<br>
power management: ts ttp<br>
<br>
$grep cx18 /proc/interrupts<br>
18: 72358 IO-APIC-fasteoi cx18-0, nvidia<br>
<br>$ uname -a<br>Linux nelson 2.6.27-7-generic #1 SMP Fri Oct 24 06:42:44 UTC 2008 i686 GNU/Linux<br><br><br>I built and installed the following:<br>
<br>
<font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"></span></font><font size="2" face="Arial"><a href="http://linuxtv.org/hg/%7Eawalls/cx18-bugfix/archive/891eedf234a5.tar.bz2" target="_blank">http://linuxtv.org/hg/~awalls/cx18-bugfix/archive/891eedf234a5.tar.bz2</a></font><br>
<br>
Here is the debug output:<br><br>[ 10.478250] i2c-adapter i2c-0: nForce2 SMBus adapter at 0x4c00<br>[ 10.478289] i2c-adapter i2c-1: nForce2 SMBus adapter at 0x4c40<br>[ 10.854688] input: Power Button (FF) as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2<br>
[ 10.864034] ACPI: Power Button (FF) [PWRF]<br>[ 10.864177] input: Power Button (CM) as /devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input3<br>[ 10.880025] ACPI: Power Button (CM) [PWRB]<br>[ 11.168198] gameport: EMU10K1 is pci0000:01:09.1/gameport0, io 0xde00, speed 59659kHz<br>
[ 11.243855] Linux video capture interface: v2.00<br>[ 11.297347] input: PC Speaker as /devices/platform/pcspkr/input/input4<br>[ 11.643132] cx18: Start initialization, version 1.0.2<br>[ 11.648808] cx18-0: Initializing card #0<br>
[ 11.648815] cx18-0: Autodetected Hauppauge card<br>[ 11.648819] cx18-0 info: base addr: 0xf8000000<br>[ 11.648822] cx18-0 info: Enabling pci device<br>[ 11.649212] ACPI: PCI Interrupt Link [APC3] enabled at IRQ 18<br>
[ 11.649223] cx18 0000:01:08.0: PCI INT A -> Link[APC3] -> GSI 18 (level, low) -> IRQ 18<br>[ 11.649233] cx18-0: Unreasonably low latency timer, setting to 64 (was 32)<br>[ 11.649239] cx18-0 info: cx23418 (rev 0) at 01:08.0, irq: 18, latency: 64, memory: 0xf8000000<br>
[ 11.649243] cx18-0 info: attempting ioremap at 0xf8000000 len 0x04000000<br>[ 11.652185] cx18-0: cx23418 revision 01010000 (B)<br>[ 11.807058] cx18-0 info: GPIO initial dir: 0000ffff/0000ffff out: 00000000/00000000<br>
[ 11.807068] cx18-0 info: activating i2c...<br>[ 12.071835] parport_pc 00:0a: reported by Plug and Play ACPI<br>[ 12.071882] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]<br>[ 12.295497] cx18-0 info: Active card count: 1.<br>
[ 12.331103] tveeprom 2-0050: Hauppauge model 74041, rev C6B2, serial# 3328594<br>[ 12.331108] tveeprom 2-0050: MAC address is 00-0D-FE-32-CA-52<br>[ 12.331111] tveeprom 2-0050: tuner model is TCL M2523_5N_E (idx 112, type 50)<br>
[ 12.331115] tveeprom 2-0050: TV standards NTSC(M) (eeprom 0x08)<br>[ 12.331119] tveeprom 2-0050: audio processor is CX23418 (idx 38)<br>[ 12.331122] tveeprom 2-0050: decoder processor is CX23418 (idx 31)<br>[ 12.331125] tveeprom 2-0050: has no radio, has IR receiver, has IR transmitter<br>
[ 12.331129] cx18-0: Autodetected Hauppauge HVR-1600<br>[ 12.331132] cx18-0 info: NTSC tuner detected<br>[ 12.331134] cx18-0: VBI is not yet supported<br>[ 12.878008] cx18-0 info: Loaded module tuner<br>[ 12.997285] cx18-0 info: Loaded module cs5345<br>
[ 12.998242] tuner 3-0061: chip found @ 0xc2 (cx18 i2c driver #0-1)<br>[ 12.998285] cs5345 2-004c: chip found @ 0x98 (cx18 i2c driver #0-0)<br>[ 13.328880] tuner-simple 3-0061: creating new instance<br>[ 13.328885] tuner-simple 3-0061: type set to 50 (TCL 2002N)<br>
[ 13.329652] cx18-0 info: Allocate encoder MPEG stream: 63 x 32768 buffers (2016kB total)<br>[ 13.329711] cx18-0 info: Allocate TS stream: 32 x 32768 buffers (1024kB total)<br>[ 13.329737] cx18-0 info: Allocate encoder YUV stream: 16 x 131072 buffers (2048kB total)<br>
[ 13.329764] cx18-0 info: Allocate encoder PCM audio stream: 63 x 16384 buffers (1008kB total)<br>[ 13.329809] cx18-0: Disabled encoder IDX device<br>[ 13.330013] cx18-0: Registered device video0 for encoder MPEG (2 MB)<br>
[ 13.330017] DVB: registering new adapter (cx18)<br>[ 13.673473] MXL5005S: Attached at address 0x63<br>[ 13.673481] DVB: registering adapter 0 frontend 0 (Samsung S5H1409 QAM/8VSB Frontend)...<br>[ 13.673670] cx18-0: DVB Frontend registered<br>
[ 13.673715] cx18-0: Registered device video32 for encoder YUV (2 MB)<br>[ 13.673754] cx18-0: Registered device video24 for encoder PCM audio (1 MB)<br>[ 13.673758] cx18-0: Initialized card #0: Hauppauge HVR-1600<br>
[ 13.674278] cx18: End initialization<br>[ 13.984265] ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19<br>[ 13.984278] EMU10K1_Audigy 0000:01:09.0: PCI INT A -> Link[APC4] -> GSI 19 (level, low) -> IRQ 19<br>
[ 14.017458] Linux agpgart interface v0.103<br>[ 14.200463] nvidia: module license 'NVIDIA' taints kernel.<br>[ 14.795264] nvidia 0000:05:00.0: PCI INT A -> Link[APC3] -> GSI 18 (level, low) -> IRQ 18<br>
[ 14.795274] nvidia 0000:05:00.0: setting latency timer to 64<br>[ 14.795670] NVRM: loading NVIDIA UNIX x86 Kernel Module 173.14.12 Thu Jul 17 18:11:36 PDT 2008<br>[ 16.939862] lp0: using parport0 (interrupt-driven).<br>
[ 17.199158] Adding 506036k swap on /dev/sda2. Priority:-1 extents:1 across:506036k<br>[ 17.983580] EXT3 FS on sda3, internal journal<br>[ 19.028607] kjournald starting. Commit interval 5 seconds<br>[ 19.028726] EXT3 FS on sda1, internal journal<br>
[ 19.028733] EXT3-fs: mounted filesystem with ordered data mode.<br>[ 19.078780] JFS: nTxBlock = 8074, nTxLock = 64598<br>[ 19.894850] type=1505 audit(1227145232.080:2): operation="profile_load" name="/usr/lib/cups/backend/cups-pdf" name2="default" pid=4086<br>
[ 19.895148] type=1505 audit(1227145232.080:3): operation="profile_load" name="/usr/sbin/cupsd" name2="default" pid=4086<br>[ 19.948874] type=1505 audit(1227145232.136:4): operation="profile_load" name="/usr/sbin/mysqld" name2="default" pid=4090<br>
[ 20.128698] ip_tables: (C) 2000-2006 Netfilter Core Team<br>[ 20.896500] NET: Registered protocol family 10<br>[ 20.897023] lo: Disabled Privacy Extensions<br>[ 21.314133] RPC: Registered udp transport module.<br>
[ 21.314138] RPC: Registered tcp transport module.<br>[ 21.976619] warning: `ntpd' uses 32-bit capabilities (legacy support in use)<br>[ 22.438384] ACPI: WMI: Mapper loaded<br>[ 24.990325] ppdev: user-space parallel port driver<br>
[ 31.236007] eth0: no IPv6 routers present<br>[ 32.816051] firmware: requesting v4l-cx23418-apu.fw<br>[ 32.889470] cx18-0 info: load segment a00000-a07fff<br>[ 32.908330] cx18-0 info: load segment ae0000-ae00ff<br>
[ 32.908482] cx18-0 info: load segment b00000-b1a65f<br>[ 32.970481] cx18-0: loaded v4l-cx23418-apu.fw firmware V00120000 (141200 bytes)<br>[ 33.472733] firmware: requesting v4l-cx23418-cpu.fw<br>[ 33.582593] cx18-0: loaded v4l-cx23418-cpu.fw firmware (158332 bytes)<br>
[ 33.588746] cx18-0 info: 1 MiniMe Encoder Firmware <a href="http://0.0.74.0">0.0.74.0</a> (Release 2007/03/12)<br>[ 33.588755] cx18-0: FW version: <a href="http://0.0.74.0">0.0.74.0</a> (Release 2007/03/12)<br>[ 33.784035] firmware: requesting v4l-cx23418-apu.fw<br>
[ 33.788935] cx18-0 info: load segment a00000-a07fff<br>[ 33.807756] cx18-0 info: load segment ae0000-ae00ff<br>[ 33.807908] cx18-0 info: load segment b00000-b1a65f<br>[ 34.368013] firmware: requesting v4l-cx23418-cpu.fw<br>
[ 34.469963] cx18-0 info: 1 MiniMe Encoder Firmware <a href="http://0.0.74.0">0.0.74.0</a> (Release 2007/03/12)<br>[ 34.664016] cx18-0 info: Changing input from 1 to 0<br>[ 34.664021] cx18-0 info: Mute<br>[ 34.664025] cx18-0 info: cmd 4008646f triggered fw load<br>
[ 34.664028] firmware: requesting v4l-cx23418-dig.fw<br>[ 34.849528] cx18-0: loaded v4l-cx23418-dig.fw firmware (16382 bytes)<br>[ 34.849570] cx18-0 info: decoder set video input 7, audio input 8<br>[ 34.852749] cx18-0 info: decoder set video input 7, audio input 8<br>
[ 34.853726] cx18-0 info: Unmute<br>[ 34.853732] cx18-0 info: Switching standard to 1000.<br>[ 34.853736] cx18-0 info: changing video std to fmt 1<br>[ 34.853750] cx18-0 info: PLL regs = int: 15, frac: 2876158, post: 4<br>
[ 34.853753] cx18-0 info: PLL = 108.000014 MHz<br>[ 34.853756] cx18-0 info: PLL/8 = 13.500001 MHz<br>[ 34.853759] cx18-0 info: ADC Sampling freq = 14.317384 MHz<br>[ 34.853762] cx18-0 info: Chroma sub-carrier freq = 3.579545 MHz<br>
[ 34.853766] cx18-0 info: hblank 122, hactive 720, vblank 26 , vactive 487, vblank656 26, src_dec 543,burst 0x5b, luma_lpf 1, uv_lpf 1, comb 0x66, sc 0x087c1f<br>[ 34.861431] cx18-0 info: Mute<br>[ 34.861436] cx18-0 info: v4l2 ioctl: set frequency 1076<br>
[ 34.863303] cx18-0 info: Unmute<br>[ 35.009920] cx18-0 info: Changing input from 0 to 1<br>[ 35.009930] cx18-0 info: Mute<br>[ 35.009934] cx18-0 info: decoder set video input 1296, audio input 8<br>[ 35.013455] cx18-0 info: decoder set video input 1296, audio input 0<br>
[ 35.014359] cx18-0 info: Unmute<br>[ 35.014806] cx18-0 info: Switching standard to b000.<br>[ 35.014812] cx18-0 info: changing video std to fmt 1<br>[ 35.014826] cx18-0 info: PLL regs = int: 15, frac: 2876158, post: 4<br>
[ 35.014830] cx18-0 info: PLL = 108.000014 MHz<br>[ 35.014832] cx18-0 info: PLL/8 = 13.500001 MHz<br>[ 35.014835] cx18-0 info: ADC Sampling freq = 14.317384 MHz<br>[ 35.014838] cx18-0 info: Chroma sub-carrier freq = 3.579545 MHz<br>
[ 35.014842] cx18-0 info: hblank 122, hactive 720, vblank 26 , vactive 487, vblank656 26, src_dec 543,burst 0x5b, luma_lpf 1, uv_lpf 1, comb 0x66, sc 0x087c1f<br>[ 35.023866] cx18-0 info: Input unchanged<br>[ 35.024540] cx18-0 info: Mute<br>
[ 35.024546] cx18-0 info: v4l2 ioctl: set frequency 980<br>[ 35.026401] cx18-0 info: Unmute<br>[ 35.095604] cx18-0 info: Mute<br>[ 35.095613] cx18-0 info: v4l2 ioctl: set frequency 980<br>[ 35.097794] cx18-0 info: Unmute<br>
[ 35.780237] Bluetooth: Core ver 2.13<br>[ 35.782281] NET: Registered protocol family 31<br>[ 35.782288] Bluetooth: HCI device and connection manager initialized<br>[ 35.782292] Bluetooth: HCI socket layer initialized<br>
[ 35.831651] Bluetooth: L2CAP ver 2.11<br>[ 35.831659] Bluetooth: L2CAP socket layer initialized<br>[ 35.949270] Bluetooth: SCO (Voice Link) ver 0.6<br>[ 35.949281] Bluetooth: SCO socket layer initialized<br>[ 35.990004] Bluetooth: RFCOMM socket layer initialized<br>
[ 35.990323] Bluetooth: RFCOMM TTY layer initialized<br>[ 35.990329] Bluetooth: RFCOMM ver 1.10<br>[ 36.008507] Bluetooth: BNEP (Ethernet Emulation) ver 1.3<br>[ 36.008514] Bluetooth: BNEP filters: protocol multicast<br>
[ 36.057085] Bridge firewalling registered<br>[ 36.057542] pan0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.<br>[ 40.537443] lirc_dev: IR Remote Control driver registered, major 61<br>[ 40.749246] bttv: driver version 0.9.17 loaded<br>
[ 40.749255] bttv: using 8 buffers with 2080k (520 pages) each for capture<br>[ 40.974407] ivtv: Start initialization, version 1.4.0<br>[ 40.975812] ivtv: End initialization<br>[ 41.182445] cx88/0: cx2388x v4l2 driver version 0.0.6 loaded<br>
[ 41.185797] lirc_i2c: chip 0x10020 found @ 0x71 (Hauppauge PVR150)<br>[ 41.185824] lirc_dev: lirc_register_plugin: sample_rate: 10<br>[ 41.249099] lirc_serial: port 03f8 already in use<br>[ 41.249109] lirc_serial: use 'setserial /dev/ttySX uart none'<br>
[ 41.249112] lirc_serial: or compile the serial port driver as module and<br>[ 41.249115] lirc_serial: make sure this module is loaded first<br>[ 83.801929] cx18-0 info: Start encoder stream encoder MPEG<br>[ 88.328814] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 52) while processing<br>
[ 89.526914] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 67) while processing<br>[ 112.046227] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 357) while processing<br>
[ 128.563274] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 576) while processing<br>[ 144.781984] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 795) while processing<br>
[ 155.334230] cx18-0 info: User stopped encoder MPEG<br>[ 155.335043] cx18-0 info: close stopping capture<br>[ 155.335051] cx18-0 info: Stop Capture<br>[ 422.270549] cx18-0 info: Input unchanged<br>[ 422.271205] cx18-0 info: Mute<br>
[ 422.271211] cx18-0 info: v4l2 ioctl: set frequency 980<br>[ 422.273081] cx18-0 info: Unmute<br>[ 422.276845] cx18-0 info: Mute<br>[ 422.276853] cx18-0 info: v4l2 ioctl: set frequency 980<br>[ 422.278831] cx18-0 info: Unmute<br>
[ 428.728899] cx18-0 info: Start encoder stream encoder MPEG<br>[ 434.640532] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 1320) while processing<br>[ 435.033614] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 1340) while processing<br>
[ 438.009412] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 1488)<br>[ 440.165578] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 1594) while processing<br>
[ 450.877048] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 2138) while processing<br>[ 462.228374] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 2722) while processing<br>
[ 469.673531] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 3104) while processing<br>[ 469.866070] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 3114) while processing<br>
[ 472.342068] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 3237) while processing<br>[ 499.116283] cx18-0 info: close stopping capture<br>[ 499.116292] cx18-0 info: Stop Capture<br>
[ 724.246799] cx18-0 info: Start encoder stream encoder MPEG<br>[ 725.454632] cx18-0 warning: Possibly falling behind: CPU self-ack'ed our incoming CPU to EPU mailbox (sequence no. 4684) while processing<br>[ 757.880500] cx18-0 info: User stopped encoder MPEG<br>
[ 757.881320] cx18-0 info: close stopping capture<br>[ 757.881328] cx18-0 info: Stop Capture<br><br><br>If you're interested in viewing the result email me and I will email you a URL to dl an mpg.<br><br>I am tempted to put the card into another dual core system to see how it performs.<br>
<br><br>Thanks,<br>Al <br>