View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 8 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Jan 14, 2007 7:53 pm 
Offline
Joined: Tue Aug 08, 2006 7:08 pm
Posts: 561
Location: UK
Since moving over to R5E50, I've noticed on consecutive bootups, the device of the PVR350 card seems to change from /dev/video0 to video1 or video2, or back to video0. It seems to be due to the new fast bootup introduced in R5E50.
What then seems to happen it causes the backend some problems, especially if you have a recording starting soon after boot. I don't reboot my KM box very often, but if I need to do anything around the back of the machine, as it seems to be rather sensitive with its power connection. :)
After restart, I need to stop the frontend, the backend, go into mythtv-setup and then reassign the particular device for the card. What's annoying that the initial capture device display that comes up fairly early on in the boot sequence, the cards remain constant in their numbering .
Samples from dmesgs:
Code:
bruce@homenet-pvr:~$ dmesg |grep ivtv
ivtv:  ==================== START INIT IVTV ====================
ivtv:  version 0.8.2 (tagged release) loading
ivtv:  Linux version: 2.6.18-chw-13 SMP preempt mod_unload 586 gcc-4.1
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 Hauppauge card (cx23415 based)
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv0: loaded v4l-cx2341x-dec.fw firmware (262144 bytes)
tuner 3-0043: chip found @ 0x86 (ivtv i2c driver #0)
tuner 3-0061: chip found @ 0xc2 (ivtv i2c driver #0)
msp3400 3-0040: MSP4418G-B3 found @ 0x80 (ivtv i2c driver #0)
saa7115 3-0021: saa7115 found @ 0x42 (ivtv i2c driver #0)
ivtv0: Autodetected Hauppauge WinTV PVR-350
saa7127 3-0044: saa7129 found @ 0x88 (ivtv i2c driver #0)
ivtv0: Encoder revision: 0x02050032
ivtv0: Decoder revision: 0x02020023
ivtv0: Registered device video1 for encoder MPEG
ivtv0: Registered device video32 for encoder YUV
ivtv0: Registered device vbi1 for encoder VBI
ivtv0: Registered device video24 for encoder PCM audio
ivtv0: Registered device radio0 for encoder radio
ivtv0: Registered device video16 for decoder MPEG
ivtv0: Registered device vbi8 for decoder VBI
ivtv0: Registered device vbi16 for decoder VOUT
ivtv0: Registered device video48 for decoder YUV
ivtv0: loaded v4l-cx2341x-init.mpg firmware (155648 bytes)
ivtv0: Initialized Hauppauge WinTV PVR-350, card #0
ivtv:  ====================  END INIT IVTV  ====================

and
Code:
root@homenet-pvr:/home/bruce# dmesg |grep ivtv
ivtv:  ==================== START INIT IVTV ====================
ivtv:  version 0.8.2 (tagged release) loading
ivtv:  Linux version: 2.6.18-chw-13 SMP preempt mod_unload 586 gcc-4.1
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 Hauppauge card (cx23415 based)
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv0: loaded v4l-cx2341x-dec.fw firmware (262144 bytes)
tuner 2-0043: chip found @ 0x86 (ivtv i2c driver #0)
tuner 2-0061: chip found @ 0xc2 (ivtv i2c driver #0)
msp3400 2-0040: MSP4418G-B3 found @ 0x80 (ivtv i2c driver #0)
saa7115 2-0021: saa7115 found @ 0x42 (ivtv i2c driver #0)
ivtv0: Autodetected Hauppauge WinTV PVR-350
saa7127 2-0044: saa7129 found @ 0x88 (ivtv i2c driver #0)
ivtv0: Encoder revision: 0x02050032
ivtv0: Decoder revision: 0x02020023
ivtv0: Registered device video0 for encoder MPEG
ivtv0: Registered device video32 for encoder YUV
ivtv0: Registered device vbi0 for encoder VBI
ivtv0: Registered device video24 for encoder PCM audio
ivtv0: Registered device radio0 for encoder radio
ivtv0: Registered device video16 for decoder MPEG
ivtv0: Registered device vbi8 for decoder VBI
ivtv0: Registered device vbi16 for decoder VOUT
ivtv0: Registered device video48 for decoder YUV
ivtv0: loaded v4l-cx2341x-init.mpg firmware (155648 bytes)
ivtv0: Initialized Hauppauge WinTV PVR-350, card #0
ivtv:  ====================  END INIT IVTV  ====================


I assume there must be some way using config files to keep it constant, as this is really rather annoying.

Bruce S.

Edited to modify Subject to notify change of status.

_________________
Updated 2019/10/26: AthlonII X2 265 Gigabyte GA-970A-DS3P
16Gb PC 1866 DDR3, 500GB+2TB+4TB SATA HDD,
SATA DVD-RW Asus DRW-24D5MT , NVIDIA GeForce GT1080
Hauppauage Nova-T 500, Nova-T LinHes R8.6.1


Last edited by bruce_s01 on Tue Jan 16, 2007 5:37 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 14, 2007 9:33 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
As I understand it R5E50 introduces us to udev, a dynamic way of handling the /dev entries. man udev should tell you what config file to edit to make certain pieces of hardware retain their /dev entries upon bootup. I personally have no working knowledge of udev so I'm afraid I can't be of more help, sorry.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 15, 2007 9:41 am 
Offline
Joined: Tue Sep 26, 2006 3:21 pm
Posts: 14
I only noticed that if I had to reset or switch the box off without being able to properly shut it down. A proper reboot after that has always taken care of the problem.

_________________
# CASE: Acer AP8400 (Mini-tower)
# CPU: P3 733Mhz
# Motherboard: Asus CUV4X Rev. 1.03 Socket 370
# RAM: 384 MByte
# CD/DVD-RW: LG DVD/RW
# HDD: Seagate 320 GByte
# SOUNDCARD: On board
# TUNER CARD: PVR-350
# REMOTE CONTROL: Silver Haupauge


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 15, 2007 9:55 am 
Offline
Joined: Tue Aug 08, 2006 7:08 pm
Posts: 561
Location: UK
I think it's something to do with having 3 cards (1xPVR350 & 2xNovaT).

Bruce S.

_________________
Updated 2019/10/26: AthlonII X2 265 Gigabyte GA-970A-DS3P
16Gb PC 1866 DDR3, 500GB+2TB+4TB SATA HDD,
SATA DVD-RW Asus DRW-24D5MT , NVIDIA GeForce GT1080
Hauppauage Nova-T 500, Nova-T LinHes R8.6.1


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 5:35 pm 
Offline
Joined: Tue Aug 08, 2006 7:08 pm
Posts: 561
Location: UK
Having a look at the udev info here, here, and here gave me pointers, but the ivtv Wiki gives an example.

Working through the steps,
Code:
bruce@homenet-pvr:~$ udevinfo -e |less

P: /class/video4linux/radio0
N: radio0

P: /class/video4linux/vbi0
N: vbi0

P: /class/video4linux/vbi1
N: vbi1

P: /class/video4linux/vbi16
N: vbi16

P: /class/video4linux/vbi2
N: vbi2

P: /class/video4linux/vbi8
N: vbi8

P: /class/video4linux/video0
N: video0

P: /class/video4linux/video1
N: video1

P: /class/video4linux/video16
N: video16

P: /class/video4linux/video2
N: video2

P: /class/video4linux/video24
N: video24

P: /class/video4linux/video32
N: video32

P: /class/video4linux/video48
N: video48
I extracted the relevant info, the above has been edited to remove all the other devices.
So at this boot, it was still video0, so I needed to get more info about it:
Code:
bruce@homenet-pvr:~$ udevinfo -a -p /class/video4linux/video0

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/class/video4linux/video0':
    KERNEL=="video0"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{name}=="ivtv0 encoder MPEG"
    ATTR{dev}=="81:0"

  looking at parent device '/devices/pci0000:00/0000:00:09.0/0000:05:06.0':
    KERNELS=="0000:05:06.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="ivtv"
    ATTRS{broken_parity_status}=="0"
    ATTRS{modalias}=="pci:v00004444d00000803sv00000070sd00004000bc04sc00i00"
    ATTRS{local_cpus}=="ffffffff"
    ATTRS{irq}=="20"
    ATTRS{class}=="0x040000"
    ATTRS{subsystem_device}=="0x4000"
    ATTRS{subsystem_vendor}=="0x0070"
    ATTRS{device}=="0x0803"
    ATTRS{vendor}=="0x4444"

  looking at parent device '/devices/pci0000:00/0000:00:09.0':
    KERNELS=="0000:00:09.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{modalias}=="pci:v000010DEd0000005Csv00000000sd00000000bc06sc04i01"
    ATTRS{local_cpus}=="ffffffff"
    ATTRS{irq}=="0"
    ATTRS{class}=="0x060401"
    ATTRS{subsystem_device}=="0x0000"
    ATTRS{subsystem_vendor}=="0x0000"
    ATTRS{device}=="0x005c"
    ATTRS{vendor}=="0x10de"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
So using the info above and from the links, I created a local.rules file in /etc/udev and tried to get a symlink to whatever /dev/videoX device would be used, as follows:
Code:
root@homenet-pvr:/home/bruce#cd /etc/udev
root@homenet-pvr:/etc/udev#nano local.rules

DRIVERS=="ivtv", SYSFS{name}=="ivtv? encoder MPEG", ID=="0000:05:06.0", NAME="video", SYMLINK+="pvr_350", GROUP="video"
root@homenet-pvr:/etc/udev# cd rules.d
root@homenet-pvr:/etc/udev/rules.d#ln -s ../local.rules z99_local.rules
So after the reboot the symlink worked and would follow whatever device the PVR350 would be at. Unfortunately I still was not able to select the symlink in mythtv-setup and it would not change the symlink group to video. So modifying the local.rules file to:
Code:
DRIVERS=="ivtv", SYSFS{name}=="ivtv? encoder MPEG", ID=="0000:05:06.0", NAME="video", SYMLINK+="pvr_350", GROUP="video"

This forces the PVR350 to /dev/video, resulting in the following:
Code:
bruce@homenet-pvr:~$ ls -l /dev/pv*
lrwxrwxrwx 1 root root 5 Jan 16 19:53 /dev/pvr_350 -> video
bruce@homenet-pvr:~$ ls -l /dev/video*
crw-rw---- 1 root video 81,  1 Jan 16 19:53 /dev/video
crw-rw---- 1 root video 81,  0 Jan 16 19:53 /dev/video0
crw-rw---- 1 root video 81, 16 Jan 16 19:53 /dev/video16
crw-rw---- 1 root video 81,  2 Jan 16 19:53 /dev/video2
crw-rw---- 1 root video 81, 24 Jan 16 19:53 /dev/video24
crw-rw---- 1 root video 81, 32 Jan 16 19:53 /dev/video32
crw-rw---- 1 root video 81, 48 Jan 16 19:53 /dev/video48
Going into mythtv-setup, allowed me to set the device to /dev/video, though in tuner setup, it still showed /dev/video1. Restarting the backend, then the frontend, generated "Can't connect to backend" error, so stopping the backend and going into mythtv-setup, I deleted the tuner and recreated it, using /dev/video.
Restarting the backend and frontend, everything seems to be OK, though doing the following:
Code:
root@homenet-pvr:/etc/udev# dmesg |grep ivtv
ivtv:  ==================== START INIT IVTV ====================
ivtv:  version 0.8.2 (tagged release) loading
ivtv:  Linux version: 2.6.18-chw-13 SMP preempt mod_unload 586 gcc-4.1
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 Hauppauge card (cx23415 based)
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv0: loaded v4l-cx2341x-dec.fw firmware (262144 bytes)
tuner 3-0043: chip found @ 0x86 (ivtv i2c driver #0)
tuner 3-0061: chip found @ 0xc2 (ivtv i2c driver #0)
msp3400 3-0040: MSP4418G-B3 found @ 0x80 (ivtv i2c driver #0)
saa7115 3-0021: saa7115 found @ 0x42 (ivtv i2c driver #0)
ivtv0: Autodetected Hauppauge WinTV PVR-350
saa7127 3-0044: saa7129 found @ 0x88 (ivtv i2c driver #0)
ivtv0: Encoder revision: 0x02050032
ivtv0: Decoder revision: 0x02020023
ivtv0: Registered device video1 for encoder MPEG
ivtv0: Registered device video32 for encoder YUV
ivtv0: Registered device vbi1 for encoder VBI
ivtv0: Registered device video24 for encoder PCM audio
ivtv0: Registered device radio0 for encoder radio
ivtv0: Registered device video16 for decoder MPEG
ivtv0: Registered device vbi8 for decoder VBI
ivtv0: Registered device vbi16 for decoder VOUT
ivtv0: Registered device video48 for decoder YUV
ivtv0: loaded v4l-cx2341x-init.mpg firmware (155648 bytes)
ivtv0: Initialized Hauppauge WinTV PVR-350, card #0
ivtv:  ====================  END INIT IVTV  ====================
Shows that /dev/video1 is still being created for ivtv, it must then be changed by udev to /dev/video. I don't know what this does to the drivers, it's possible that the local.rules symlink needs to changed to a smaller number so it's triggered earlier in the udev sequence. It does seem to work, though I haven't rebooted yet as the box has been fairly busy.

Hope this helps someone else as well.

Bruce S.

_________________
Updated 2019/10/26: AthlonII X2 265 Gigabyte GA-970A-DS3P
16Gb PC 1866 DDR3, 500GB+2TB+4TB SATA HDD,
SATA DVD-RW Asus DRW-24D5MT , NVIDIA GeForce GT1080
Hauppauage Nova-T 500, Nova-T LinHes R8.6.1


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 23, 2007 3:07 am 
Offline
Joined: Tue Aug 08, 2006 7:08 pm
Posts: 561
Location: UK
Just as an update, I found the following message appearing in /var/log/mythtv/mythbackend.log.
Code:
2007-02-21 20:00:07.583 MPEGRec(/dev/video) Error: Error getting codec params using old IVTV ioctl
                        eno: Bad address (14)

I don't know what the significance of this is, whether it is bad or good but everything seems to be OK.

Bruce S.

_________________
Updated 2019/10/26: AthlonII X2 265 Gigabyte GA-970A-DS3P
16Gb PC 1866 DDR3, 500GB+2TB+4TB SATA HDD,
SATA DVD-RW Asus DRW-24D5MT , NVIDIA GeForce GT1080
Hauppauage Nova-T 500, Nova-T LinHes R8.6.1


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 11, 2007 7:24 am 
Offline
Joined: Fri Feb 03, 2006 11:36 pm
Posts: 63
Location: Melbourne
In R5F1 the format of the local rules has changed because it uses udev version 103. Details are at http://ivtvdriver.org/index.php/Howto#Howto_use_udev_rules.21. Here are the rules I had for a pvr 500:

DRIVERS=="ivtv", ATTR{name}=="ivtv? encoder MPEG", KERNELS=="0000:02:08.0", NAME="video02", SYMLINK+="pvr_500_1"
DRIVERS=="ivtv", ATTR{name}=="ivtv? encoder MPEG", KERNELS=="0000:02:09.0", NAME="video03", SYMLINK+="pvr_500_2"


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 15, 2007 8:46 am 
Offline
Joined: Fri Feb 03, 2006 11:36 pm
Posts: 63
Location: Melbourne
With R5F27 the udev rules didn't work for me anymore. I ran the udevinfo command below and found that the spelling of "ivtv? encoder MPEG" had changed to "ivtv? encoder MPG":

udevinfo -a -p $(udevinfo -q path -n /dev/video0)


The new rules are:

DRIVERS=="ivtv", ATTR{name}=="ivtv? encoder MPG", KERNELS=="0000:02:08.0", NAME="video02", SYMLINK+="pvr_500_1"

DRIVERS=="ivtv", ATTR{name}=="ivtv? encoder MPG", KERNELS=="0000:02:09.0", NAME="video03", SYMLINK+="pvr_500_2"


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu