From owner-freebsd-multimedia@FreeBSD.ORG Fri Jan 6 12:07:26 2012 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD6F2106564A for ; Fri, 6 Jan 2012 12:07:25 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id 6FCCA8FC0A for ; Fri, 6 Jan 2012 12:07:25 +0000 (UTC) Received: from [93.104.82.184] (helo=localhost.my.domain) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Rj8Zu-0007og-HU; Fri, 06 Jan 2012 13:07:22 +0100 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.4/8.14.3) with ESMTP id q06C7MpV005794; Fri, 6 Jan 2012 13:07:22 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.4/8.14.3/Submit) id q06C7LJO005793; Fri, 6 Jan 2012 13:07:21 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Fri, 6 Jan 2012 13:07:20 +0100 From: Matthias Apitz To: Hans Petter Selasky Message-ID: <20120106120720.GA5779@tinyCurrent> References: <20120101164408.GA2389@tinyCurrent> <201201051653.15808.hselasky@c2i.net> <20120105175505.GA2167@tinyCurrent> <201201051900.01903.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201201051900.01903.hselasky@c2i.net> X-Operating-System: FreeBSD 9.0-CURRENT r214444 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Originating-IP: 93.104.82.184 Cc: freebsd-multimedia@freebsd.org Subject: Re: webcamd/cuse4bsd && Skype X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2012 12:07:26 -0000 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 - 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