From owner-freebsd-multimedia@FreeBSD.ORG Tue Jun 26 15:35:23 2012 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A4CF106564A for ; Tue, 26 Jun 2012 15:35:23 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id E9A328FC08 for ; Tue, 26 Jun 2012 15:35:22 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 291671817 for freebsd-multimedia@freebsd.org; Tue, 26 Jun 2012 17:35:15 +0200 From: Hans Petter Selasky To: freebsd-multimedia@freebsd.org Date: Tue, 26 Jun 2012 17:34:59 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201206261734.59309.hselasky@c2i.net> Subject: [HOWTO] How to duplicate USB audio output 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, 26 Jun 2012 15:35:23 -0000 Hi, You've maybe wondered how you can duplicate the USB audio output without too much hassle. Here is a quick HOWTO using 8-stable, 9-stable or 10-current. 1) su 2) usbconfig Locate your USB audio device, for example ugen4.2. ugen4.2: at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON 3) Locate output format for USB audio device dmesg | grep -C 10 ugen4.2 uaudio0: Play: 48000 Hz, 2 ch, 16-bit S-LE PCM format. uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format. uaudio0: No midi sequencer. 4) Install /usr/ports/audio/sox 5) Playback something on your USB device 6) Locate the USB audio endpoint used: usbdump -i usbus4 -f 2 -v usbus4.2 SUBM-ISOC-EP=00000001,SPD=FULL,NFR=8,SLEN=1536,IVAL=0 ^^ endpoint number in hex 7) Redirect audio output by use of usbdump from device 4.2 and endpoint 1 to another audio device in raw binary format: usbdump -s 65536 -i usbus4 -f 2.1 -b /dev/stdout | \ env AUDIODEV=/dev/dsp1 play -c 2 -r 48000 -b 16 -t raw -s /dev/stdin Good luck! --HPS