From owner-freebsd-usb@FreeBSD.ORG Sun Oct 20 04:57:30 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2163734B for ; Sun, 20 Oct 2013 04:57:30 +0000 (UTC) (envelope-from taner76@gmail.com) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8AACD2536 for ; Sun, 20 Oct 2013 04:57:29 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id o14so375003lbi.14 for ; Sat, 19 Oct 2013 21:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uucozJIE7DU4IRXkjIXpVmKMISIygT+vBkXghHkt2LY=; b=kDD2wqVLIqeNL42x/H69EPtn4vOf3I2rvwh7BbEdGwZmzBbHNImbQTggIcUv3FhdfN gyxKd682Bxh6FlFrfm0pbwAtAAqotkO4O+crPsMZbjlfzXP8FYTf4j495yZv8hDbRzFP /nWRf1V4ZdlUAqNyHdvRx4vwOL4FyrNJamspEyEde7i++r/fZqVhBkX5J+izUh7hJgHE SoLWfbLM9s8UmvWDmS81ckolWZpBmVV2rdtkTnORrN8GN1XqiAp9EofGctSylpz4nr2U RpnOnf9JT0kJVmR+L0gWoqjqWA6A+kYxgghiHfLfFR08a6A5Zm5rQQqmaLiLd28t0MVE ujTQ== MIME-Version: 1.0 X-Received: by 10.112.167.3 with SMTP id zk3mr8128532lbb.23.1382245046921; Sat, 19 Oct 2013 21:57:26 -0700 (PDT) Received: by 10.112.99.1 with HTTP; Sat, 19 Oct 2013 21:57:26 -0700 (PDT) In-Reply-To: <526229D6.6040605@bitfrost.no> References: <52622842.6030105@bitfrost.no> <526229D6.6040605@bitfrost.no> Date: Sun, 20 Oct 2013 07:57:26 +0300 Message-ID: Subject: Re: Scratchy playback issue with USB CLASS2 audio device From: Taner To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Oct 2013 04:57:30 -0000 Hi, I modified uaudio.c according to your patch but it didn't make any difference. I'm running 10.0-stable. It doesn't matter with vchan adaptive/fixed or bitperfect settings. Behavior is same. I don't know how to read usbdump output thus I'm mailing 5 sec. playback output file to you (1.5MB zipped). It captured while vchan at 16bit/48Khz. I keen on any other suggestion from you. I don't know why but sound quality is obviously better in FreeBSD despite this playback issue still remains. Regards, Taner On Sat, Oct 19, 2013 at 9:42 AM, Hans Petter Selasky wrote: > On 10/19/13 08:35, Hans Petter Selasky wrote: > >> On 10/19/13 07:46, Taner wrote: >> >>> uaudio_chan_play_sync_**callback: Value = 0x0005fff8 >>> uaudio_chan_play_sync_**callback: Comparing 47998 < 48000 >>> uaudio_chan_play_sync_**callback: Value = 0x0005fff6 >>> uaudio_chan_play_sync_**callback: Comparing 47998 < 48000 >>> >> >> Hi, >> >> The normal for adaptive rates is that this value should tilt just above >> or below the 48000 or whatever is there. Else something is wrong. >> >> Did you try to record while playing? >> >> Also, are you running -stable? >> >> Could also check the amount of samples sent by using >> "usbdump -i usbusX -f Y -s 65536 -vvv" >> >> --HPS >> > > Hi, > > Does this patch make any difference? > > === dev/sound/usb/uaudio.c > ==============================**==============================**====== > --- dev/sound/usb/uaudio.c (revision 256754) > +++ dev/sound/usb/uaudio.c (local) > @@ -2070,7 +2070,7 @@ > chn_intr(ch->pcm_ch); > > /* start SYNC transfer, if any */ > - if ((ch->last_sync_time++ & 7) == 0) > + if ((ch->last_sync_time++ & 3) == 0) > usbd_transfer_start(ch->xfer[**UAUDIO_NCHANBUFS]); > > case USB_ST_SETUP: > > --HPS >