FYI: v4l-linuxulator support in FreeBSD-current now

Andrew Gallatin gallatin at gmail.com
Tue Jan 11 15:17:58 UTC 2011


On Tue, Jan 11, 2011 at 9:26 AM, J.R. Oldroyd <fbsd at opal.com> wrote:

> This patch merely flips the cmd bits.
>
> I'm not familiar with the Linux DVB ioctls... is it really the case
> that none of the data structures have 32/64-bit architecture dependent
> field sizes?  Great if that's the case, but if not, we need to do
> data structure conversions here too, as we did for V4L.

I looked for a compat_ioctl for DVB, but came up with nothing.  From a
2.6.37 kernel:

$ pwd
/usr/src/kernels/linux-2.6.37/drivers/media
$ find . -name '*.c' | xargs grep compat_ioctl
./video/v4l2-dev.c:     .compat_ioctl = v4l2_compat_ioctl32,
./video/v4l2-compat-ioctl32.c:          printk(KERN_INFO
"compat_ioctl32: unexpected VIDIOC_FMT type %d\n",
./video/v4l2-compat-ioctl32.c:          printk(KERN_INFO
"compat_ioctl32: unexpected VIDIOC_FMT type %d\n",
./video/v4l2-compat-ioctl32.c:long v4l2_compat_ioctl32(struct file
*file, unsigned int cmd, unsigned long arg)
./video/v4l2-compat-ioctl32.c:          printk(KERN_WARNING "compat_ioctl32: "
./video/v4l2-compat-ioctl32.c:EXPORT_SYMBOL_GPL(v4l2_compat_ioctl32);
./IR/ir-lirc-codec.c:   .compat_ioctl   = ir_lirc_ioctl,
./IR/lirc_dev.c:        .compat_ioctl   = lirc_dev_fop_ioctl,

Also,  the DVB ioctls  I've looked at seem to be explictly sized (no
"long" used, u32 or u64 everywhere).

I tested the patch last night on amd64. I was able to successfully run
ia32 linux azap, dvbtraffic and test_dvr utils to tune a channel, find
the active PIDs, and record the stream to a file.

Drew


More information about the freebsd-multimedia mailing list