From owner-freebsd-multimedia@FreeBSD.ORG Sat Oct 30 13:54:16 2010 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 A968F106564A for ; Sat, 30 Oct 2010 13:54:16 +0000 (UTC) (envelope-from appdebgr@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5E64A8FC14 for ; Sat, 30 Oct 2010 13:54:16 +0000 (UTC) Received: by vws12 with SMTP id 12so1323489vws.13 for ; Sat, 30 Oct 2010 06:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=/WNIOt5rn7+R/gPz7hfeBgmXlqaEhmA1ovc+qNfu14s=; b=IqSVnqt28DtjYC01aayxVio+MbVS8XfizhOS+urDK9b2lBbvmt0OMN5+NPKiMrusN3 KV4v0vTfCRVhNdZu54ur30pQ68Os8bNCl/R+5m61WJPPbcYRaw4xDuaAaqmX/9BCYs8Y Gp76080Agh3I6Xo62t73tGKh9LKo2X++yHP6E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Kj3cXCyZRmThk5agBHRsaE4lsUc3M6RQn1WKkeaNNC4zAKtd0YrLKoCHTMynGkZWKW fN8SUcLzOOGbqQ/Iy0IQw0AXm/Z/uhY6ZsKFg/nDJYtLYUA9T04usqw1i3S4wDAgGQwg VSl/CI7VqB2tw0QJPuiP3107PXxKYVyUJ9rN4= MIME-Version: 1.0 Received: by 10.224.39.18 with SMTP id d18mr6080827qae.233.1288446854769; Sat, 30 Oct 2010 06:54:14 -0700 (PDT) Received: by 10.229.28.7 with HTTP; Sat, 30 Oct 2010 06:54:14 -0700 (PDT) In-Reply-To: <201010301402.08201.hselasky@c2i.net> References: <201010301402.08201.hselasky@c2i.net> Date: Sat, 30 Oct 2010 16:54:14 +0300 Message-ID: From: App Deb To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-multimedia@freebsd.org Subject: Re: webcamd: usb dvb-t tuner needs to be re-plugged (after boot/reboot) to work. 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: Sat, 30 Oct 2010 13:54:16 -0000 OK, first I tried usbconfig -d 2.2 reset (or "power_off" and "power_on") but it didn't work. The tuner was still not working after I restarted webcamd. However webcamd with HAVE_DEBUG gives some useful information: - webcamd log when IT IS NOT working (first start after boot/reboot without manually replugging device): Attached ugen2.2[0] to cuse unit 0 dvb-usb: found a 'Gigabyte U8000-RH' in warm state. dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. DVB: registering new adapter (Gigabyte U8000-RH) DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)... xc2028 130-0061: creating new instance xc2028 130-0061: type set to XCeive xc2028/xc3028 tuner dvb-usb: schedule remote query interval to 50 msecs. dvb-usb: Gigabyte U8000-RH successfully initialized and connected. Creating /dev/dvb/adapter0/demux0 Creating /dev/dvb/adapter0/dvr0 Creating /dev/dvb/adapter0/frontend0 webcamd log when it IS working (start webcamd after I manually re-plug usb device): Attached ugen2.2[0] to cuse unit 0 dvb-usb: found a 'Gigabyte U8000-RH' in cold state, will try to load a firmware Loading firmware at '/boot/modules/dvb-usb-dib0700-1.20.fw', f=7 dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw' dib0700: firmware started successfully. dvb-usb: found a 'Gigabyte U8000-RH' in warm state. dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. DVB: registering new adapter (Gigabyte U8000-RH) DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)... xc2028 130-0061: creating new instance xc2028 130-0061: type set to XCeive xc2028/xc3028 tuner dvb-usb: schedule remote query interval to 50 msecs. dvb-usb: Gigabyte U8000-RH successfully initialized and connected. Creating /dev/dvb/adapter0/demux0 Creating /dev/dvb/adapter0/dvr0 Creating /dev/dvb/adapter0/frontend0 - - - As you see, when webcamd first finds the usb tuner in "cold state" and loads the firmware it works, but when it finds it in warm state (and bypasses firmware load) it doesn't. Also sometimes a message appears like that: dvb-usb: Gigabyte U8000-RH successfully initialized and connected. dib0700: rc submit urb failed But even when it doesn't appear, the tuner still doesn't work if it was started from warm-state. Is there any way to force webcamd to behave like the tuner is always in Cold State to fix this? As I said the usbconfig command didn't seem to work for that. Thanks. On Sat, Oct 30, 2010 at 3:02 PM, Hans Petter Selasky wrote: > On Saturday 30 October 2010 10:54:55 App Deb wrote: > > Great work on webcamd, I easily managed to get my usb dvb-t working with > > VLC. It works great but there is a slight problem. > > > > For it to work it needs to be unplugged and plugged again once after a > > FreeBSD boot or reboot. > > > > My usb dvb-t uses 2 firmware files: "dvb-usb-dib0700-1.20.fw" and > > "xc3028-v27.fw" (I have them in /boot/modules of course). > > > > Looking at the webcamd program output, The dib0700 firmware doesn't seem > to > > be loaded if my usb tuner was already connected when FreeBSD booted. The > > result is that when trying to view TV, all channels have garbled video > and > > audio output (if they work at all). > > > > Replugging it on a live system, correctly shows a webcamd message > "Loading > > dvb-usb-dib0700-1.20.fw firmware.." and from there on the usb tuner works > > perfectly. > > > > I don't exactly know the internal workings of USB tuners, but for some > > reason the tuner itself seems to need a full power-cycle (replug) to be > > initialized properly, or maybe webcamd "thinks" that the firmware is > > already loaded when it is not (when FreeBSD boots). > > > > Is there any workaround/solution for this? Is there any command that does > > some virtual (software) re-plug of a usb device. I could use it in a > > startup script to solve the problem. > > > > Thanks, keep up the good work on webcamd, great project. > > _______________________________________________ > > freebsd-multimedia@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia > > To unsubscribe, send any mail to > > "freebsd-multimedia-unsubscribe@freebsd.org" > > Hi, > > 1) You can try to compile webcamd using the "make HAVE_DEBUG=YES". > > 2) Also try: usbconfig -d X.Y reset > > --HPS >