From owner-freebsd-usb@FreeBSD.ORG Sat Oct 19 05:46:13 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 8E071BFF for ; Sat, 19 Oct 2013 05:46:13 +0000 (UTC) (envelope-from taner76@gmail.com) Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com [IPv6:2a00:1450:4010:c04::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F3AD0273D for ; Sat, 19 Oct 2013 05:46:12 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id p9so3922645lbv.27 for ; Fri, 18 Oct 2013 22:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=psoXoLiCRED12XN3Dzx9/tflb2r0Uwmo1uMJgYWYUc0=; b=zSkkJVlws5d0DLE1BlplnZ8PccbFdTELO0wZVUpfSeKulVHrnPFc2dx5JBZ9qqThSC wZTNaApy+bpr4BdpZZAjGvuDbAsHoO7TpXkZ8+PRR4gK5qXuePexnuKKm+09ZrrwNnMV oLwZcZhgz+2HVkiFOvcPnrHkNHIY7z6lM0HZsCNqM4BomodWsYBlPXMBfaZzMcqShD21 vPdGaf6zcnaFPBxHZTmxlcoabzLb55wb47UeBa5AGVd9H762y80wrBXxUhWXK4Jv7QGZ 4XbEJVNzM1z6hU5TY+DuHD05BDgkGirEWOGcXuXtVhhaWOi5k11o2WJKlN1ZMt62AkVg oFLQ== MIME-Version: 1.0 X-Received: by 10.112.143.3 with SMTP id sa3mr4953841lbb.12.1382161570656; Fri, 18 Oct 2013 22:46:10 -0700 (PDT) Received: by 10.112.99.1 with HTTP; Fri, 18 Oct 2013 22:46:10 -0700 (PDT) Date: Sat, 19 Oct 2013 08:46:10 +0300 Message-ID: Subject: Scratchy playback issue with USB CLASS2 audio device From: Taner To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Sat, 19 Oct 2013 05:46:13 -0000 Hi, I'm trying to solve scratchy (as like as scratched vinyl records) playback issue with my Amanero Asyncronous USB to I2S interface (http://amanero.com/) on a amd64 FreeBSD-10-BETA1 system. Amanero is a 2 channels high speed usb class2 audio device which capable of accepting up to 32bit 384khz data format. I haven't similar issues with other operating systems. I played with many sysctl setting combinations including: dev.pcm.0.play.vchanmode=fixed/adaptive dev.pcm.0.play.vchanformat:s32le:2.0 dev.pcm.0.play.vchans=0 dev.pcm.0.bitperfect:1 etc. With enabling debug, lots of these error messages appear on dmesg output: 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 or uaudio_chan_play_sync_callback: Value = 0x000bfff0 uaudio_chan_play_sync_callback: Comparing 95997 < 96000 uaudio_chan_play_sync_callback: Value = 0x000bfff0 uaudio_chan_play_sync_callback: Comparing 95997 < 96000 ---> dmesg output while device attached uaudio0: at uhub1, port 3, addr 1 (disconnected) pcm0: detached uaudio0: on usbus0 uaudio0: Play: 96000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play: 88200 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play: 48000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play: 44100 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play: 32000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: No recording. uaudio0: No MIDI sequencer. pcm0: on uaudio0 uaudio0: No HID volume keys found. ---> usbconfig -d 0.2 dump_all_config_desc ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (128mA) Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x00b0 bNumInterfaces = 0x0003 bConfigurationValue = 0x0001 iConfiguration = 0x0002 bmAttributes = 0x0080 bMaxPower = 0x0040 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x0000 iInterface = 0x0000 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x08 bDescriptorType = 0x0b bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x08, 0x0b, 0x01, 0x02, 0x01, 0x00, 0x20, 0x00 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0000 bInterfaceClass = 0x0001 bInterfaceSubClass = 0x0001 bInterfaceProtocol = 0x0020 iInterface = 0x0000 Additional Descriptor bLength = 0x09 bDescriptorType = 0x24 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x09, 0x24, 0x01, 0x00, 0x02, 0x01, 0x48, 0x00, 0x08 | 0x00 Additional Descriptor bLength = 0x08 bDescriptorType = 0x24 bDescriptorSubType = 0x0a RAW dump: 0x00 | 0x08, 0x24, 0x0a, 0x29, 0x03, 0x07, 0x00, 0x02 Additional Descriptor bLength = 0x08 bDescriptorType = 0x24 bDescriptorSubType = 0x0b RAW dump: 0x00 | 0x08, 0x24, 0x0b, 0x28, 0x01, 0x29, 0x03, 0x02 Additional Descriptor bLength = 0x11 bDescriptorType = 0x24 bDescriptorSubType = 0x02 RAW dump: 0x00 | 0x11, 0x24, 0x02, 0x2a, 0x01, 0x01, 0x00, 0x28, 0x08 | 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 | 0x00 Additional Descriptor bLength = 0x12 bDescriptorType = 0x24 bDescriptorSubType = 0x06 RAW dump: 0x00 | 0x12, 0x24, 0x06, 0x0a, 0x2a, 0x0f, 0x00, 0x00, 0x08 | 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x10 | 0x00, 0x00 Additional Descriptor bLength = 0x0c bDescriptorType = 0x24 bDescriptorSubType = 0x03 RAW dump: 0x00 | 0x0c, 0x24, 0x03, 0x2b, 0x01, 0x03, 0x00, 0x0a, 0x08 | 0x28, 0x00, 0x00, 0x00 Interface 2 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0002 bAlternateSetting = 0x0000 bNumEndpoints = 0x0000 bInterfaceClass = 0x0001 bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0020 iInterface = 0x0000 Interface 2 Alt 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0002 bAlternateSetting = 0x0001 bNumEndpoints = 0x0002 bInterfaceClass = 0x0001 bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0020 iInterface = 0x0000 Additional Descriptor bLength = 0x10 bDescriptorType = 0x24 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x10, 0x24, 0x01, 0x2a, 0x00, 0x01, 0x01, 0x00, 0x08 | 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00 Additional Descriptor bLength = 0x06 bDescriptorType = 0x24 bDescriptorSubType = 0x02 RAW dump: 0x00 | 0x06, 0x24, 0x02, 0x01, 0x04, 0x20 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0005 bmAttributes = 0x0005 wMaxPacketSize = 0x0400 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x08 bDescriptorType = 0x25 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x08, 0x25, 0x01, 0x00, 0x00, 0x02, 0x08, 0x00 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0011 wMaxPacketSize = 0x0004 bInterval = 0x0007 bRefresh = 0x0000 bSynchAddress = 0x0000 Configuration index 1 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0019 bNumInterfaces = 0x0001 bConfigurationValue = 0x0002 iConfiguration = 0x0002 bmAttributes = 0x0080 bMaxPower = 0x0040 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x0000 iInterface = 0x0000 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Regards Taner