[mythtv-users] Anyone good with udev rules?

Jeff Simpson jeffsimpson at alum.wpi.edu
Wed Sep 13 17:25:22 UTC 2006


Take a look in this directory:

/sys/class/video4linux

You should see subdirectories for each device currently loaded.

The following command will give you a lot of information about the device:

udevinfo -a -p /sys/class/video4linux/video0/

The idea is to pick things that uniquely identify a device from all
the others, and assign it a device node accordingly. I only have a
single encoder, so I don't know what is different between devices. You
should be able to find something that differs.

So for example, I might try this line:

KERNEL=="video[0-9]", SYSFS{name}=="ivtv0 encoder MPEG", NAME="video0"

That line (should) take any videoX device that matches "ivtv0 encoder
MPEG" and assign it specifically to video0 (and not whatever video
device it started as). You could just as easily do:

KERNEL=="video[0-9]", SYSFS{name}=="ivtv0 encoder MPEG", NAME="pvr150_video0"

to give the video device a more specific and helpful name.

I haven't tried any of this, of course, so your results may vary.

 - Jeff


On 9/13/06, Derek Meek <thekazan at gmail.com> wrote:
> Stuart Larson wrote:
>
> >>All I can find are a bunch of references to the docs I cannot quite
> >>follow :D
> >>
> >>--
> >>Derek "Kazan" Meek
> >>----------------------------------------------------------------------------------------
> >>"Is God willing to prevent evil, but not able? Then he is impotent. Is he
> >>able, but not willing? Then he is malevolent. Is he both able and willing?
> >>Whence then is evil?" - Epicurus
> >>
> >>_______________________________________________
> >>mythtv-users mailing list
> >>mythtv-users at mythtv.org
> >>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >>
> >>
> >>
> >
> >How about:
> >http://www.gossamer-threads.com/lists/mythtv/users/215108#215108  Is that
> >what you were looking at?
> >
> >_______________________________________________
> >mythtv-users mailing list
> >mythtv-users at mythtv.org
> >http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
> >
> >
> Saw those - the relevant ones are just links back to the documentation
> i've already seen, and didn't understand. I have
>
> bttv0: /dev/video0
> ivtv0: /dev/video1
> ivtv1: /dev/video2
>
> dmesg output (grepping for bttv or ivtv)
>
> bttv: driver version 0.9.16 loaded
> bttv: using 8 buffers with 2080k (520 pages) each for capture
> bttv: Bt8xx card found (0).
> bttv0: Bt878 (rev 17) at 0000:00:08.0, irq: 19, latency: 32, mmio:
> 0xda001000
> bttv0: using: Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF
> [card=78,insmod option]
> bttv0: gpio: en=00000000, out=00000000 in=003fffff [init]
> bttv0: using tuner=2
> bttv0: i2c: checking for TDA9875 @ 0xb0... not found
> bttv0: i2c: checking for TDA7432 @ 0x8a... not found
> bttv0: i2c: checking for TDA9887 @ 0x86... not found
> bttv0: registered device video0
> bttv0: registered device vbi0
> bttv0: registered device radio0
> ivtv: ==================== START INIT IVTV ====================
> ivtv: version 0.6.1 (tagged release) loading
> ivtv: Linux version: 2.6.16-1.2080_FC5 686 REGPARM 4KSTACKS 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 WinTV PVR-150 card (cx23416 based)
> ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
> tuner 2-0060: chip found @ 0xc0 (ivtv i2c driver #0)
> tuner 2-0061: chip found @ 0xc2 (ivtv i2c driver #0)
> ivtv0: This is the first unit of a PVR500
> tda9887 2-0043: chip found @ 0x86 (ivtv i2c driver #0)
> cx25840 2-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)
> wm8775 2-001b: chip found @ 0x36 (ivtv i2c driver #0)
> ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
> ivtv0: Encoder revision: 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
> ivtv0: Initialized WinTV PVR 500 (unit #1), card #0
> ivtv: ====================== NEXT CARD ======================
> ivtv1: Autodetected Hauppauge WinTV PVR-150 card (cx23416 based)
> ivtv1: Unreasonably low latency timer, setting to 64 (was 32)
> tuner 3-0061: chip found @ 0xc2 (ivtv i2c driver #1)
> tda9887 3-0043: chip found @ 0x86 (ivtv i2c driver #1)
> cx25840 3-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #1)
> wm8775 3-001b: chip found @ 0x36 (ivtv i2c driver #1)
> 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: 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)
> ivtv1: Initialized WinTV PVR 500 (unit #2), card #1
> ivtv: ==================== END INIT IVTV ====================
>
>
> --
> Derek "Kazan" Meek
> ----------------------------------------------------------------------------------------
> "Is God willing to prevent evil, but not able? Then he is impotent. Is he able, but not willing? Then he is malevolent. Is he both able and willing? Whence then is evil?" - Epicurus
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


More information about the mythtv-users mailing list