From owner-freebsd-usb@freebsd.org Thu Nov 26 13:34:28 2020 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 674864AC8AE for ; Thu, 26 Nov 2020 13:34:28 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4Chdyr1rFmz4VXp for ; Thu, 26 Nov 2020 13:34:28 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: by mailman.nyi.freebsd.org (Postfix) id 3EE744AC9D6; Thu, 26 Nov 2020 13:34:28 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EAA54ACB21 for ; Thu, 26 Nov 2020 13:34:28 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: from smtp2.servers.tyknet.dk (smtp2.servers.tyknet.dk [IPv6:2a01:3a0:1:1900:89:233:43:78]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Chdyr0nwfz4VW0 for ; Thu, 26 Nov 2020 13:34:27 +0000 (UTC) (envelope-from thomas@gibfest.dk) Subject: Re: webcamd, usb and two webcams - only one works DKIM-Filter: OpenDKIM Filter v2.10.3 smtp2.servers.tyknet.dk E851BE85 To: Hans Petter Selasky References: <9a382539-c90d-91b9-bfac-f36c0f19d3f7@selasky.org> From: Thomas Steen Rasmussen Cc: usb@freebsd.org Message-ID: <723be24d-b2fe-85df-4961-5483004050e8@gibfest.dk> Date: Thu, 26 Nov 2020 14:34:18 +0100 MIME-Version: 1.0 In-Reply-To: <9a382539-c90d-91b9-bfac-f36c0f19d3f7@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Chdyr0nwfz4VW0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 13:34:28 -0000 On 11/26/20 1:18 PM, Hans Petter Selasky wrote: > > Hi Thomas, > > Try setting the resolution or framerate down, because high resolution > webcams need a lot of USB bandwidth! Hi, Thanks for the reply. How can I set the resolution or framerate lower? I first connect both webcams, and then try for example with the pwcview command: $ sudo pwcview -h -c 1 -o foo.jpg -d /dev/video0 -s xga Webcam set to: 640x480 (xga) at 5 fps $ $ sudo pwcview -h -c 1 -o foo.jpg -d /dev/video2 -s xga Webcam set to: 640x480 (xga) at 5 fps ^C $ And only the first (video0+1) works, the second (video2+3) never returns. Can I maybe tell webcamd to set fps and resolution somehow or how would I do it? The webcams are connected to a externally powered USB3 hub which is connected to a USB3 XHCI controller. I would think the 5 gbit/s offered by USB3 would be enough for this. The onboard usb3 controller: usbus0 on xhci0 usbus0: 5.0Gbps Super Speed USB v3.0 ugen0.1: <0x1022 XHCI root HUB> at usbus0 uhub1: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 When I plugin the external USB hub it shows both a usb 2 and a usb3 hub for some reason? ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.3: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) uhub5 on uhub1 uhub5: on usbus0 uhub5: 4 ports with 4 removable, self powered uhub6 on uhub1 uhub6: on usbus0 uhub6: 4 ports with 4 removable, self powered So when I plug in the webcams how do I know which "uhub" device they are plugged into? These are the messages after plugging in the webcams: ===================================== ugen0.4: at usbus0 uaudio0 on uhub5 uaudio0: on usbus0 uaudio0: No playback. uaudio0: Record[0]: 48000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 44100 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 16000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 8000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: No MIDI sequencer. pcm0: on uaudio0 uaudio0: No HID volume keys found. ugen0.5: at usbus0 uaudio1 on uhub5 uaudio1: on usbus0 uaudio1: No playback. uaudio1: Record[0]: 48000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio1: Record[0]: 44100 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio1: Record[0]: 16000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio1: Record[0]: 8000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio1: No MIDI sequencer. pcm1: on uaudio1 uaudio1: No HID volume keys found. ===================================== "uhub5" is the usb2 external hub. Could this be the reason for my timeouts? Thanks! /Thomas