alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
344 stars 173 forks source link

Focusrite USB UCM2 profile forcing 48kHz #388

Open geoffreybennett opened 4 months ago

geoffreybennett commented 4 months ago

I'm creating UCM2 profiles for the Focusrite USB interfaces. They support:

$ cat /proc/asound/Gen/stream0 
Focusrite Scarlett 4i4 4th Gen at usb-0000:00:14.0-6.4.1, high speed : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 1
    Packet Size = 216
    Momentary freq = 48000 Hz (0x6.0000)
  Interface 1
    Altset 1
    Format: S32_LE
    Channels: 6
    Endpoint: 0x01 (1 OUT) (SYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR

Capture:
  Status: Running
    Interface = 2
    Altset = 1
    Packet Size = 216
    Momentary freq = 48000 Hz (0x6.0000)
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 6
    Endpoint: 0x81 (1 IN) (SYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR

When I use my UCM2 profile that splits the inputs and outputs up, PipeWire will only select 48kHz. The Pro Audio and Direct profiles can use all the sample rates.

To me it sounded like https://github.com/alsa-project/alsa-ucm-conf/issues/313 but @perexg advised https://github.com/alsa-project/alsa-ucm-conf/issues/313#issuecomment-1989386017:

For configurations using split macros, the default rate is hardcoded to 48kHz in the alsa-lib direct plugins. It would be better to create a bug in alsa-lib issue tracker.