Welcome, Guest
Username: Password: Remember me

NOTE: This is a "Community" forum. Please be mindful that community members are here to help as part of a community effort. We therefore appreciate your effort in keeping this forum a happy place!

If you have a specific issue (e.g. hardware, failure) and want help from our support team, please use our tech support portal (Support menu - > Contact Us).
Thanks a lot of your help in making a better community.
  • Page:
  • 1
  • 2

TOPIC:

multi-channel recording (linux) 8 years 9 months ago #14713

  • Prestemon
  • Prestemon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
I wanted to follow-up with the solution I found (much trial and error!):

1. Platform is Fedora 20; though we will target Red Hat 7. This is due to the issue I mentioned upthread regarding USB Audio Class 2 driver support in kernels prior to 3.4. Bottom line is; if you're on an earlier version of linux, the USBStreamer device is not going to show up in "arecord -l".

2. I connected the USBStreamer to Windows, installed the driver, and upgraded the firmware to the ADAT firmware.

3. For the Behringer ADA 8000, I have the clock set to slave ADAT IN, using the USBStreamer's clock. (I have not had any problems with it, but clock sync is irrelevant to our application).

4. I use "alsamixer" to un-mute the capture channels of the USBStreamer ADAT device.

5. When I tried to record with SoX, a single SoX process could not individually record one (of 8) channels, without locking the whole device - (it would output all 8 inputs to one file). When I recorded from the USBStreamer using Audacity, it would allow me to select 1 through 8 channels, though only incrementally (not individually). This does not work on Windows (but should, if Audacity is recompiled with ASIO support). Audacity helped me to confirm that I could read signal from the USBStreamer, and from all 8 channels. This was important, because I had no other way to tell if either of my audio hardware components was even working (and I had levels set properly).

6. To solve the problem, I used ffmpeg to read the stream off the alsa device, and ffmpeg's "channel_map" feature to send each of the 8 channels to a udp stream, on 8 different port addresses. ffmpeg does not care whether a channel is labelled F, R, L, Sub, or whatever. It's just channels 0-7.

7. To receive the individual channel data, I set up 8 separate ffmpeg processes to play each udp stream, and pipeline it to SoX, using SoX's silence : newfile : restart effects. SoX edits out silence, and writes signal to a file, encoded to ogg. When the signal stops, SoX closes that file, and restarts, creating a new file, and waits for a new signal.

With the streamer process, listeners, and encoders all running for 8 channels, we used about 16% of the CPU, (Intel i7 950 @ 3.07 GHz x 8 cores) with about 30% being the max. This is without assigning processes to different cores, or using ffmpeg's opencl support.

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 8 years 7 months ago #15222

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 144
  • Thank you received: 14
Hi Prestemon - and thanks for sharing your experience with getting the USBStreamer working on Linux.

I am myself struggling to get it running as USB->I2S converter on a Beaglebone Black running Volumio - for output only (not recording) and was hoping that you (or someone else) could share some ideas on how to get it work. After connecting it to the BBB, it is recognized alright. Aplay -l gives the following:
[email protected]:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Black [TI BeagleBone Black], device 0: HDMI nxp-hdmi-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USBStreamer [USBStreamer], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I was expecting a number of subdevices matching the number of output channels. Also, in alsamixer only one slider is present, which indicates that it is not recognized as a multichannel device. Unfortunately I'm completely new to linux, and searching the web for "linux" and "USBStreamer" hasn't been fruitful. Any help would be most appreciated.

Best regards,
Mattias

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 8 years 7 months ago #15245

  • anon
  • anon's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
Hi

