Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Oct 2013 08:46:10 +0300
From:      Taner <taner76@gmail.com>
To:        freebsd-usb@freebsd.org
Subject:   Scratchy playback issue with USB CLASS2 audio device
Message-ID:  <CAOe1Rswpuqe3ObQ%2BzSNo91pqQH1Ds9tPTPRyYHpwArcZnJuFvQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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: <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.

---> usbconfig -d 0.2 dump_all_config_desc

ugen0.2: <Combo384 Amanero Amanero Technologies> 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  <Combo384 Amanero>
    bmAttributes = 0x0080
    bMaxPower = 0x0040

    Interface 0
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x00ff
      bInterfaceSubClass = 0x00ff
      bInterfaceProtocol = 0x0000
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0002  <OUT>
        bmAttributes = 0x0002  <BULK>
        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  <no string>

      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  <no string>


    Interface 2 Alt 1
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0002
      bAlternateSetting = 0x0001
      bNumEndpoints = 0x0002
      bInterfaceClass = 0x0001
      bInterfaceSubClass = 0x0002
      bInterfaceProtocol = 0x0020
      iInterface = 0x0000  <no string>

      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  <OUT>
        bmAttributes = 0x0005  <ASYNC-ISOCHRONOUS>
        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  <IN>
        bmAttributes = 0x0011  <ISOCHRONOUS>
        wMaxPacketSize = 0x0004
        bInterval = 0x0007
        bRefresh = 0x0000
        bSynchAddress = 0x0000



 Configuration index 1

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x0019
    bNumInterfaces = 0x0001
    bConfigurationValue = 0x0002
    iConfiguration = 0x0002  <Combo384 Amanero>
    bmAttributes = 0x0080
    bMaxPower = 0x0040

    Interface 0
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x00ff
      bInterfaceSubClass = 0x00ff
      bInterfaceProtocol = 0x0000
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0002  <OUT>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200
        bInterval = 0x0000
        bRefresh = 0x0000
        bSynchAddress = 0x0000

Regards

Taner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOe1Rswpuqe3ObQ%2BzSNo91pqQH1Ds9tPTPRyYHpwArcZnJuFvQ>