Date: Mon, 26 Nov 2018 20:47:40 +0100 From: "Herbert J. Skuhra" <herbert@gojira.at> To: freebsd-arm@freebsd.org Subject: Re: Raspberry PI 2B/3 and USB audio Message-ID: <87k1kzhb8j.wl-herbert@gojira.at> In-Reply-To: <87lg5fhcgz.wl-herbert@gojira.at> References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Nov 2018 20:21:00 +0100, "Herbert J. Skuhra" wrote: > > On Mon, 12 Nov 2018 20:46:13 +0100, "Herbert J. Skuhra" wrote: > > > > On Sun, 11 Nov 2018 13:52:14 +0100, Hans Petter Selasky wrote: > > > > > > On 11/10/18 12:24 PM, Herbert J. Skuhra wrote: > > > > Hi, > > > > > > > > if you use an USB sound card on your Raspberry PI 2B/3, can you please > > > > answer the following questions: > > > > > > > > - which USB sound card? > > > > - do you have bad audio on current or stable/12 after r339388? > > > > > > > > My "Creative Technology Ltd Sound Blaster Play 2" device sounds very > > > > bad. Meanwhile more changes were commited but they don't fix audio > > > > completly. > > > > > > > > > > Hi, > > > > > > Some background: > > > > > > The USB controller in Raspberry PI is running HIGH-speed USB. Many USB > > > audio device are FULL-speed USB. In order for a FULL-speed USB device > > > to work in a HIGH-speed USB environment all data transfers need to go > > > through a so-called transaction translator. This transaction > > > translator operate on chunks of data, 171 bytes maximum. That means if > > > a USB audio stream generates 1000 packets per second, then suddenly a > > > bunch of smaller packets will be needed. This puts some stress on the > > > DWC OTG driver and there might be some room for improvement in this > > > area too, but the basic sympthom is that the DWC OTG driver in FreeBSD > > > is not always able to keep up with the timing required for these > > > so-called split transactions. One idea is to move all DWC OTG IRQ > > > handling away from CPU-0. I'm not sure if cpuset supports this yet on > > > armv7 // arm64. Might have to be done in the driver. > > > > > > Further some audio device use non-adaptive clocks, which means the > > > recording channel must be active along with the playback channel else > > > jitter will occur. > > > > > > The recommendation for RPI is a HIGH-speed USB audio device (should be > > > clearly marked in the specification). Using a HIGH-speed USB audio > > > device will reduce the number of interrupts significantly. > > > > Well, the sound card worked perfectly fine so far... both on FreeBSD > > and Arch Linux ARM... no luck with NetBSD. Never mind! I am obviously > > the only user affected by this "fix" (r339388). > > Unfortunally I've purchased another full-speed usb audio device: > > uaudio0 on uhub1 > uaudio0: <Creative Technology Ltd Sound Blaster Play 3, class 0/0, rev 2.00/1.06, addr 4> on usbus0 > uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Play: 88200 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Play: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Play: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Record: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Record: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: No MIDI sequencer. > pcm0: <USB audio> on uaudio0 > uaudio0: HID volume keys found. > > While it works fine under Linux (pulse), MacOS and Windows, it > produces only bad noise under FreeBSD (Raspberry PI3B)! :-( > > How can I get it working? Can anyone recommend an USB audio device for > FreeBSD? Should DACs from Pro-Ject work? Well, this USB sound card works perfectly fine on my desktop PC running FreeBSD (amd64). -- Herbert
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87k1kzhb8j.wl-herbert>