From owner-freebsd-arm@freebsd.org Wed Nov 28 08:46:17 2018 Return-Path: Delivered-To: freebsd-arm@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 78FE9114C8E7 for ; Wed, 28 Nov 2018 08:46:17 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 D48D8873A8 for ; Wed, 28 Nov 2018 08:46:15 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [178.17.145.230]) (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 29F922600F9; Wed, 28 Nov 2018 09:46:14 +0100 (CET) Subject: Re: Raspberry PI 2B/3 and USB audio To: Brian Scott , freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> <87k1kzhb8j.wl-herbert@gojira.at> <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> From: Hans Petter Selasky Message-ID: Date: Wed, 28 Nov 2018 09:45:40 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D48D8873A8 X-Spamd-Result: default: False [-6.71 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; MX_GOOD(-0.01)[mail.turbocat.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-3.45)[ip: (-9.53), ipnet: 88.99.0.0/16(-4.79), asn: 24940(-2.89), country: DE(-0.02)]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 08:46:17 -0000 On 11/28/18 1:46 AM, Brian Scott wrote: > On 27/11/18 6:38 pm, Hans Petter Selasky wrote: >> On 11/26/18 8:47 PM, Herbert J. Skuhra wrote: >>> Well, this USB sound card works perfectly fine on my desktop PC >>> running FreeBSD (amd64). >> >> Hi, >> >> There is a problem in the DWC OTG USB controller driver that it cannot >> handle the big data payload 24-bit 48KHz sampling requires. >> Unfortunately your device has only one sample size selection. >> >> If you buy a USB sound device marked as "HIGH SPEED USB" it should >> work. Yours is "spd=FULL". >> >> --HPS > Just an additional data point, > > This one also sounds like junk but is high speed: > > ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=ON (100mA) > >   bLength = 0x0012 >   bDescriptorType = 0x0001 >   bcdUSB = 0x0200 >   bDeviceClass = 0x0000  >   bDeviceSubClass = 0x0000 >   bDeviceProtocol = 0x0000 >   bMaxPacketSize0 = 0x0040 >   idVendor = 0x0bda >   idProduct = 0x4040 >   bcdDevice = 0x0000 >   iManufacturer = 0x0003  >   iProduct = 0x0001  >   iSerialNumber = 0x0002  <201405280001> >   bNumConfigurations = 0x0001 > > But I notice that it handles both 48000 and 8000 according to the sound > driver. > > cat /dev/sndstat > FreeBSD Audio Driver (64bit 2009061500/aarch64) > Installed devices: > pcm0: at ? kld snd_uaudio (1p:1v/1r:1v) default >     snddev flags=0x2e2 >     [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags > 0x00002100, 0x00000004 >     interrupts 0, underruns 0, feed 0, ready 0 > [b:3072/1536/2|bs:4096/2048/2] >     channel flags=0x2100 >     {userland} -> feeder_mixer(0x00200010) -> {hardware} >     pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 8000, fmt > 0x00100008, flags 0x10000000, 0x00000000 >     interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0] >     channel flags=0x10000000 >     {userland} -> feeder_root(0x00000000) -> {hardware} >     [pcm0:record:dsp0.r0]: spd 48000,fmt 0x00200010/0x00210000, > flags 0x00002100, 0x00000007 >     interrupts 0, overruns 0, feed 0, hfree 4608, sfree 4096 > [b:4608/2304/2|bs:4096/2048/2] >     channel flags=0x2100 >     {hardware} -> feeder_root(0x00210000) -> > feeder_format(0x00210000 -> 0x00200010) -> feeder_mixer(0x00200010) > -> {userland} >     pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt > 0x00100008, flags 0x10000000, 0x00000000 >     interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 > [b:0/0/0|bs:0/0/0] >     channel flags=0x10000000 >     {hardware} -> feeder_root(0x00000000) -> {userland} > No devices installed from userspace. > > Output sounds like rubbish with both 8000 speed stuff sent directly to > /dev/dsp using cat and higher quality stuff sent via sox play. > > It could also just be a junk piece of hardware from my local electronics > shop. Which version of FreeBSD is this? Can you show dmesg? --HPS