• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Linux Alsa and USB interface, what does what?

Bebelalu55

Member
Joined
May 7, 2024
Messages
6
Likes
1
Location
France
I have a technical question that has probably been answered to already, but I am too lazy to go through all the posts trying to find the answer.
I am digitizing some vinyls using a Steinberg UR22Mk2 USB interface.
Being on Debian Linux, I use the 'arecord' command line instruction with the 'dat' parameter (16bits 48KHz).
I then use Audacity to split the tracks.
But my interface is capable of 24bits 192Khz.
Does the UR22 feed Alsa with a 24bits 192Khz stream that is then 'down sampled' to the desired values or is Alsa telling the UR22 to limit itself to 16bits 48Khz.
I don't understand what is responsible for what.
Can someone clarify this for me.
Thanks in advance.
 
Does the UR22 feed Alsa with a 24bits 192Khz stream that is then 'down sampled' to the desired values or is Alsa telling the UR22 to limit itself to 16bits 48Khz.
It's Alsa telling the device what format to use. The available formats that the device is capable to deliver are listed in "/proc/asound/card0/stream0" (or card1 or card2 etc). And I think "stream0" is the standard file name for USB devices. For example:
Code:
]$ cat /proc/asound/card2/stream0
Plantronics Plantronics C435 at usb-0000:00:14.0-8, full speed : USB Audio

Playback:
  Status: Stop
  Interface 1
    Altset 1
    Format: S16_LE
    Channels: 2
    Endpoint: 4 OUT (SYNC)
    Rates: 8000, 16000, 48000

Capture:
  Status: Stop
  Interface 2
    Altset 1
    Format: S16_LE
    Channels: 1
    Endpoint: 4 IN (SYNC)
    Rates: 8000, 16000
My Plantronics headset can capture mono, in 16-bits, at 8 or 16 kHz sampling rate.
Code:
]$ cat /proc/asound/card3/stream0
RME ADI-2 Pro (57760455) at usb-0000:00:14.0-4, high speed : USB Audio

Playback:
  Status: Stop
  Interface 1
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 2 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000, 705600, 768000
    Data packet interval: 125 us

Capture:
  Status: Stop
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 1 IN (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000, 705600, 768000
    Data packet interval: 125 us
ADI-2 Pro can capture stereo, in 32-bits, at a bunch of different sampling rates.

When you call arecord you can specify which format the device should deliver:
Code:
arecord ... --channels=2 --format=S32_LE --rate=96000
arecord ... -c 2 -f S32_LE -r 96000

EDIT:
Oh, and I assume that the direct hardware device ("hw") is used, like:
Code:
arecord -D hw:CARD=Pro57760455,DEV=0 ...
or
arecord -D hw:3,0 ...
It may be that with other type, Alsa itself could do some resampling. I'm not sure.
 
Last edited:
Back
Top Bottom