we have the USBstreamer working here fine with linux (debian testing) using jack. We can attach any jack-aware application (e.g. ardour) to any in/out channel. We didn't change the firmware or anything to make it work. The only issue we have is that there is no signal under certain circumstances. It seems the alsa driver has some issues resulting in that any attempt to change mixer settings in the alsamixer seems to mute the device. If that happens we use an alsactl file which unmutes the device and don't touch the mixer at all (as we don't need it anyway). Attached is the alsactl file we use. Just issue the comand "alsactl -f <filename> restore" and you should be set. If you're not very experienced with jack or qjackctl, just let me know. The ffmpeg method seems quite complicated and unnecessary...

Please Log in or Create an account to join the conversation.

Re:multi-channel recording (linux) 8 years 7 months ago #15276

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 144
  • Thank you received: 14
Thanks alot anon, I'll check this out! I have no experience with jack so far, but I'll look into it.

Best regards,
Mattias

Please Log in or Create an account to join the conversation.

Re:multi-channel recording (linux) 8 years 4 months ago #16385

  • Prestemon
  • Prestemon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
I wanted to come back with some further experiences to clarify some confusion in my earlier posts:

1. We have found that we were able to connect the USBStreamer device to Red Hat 6.5; but not with the default kernel of 2.6.x. If we update the kernel (we tried 3.16.x from elrepo), we got past the error that happens when the USB driver is scanning the bus and enumerating the devices audio controls. That's really the big issue, as far as overall linux-compatibility goes. Earlier kernels may support USB Class 2 Audio devices, but there's a bug in the kernel module that prevents the USBStreamer from being properly enumerated, and the error isn't handled very well, so what you'll get is the USBStreamer will appear in your "lsusb" output, but it won't appear in "arecord -l". (and it doesn't seem to have anything to do with the version of ALSA installed.) - use "uname -r" to display the kernel version you're running. If it's not at least at 3.4, you will need to update your kernel, or try a distro that has a more up-to-date kernel. (see distrowatch.com) -

2. In our current configuration, we're not touching "amixer" at all; and we're not having any trouble with channels being muted. It seemed like this was a factor in earlier configurations we tested, but I can't really say what the cause was. We had tried installing various audio packages, so I can't vouch for the sanity of the software configuration at the time we were having trouble with amixer and channel muting.

3. In testing, a lot of the unexplainable issues we were hitting seemed to have to do with the pulseaudio server crashing or becoming unresponsive, which sort of messed up the entire audio subsystem of the machine. Symptoms would include: no signal, or the USBStreamer ADAT device would not appear in the Sound control panel as an Input Device. What SEEMED to be the fix for this, was to add our user-account to the "audio" group. (sudo usermod -aG audio <username>). This gives the user permissions to access the device tree at /dev/snd. (which, I guess, depends on which flavor of Linux you are running). The sound control panel (in RHEL 6.x) is part of pulseaudio, not ALSA. So even though our application wasn't using pulseaudio, we would still get flaky behavior because pulseaudio is involved in configuring audio devices, and setting the system default devices.

4. As far as splitting the input stream from the USBStreamer to separate audio channels goes: - ffmpeg has command-line support for that. (SoX does - but it does not really work very well for streams with more than 2 channels). We weren't able to use ffmpeg due to the licensing issues for the mpeg components. (which we weren't even using). We wrote a python-gstreamer app to pipeline the 8 inputs using gstreamer's "deinterleave" function (which is available on gstreamer's command-line). We were using only the open plugins, so; no licensing problems. Encoding to .ogg. That worked well.

Please Log in or Create an account to join the conversation.

Re:multi-channel recording (linux) 8 years 4 months ago #16404

  • devteam
  • devteam's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9145
  • Thank you received: 1456
@ Prestemon,

Wow, your Linux USBStreamer streamer is by far the most complete of this forum! Thanks again so much for sharing all your findings with the community.
It's clear from your technical info that quite a fair amount of testing/investigation went through to make this happen. Very neat that you're able to remember all the steps. :-)

I'll sticky this thread. Very neat!

PS: Overall conclusion, is your setup all good by now? :-)
miniDSP, building a DSP community one board at a time.

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 7 years 4 months ago #22021

  • kalexm
  • kalexm's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 1
Hi,

I already opened a thread and got a hint that I may find here some good hints.

I purchased an U-DAC8. I want to run it with an Odroid XU4.
The devices are listed, but I get no sound. As the U-DAC8 is built upon the USBStreamer it is OS-wise the same device. I hope an look forward that someone gives me a hint of what might be wrong.

I aim at running a stereo 4 way x-over and therefore need 8 channels. I am going to create the filters using rePhase. I already did that creating FIR Filters for the miniSharc and it works well. The convolution shall be done by brutefir that already showed to work properly on the XU4 with quite a number of Taps. The only thing missing is to get the U-DAC/USBStreamer to work.

The device shows up in lsusb. Also in aplay -l resp. -L. arecord shows it too. Whenever i try to stream audio to the device it fails.

