Bug 183409

Summary: USB Class 2 audio device playback issue
Product: Base System Reporter: taner76
Component: usbAssignee: freebsd-usb (Nobody) <usb>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: 10.0-BETA1   
Hardware: Any   
OS: Any   

Description taner76 2013-10-28 16:20:00 UTC
My asyncronous USB to I2S interface (http://amanero.com/) has detected on a amd64 FreeBSD-10.0-BETA1 system. But playback is crackling like old vinyl records.

I haven't similar issues with other operating systems.

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: <Amanero Technologies Combo384 Amanero, class 239/2, rev
2.00/1.80, addr 1> 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: <USB audio> on uaudio0
uaudio0: No HID volume keys found.

How-To-Repeat: Playback any audio file/stream.
Comment 1 HPS 2013-10-28 18:23:28 UTC
Hi,

Can you add output from "usbconfig -d X.Y dump_device_desc 
dump_curr_config_desc" and "lsusb -vv" from /usr/ports/sysutils/usbutils

Also, is the device directly connected to the USB port? No hub in between.

Did you try other sample and bit rates by setting the sysctls below?

hw.usb.uaudio.default_channels: 0
hw.usb.uaudio.default_bits: 32
hw.usb.uaudio.default_rate: 0

default_bits=16, 24
default_rate=48000

--HPS
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2013-10-29 00:53:14 UTC
State Changed
From-To: open->feedback

Set to feedback.  Partially this is to notify the submitter of hps' followup, 
which he or she will most likely not have seen, as a result of a managled 
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:20 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped