From owner-freebsd-usb@FreeBSD.ORG Sat Apr 24 15:04:09 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 644001065673 for ; Sat, 24 Apr 2010 15:04:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id BE8278FC14 for ; Sat, 24 Apr 2010 15:04:08 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=-hLAtItR7ToA:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=UdiT0P6CVxjeBB0u1IYA:9 a=RlEHuBLlfqDIC6JpWf8hmgQStakA:4 a=wPNLvfGTeEIA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1401481265; Sat, 24 Apr 2010 17:04:06 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 24 Apr 2010 17:01:34 +0200 User-Agent: KMail/1.12.4 (FreeBSD/8.0-STABLE; KDE/4.3.4; amd64; ; ) References: <20100424140902.4b7meoicg084g04g@webmail.diode.be> In-Reply-To: <20100424140902.4b7meoicg084g04g@webmail.diode.be> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004241701.34223.hselasky@c2i.net> Cc: Subject: Re: webcamd and cameras with Micron (MT9M0x1 and MT9T0x1) chips X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2010 15:04:09 -0000 Hi, > For both Micron cameras, #webcamd -B just gives `Cannot find USB device'. This usually happens when the webcamd is not listed. > > dmesg output for the Mightex camera (MT9M001 chip): > ugen3.2: at usbus3 > > and usbconfig -d ugen3.2 dump_device_desc gives: > ugen3.2: at usbus3, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x04b4 > idProduct = 0x0228 > bcdDevice = 0x0000 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0000 > bNumConfigurations = 0x0001 > > > For the MT9T031 camera (likely prototype), dmesg gives: > ugen3.2: at usbus3 > > and usbconfig -d ugen3.2 dump_device_desc: > ugen3.2: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x0634 > idProduct = 0x1007 > bcdDevice = 0x0021 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0000 > bNumConfigurations = 0x0001 > > > > > Now, I have no coding skills, but thought it would be good to have a > look into the driver code. I hoped I would find Vendor and Product > id's that differed from how the camera identified, this explaining the > refusal to associate. But while some other v4l drivers appear to > contain things like {USB_DEVICE(0xXXXX, 0xXXXX), .driver_info=XXXXX}, > such code is absent from the mt9xxxx.c files. Instead, there is a > function data = reg_read(client, MT9M001_CHIP_VERSION) that does some > sort of identification. But this is on the i2c level, reading the chip > version number. I thought that for doing this, the system would > already need to know what Micron chip it is dealing with. > > Any thoughts would be appreciated. Hi, I did a little bit of grepping, and I think you need to patch the following file to get your webcam working: v4l-dvb/linux/drivers/media/video/gspca/sn9c20x.c You can use this entry as an example: {USB_DEVICE(0x0c45, 0x6240), SN9C20X(MT9M001, 0x5d, 0)}, The iProduct dump indicates this is the right place to hack for the MT9M001 one :-) --HPS