Date: Fri, 6 Jan 2012 16:47:46 +0100 From: Hans Petter Selasky <hselasky@c2i.net> To: Matthias Apitz <guru@unixarea.de> Cc: freebsd-multimedia@freebsd.org Subject: Re: webcamd/cuse4bsd && Skype Message-ID: <201201061647.46539.hselasky@c2i.net> In-Reply-To: <20120106134811.GA6168@tinyCurrent> References: <20120101164408.GA2389@tinyCurrent> <201201051900.01903.hselasky@c2i.net> <20120106134811.GA6168@tinyCurrent>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 06 January 2012 14:48:11 Matthias Apitz wrote: > El d=EDa Thursday, January 05, 2012 a las 07:00:01PM +0100, Hans Petter=20 Selasky escribi=F3: > > > > > 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 > > >=20 > > > Hi, > > >=20 > > > OK concerning HAL, but the main question is why the V4L IOCTL are not > > > translated into V4L2? where should I look? thanks > >=20 > > They are, but probably the structure size is wrong. >=20 > Hi, >=20 > 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: >=20 > static int check_array_args(unsigned int cmd, void *parg, size_t > *array_size, void * __user *user_ptr, void ***kernel_ptr) { > int ret =3D 0; >=20 > switch (cmd) { > case VIDIOC_QUERYBUF: > case VIDIOC_QBUF: > case VIDIOC_DQBUF: { > struct v4l2_buffer *buf =3D parg; > ... >=20 > and I have it in GDB as: >=20 > (gdb) s > check_array_args (cmd=3D1074034177, parg=3D0xbf4f9d94, > array_size=3D0xbf4f9d80, > user_ptr=3D0xbf4f9d7c, kernel_ptr=3D0xbf4f9d78) > at media_tree/drivers/media/video/v4l2-ioctl.c:2202 > 2202 int ret =3D 0; > (gdb) n > 2204 switch (cmd) { > (gdb) > 2239 return ret; > (gdb) p ret > $8 =3D 0 > (gdb) p /x cmd > $9 =3D 0x40047601 >=20 > i.e. it can not find any match with cmd=3D0x40047601 in the defines of >=20 > /usr/local/include/linux/videodev2.h >=20 > /* > * 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) > ... >=20 > 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 >=20 Hi, Could you try with the latest 3.2 port of webcamd which I posted? BTW: I'm busy all weekend. Will reply on Monday. =2D-HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201061647.46539.hselasky>