I simply show what I am doind and hopefully someone can give me a hint of what might be wrong.

best,

Alex

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 7 years 4 months ago #22024

  • kalexm
  • kalexm's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 1
some system information as follows:
[email protected]:~# uname -r
3.10.82-39

the kernel version is > 3.4
[email protected]:~# lsusb -s 3:5 -v

Bus 003 Device 005: ID 2752:0016  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x2752 
  idProduct          0x0016 
  bcdDevice            5.30
  iManufacturer           1 miniDSP 
  iProduct                2 USBStreamer 
  iSerial                 3 00001
  bNumConfigurations      2
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          441
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         3
      bFunctionClass          1 Audio
      bFunctionSubClass       0 
      bFunctionProtocol      32 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol     32 
      iInterface              2 USBStreamer 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               2.00
        bCategory               8
        wTotalLength          273
        bmControl            0x00
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               41
        bmAttributes         0x03 Internal programmable Clock 
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource            9 USBStreamer Internal Clock
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               42
        bmAttributes         0x00 External Clock 
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource           10 USBStreamer TOSLINK Clock
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype     11 (CLOCK_SELECTOR)
        bUnitID                40
        bNrInPins               2
        baCSourceID( 0)        41
        baCSourceID( 1)        42
        bmControls           0x03
          Clock Selector Control (read/write)
        iClockSelector          8 USBStreamer Clock Selector
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels            10
        bmChannelConfig   0x00000000
        bmControls    0x0000
        iChannelNames          15 I2S 0 Output L
        iTerminal               6 USBStreamer Output
      AudioControl Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      9 (EXTENSION_UNIT)
      Warning: Descriptor too short
        bUnitID                51
        wExtensionCode          0
        bNrPins                 1
        baSourceID( 0)          2
        bNrChannels            10
        wChannelConfig          0
        iChannelNames           3 00001
        bmControls        0x00
        iExtension             50 I2S 8 Input R
      AudioControl Interface Descriptor:
        bLength                50
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                10
        bSourceID              51
        bmaControls( 0)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 1)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 2)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 3)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 4)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 5)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 6)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 7)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 8)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 9)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls(10)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            20
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID              10
        bCSourceID             40
        bmControls         0x0000
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels            10
        bmChannelConfig   0x00000000
        bmControls    0x0000
        iChannelNames          33 I2S 0 Input L
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      9 (EXTENSION_UNIT)
      Warning: Descriptor too short
        bUnitID                52
        wExtensionCode          0
        bNrPins                 1
        baSourceID( 0)          1
        bNrChannels            10
        wChannelConfig          0
        iChannelNames           3 00001
        bmControls        0x00
        iExtension             50 I2S 8 Input R
      AudioControl Interface Descriptor:
        bLength                50
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                11
        bSourceID              52
        bmaControls( 0)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 1)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 2)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 3)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 4)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 5)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 6)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 7)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 8)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 9)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls(10)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            22
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID              11
        bCSourceID             40
        bmControls         0x0000
        iTerminal               7 USBStreamer Input
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      9 (EXTENSION_UNIT)
      Warning: Descriptor too short
        bUnitID                50
        wExtensionCode          0
        bNrPins                 2
        baSourceID( 0)          2
        baSourceID( 1)          1
        bNrChannels            18
        wChannelConfig          0
        iChannelNames           3 00001
        bmControls        0x00
        iExtension             32 I2S 8 Output R
      AudioControl Interface Descriptor:
        bLength                32
        bDescriptorType        36
        bDescriptorSubtype      4 (MIXER_UNIT)
        bUnitID                60
        bNrPins                 1
        baSourceID( 0)         50
        bNrChannels             8
        bmChannelConfig    0x00000000
        iChannelNames          49 I2S 8 Input L
 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
        bmControls         00
        iMixer                 0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0006  1x 6 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              4 USBStreamer Audio Out
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              4 USBStreamer Audio Out
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           2
        bmControls           0x00
        bFormatType             1
        bmFormats         0x00000001
          PCM
        bNrChannels            10
        bmChannelConfig   0x00000000
        iChannelNames          15 I2S 0 Output L
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
        AudioControl Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay              8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           17
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              5 USBStreamer Audio In
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              5 USBStreamer Audio In
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink          22
        bmControls           0x00
        bFormatType             1
        bmFormats         0x00000001
          PCM
        bNrChannels            10
        bmChannelConfig   0x00000000
        iChannelNames          33 I2S 0 Input L
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
        AudioControl Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay              8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      1 
      iInterface             12 USBStreamer DFU
      Device Firmware Upgrade Interface Descriptor:
        bLength                             9
        bDescriptorType                    33
        bmAttributes                        7
          Will Not Detach
          Manifestation Tolerant
          Upload Supported
          Download Supported
        wDetachTimeout                    250 milliseconds
        wTransferSize                      64 bytes
        bcdDFUVersion                   1.10
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          441
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         3
      bFunctionClass          1 Audio
      bFunctionSubClass       0 
      bFunctionProtocol      32 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol     32 
      iInterface              2 USBStreamer 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               2.00
        bCategory               8
        wTotalLength          273
        bmControl            0x00
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               41
        bmAttributes         0x03 Internal programmable Clock 
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource            9 USBStreamer Internal Clock
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               42
        bmAttributes         0x00 External Clock 
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource           10 USBStreamer TOSLINK Clock
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype     11 (CLOCK_SELECTOR)
        bUnitID                40
        bNrInPins               2
        baCSourceID( 0)        41
        baCSourceID( 1)        42
        bmControls           0x03
          Clock Selector Control (read/write)
        iClockSelector          8 USBStreamer Clock Selector
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels            10
        bmChannelConfig   0x00000000
        bmControls    0x0000
        iChannelNames          15 I2S 0 Output L
        iTerminal               6 USBStreamer Output
      AudioControl Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      9 (EXTENSION_UNIT)
      Warning: Descriptor too short
        bUnitID                51
        wExtensionCode          0
        bNrPins                 1
        baSourceID( 0)          2
        bNrChannels            10
        wChannelConfig          0
        iChannelNames           3 00001
        bmControls        0x00
        iExtension             50 I2S 8 Input R
      AudioControl Interface Descriptor:
        bLength                50
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                10
        bSourceID              51
        bmaControls( 0)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 1)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 2)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 3)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 4)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 5)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 6)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 7)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 8)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 9)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls(10)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            20
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID              10
        bCSourceID             40
        bmControls         0x0000
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels            10
        bmChannelConfig   0x00000000
        bmControls    0x0000
        iChannelNames          33 I2S 0 Input L
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      9 (EXTENSION_UNIT)
      Warning: Descriptor too short
        bUnitID                52
        wExtensionCode          0
        bNrPins                 1
        baSourceID( 0)          1
        bNrChannels            10
        wChannelConfig          0
        iChannelNames           3 00001
        bmControls        0x00
        iExtension             50 I2S 8 Input R
      AudioControl Interface Descriptor:
        bLength                50
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                11
        bSourceID              52
        bmaControls( 0)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 1)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 2)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 3)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 4)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 5)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 6)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 7)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 8)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls( 9)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        bmaControls(10)      0x0000000f
          Mute Control (read/write)
          Volume Control (read/write)
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            22
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID              11
        bCSourceID             40
        bmControls         0x0000
        iTerminal               7 USBStreamer Input
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      9 (EXTENSION_UNIT)
      Warning: Descriptor too short
        bUnitID                50
        wExtensionCode          0
        bNrPins                 2
        baSourceID( 0)          2
        baSourceID( 1)          1
        bNrChannels            18
        wChannelConfig          0
        iChannelNames           3 00001
        bmControls        0x00
        iExtension             32 I2S 8 Output R
      AudioControl Interface Descriptor:
        bLength                32
        bDescriptorType        36
        bDescriptorSubtype      4 (MIXER_UNIT)
        bUnitID                60
        bNrPins                 1
        baSourceID( 0)         50
        bNrChannels             8
        bmChannelConfig    0x00000000
        iChannelNames          49 I2S 8 Input L
 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
        bmControls         00
        iMixer                 0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0006  1x 6 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              4 USBStreamer Audio Out
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              4 USBStreamer Audio Out
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           2
        bmControls           0x00
        bFormatType             1
        bmFormats         0x00000001
          PCM
        bNrChannels            10
        bmChannelConfig   0x00000000
        iChannelNames          15 I2S 0 Output L
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
        AudioControl Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay              8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           17
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              5 USBStreamer Audio In
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              5 USBStreamer Audio In
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink          22
        bmControls           0x00
        bFormatType             1
        bmFormats         0x00000001
          PCM
        bNrChannels            10
        bmChannelConfig   0x00000000
        iChannelNames          33 I2S 0 Input L
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
        AudioControl Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay              8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      1 
      iInterface             12 USBStreamer DFU
      Device Firmware Upgrade Interface Descriptor:
        bLength                             9
        bDescriptorType                    33
        bmAttributes                        7
          Will Not Detach
          Manifestation Tolerant
          Upload Supported
          Download Supported
        wDetachTimeout                    250 milliseconds
        wTransferSize                      64 bytes
        bcdDFUVersion                   1.10
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

