Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2018 09:45:40 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Brian Scott <bscott@bunyatech.com.au>, freebsd-arm@freebsd.org
Subject:   Re: Raspberry PI 2B/3 and USB audio
Message-ID:  <b5d07fe0-8b1a-9b59-3241-1bfe7f72b096@selasky.org>
In-Reply-To: <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <Generic USB Audio> at usbus0, cfg=0 md=HOST spd=HIGH
>      (480Mbps) pwr=ON (100mA)
> 
>        bLength = 0x0012
>        bDescriptorType = 0x0001
>        bcdUSB = 0x0200
>        bDeviceClass = 0x0000  <Probed by interface class>
>        bDeviceSubClass = 0x0000
>        bDeviceProtocol = 0x0000
>        bMaxPacketSize0 = 0x0040
>        idVendor = 0x0bda
>        idProduct = 0x4040
>        bcdDevice = 0x0000
>        iManufacturer = 0x0003  <Generic>
>        iProduct = 0x0001  <USB Audio>
>        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: <USB audio> at ? kld snd_uaudio (1p:1v/1r:1v) default
>          snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
>          [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<BUSY,HAS_VCHAN>
>          {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<VIRTUAL>
>          {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<BUSY,HAS_VCHAN>
>          {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<VIRTUAL>
>          {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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b5d07fe0-8b1a-9b59-3241-1bfe7f72b096>