From owner-freebsd-usb@freebsd.org Fri Feb 9 15:15:28 2018 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04705F0B486 for ; Fri, 9 Feb 2018 15:15:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 999E46862A for ; Fri, 9 Feb 2018 15:15:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 972952600DF; Fri, 9 Feb 2018 16:15:25 +0100 (CET) Subject: Re: uaudio - distorted output To: Ert Retre , "freebsd-usb@freebsd.org" References: <975281149.1691406.1518176869272.ref@mail.yahoo.com> <975281149.1691406.1518176869272@mail.yahoo.com> From: Hans Petter Selasky Message-ID: <56fad69d-faf9-cfd5-6b81-31594c9d248b@selasky.org> Date: Fri, 9 Feb 2018 16:12:31 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <975281149.1691406.1518176869272@mail.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2018 15:15:28 -0000 On 02/09/18 12:47, Ert Retre via freebsd-usb wrote: >> Hi, >> >> attached are the config descriptors and the device dump of two uaudio >> devices. Both exhibit distorted audio output. It sounds a little bit >> like clipping / not feeding enough samples fast enough... >> >> I played around with dev.pcm.2.bitperfect=1, dev.pcm.2.play.vchans=0, >> dev.pcm.2.play.vchanrate and hw.snd.latency=1...10. >> >> At some point vchanrate doesn't work anymore, it always stays at 4.0 >> audio, even when trying to go back to 2.0. I have to usbconfig reset the >> device. >> >> Sometimes (rarely) when playing around I get clear audio output, but >> when I try to reproduce it (going back to default value for the last >> sysctl setting and then going back again to the same setting again), the >> audio is distorted again. >> >> To me it sounds like some kind of buffer is not big enough or the data >> is not delivered fast enough to the uaudio device. But this is a >> dual-socket system with: >>     CPU: Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz (2133.36-MHz >> K8-class CPU) >>     FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs >>     FreeBSD/SMP: 2 package(s) x 4 core(s) x 2 hardware threads >> And while playing around with uaudio the system has a load of around 1, >> so I would expect CPU/RAM is not an issue here. > > Hi, > > What version of FreeBSD is this? > > Try to enable hw.usb.uaudio.debug=16 during playback. Hi, If your device is FULL speed, you cannot connect it via an external HUB for more than 2 channels, recording and playback simultaneously. There is a capacity issue (except when using XHCI) and it will cause clipping. Can you send the full output from usbconfig? --HPS