the usb device is listed.
[email protected]:~# amixer -D hw:USBStreamer contents
numid=5,iface=MIXER,name='USBStreamer Clock Selector'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'USBStreamer Internal Clock'
  ; Item #1 'USBStreamer TOSLINK Clock'
  : values=0
numid=6,iface=MIXER,name='USBStreamer Clock Selector Capture Switch'
  ; type=BOOLEAN,access=rw------,values=10
  : values=on,on,on,on,on,on,on,on,on,on
numid=7,iface=MIXER,name='USBStreamer Clock Selector Capture Switch',index=1
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=8,iface=MIXER,name='USBStreamer Clock Selector Capture Volume'
  ; type=INTEGER,access=rw---R--,values=10,min=0,max=255,step=0
  : values=255,255,255,255,255,255,255,255,255,255
  | dBminmax-min=-127.50dB,max=0.00dB
numid=9,iface=MIXER,name='USBStreamer Clock Selector Capture Volume',index=1
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=255,step=0
  : values=255
  | dBminmax-min=-127.50dB,max=0.00dB
numid=1,iface=MIXER,name='USBStreamer Clock Selector Playback Switch'
  ; type=BOOLEAN,access=rw------,values=10
  : values=off,off,off,off,off,off,off,off,off,off
numid=2,iface=MIXER,name='USBStreamer Clock Selector Playback Switch',index=1
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=3,iface=MIXER,name='USBStreamer Clock Selector Playback Volume'
  ; type=INTEGER,access=rw---R--,values=10,min=0,max=255,step=0
  : values=255,255,255,255,255,255,255,255,255,255
  | dBminmax-min=-127.50dB,max=0.00dB
