<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-flowed"
 style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">One
line version:
<br>
- PVR-500 drivers work for both encoders in two cards using linux
2.6.13/ivtv-0.4.1, in linux 2.6.32 only first encoder produces MPEG
data, the other three produce... something else.
<br>
<br>
Short version:
<br>
- Attempted to upgrade an older mythbox (kernel 2.6.13/ivtv
0.4.1/working for years) to current codebase, along with some hardware
upgrades. Collapsing two mythboxen into one, so I have extra hardware.
<br>
- I have three PVR-500s, Revs D492, E587, E787. All working a week ago.
<br>
- Problem occurs with as little as one PVR-500 in PC, I have tried each
of the three individually with same results.
<br>
- In new PC, using 2.6.32, video0 works perfectly. video1 seems to set
up alright, and dmesg looks normal, no errors.
<br>
- When I do "cat /dev/v4l/video0 &gt; foo.mpg" it produces a usable mpg
<br>
- When I do "cat /dev/v4l/video1 &gt; foo.mpg" it produces many more
bytes, and not an mpg.
<br>
- Same effect if I add another PVR-500, video2 and video3 also fail.
<br>
- However, if I reboot with kernel 2.6.13, and build ivtv-0.4.1, and
install those modules, everything works fine.
<br>
- No module options, both kernels use the same /dev structure and same
device nodes, and install the same firmware file.
<br>
- Seemingly identical conditions except kernel version and driver
version.
<br>
<br>
Long data:
<br>
<br>
Here is the logs for 2.6.32, two cards installed. Only the first
encoder of four works. (video0)
<br>
<br>
messages:Dec 27 15:09:17 trevo kernel: ivtv: Start initialization,
version 1.4.1
<br>
messages:Dec 27 15:09:17 trevo kernel: ivtv0: Initializing card 0
<br>
messages:Dec 27 15:09:17 trevo kernel: ivtv0: Autodetected Hauppauge
card (cx23416 based)
<br>
messages:Dec 27 15:09:17 trevo kernel: ivtv0: Unreasonably low latency
timer, setting to 64 (was 32)
<br>
messages:Dec 27 15:09:17 trevo kernel: ivtv0: Autodetected WinTV PVR
500 (unit #1)
<br>
messages:Dec 27 15:09:17 trevo kernel: cx25840 0-0044: cx25843-24 found
@ 0x88 (ivtv i2c driver #0)
<br>
messages:Dec 27 15:09:18 trevo kernel: tuner 0-0060: chip found @ 0xc0
(ivtv i2c driver #0)
<br>
messages:Dec 27 15:09:18 trevo kernel: tuner 0-0061: chip found @ 0xc2
(ivtv i2c driver #0)
<br>
messages:Dec 27 15:09:18 trevo kernel: wm8775 0-001b: chip found @ 0x36
(ivtv i2c driver #0)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device video0
for encoder MPG (4096 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device video32
for encoder YUV (2048 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device vbi0
for encoder VBI (1024 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device video24
for encoder PCM (320 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device radio0
for encoder radio
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Initialized card: WinTV
PVR 500 (unit #1)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Initializing card 1
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Autodetected Hauppauge
card (cx23416 based)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Unreasonably low latency
timer, setting to 64 (was 32)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Correcting tveeprom data:
no radio present on second unit
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Autodetected WinTV PVR
500 (unit #2)
<br>
messages:Dec 27 15:09:18 trevo kernel: cx25840 1-0044: cx25843-24 found
@ 0x88 (ivtv i2c driver #1)
<br>
messages:Dec 27 15:09:18 trevo kernel: tuner 1-0061: chip found @ 0xc2
(ivtv i2c driver #1)
<br>
messages:Dec 27 15:09:18 trevo kernel: wm8775 1-001b: chip found @ 0x36
(ivtv i2c driver #1)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device video1
for encoder MPG (4096 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device video33
for encoder YUV (2048 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device vbi1
for encoder VBI (1024 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device video25
for encoder PCM (320 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Initialized card: WinTV
PVR 500 (unit #2)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Initializing card 2
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Autodetected Hauppauge
card (cx23416 based)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Unreasonably low latency
timer, setting to 64 (was 32)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Autodetected WinTV PVR
500 (unit #1)
<br>
messages:Dec 27 15:09:18 trevo kernel: cx25840 2-0044: cx25843-24 found
@ 0x88 (ivtv i2c driver #2)
<br>
messages:Dec 27 15:09:18 trevo kernel: tuner 2-0060: chip found @ 0xc0
(ivtv i2c driver #2)
<br>
messages:Dec 27 15:09:18 trevo kernel: tuner 2-0061: chip found @ 0xc2
(ivtv i2c driver #2)
<br>
messages:Dec 27 15:09:18 trevo kernel: wm8775 2-001b: chip found @ 0x36
(ivtv i2c driver #2)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device video2
for encoder MPG (4096 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device video34
for encoder YUV (2048 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device vbi2
for encoder VBI (1024 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device video26
for encoder PCM (320 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device radio2
for encoder radio
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Initialized card: WinTV
PVR 500 (unit #1)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Initializing card 3
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Autodetected Hauppauge
card (cx23416 based)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Unreasonably low latency
timer, setting to 64 (was 32)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Correcting tveeprom data:
no radio present on second unit
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Autodetected WinTV PVR
500 (unit #2)
<br>
messages:Dec 27 15:09:18 trevo kernel: cx25840 3-0044: cx25843-24 found
@ 0x88 (ivtv i2c driver #3)
<br>
messages:Dec 27 15:09:18 trevo kernel: tuner 3-0061: chip found @ 0xc2
(ivtv i2c driver #3)
<br>
messages:Dec 27 15:09:18 trevo kernel: wm8775 3-001b: chip found @ 0x36
(ivtv i2c driver #3)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device video3
for encoder MPG (4096 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device video35
for encoder YUV (2048 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device vbi3
for encoder VBI (1024 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device video27
for encoder PCM (320 kB)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Initialized card: WinTV
PVR 500 (unit #2)
<br>
messages:Dec 27 15:09:18 trevo kernel: ivtv: End initialization
<br>
messages:Dec 27 15:10:31 trevo kernel: ivtv 0000:03:08.0: firmware:
requesting v4l-cx2341x-enc.fw
<br>
messages:Dec 27 15:10:31 trevo kernel: ivtv0: Loaded v4l-cx2341x-enc.fw
firmware (376836 bytes)
<br>
messages:Dec 27 15:10:31 trevo kernel: ivtv0: Encoder revision:
0x02050032
<br>
<br>
Here is dmesg for 2.6.13 one card installed (running happily, both
encoders)
<br>
<br>
ivtv:&nbsp; ==================== START INIT IVTV ====================
<br>
ivtv:&nbsp; version 0.4.1 (tagged release) loading
<br>
ivtv:&nbsp; Linux version: 2.6.13 SMP preempt PENTIUM4 gcc-4.2
<br>
ivtv:&nbsp; In case of problems please include the debug info between
<br>
ivtv:&nbsp; the START INIT IVTV and END INIT IVTV lines, along with
<br>
ivtv:&nbsp; any module options, when mailing the ivtv-users mailinglist.
<br>
ivtv0: Autodetected WinTV PVR 150 card (cx23416 based)
<br>
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
<br>
tuner (ivtv): chip found at addr 0xc0 i2c-bus ivtv i2c driver #0
<br>
ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=60]
<br>
tuner: type set to 62 (Philips TEA5767HN FM Radio) by autodetect
<br>
tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #0
<br>
ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]
<br>
tveeprom: Second (radio) tuner idx 101
<br>
tveeprom: ivtv version
<br>
tveeprom: Hauppauge: model = 23552, rev = D492, serial# = 7804812
<br>
tveeprom: tuner = Philips FQ1236A MK4 (idx = 92, type = 57)
<br>
tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
<br>
tveeprom: audio processor = CX25843 (type = 25)
<br>
tveeprom: decoder processor = CX25843 (type = 1e)
<br>
ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]
<br>
ivtv0: This is the first unit of a PVR500
<br>
cx25840 0-0044: ivtv driver
<br>
cx25840 0-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)
<br>
ivtv0: i2c attach to card #0 ok [client=cx25840, addr=44]
<br>
wm8775 0-001b: ivtv driver
<br>
wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0)
<br>
ivtv0: i2c attach to card #0 ok [client=wm8775, addr=1b]
<br>
tda9887 0-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #0)
<br>
ivtv0: i2c attach to card #0 ok [client=tda9887, addr=43]
<br>
ivtv0: Detected a TEA5767 radio tuner. Enabling radio support.
<br>
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
<br>
ivtv0: Encoder revision: 0x02060039
<br>
ivtv0 warning: Encoder Firmware can be buggy, use version 0x02040011 or
0x02050032.
<br>
ivtv0: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB
total)
<br>
ivtv0: Allocate DMA encoder YUV stream: 194 x 10800 buffers (2048KB
total)
<br>
ivtv0: Allocate DMA encoder VBI stream: 120 x 17472 buffers (2048KB
total)
<br>
ivtv0: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers
(2048KB total)
<br>
ivtv0: Create encoder radio stream
<br>
tuner: type set to 57 (Philips FQ1236A MK4) by ivtv i2c driver #0
<br>
ivtv0: Initialized WinTV PVR 500 (unit #1), card #0
<br>
ivtv:&nbsp; ======================&nbsp; NEXT CARD&nbsp; ======================
<br>
ivtv1: Autodetected WinTV PVR 150 card (cx23416 based)
<br>
ivtv1: Unreasonably low latency timer, setting to 64 (was 32)
<br>
tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #1
<br>
ivtv1: i2c attach to card #1 ok [client=(tuner unset), addr=61]
<br>
tveeprom: Second (radio) tuner idx 101
<br>
tveeprom: ivtv version
<br>
tveeprom: Hauppauge: model = 23552, rev = D492, serial# = 7804812
<br>
tveeprom: tuner = Philips FQ1236A MK4 (idx = 92, type = 57)
<br>
tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
<br>
tveeprom: audio processor = CX25843 (type = 25)
<br>
tveeprom: decoder processor = CX25843 (type = 1e)
<br>
ivtv1: i2c attach to card #1 ok [client=tveeprom, addr=50]
<br>
cx25840 1-0044: ivtv driver
<br>
cx25840 1-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #1)
<br>
ivtv1: i2c attach to card #1 ok [client=cx25840, addr=44]
<br>
wm8775 1-001b: ivtv driver
<br>
wm8775 1-001b: chip found @ 0x36 (ivtv i2c driver #1)
<br>
ivtv1: i2c attach to card #1 ok [client=wm8775, addr=1b]
<br>
tda9887 1-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #1)
<br>
ivtv1: i2c attach to card #1 ok [client=tda9887, addr=43]
<br>
ivtv1: This is the second unit of a PVR500
<br>
ivtv1: Correcting tveeprom data: no radio present on second unit
<br>
ivtv1: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
<br>
ivtv1: Encoder revision: 0x02060039
<br>
ivtv1 warning: Encoder Firmware can be buggy, use version 0x02040011 or
0x02050032.
<br>
ivtv1: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB
total)
<br>
ivtv1: Allocate DMA encoder YUV stream: 194 x 10800 buffers (2048KB
total)
<br>
ivtv1: Allocate DMA encoder VBI stream: 120 x 17472 buffers (2048KB
total)
<br>
ivtv1: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers
(2048KB total)
<br>
tuner: type set to 57 (Philips FQ1236A MK4) by ivtv i2c driver #1
<br>
ivtv1: Initialized WinTV PVR 500 (unit #2), card #1
<br>
ivtv:&nbsp; ====================&nbsp; END INIT IVTV&nbsp; ====================
<br>
<br>
<br>
More debugging information:
<br>
<br>
Is this right? lspci shows the cards at 03:09 and 03:09, but v4l2-ctl
shows them both as unit #1 and at 03:08:
<br>
<br>
03:08.0 Multimedia video controller: Internext Compression Inc iTVC16
(CX23416) MPEG-2 Encoder (rev 01)
<br>
03:09.0 Multimedia video controller: Internext Compression Inc iTVC16
(CX23416) MPEG-2 Encoder (rev 01)
<br>
<br>
crw-rw----&nbsp; 1 video 81, 0 2009-12-27 20:13 /dev/v4l/video0
<br>
crw-rw----&nbsp; 1 video 81, 1 2009-12-27 20:13 /dev/v4l/video1
<br>
crw-rw----&nbsp; 1 video 81, 2 2009-12-27 20:13 /dev/v4l/video2
<br>
crw-rw----&nbsp; 1 video 81, 3 2009-12-27 20:13 /dev/v4l/video3
<br>
<br>
root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video1 -D
<br>
Driver Info:
<br>
Driver name : ivtv
<br>
Card type : WinTV PVR 500 (unit #1)
<br>
Bus info : PCI:0000:03:08.0
<br>
<br>
root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video0 -D
<br>
Driver Info:
<br>
Driver name : ivtv
<br>
Card type : WinTV PVR 500 (unit #1)
<br>
Bus info : PCI:0000:03:08.0
<br>
<br>
<br>
<br>
Also notable, the pixel format for each tuner is listed differently,
the working one is MPEG, the non-working one is HM12. Setting the
pixelformat with v4l2-ctl doesn't seem to affect it, no error but it
stays as HM12. I can change the resolution successfully though.
<br>
<br>
root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video0 -V
<br>
Format Video Capture:
<br>
Width/Height : 720/480
<br>
Pixel Format : 'MPEG'
<br>
Field : Interlaced
<br>
Bytes per Line: 0
<br>
Size Image : 131072
<br>
Colorspace : Broadcast NTSC/PAL (SMPTE170M/ITU601)
<br>
<br>
root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video1 -V
<br>
Format Video Capture:
<br>
Width/Height : 720/480
<br>
Pixel Format : 'HM12'
<br>
Field : Interlaced
<br>
Bytes per Line: 720
<br>
Size Image : 518400
<br>
Colorspace : Broadcast NTSC/PAL (SMPTE170M/ITU601)
<br>
<br>
<br>
I hope something in there is useful.
<br>
<br>
Cheers.
<br>
<br>
<br>
</div>
</body>
</html>