Skip to content

Technical Insights: Hardware Negotiation Failure with Multi-channel DACs (Audient iD4 MKII) in Bit-Perfect Mode #60

Description

@Gordhen

Hello! I am a user of Sone (0.12.0-1 AUR) on CachyOS and I’ve been investigating some hardware-specific hurdles when using professional audio interfaces (specifically the Audient iD4 MKII) in Bit-Perfect/Exclusive mode.

I’ve spent some time debugging this behavior with the assistance of Gemini (AI), and I wanted to share these findings to provide more context for future developments regarding ALSA backend stability, as it seems closely related to Issue #49 and Issue #27.

While Sone correctly identifies the supported sample rates and formats (detecting $S32_LE$ correctly in the logs), the playback fails during the hardware parameter negotiation phase.The Audient iD4 MKII (and similar "Class Compliant" pro-interfaces) is strictly a 4-channel device at the hardware level in Linux. When an application attempts to open a direct hardware stream (hw:X,Y) requesting only 2 channels (Stereo), the ALSA driver rejects the request with the following error:snd_pcm_hw_params_set_channels error (Invalid argument).

Observed behavior in logs:

[alsa-writer] DAC supported GStreamer formats: ["S32LE"]
[alsa-writer] DAC supported rates: [44100, 48000, 88200, 96000]
[audio] DAC supported formats: [S32LE (32-bit)]
...
(Playback fails to initialize or remains silent if the channel count doesn't match the hardware's 4-channel requirement)

Connection to Existing Issues

Issue #49: The "ALSA writer" seems to struggle when the physical device expects a specific channel layout that differs from the source stream.

Issue #27: This likely stems from the same "strict handshake" where the backend doesn't account for interfaces that require channel padding (sending 2 channels of audio + 2 channels of silence to satisfy a 4-channel DAC).

To bypass this without modifying the application code, I had to manually "tunnel" the audio through a virtual ALSA device using ~/.asoundrc. This configuration performs the necessary channel mapping and format conversion to satisfy the Audient’s hardware requirements:

pcm.audient_exclusive {
    type plug
    slave {
        pcm "hw:iD4,0"   # Direct hardware access
        channels 4       # Forces the 4 channels the DAC requires
        format S32_LE    # Forces the bit-depth the DAC requires
    }
    # Maps Stereo (0,1) to the interface's main outputs (0,1)
    ttable.0.0 1
    ttable.1.1 1
}

By pointing the system's default ALSA output to this "route/plug" device, Sone is able to play Hi-Res audio (verified at 96kHz via hw_params) because ALSA handles the "padding" that the hardware demands.

I truly appreciate all the work put into this project. Unfortunately, I am not a particularly skilled user with these types of technical audio configurations, so I relied on Gemini (AI) to help orient me and condense hours of trial and error into this issue. My hope is that this information might be helpful or at least shed some light for others in a similar situation.

The AI suggests that the ALSA/GStreamer sink might need to handle channel-count discrepancies more elastically (e.g., via automatic channel padding to match the device's native channel count) to support this type of hardware natively in the future.

Best regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    audioALSA, GStreamer, bit-perfect, DAC, signal pathbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions