From owner-freebsd-multimedia@FreeBSD.ORG Sun Apr 21 15:55:51 2013 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3F0AC16C for ; Sun, 21 Apr 2013 15:55:51 +0000 (UTC) (envelope-from hps@bitfrost.no) Received: from mta.bitpro.no (mta.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id CE3AE16E3 for ; Sun, 21 Apr 2013 15:55:50 +0000 (UTC) Received: from mail.bitfrost.no (mail.bitfrost.no [46.29.221.36]) by mta.bitpro.no (Postfix) with ESMTP id 3B6207A03D; Sun, 21 Apr 2013 17:55:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bitfrost.no Received: from laptop015.hselasky.homeunix.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hanspetter) by mail.bitfrost.no (Postfix) with ESMTPSA id 10AEF1FF9F; Sun, 21 Apr 2013 17:55:41 +0200 (CEST) Message-ID: <51740C56.3000907@bitfrost.no> Date: Sun, 21 Apr 2013 17:57:10 +0200 From: Hans Petter Selasky Organization: Bitfrost A/S MIME-Version: 1.0 To: Craig Leres Subject: Re: Dragonfly USB DAC under 9.1-RELEASE References: <51732A63.9010001@ee.lbl.gov> In-Reply-To: <51732A63.9010001@ee.lbl.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-multimedia@freebsd.org X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2013 15:55:51 -0000 On 04/21/13 01:53, Craig Leres wrote: > Has anybody tried a Dragonfly USB DAC with FreeBSD 9.1-RELEASE? I picked > up one last week can't quite get it to work > > My streamer is a Barix instreamer. I normally feed it with 48 KHz PCM > from a Sirius Satellite radio receiver via toslink. I can also feed it > directly with 44.1 KHz from VBR MP3s downloaded from amazon.com or 48 > KHz RIFF/WAVE files. > > I'm using the multimedia/xmms port with the OSS plugin. I use mpg123 to > play MP3s. I think it uses OSS too. And obviously ossplay uses OSS. > > The DACs I have previously used are Realtek ALC883 and ALC888's on the > motherboard of my desktop machines. With the Dragonfly plugged in, > /dev/sndstat says: > > ice 327 % cat /dev/sndstat > FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) > Installed devices: > pcm0: on hdaa0 (1p:1v/0r:0v) > pcm1: on hdaa1 (1p:2v/2r:1v) > default > pcm2: at ? (1p:1v/0r:0v) > > (The Dragonfly is pcm2.) > > The first issue was a pop every 5 seconds. I noticed the LED was magenta > which indicated the DAC was running at 96K so I looked at > /sys/dev/sound/usb/uaudio.c and found that thd driver was defaulting to > the highest sample rate the DAC reports. This meant my 48K input source > was being upsampled. > > Looking at the driver a bit more I changed: > > sysctl hw.usb.uaudio.default_rate=48000 > > and removed/inserted the DAC and that fixes it at 48K (confirmed by a > blue LED) and the 5 second pops are gone. > > Now I have noticeable audio glitches about ever minute or so. I don't > think it's source material related. For example, if I play the same > sound file over and over and note the number of seconds into the song > when a glitch happens, it rarely happens at the same time. > > I tried to attach a short wav file of an example glitch but got a funny > bounce ("550 5.7.1 Size too green"?) so I put a copy here: > > http://xse.com/leres/scratch/glitch.wav > > Thinking it might be a ground loop problem, I got an Olimex USB-ISO USB > isolator. It works ok but the glitches are still present. > > The Dragonfly sounds very nice so I hate to send it back; does anyone > have suggestions for me? I called Audio Quest but the tech I talked to > admitted he had only been trained for Windows and OSX. > > Craig Hi, There are multiple options for debugging this issue. 1) Look at the usbdump utility for dumping the data communication for your device: usbdump -i usbusX -f Y -s 65536 I suspect your device uses rate adaption, and that it does not work properly. What does: usbconfig -d X.Y dump_curr_config_desc Say? I use a Fasttracker over USB having eight 24-bit tracks at 96KHz, and that works just fine. Also all the additional mixer functionality is supported through extended pcm mixer sysctls. See also: sysctl hw.usb.uaudio.debug=15 --HPS