From owner-freebsd-multimedia@FreeBSD.ORG Mon Apr 22 06:18:41 2013 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 593B41D3 for ; Mon, 22 Apr 2013 06:18:41 +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 E95ED126A for ; Mon, 22 Apr 2013 06:18:40 +0000 (UTC) Received: from mail.bitfrost.no (mail.bitfrost.no [46.29.221.36]) by mta.bitpro.no (Postfix) with ESMTP id E262B7A0DC; Mon, 22 Apr 2013 08:18:39 +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 CB62A20AAF; Mon, 22 Apr 2013 08:18:37 +0200 (CEST) Message-ID: <5174D696.5080009@bitfrost.no> Date: Mon, 22 Apr 2013 08:20:06 +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> <51740C56.3000907@bitfrost.no> <51743200.7010209@ee.lbl.gov> In-Reply-To: <51743200.7010209@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: Mon, 22 Apr 2013 06:18:41 -0000 On 04/21/13 20:37, Craig Leres wrote: > First let me say that I did a quick install of FreeBSD 10.0-CURRENT > (r249439) onto a spare system yesterday and was able to play various > source material with no glitches. Then I back ported the 10.0-CURRENT > /sys/dev/sound tree (r249715) to my 9.1-RELEASE system and this solved > my remaining audio issues. There were bug fixes but it looks like the > bulk of the changes add support for USB Audio v2.0. > > On 04/21/13 08:57, Hans Petter Selasky wrote: >> 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 did find usbdump earlier but don't know enough about usb audio to be > able to identify any problems. > >> I suspect your device uses rate adaption, and that it does not work >> properly. > > The Dragonfly supports 44.1, 48, 88.2 and 96 and one goal of mine is to > not be doing any additional conversion so I'm hoping it's not doing that! > >> What does: >> >> usbconfig -d X.Y dump_curr_config_desc >> >> Say? > > Attached. I also installed usbutils and have attached output from "lsusb > -v". > >> See also: >> >> sysctl hw.usb.uaudio.debug=15 > > hw.usb.uaudio.debug was very helpful the original sample rate mismatch > problem. > > One thing that's annoying is the way dev/sound/usb/uaudio.c is > structured, the sample rate is programmed in the Dragonfly only when the > device is inserted; there's no way to change rates once it's plugged in. Hi, This can be changed. The problem is allocating and freeing audio buffers, which is a sleeping operation and I think cannot be done directly from the PCM API. If it is all about changing the sample rate, I think we at insert time can decide the maximum, and allow lower values to be set without any problems. I know there was a thread about this at the FreeBSD forums too, and it shouldn't be too hard to change this, at least for the case you are seeing. Are you a programmer capable of writing C-code ? --HPS