Date: Fri, 6 Jan 2012 13:07:20 +0100 From: Matthias Apitz <guru@unixarea.de> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org Subject: Re: webcamd/cuse4bsd && Skype Message-ID: <20120106120720.GA5779@tinyCurrent> In-Reply-To: <201201051900.01903.hselasky@c2i.net> References: <20120101164408.GA2389@tinyCurrent> <201201051653.15808.hselasky@c2i.net> <20120105175505.GA2167@tinyCurrent> <201201051900.01903.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
El día Thursday, January 05, 2012 a las 07:00:01PM +0100, Hans Petter Selasky escribió: > > OK concerning HAL, but the main question is why the V4L IOCTL are not > > translated into V4L2? where should I look? thanks > > They are, but probably the structure size is wrong. > > --HPS Hello Hans, I have below a gdb session of the 1st failing IOCTL after the open; does not look like a problem of the structure size; the error is returned from the call ret = vdev->fops->unlocked_ioctl(filp, cmd, arg); let me know if you need more details of the gdb session; thanks matthias # gdb work/webcamd-3.2.0.1/webcamd ... (gdb) br v4b_ioctl Breakpoint 1 at 0x82f2c96: file webcamd.c, line 265. (gdb) r Starting program: /usr/ports/multimedia/webcamd/work/webcamd-3.2.0.1/webcamd (now Skype in another session) mydebug: v4b_open fflags: 00000003 mydebug: linux_open gives: handle=28c08600 [Switching to Thread 28805180 (LWP 100240)] Breakpoint 1, v4b_ioctl (cdev=0x2882c0c0, fflags=7, cmd=1074034177, peer_data=0x10000) at webcamd.c:265 265 printf("mydebug: v4b_ioctl: cmd=0x%08x\n", cmd); (gdb) n mydebug: v4b_ioctl: cmd=0x40047601 266 handle = cuse_dev_get_per_file_handle(cdev); (gdb) n 267 printf("mydebug: v4b_ioctl: handle=%08x cmd=0x%08x\n", handle, cmd); (gdb) n mydebug: v4b_ioctl: handle=28c08600 cmd=0x40047601 270 if (cmd == FIONBIO || cmd == FIOASYNC) (gdb) n 274 error = linux_ioctl(handle, fflags & CUSE_FFLAG_NONBLOCK, (gdb) s linux_ioctl (handle=0x28c08600, fflags=4, cmd=1074034177, arg=0x10000) at kernel/linux_file.c:114 114 if (handle == NULL) (gdb) n 117 linux_fix_f_flags(&handle->fixed_file, fflags); (gdb) n 119 if (handle->fixed_file.f_op->unlocked_ioctl != NULL) (gdb) n 120 return (handle->fixed_file.f_op->unlocked_ioctl(&handle->fixed_file, (gdb) s v4l2_ioctl (filp=0x28c08608, cmd=1074034177, arg=65536) at media_tree/drivers/media/video/v4l2-dev.c:333 333 struct video_device *vdev = video_devdata(filp); (gdb) n 334 int ret = -ENODEV; (gdb) n 336 if (vdev->fops->unlocked_ioctl) { (gdb) n 337 if (vdev->lock && mutex_lock_interruptible(vdev->lock)) (gdb) n 339 if (video_is_registered(vdev)) (gdb) n 340 ret = vdev->fops->unlocked_ioctl(filp, cmd, arg); (gdb) n 341 if (vdev->lock) (gdb) p ret $1 = -22 (gdb) n 379 if (ret == 0 && cmd == VIDIOC_ENUMINPUT) { (gdb) n 397 return ret; (gdb) n 398 } (gdb) n linux_ioctl (handle=0x28c08600, fflags=4, cmd=1074034177, arg=0x10000) at kernel/linux_file.c:127 127 } (gdb) n v4b_ioctl (cdev=0x2882c0c0, fflags=7, cmd=1074034177, peer_data=0x10000) at webcamd.c:276 276 printf("mydebug: linux_ioctl returns: error=%08x\n", error); (gdb) n mydebug: linux_ioctl returns: error=ffffffea -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e <guru@unixarea.de> - w http://www.unixarea.de/ UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120106120720.GA5779>