numid=4,iface=MIXER,name='USBStreamer Clock Selector Playback Volume',index=1
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=255,step=0
  : values=255
  | dBminmax-min=-127.50dB,max=0.00dB

somewhat ten 'units' are listed. I need to check what these mean, but it is somewhat an expected number as there are totally ten input and ten output channels (2x toslink and 8 I2S)
[email protected]:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: odroidaudio [odroid-audio], device 0: i2s0-pri dummy-aif1-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: odroidaudio [odroid-audio], device 1: i2s-sec dummy-aif2-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USBStreamer [USBStreamer], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

[email protected]:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: odroidaudio [odroid-audio], device 0: i2s0-pri dummy-aif1-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: odroidaudio [odroid-audio], device 1: i2s-sec dummy-aif2-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USBStreamer [USBStreamer], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

[email protected]:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
dmixer
    DMixer for hw:0,0
default
plugdmixer
plugequal
    Equalizer for DMixer
equal
sysdefault:CARD=odroidaudio
    odroid-audio, 
    Default Audio Device
dmix:CARD=odroidaudio,DEV=0
    odroid-audio, 
    Direct sample mixing device
dmix:CARD=odroidaudio,DEV=1
    odroid-audio, 
    Direct sample mixing device
dsnoop:CARD=odroidaudio,DEV=0
    odroid-audio, 
    Direct sample snooping device
dsnoop:CARD=odroidaudio,DEV=1
    odroid-audio, 
    Direct sample snooping device
hw:CARD=odroidaudio,DEV=0
    odroid-audio, 
    Direct hardware device without any conversions
hw:CARD=odroidaudio,DEV=1
    odroid-audio, 
    Direct hardware device without any conversions
plughw:CARD=odroidaudio,DEV=0
    odroid-audio, 
    Hardware device with all software conversions
plughw:CARD=odroidaudio,DEV=1
    odroid-audio, 
    Hardware device with all software conversions
