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.

TOPIC: Usbstreamer b + linux

Usbstreamer b + linux 9 months 4 days ago #46809

  • Jerdboyd
  • Jerdboyd's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Hello. I am a fedora linux user and have acquired an apogee rosetta 800 DAC. The usbstreamer b looks like a perfect device for interfacing the rosetta to my machine. To get the best out of the rosetta I'll need to use it as the master clock. Can that setting be altered from linux using alsamixer?
The administrator has disabled public write access.

Usbstreamer b + linux 8 months 3 weeks ago #46997

  • devteam
  • devteam's Avatar
  • Offline
  • Administrator
  • Posts: 8767
  • Thank you received: 1156
  • Karma: 165

Unfortunately we don't support Linux so wouldn't know of how to set this up.. :-( There was a long thread here a while ago of similar setup I think.

miniDSP, building a DSP community one board at a time.
The administrator has disabled public write access.

Usbstreamer b + linux 3 months 2 days ago #50427

  • CharlieLaub
  • CharlieLaub's Avatar
  • Offline
  • Expert Boarder
  • Posts: 113
  • Thank you received: 8
  • Karma: 5
I have figured out how to get the USBStreamer working under Linux, on a Raspberry Pi 4B that is running kernel 5.4. This probably applies to other Linux flavors as well, especially anything Debian based (e.g. Ubuntu).

I previously used the USBStreamer configured as an ADAT interface under Linux and it works great. Recently I wanted to use it as a stereo SPDIF receiver as part of an audio project so that I could bring in digital audio to the Pi from an external source. But I found that while I could see the USBStreamer listed with aplay -l and I could employ the streamer as an ALSA input, there was no sound.

I found some older posts that mentioned this problem and suggested to create a new device via the asoundrc file that would modify the channel routing. I tried this but I could not get it to work, however, it did give me the clues I needed to come up with a fix.

There is an ALSA "state" file located at /var/lib/alsa/asound.state that contains the fields and values for all the controls and so on for the soundcard. This file is written when you shutdown the computer, and read in again when you boot up. When the USBStreamer is connected to the computer, the file gets a section for it that comes under the heading "U7" instead of USBStreamer. I assume this refers to the XMos interface. It doesn't really matter, just look for the lines below where it says "state.U7 {".

Open the file for editing by typing:
sudo nano /var/lib/alsa/asound.state

Each control is listed in a format like this:
State.U7 {
      control.1 {
            iface PCM
            name 'Playback Channel Map'
             value.0 0
Look for control 4, called 'PCM Capture Map'.

In the PCM Capture Map, you will see two values listed. These are the channel mappings for the two input channels under the stereo configuration of the board. They are numbered channel 0 and channel 1. These are mapped to Linux channel numbers via the number given after the decimal point in each value assignment.

Modify these lines to look like this:
value.0 3
value.1 4

Under Linux the front left channel has the channel ID of 3 and the front right channel has the channel ID of 4. With the modification to these two value assignment lines in the Capture Channel Map now properly direct the input channels to the front left and right channels under ALSA.

Save the file by typing control+s, and then control+x to exit.

You should be able to use the USBStreamer immediately to record stereo audio via the toslink line. The coax input (via header) should also work but I did not test it. If not, try shutting down and rebooting.

Once I made this change, it persisted after reboots, unplugging and re-plugging the USB connection to the USBStreamer, etc. There is no userspace control to edit the channel map, so I think it is permanent.

A similar change to this file could be used to modify the input channel map as well, if that is desired for stereo output via the spdif toslink port.

Have Fun,

The administrator has disabled public write access.
Moderators: devteam