From owner-freebsd-multimedia@FreeBSD.ORG Fri Jan 6 13:48:15 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 C52B3106564A for ; Fri, 6 Jan 2012 13:48:15 +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 564F28FC17 for ; Fri, 6 Jan 2012 13:48:15 +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 1RjA9U-00044Y-CF; Fri, 06 Jan 2012 14:48:12 +0100 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.4/8.14.3) with ESMTP id q06DmC5b006201; Fri, 6 Jan 2012 14:48:12 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.4/8.14.3/Submit) id q06DmBc7006200; Fri, 6 Jan 2012 14:48:11 +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 14:48:11 +0100 From: Matthias Apitz To: Hans Petter Selasky Message-ID: <20120106134811.GA6168@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 13:48:15 -0000 El día Thursday, January 05, 2012 a las 07:00:01PM +0100, Hans Petter Selasky escribió: > > > > I checked the source tree for 'CONFIG_VIDEO_V4L1_COMPAT' but it is only > > > > mentioned as #undef CONFIG_VIDEO_V4L1_COMPAT in build/config.h, no > > > > further places; so I don't know where to look if some additional lib is > > > > compiled and linked static to webcamd (ldd does not show any additional > > > > shared lib); I'm a bit clueless; please help > > > > Hi, > > > > 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. Hi, Sorry for disagreeing; webcamd goes with a V4L cmd (0x40047601) into the routines of media_tree/drivers/media/video/v4l2-ioctl.c and tries to find a match there; the source reads: static int check_array_args(unsigned int cmd, void *parg, size_t *array_size, void * __user *user_ptr, void ***kernel_ptr) { int ret = 0; switch (cmd) { case VIDIOC_QUERYBUF: case VIDIOC_QBUF: case VIDIOC_DQBUF: { struct v4l2_buffer *buf = parg; ... and I have it in GDB as: (gdb) s check_array_args (cmd=1074034177, parg=0xbf4f9d94, array_size=0xbf4f9d80, user_ptr=0xbf4f9d7c, kernel_ptr=0xbf4f9d78) at media_tree/drivers/media/video/v4l2-ioctl.c:2202 2202 int ret = 0; (gdb) n 2204 switch (cmd) { (gdb) 2239 return ret; (gdb) p ret $8 = 0 (gdb) p /x cmd $9 = 0x40047601 i.e. it can not find any match with cmd=0x40047601 in the defines of /usr/local/include/linux/videodev2.h /* * I O C T L C O D E S F O R V I D E O D E V I C E S * */ #define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability) #define VIDIOC_RESERVED _IO('V', 1) #define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc) #define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format) #define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format) #define VIDIOC_REQBUFS _IOWR('V', 8, struct v4l2_requestbuffers) ... they are all there with capital 'V' while we have 'v' (0x76) im the cmd; this can not work; somewhere the conversion from V4L to V4L2 is missed; where this should be done, please point me to the source file to check and set a breakpoint there; thanks matthias -- 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