sysdefault:CARD=USBStreamer
    USBStreamer, USB Audio
    Default Audio Device
front:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    Front speakers
surround21:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    Direct sample mixing device
dsnoop:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    Direct sample snooping device
hw:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    Direct hardware device without any conversions
plughw:CARD=USBStreamer,DEV=0
    USBStreamer, USB Audio
    Hardware device with all software conversions

when trying to stream audio to the device, as I did it succesfully with my other USB SPDIF Interface it fails:

Is it recognized correctly despite the fact that aplay -l just shows one subdevice?

Is there something special about streaming audio to the device?

Does someone has a working sox, mg123, mplayer or aplay example, so that I can verify what is going wrong here?

Please Log in or Create an account to join the conversation.

Last edit: by kalexm.

multi-channel recording (linux) 7 years 1 month ago #23500

  • Hadfield
  • Hadfield's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 2
Hi, thanks a lot for reporting your experiences to this forum. I'm trying to do almost exactly what you're doing - ie use the USBStreamer as an 8-channel simultaneous recorder, via an ADA8000 (and a DDX3216) to files which I can then copy to an editor machine. Only difference is I'm using a Raspberry Pi as the host.

Again, the USBStreamer is recognised and the device is present as a sound card. However I'm having issues getting arecord working. If you have an updated recipe, now that some time has passed since your last post, I would very much value a "step-by-step" setup!!

I'm familiar with Linux, but not the sound system (I'm used to headless servers and c programming - not workstation stuff ;-)

thanks again
Doug

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 7 years 1 month ago #23509

  • Hadfield
  • Hadfield's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 2
Update- actually, even though I seemed to be getting the same issues with amixer etc, the arecord command DID WORK for me, recording 8 channel audio (using arecord) and playing it back with aplay. One thing I can't get working yet is the --separate-channels flag, to separate the 8 channels into separate .wav files (rather then have all channels consolidated in a single wav file). I keep getting the error:

arecord: set_params:1228: Access type not available

the only change from a working command line is to add the "--separate-channels" parameter. The working command line is:

arecord -D hw:USBStreamer -c 8 -r 44100 -f S32_LE music.wav

anyone have any ideas?

cheers
Doug
The following user(s) said Thank You: devteam

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 6 years 11 months ago #24733

  • francolargo
  • francolargo's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 1
Cool!

So "arecord -D hw:USBStreamer -c 8 -r 44100 -f S32_LE music.wav" works for you...

Sorry if this was given previously, but what is the format of your source stream? I2S or Toslink?

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 6 years 11 months ago #24912

  • Hadfield
  • Hadfield's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 2
Hi, yes it does work. However, in common with others on this thread, I was getting occasional dropouts in the audio stream. I was using an NTFS file system type as destination for the record stream, so it could be read directly on my windows workstation where Reaper is running. I've now changed that file system to XFS and the dropouts seem to have gone! - early days though, so watch this space for updates....
Doug
The following user(s) said Thank You: devteam

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 6 years 11 months ago #24936

  • devteam
  • devteam's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9145
  • Thank you received: 1456
Thanks for the update Hadfield. Keep us updated of your progress.

DevTeam
miniDSP, building a DSP community one board at a time.

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 6 years 5 months ago #28333

  • mirrijakys
  • mirrijakys's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 1
Hi,

I am retaking this thread, as I have seen there are some messages unanswered regarding reproduction.

I recently bough a USBStreamer kit which I am trying to use to play audio via the SDPIF output. I have tried it with Windows and it works...

I am trying to do the same with Linux using Jack, but nothing comes out. Whilst that I am able to see the 10 inputs and outputs and I am wiring audio via Jack to outputs 9 and 10 (SPDIF out) nothing sounds... Any idea of why? I have seen than in the past people were having the same problem... But no one said if it was solved of how.

Thanks in advance.

Please Log in or Create an account to join the conversation.

multi-channel recording (linux) 6 years 5 months ago #28413

  • devteam
  • devteam's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9145
  • Thank you received: 1456
@ mirrijakys

While we don't support Linux, there are quite few threads on this forum showing success. Worth for you to do a simple search.
I'm guessing that maybe you're doing playback here. That thread is more applicable I guess.
www.minidsp.com/forum/usbstreamer/12262-...linux?start=15#26426

DevTeam
miniDSP, building a DSP community one board at a time.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: devteam