Mailing List Archive

PVR-500 has working video0, failing video1/2/3 (long)
One line version:
- 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.

Short version:
- 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.
- I have three PVR-500s, Revs D492, E587, E787. All working a week ago.
- Problem occurs with as little as one PVR-500 in PC, I have tried each
of the three individually with same results.
- In new PC, using 2.6.32, video0 works perfectly. video1 seems to set
up alright, and dmesg looks normal, no errors.
- When I do "cat /dev/v4l/video0 > foo.mpg" it produces a usable mpg
- When I do "cat /dev/v4l/video1 > foo.mpg" it produces many more bytes,
and not an mpg.
- Same effect if I add another PVR-500, video2 and video3 also fail.
- However, if I reboot with kernel 2.6.13, and build ivtv-0.4.1, and
install those modules, everything works fine.
- No module options, both kernels use the same /dev structure and same
device nodes, and install the same firmware file.
- Seemingly identical conditions except kernel version and driver version.

Long data:

Here is the logs for 2.6.32, two cards installed. Only the first encoder
of four works. (video0)

messages:Dec 27 15:09:17 trevo kernel: ivtv: Start initialization,
version 1.4.1
messages:Dec 27 15:09:17 trevo kernel: ivtv0: Initializing card 0
messages:Dec 27 15:09:17 trevo kernel: ivtv0: Autodetected Hauppauge
card (cx23416 based)
messages:Dec 27 15:09:17 trevo kernel: ivtv0: Unreasonably low latency
timer, setting to 64 (was 32)
messages:Dec 27 15:09:17 trevo kernel: ivtv0: Autodetected WinTV PVR 500
(unit #1)
messages:Dec 27 15:09:17 trevo kernel: cx25840 0-0044: cx25843-24 found
@ 0x88 (ivtv i2c driver #0)
messages:Dec 27 15:09:18 trevo kernel: tuner 0-0060: chip found @ 0xc0
(ivtv i2c driver #0)
messages:Dec 27 15:09:18 trevo kernel: tuner 0-0061: chip found @ 0xc2
(ivtv i2c driver #0)
messages:Dec 27 15:09:18 trevo kernel: wm8775 0-001b: chip found @ 0x36
(ivtv i2c driver #0)
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device video0
for encoder MPG (4096 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device video32
for encoder YUV (2048 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device vbi0 for
encoder VBI (1024 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device video24
for encoder PCM (320 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device radio0
for encoder radio
messages:Dec 27 15:09:18 trevo kernel: ivtv0: Initialized card: WinTV
PVR 500 (unit #1)
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Initializing card 1
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Autodetected Hauppauge
card (cx23416 based)
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Unreasonably low latency
timer, setting to 64 (was 32)
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Correcting tveeprom data:
no radio present on second unit
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Autodetected WinTV PVR 500
(unit #2)
messages:Dec 27 15:09:18 trevo kernel: cx25840 1-0044: cx25843-24 found
@ 0x88 (ivtv i2c driver #1)
messages:Dec 27 15:09:18 trevo kernel: tuner 1-0061: chip found @ 0xc2
(ivtv i2c driver #1)
messages:Dec 27 15:09:18 trevo kernel: wm8775 1-001b: chip found @ 0x36
(ivtv i2c driver #1)
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device video1
for encoder MPG (4096 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device video33
for encoder YUV (2048 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device vbi1 for
encoder VBI (1024 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device video25
for encoder PCM (320 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv1: Initialized card: WinTV
PVR 500 (unit #2)
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Initializing card 2
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Autodetected Hauppauge
card (cx23416 based)
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Unreasonably low latency
timer, setting to 64 (was 32)
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Autodetected WinTV PVR 500
(unit #1)
messages:Dec 27 15:09:18 trevo kernel: cx25840 2-0044: cx25843-24 found
@ 0x88 (ivtv i2c driver #2)
messages:Dec 27 15:09:18 trevo kernel: tuner 2-0060: chip found @ 0xc0
(ivtv i2c driver #2)
messages:Dec 27 15:09:18 trevo kernel: tuner 2-0061: chip found @ 0xc2
(ivtv i2c driver #2)
messages:Dec 27 15:09:18 trevo kernel: wm8775 2-001b: chip found @ 0x36
(ivtv i2c driver #2)
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device video2
for encoder MPG (4096 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device video34
for encoder YUV (2048 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device vbi2 for
encoder VBI (1024 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device video26
for encoder PCM (320 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device radio2
for encoder radio
messages:Dec 27 15:09:18 trevo kernel: ivtv2: Initialized card: WinTV
PVR 500 (unit #1)
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Initializing card 3
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Autodetected Hauppauge
card (cx23416 based)
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Unreasonably low latency
timer, setting to 64 (was 32)
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Correcting tveeprom data:
no radio present on second unit
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Autodetected WinTV PVR 500
(unit #2)
messages:Dec 27 15:09:18 trevo kernel: cx25840 3-0044: cx25843-24 found
@ 0x88 (ivtv i2c driver #3)
messages:Dec 27 15:09:18 trevo kernel: tuner 3-0061: chip found @ 0xc2
(ivtv i2c driver #3)
messages:Dec 27 15:09:18 trevo kernel: wm8775 3-001b: chip found @ 0x36
(ivtv i2c driver #3)
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device video3
for encoder MPG (4096 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device video35
for encoder YUV (2048 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device vbi3 for
encoder VBI (1024 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device video27
for encoder PCM (320 kB)
messages:Dec 27 15:09:18 trevo kernel: ivtv3: Initialized card: WinTV
PVR 500 (unit #2)
messages:Dec 27 15:09:18 trevo kernel: ivtv: End initialization
messages:Dec 27 15:10:31 trevo kernel: ivtv 0000:03:08.0: firmware:
requesting v4l-cx2341x-enc.fw
messages:Dec 27 15:10:31 trevo kernel: ivtv0: Loaded v4l-cx2341x-enc.fw
firmware (376836 bytes)
messages:Dec 27 15:10:31 trevo kernel: ivtv0: Encoder revision: 0x02050032

Here is dmesg for 2.6.13 one card installed (running happily, both
encoders)

ivtv: ==================== START INIT IVTV ====================
ivtv: version 0.4.1 (tagged release) loading
ivtv: Linux version: 2.6.13 SMP preempt PENTIUM4 gcc-4.2
ivtv: In case of problems please include the debug info between
ivtv: the START INIT IVTV and END INIT IVTV lines, along with
ivtv: any module options, when mailing the ivtv-users mailinglist.
ivtv0: Autodetected WinTV PVR 150 card (cx23416 based)
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
tuner (ivtv): chip found at addr 0xc0 i2c-bus ivtv i2c driver #0
ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=60]
tuner: type set to 62 (Philips TEA5767HN FM Radio) by autodetect
tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #0
ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]
tveeprom: Second (radio) tuner idx 101
tveeprom: ivtv version
tveeprom: Hauppauge: model = 23552, rev = D492, serial# = 7804812
tveeprom: tuner = Philips FQ1236A MK4 (idx = 92, type = 57)
tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
tveeprom: audio processor = CX25843 (type = 25)
tveeprom: decoder processor = CX25843 (type = 1e)
ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]
ivtv0: This is the first unit of a PVR500
cx25840 0-0044: ivtv driver
cx25840 0-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=cx25840, addr=44]
wm8775 0-001b: ivtv driver
wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=wm8775, addr=1b]
tda9887 0-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=tda9887, addr=43]
ivtv0: Detected a TEA5767 radio tuner. Enabling radio support.
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv0: Encoder revision: 0x02060039
ivtv0 warning: Encoder Firmware can be buggy, use version 0x02040011 or
0x02050032.
ivtv0: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
ivtv0: Allocate DMA encoder YUV stream: 194 x 10800 buffers (2048KB total)
ivtv0: Allocate DMA encoder VBI stream: 120 x 17472 buffers (2048KB total)
ivtv0: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB
total)
ivtv0: Create encoder radio stream
tuner: type set to 57 (Philips FQ1236A MK4) by ivtv i2c driver #0
ivtv0: Initialized WinTV PVR 500 (unit #1), card #0
ivtv: ====================== NEXT CARD ======================
ivtv1: Autodetected WinTV PVR 150 card (cx23416 based)
ivtv1: Unreasonably low latency timer, setting to 64 (was 32)
tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #1
ivtv1: i2c attach to card #1 ok [client=(tuner unset), addr=61]
tveeprom: Second (radio) tuner idx 101
tveeprom: ivtv version
tveeprom: Hauppauge: model = 23552, rev = D492, serial# = 7804812
tveeprom: tuner = Philips FQ1236A MK4 (idx = 92, type = 57)
tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
tveeprom: audio processor = CX25843 (type = 25)
tveeprom: decoder processor = CX25843 (type = 1e)
ivtv1: i2c attach to card #1 ok [client=tveeprom, addr=50]
cx25840 1-0044: ivtv driver
cx25840 1-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #1)
ivtv1: i2c attach to card #1 ok [client=cx25840, addr=44]
wm8775 1-001b: ivtv driver
wm8775 1-001b: chip found @ 0x36 (ivtv i2c driver #1)
ivtv1: i2c attach to card #1 ok [client=wm8775, addr=1b]
tda9887 1-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #1)
ivtv1: i2c attach to card #1 ok [client=tda9887, addr=43]
ivtv1: This is the second unit of a PVR500
ivtv1: Correcting tveeprom data: no radio present on second unit
ivtv1: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv1: Encoder revision: 0x02060039
ivtv1 warning: Encoder Firmware can be buggy, use version 0x02040011 or
0x02050032.
ivtv1: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
ivtv1: Allocate DMA encoder YUV stream: 194 x 10800 buffers (2048KB total)
ivtv1: Allocate DMA encoder VBI stream: 120 x 17472 buffers (2048KB total)
ivtv1: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB
total)
tuner: type set to 57 (Philips FQ1236A MK4) by ivtv i2c driver #1
ivtv1: Initialized WinTV PVR 500 (unit #2), card #1
ivtv: ==================== END INIT IVTV ====================


More debugging information:

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:

03:08.0 Multimedia video controller: Internext Compression Inc iTVC16
(CX23416) MPEG-2 Encoder (rev 01)
03:09.0 Multimedia video controller: Internext Compression Inc iTVC16
(CX23416) MPEG-2 Encoder (rev 01)

crw-rw---- 1 video 81, 0 2009-12-27 20:13 /dev/v4l/video0
crw-rw---- 1 video 81, 1 2009-12-27 20:13 /dev/v4l/video1
crw-rw---- 1 video 81, 2 2009-12-27 20:13 /dev/v4l/video2
crw-rw---- 1 video 81, 3 2009-12-27 20:13 /dev/v4l/video3

root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video1 -D
Driver Info:
Driver name : ivtv
Card type : WinTV PVR 500 (unit #1)
Bus info : PCI:0000:03:08.0

root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video0 -D
Driver Info:
Driver name : ivtv
Card type : WinTV PVR 500 (unit #1)
Bus info : PCI:0000:03:08.0



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.

root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video0 -V
Format Video Capture:
Width/Height : 720/480
Pixel Format : 'MPEG'
Field : Interlaced
Bytes per Line: 0
Size Image : 131072
Colorspace : Broadcast NTSC/PAL (SMPTE170M/ITU601)

root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video1 -V
Format Video Capture:
Width/Height : 720/480
Pixel Format : 'HM12'
Field : Interlaced
Bytes per Line: 720
Size Image : 518400
Colorspace : Broadcast NTSC/PAL (SMPTE170M/ITU601)


I hope something in there is useful.

Cheers.
Re: PVR-500 has working video0, failing video1/2/3 (long) [ In reply to ]
On Wed, 2009-12-30 at 01:37 -0500, Trevor Boicey wrote:
> One line version:
> - 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.

One line answer:

Check your udev rules. Things changed a recently with all of the v4l
drivers (including ivtv) - minor numbers will no longer have a 1-to-1
correspondence to device node names or video stream types.


> Short version:
> - 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.
> - I have three PVR-500s, Revs D492, E587, E787. All working a week
> ago.
> - Problem occurs with as little as one PVR-500 in PC, I have tried
> each of the three individually with same results.
> - In new PC, using 2.6.32, video0 works perfectly. video1 seems to set
> up alright, and dmesg looks normal, no errors.
> - When I do "cat /dev/v4l/video0 > foo.mpg" it produces a usable mpg
> - When I do "cat /dev/v4l/video1 > foo.mpg" it produces many more
> bytes, and not an mpg.
> - Same effect if I add another PVR-500, video2 and video3 also fail.
> - However, if I reboot with kernel 2.6.13, and build ivtv-0.4.1, and
> install those modules, everything works fine.
> - No module options, both kernels use the same /dev structure and same
> device nodes, and install the same firmware file.
> - Seemingly identical conditions except kernel version and driver
> version.

The ivtv driver, cx18 driver, and V4L2 specification (IIRC)
traditionally assume a naming convention like this:

/dev/radio0 <= FM radio control node for first CX2341x
/dev/radio1 <= FM radio control node for second CX2341x
...
/dev/vbi0 <= VBI data from first CX2341x
/dev/vbi1 <= VBI data from second CX2341x
...
/dev/video0 <= MPEG from first CX2341x
/dev/video1 <= MPEG from second CX2341x
...
/dev/video24 <= PCM audio from first CX2341x
/dev/video25 <= PCM audio from second CX2341x
...
/dev/video32 <= YUV (HM12) video from first CX2341x
/dev/video33 <= YUV (HM12) video from second CX2341x

and previously the device node minor number corresponded the number
after the "/dev/video", but that is no longer the case.

Here's a listing from my 2.6.27 machine with the v1.4.1 ivtv driver and
v1.3.0 cx18 driver loaded:

$ ls -al /dev/video*
lrwxrwxrwx 1 root root 6 2009-12-30 13:24 /dev/video -> video0
crw-rw----+ 1 andy mythtv 81, 0 2009-12-30 13:24 /dev/video0
crw-rw----+ 1 andy mythtv 81, 5 2009-12-30 13:25 /dev/video1
crw-rw----+ 1 andy mythtv 81, 3 2009-12-30 13:24 /dev/video24
crw-rw----+ 1 andy mythtv 81, 8 2009-12-30 13:25 /dev/video25
crw-rw----+ 1 andy mythtv 81, 1 2009-12-30 13:24 /dev/video32
crw-rw----+ 1 andy mythtv 81, 6 2009-12-30 13:25 /dev/video33

Note how the minor numbers really have no relationship to the number
after "/dev/video" any more.



> Long data:
>
> Here is the logs for 2.6.32, two cards installed. Only the first
> encoder of four works. (video0)
>
> messages:Dec 27 15:09:17 trevo kernel: ivtv: Start initialization, version 1.4.1
> messages:Dec 27 15:09:17 trevo kernel: ivtv0: Initializing card 0
> messages:Dec 27 15:09:17 trevo kernel: ivtv0: Autodetected Hauppauge card (cx23416 based)
> messages:Dec 27 15:09:17 trevo kernel: ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
> messages:Dec 27 15:09:17 trevo kernel: ivtv0: Autodetected WinTV PVR 500 (unit #1)
> messages:Dec 27 15:09:17 trevo kernel: cx25840 0-0044: cx25843-24 found @ 0x88 (ivtv i2c driver #0)
> messages:Dec 27 15:09:18 trevo kernel: tuner 0-0060: chip found @ 0xc0 (ivtv i2c driver #0)
> messages:Dec 27 15:09:18 trevo kernel: tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0)
> messages:Dec 27 15:09:18 trevo kernel: wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0)
> messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device video0 for encoder MPG (4096 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device video32 for encoder YUV (2048 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device vbi0 for encoder VBI (1024 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device video24 for encoder PCM (320 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv0: Registered device radio0 for encoder radio
> messages:Dec 27 15:09:18 trevo kernel: ivtv0: Initialized card: WinTV PVR 500 (unit #1)
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Initializing card 1
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Autodetected Hauppauge card (cx23416 based)
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Unreasonably low latency timer, setting to 64 (was 32)
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Correcting tveeprom data: no radio present on second unit
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Autodetected WinTV PVR 500 (unit #2)
> messages:Dec 27 15:09:18 trevo kernel: cx25840 1-0044: cx25843-24 found @ 0x88 (ivtv i2c driver #1)
> messages:Dec 27 15:09:18 trevo kernel: tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver #1)
> messages:Dec 27 15:09:18 trevo kernel: wm8775 1-001b: chip found @ 0x36 (ivtv i2c driver #1)
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device video1 for encoder MPG (4096 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device video33 for encoder YUV (2048 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device vbi1 for encoder VBI (1024 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Registered device video25 for encoder PCM (320 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv1: Initialized card: WinTV PVR 500 (unit #2)
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Initializing card 2
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Autodetected Hauppauge card (cx23416 based)
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Unreasonably low latency timer, setting to 64 (was 32)
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Autodetected WinTV PVR 500 (unit #1)
> messages:Dec 27 15:09:18 trevo kernel: cx25840 2-0044: cx25843-24 found @ 0x88 (ivtv i2c driver #2)
> messages:Dec 27 15:09:18 trevo kernel: tuner 2-0060: chip found @ 0xc0 (ivtv i2c driver #2)
> messages:Dec 27 15:09:18 trevo kernel: tuner 2-0061: chip found @ 0xc2 (ivtv i2c driver #2)
> messages:Dec 27 15:09:18 trevo kernel: wm8775 2-001b: chip found @ 0x36 (ivtv i2c driver #2)
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device video2 for encoder MPG (4096 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device video34 for encoder YUV (2048 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device vbi2 for encoder VBI (1024 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device video26 for encoder PCM (320 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Registered device radio2 for encoder radio
> messages:Dec 27 15:09:18 trevo kernel: ivtv2: Initialized card: WinTV PVR 500 (unit #1)
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Initializing card 3
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Autodetected Hauppauge card (cx23416 based)
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Unreasonably low latency timer, setting to 64 (was 32)
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Correcting tveeprom data: no radio present on second unit
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Autodetected WinTV PVR 500 (unit #2)
> messages:Dec 27 15:09:18 trevo kernel: cx25840 3-0044: cx25843-24 found @ 0x88 (ivtv i2c driver #3)
> messages:Dec 27 15:09:18 trevo kernel: tuner 3-0061: chip found @ 0xc2 (ivtv i2c driver #3)
> messages:Dec 27 15:09:18 trevo kernel: wm8775 3-001b: chip found @ 0x36 (ivtv i2c driver #3)
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device video3 for encoder MPG (4096 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device video35 for encoder YUV (2048 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device vbi3 for encoder VBI (1024 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Registered device video27 for encoder PCM (320 kB)
> messages:Dec 27 15:09:18 trevo kernel: ivtv3: Initialized card: WinTV PVR 500 (unit #2)
> messages:Dec 27 15:09:18 trevo kernel: ivtv: End initialization
> messages:Dec 27 15:10:31 trevo kernel: ivtv 0000:03:08.0: firmware: requesting v4l-cx2341x-enc.fw
> messages:Dec 27 15:10:31 trevo kernel: ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
> messages:Dec 27 15:10:31 trevo kernel: ivtv0: Encoder revision: 0x02050032
>
> Here is dmesg for 2.6.13 one card installed (running happily, both
> encoders)
>
> ivtv: ==================== START INIT IVTV ====================
> ivtv: version 0.4.1 (tagged release) loading
[snip]
> ivtv: ==================== END INIT IVTV ====================
>
>
> More debugging information:
>
> 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:
>
> 03:08.0 Multimedia video controller: Internext Compression Inc iTVC16
> (CX23416) MPEG-2 Encoder (rev 01)
> 03:09.0 Multimedia video controller: Internext Compression Inc iTVC16
> (CX23416) MPEG-2 Encoder (rev 01)
>
> crw-rw---- 1 video 81, 0 2009-12-27 20:13 /dev/v4l/video0
> crw-rw---- 1 video 81, 1 2009-12-27 20:13 /dev/v4l/video1
> crw-rw---- 1 video 81, 2 2009-12-27 20:13 /dev/v4l/video2
> crw-rw---- 1 video 81, 3 2009-12-27 20:13 /dev/v4l/video3
>
> root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video1 -D
> Driver Info:
> Driver name : ivtv
> Card type : WinTV PVR 500 (unit #1)
> Bus info : PCI:0000:03:08.0
>
> root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video0 -D
> Driver Info:
> Driver name : ivtv
> Card type : WinTV PVR 500 (unit #1)
> Bus info : PCI:0000:03:08.0


Yes, it is right. You're looking at the MPEG device node
(/dev/v4l/video0) and the YUV (HM12) device node (/dev/v4l/video1) of
the same CX23416. /dev/v4l/video1 is not the MPEG device node of the
next CX23416.

You have udev rules that assume the minor number maps to the type of
video stream or video node. That's not the case anymore.


> 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.
>
> root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video0 -V
> Format Video Capture:
> Width/Height : 720/480
> Pixel Format : 'MPEG'
> Field : Interlaced
> Bytes per Line: 0
> Size Image : 131072
> Colorspace : Broadcast NTSC/PAL (SMPTE170M/ITU601)
>
> root@trevo:/tmp# v4l2-ctl -d /dev/v4l/video1 -V
> Format Video Capture:
> Width/Height : 720/480
> Pixel Format : 'HM12'
> Field : Interlaced
> Bytes per Line: 720
> Size Image : 518400
> Colorspace : Broadcast NTSC/PAL (SMPTE170M/ITU601)
>


> I hope something in there is useful.

Sure. Now here's something you may find useful.

In a window, as root, unload the ivtv module. Then in another window,
as root, run

# man udevadm
# udevadm monitor --environment --kernel --udev

In the first window, now modprobe the ivtv module. You will see all the
events and environment data that come through that udev operates upon.
It looks something like this:


udevmonitor will print the received events for:
UDEV the event which udev sends out after rule processing
UEVENT the kernel uevent

UEVENT[1262200513.371779] add /module/ivtv (module)
ACTION=add
DEVPATH=/module/ivtv
SUBSYSTEM=module
SEQNUM=1275

UDEV [1262200513.376397] add /module/ivtv (module)
UDEV_LOG=3
ACTION=add
DEVPATH=/module/ivtv
SUBSYSTEM=module
SEQNUM=1275
UDEVD_EVENT=1

[...]

UEVENT[1262200513.589200] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video1 (video4linux)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video1
SUBSYSTEM=video4linux
MAJOR=81
MINOR=5
SEQNUM=1281

UEVENT[1262200513.592127] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video33 (video4linux)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video33
SUBSYSTEM=video4linux
MAJOR=81
MINOR=6
SEQNUM=1282

UEVENT[1262200513.596333] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/vbi1 (video4linux)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/vbi1
SUBSYSTEM=video4linux
MAJOR=81
MINOR=7
SEQNUM=1283

UEVENT[1262200513.605989] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video25 (video4linux)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video25
SUBSYSTEM=video4linux
MAJOR=81
MINOR=8
SEQNUM=1284

UEVENT[1262200513.610136] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/radio1 (video4linux)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/radio1
SUBSYSTEM=video4linux
MAJOR=81
MINOR=9
SEQNUM=1285

[...]

UDEV [1262200513.707610] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/vbi1 (video4linux)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/vbi1
SUBSYSTEM=video4linux
MAJOR=81
MINOR=7
SEQNUM=1283
UDEVD_EVENT=1
ID_PATH=pci-0000:02:01.0
DEVNAME=/dev/vbi1
DEVLINKS=/dev/v4l/by-path/pci-0000:02:01.0-video-index2

UDEV [1262200513.709209] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/radio1 (video4linux)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/radio1
SUBSYSTEM=video4linux
MAJOR=81
MINOR=9
SEQNUM=1285
UDEVD_EVENT=1
ID_PATH=pci-0000:02:01.0
DEVNAME=/dev/radio1

UDEV [1262200513.718639] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video33 (video4linux)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video33
SUBSYSTEM=video4linux
MAJOR=81
MINOR=6
SEQNUM=1282
UDEVD_EVENT=1
ID_PATH=pci-0000:02:01.0
DEVNAME=/dev/video33
DEVLINKS=/dev/v4l/by-path/pci-0000:02:01.0-video-index1

UDEV [1262200513.724246] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video1 (video4linux)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video1
SUBSYSTEM=video4linux
MAJOR=81
MINOR=5
SEQNUM=1281
UDEVD_EVENT=1
ID_PATH=pci-0000:02:01.0
DEVNAME=/dev/video1
DEVLINKS=/dev/v4l/by-path/pci-0000:02:01.0-video-index0

UDEV [1262200513.740210] add /devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video25 (video4linux)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:02:01.0/video4linux/video25
SUBSYSTEM=video4linux
MAJOR=81
MINOR=8
SEQNUM=1284
UDEVD_EVENT=1
ID_PATH=pci-0000:02:01.0
DEVNAME=/dev/video25
DEVLINKS=/dev/v4l/by-path/pci-0000:02:01.0-video-index3

[...]



Note that, for example, the "video1" part of the kernel UEVENT
"DEVPATH=.../video1" string is orginating from the videodev and ivtv
modules for the MPEG stream of my PVR-150. After default udev rule
processing, the UDEV event shows a "DEVNAME=/dev/video1" which is the
device node created for the "DEVPATH=.../video1". Note that
for /dev/video1, the minor number of "5" has nothing to do with the node
type of MPEG; it's just a minor number.

I suggest you add or modify your udev rules to not use the device minor
number with the new ivtv driver.

Regards,
Andy

> Cheers.



_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: PVR-500 has working video0, failing video1/2/3 (long) [ In reply to ]
On 12/30/2009 2:50 PM, Andy Walls wrote:
> One line answer:
>
> Check your udev rules. Things changed a recently with all of the v4l
> drivers (including ivtv) - minor numbers will no longer have a 1-to-1
> correspondence to device node names or video stream types.
>
> (many lines cut)
>

Thanks Andy. I'm not using udev at the moment, but your explanation
makes perfect sense. Do you know approximately which kernel version
those changes started to appear? I have a friend I was comparing
configurations with, and he's running 2.6.24 (mythbuntu system) without
udev also, just standard major-minors. I wonder if his next kernel
upgrade will cause the same problems!

I'll switch to udev and give it another go.

Thank you!

_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: PVR-500 has working video0, failing video1/2/3 (long) [ In reply to ]
On Wed, 2009-12-30 at 16:56 -0500, Trevor Boicey wrote:
> On 12/30/2009 2:50 PM, Andy Walls wrote:
> > One line answer:
> >
> > Check your udev rules. Things changed a recently with all of the v4l
> > drivers (including ivtv) - minor numbers will no longer have a 1-to-1
> > correspondence to device node names or video stream types.
> >
> > (many lines cut)
> >
>
> Thanks Andy. I'm not using udev at the moment, but your explanation
> makes perfect sense. Do you know approximately which kernel version
> those changes started to appear?

No. The v4l-dvb driver develop somewhat independently of the kernel and
then get merged in a group. Although if you search the archives of the
Linux media list ( linux-media@vger.kernel.org ), you'll see the change
happened rather recently. Look for patches from Laurent.


> I have a friend I was comparing
> configurations with, and he's running 2.6.24 (mythbuntu system) without
> udev also, just standard major-minors. I wonder if his next kernel
> upgrade will cause the same problems!
>
> I'll switch to udev and give it another go.

Well, I think you can always just check /sys

$ ls -alL /sys/class/video4linux/
total 0
drwxr-xr-x 2 root root 0 2009-12-30 17:27 .
drwxr-xr-x 40 root root 0 2009-12-30 13:24 ..
drwxr-xr-x 3 root root 0 2009-12-30 17:27 radio0
drwxr-xr-x 3 root root 0 2009-12-30 17:27 radio1
drwxr-xr-x 3 root root 0 2009-12-30 17:27 vbi0
drwxr-xr-x 3 root root 0 2009-12-30 17:27 vbi1
drwxr-xr-x 3 root root 0 2009-12-30 17:27 video0
drwxr-xr-x 3 root root 0 2009-12-30 17:27 video1
drwxr-xr-x 3 root root 0 2009-12-30 17:27 video24
drwxr-xr-x 3 root root 0 2009-12-30 17:27 video25
drwxr-xr-x 3 root root 0 2009-12-30 17:27 video32
drwxr-xr-x 3 root root 0 2009-12-30 17:27 video33

$ cat /sys/class/video4linux/video0/dev
81:0
$ cat /sys/class/video4linux/video1/dev
81:5

and use that info to create the nodes manually, if udev isn't an option
for some reason.


> Thank you!


You're welcome.

Regards,
Andy


_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: PVR-500 has working video0, failing video1/2/3 (long) [ In reply to ]
On 30/12/2009 5:36 PM, Andy Walls wrote:
> $ cat /sys/class/video4linux/video0/dev
> 81:0
> $ cat /sys/class/video4linux/video1/dev
> 81:5
>
> and use that info to create the nodes manually, if udev isn't an option
> for some reason.
>
Thanks again Andy, this worked fine. I just created the nodes
manually, I'll probably put this box back in the TV stand and won't
touch it again for three years, so udev can wait for another day.


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