From owner-freebsd-multimedia@FreeBSD.ORG Tue Jan 3 08:26:36 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 AD0E8106566B for ; Tue, 3 Jan 2012 08:26:36 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id 036848FC1C for ; Tue, 3 Jan 2012 08:26:35 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 224674679; Tue, 03 Jan 2012 09:26:33 +0100 From: Hans Petter Selasky To: freebsd-multimedia@freebsd.org Date: Tue, 3 Jan 2012 09:24:08 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <20120101164408.GA2389@tinyCurrent> <20120103065140.GA7385@tinyCurrent> <201201030913.49508.hselasky@c2i.net> In-Reply-To: <201201030913.49508.hselasky@c2i.net> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-1?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-1?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201201030924.08045.hselasky@c2i.net> Cc: Subject: Re: webcamd/cuse4bsd && Skype X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2012 08:26:36 -0000 On Tuesday 03 January 2012 09:13:49 Hans Petter Selasky wrote: > On Tuesday 03 January 2012 07:51:40 Matthias Apitz wrote: > > El d=C3=ADa Monday, January 02, 2012 a las 11:49:09AM +0100, Matthias A= pitz >=20 > escribi=C3=B3: > > > I will compile webcamd(8) with WITH_DEBUG to see what is going on on > > > access by Skype... > > >=20 > > > the cam itself 0x0c45:0x62c0 is listed in uvc(4); > >=20 > > I have inserted some printf debug statements, see below: > >=20 > > # setenv LD_PRELOAD > > /usr/local/lib/libhal.so:/usr/local/lib/libdbus-1.so:/usr/local/lib/lib= cu > > s e4bsd.so # ./work/webcamd-3.1.0.4/webcamd > >=20 > > : v3.2:USB Acecad Flair tablet driver > > : v2.3 (May 2, 2007):Aiptek HyperPen USB Tablet Driver (Linux 2.6.x) > > : Bryan W. Headley/Chris Atenasio/Cedric Brun/Rene van Paassen > >=20 > > GTCO usb driver version: 2.00.0006: v0.0.2:USB KB Gear JamStudio Tablet > > driver > >=20 > > : v1.52:USB Wacom tablet driver > >=20 > > lirc_dev: IR Remote Control driver registered, major 14 > > IR NEC protocol handler initialized > > IR RC5(x) protocol handler initialized > > IR RC6 protocol handler initialized > > IR JVC protocol handler initialized > > IR Sony protocol handler initialized > > IR RC5 (streamzap) protocol handler initialized > > IR LIRC bridge handler initialized > > Linux video capture interface: v2.00 > > em28xx driver loaded > > Em28xx: Initialized (Em28xx dvb Extension) extension > > USBVision USB Video Device Driver for Linux : 0.9.11 > > USBVision USB Video Device Driver for Linux : 0.9.11 > > pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tun= er > > pvrusb2: Debug mask is 31 (0x1f) > > cpia2: V4L-Driver for Vision CPiA2 based cameras v3.0.1 > >=20 > > : Zoran 364xx > >=20 > > au0828 driver loaded > > USB Video Class driver (1.1.1) > >=20 > > : 0.4.7:D-Link DSB-R100 USB FM radio driver > > : 0.0.2: A driver for the TEA5764 radio chip for EZX Phones. > >=20 > > b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded > > successfully dib0700: loaded with support for 21 different device-types > > Attached ugen4.2[0] to cuse unit 0 > > uvcvideo: Found UVC 1.00 device (0c45:62c0) > > Creating /dev/video0 > >=20 > > (now I started Skype in some other session) > >=20 > > mydebug: v4b_open > > mydebug: linux_open: handle=3D28c08600 > > mydebug: v4b_ioctl: handle=3D28c08600 > > mydebug: linux_ioctl returns: error=3Dffffffea > > mydebug: v4b_convert_error: CUSE_ERR_INVALID > > mydebug: v4b_ioctl: handle=3D28c08600 > > mydebug: linux_ioctl returns: error=3Dffffffea > > mydebug: v4b_convert_error: CUSE_ERR_INVALID > > mydebug: v4b_close: handle=3D28c08600 > >=20 > > The mydebug: lines names the function where we are (v4b_*) and > > the values which are important; why linux_ioctl() returns that broken > > value 0xffffffea? >=20 > Because Linux ERROR codes are all negative! >=20 > I have another suggestion. Maybe there is a sign error: >=20 > printf("arg=3D0x%016llx\n", (long)arg); >=20 > If that value is bigger than 32-bit, try to cast it to: >=20 Hi, > (u32)(long)arg, when passing to IOCTL functions. I meant printing the "cmd" value. "arg" value can be negative if a pointer = is=20 passed along. Try to figure out which ioctl is failing. Maybe run webcamd from gdb and ad= d=20 some code you can break-point on, then single step. =2D-HPS >=20 > --HPS >=20 >=20 > linux_ioctl(struct cdev_handle *handle, int fflags, > unsigned int cmd, void *arg) > { > if (handle =3D=3D NULL) > return (-EINVAL); >=20 > linux_fix_f_flags(&handle->fixed_file, fflags); >=20 > if (handle->fixed_file.f_op->unlocked_ioctl !=3D NULL) > return (handle->fixed_file.f_op->unlocked_ioctl(&handle- >=20 > >fixed_file, >=20 > cmd, (long)arg)); > else if (handle->fixed_file.f_op->ioctl !=3D NULL) > return > (handle->fixed_file.f_op->ioctl(&handle->fixed_inode, &handle->fixed_file, > cmd, (long)arg)); > else > return (-EINVAL); > } >=20 > > matthias