Machine translation from Turkish (Cloudflare Workers AI), not reviewed by the author. Read the Turkish original

← Posts

End-to-End Audio Optimization with Artificial Intelligence on Omarchy Linux: AIYIMA DAC-A5 Pro and Koss Pro/4AA (250 Ohm)

Score —

The 24-bit/192 kHz lossless PipeWire, WirePlumber and Biquad parametric equalizer optimization we carried out with Google Antigravity and a 12-member artificial intelligence council on Omarchy (Arch Linux) for the AIYIMA DAC-A5 Pro (Savitech SA9123L + ESS ES9018K2M) USB DAC/Amp and the Koss Pro/4AA (250 Ohm) studio headphones.

· 10 min read
Contents

Summary: Plugging an external USB DAC/amp and a high-impedance studio headphone into a desktop Linux system is enough to get "plug-and-play" audio, but it is not enough on its own to reveal the hardware's true capacity. When the USB audio bridge's generic identity definitions, non-existent microphone inputs seizing the default audio source, pop/click sounds when waking from sleep mode, missing sample rates, and the distinctive frequency dips of a 250 Ohm closed-cup headphone are not corrected, sound quality drops significantly. In this article, I first cover the fundamental engineering concepts that need to be known in the Linux audio architecture (ALSA, PipeWire, WirePlumber). Then, on our Omarchy (Arch Linux) workstation, with Google Antigravity (Gemini 4 Argon), I share all the configuration files of how we optimized the AIYIMA DAC-A5 Pro (Savitech SA9123L + ESS ES9018K2M) desktop DAC/amp and the classic Koss Pro/4AA (250 Ohm) studio headphone pair step by step, from the kernel to the browser.

What are the fundamental concepts we need to know in the Linux audio architecture?

When configuring good audio hardware on Linux, most of the problems encountered start with the question "is there a driver?" However, in the modern Linux kernel, the main factor that determines sound quality is not so much the presence of a driver as the parameters with which the audio stack (ALSA -> PipeWire -> WirePlumber) talks to the hardware:

1. USB Audio Class 2.0 (UAC2) and asynchronous clock control

Modern external DAC devices use the USB Audio Class 2.0 (UAC2) standard. The built-in snd-usb-audio module in the Linux kernel directly supports the UAC2 standard without the need for any external driver. The critical point here is that USB data transfer operates in asynchronous (ASYNC) mode. In asynchronous mode, the clock signal of the audio stream is managed not by the computer's noisy USB controller but directly by the low-jitter crystal oscillator on the DAC.

2. The balance between bit depth (16-bit and 24-bit) and sample rate

A USB DAC generally offers multiple alternative sets (Altset) on the USB interface for backward compatibility:

  • Altset 1 (S16_LE): 16-bit (96 dB dynamic range) standard CD quality.
  • Altset 2 (S24_3LE): 24-bit (144 dB theoretical dynamic range) high-resolution studio quality.

If the allowed sample rates (allowed-rates) and bit format are not explicitly defined in the audio server (PipeWire), the system may compress every audio stream to a fixed 48,000 Hz / 16-bit level or unnecessarily resample, spoiling the transparency of the sound.

3. Idle suspend and wake-up latency

By default, WirePlumber suspends the ALSA audio node (suspend) to save energy when no audio is played for a few seconds. On external USB DAC/amp devices, this behavior leads to two annoying problems:

  1. When audio starts again, an audible "pop / click" sound occurs in the headphones as the DAC relay or amp stage wakes up.
  2. The first half second of notification sounds or songs is swallowed until the device wakes up.

Since a desktop DAC/amp is already powered by an external power adapter, resetting the suspend timeout (session.suspend-timeout-seconds = 0) provides an uninterrupted and noise-free listening experience.

4. Acoustic compensation in high-impedance (250 Ohm) closed-cup headphones

Studio headphones — especially heavy, high-isolation closed-back models like the Koss Pro/4AA, which has been used in broadcast and recording studios since 1970 — do not have a flat frequency response. The thick housing and high-damping pads used to block external noise cause a drop in the sub-bass (below 100 Hz), a vocal dip in the mid frequencies (1 kHz), and an in-cup reflection harshness in the upper-mid region (2.5 kHz). The most accurate way to correct this physical characteristic without distortion is the Biquad Parametric Equalizer (PEQ) filter chain running at 32-bit floating point (float) precision within PipeWire.

The hardware pair: analysis of the AIYIMA DAC-A5 Pro and Koss Pro/4AA (250 Ohm)

Before starting the optimization process, let us clarify the internal architecture and electrical limits of the two pieces of hardware on our desk:

Hardware Component AIYIMA DAC-A5 Pro Koss Pro/4AA
Device Class Desktop USB DAC and Headphone Amplifier Closed-Back Studio Headphone
USB Audio Bridge Savitech SA9123L (USB ID 262a:9123) —
DAC Chip ESS Sabre ES9018K2M (HyperStream 32-bit architecture) —
Amplifier and Op-Amp Stage TI TPA6120A2 headphone amplifier + dual NE5532 (replaceable DIP8) —
Impedance and Sensitivity 16 Ohm - 300 Ohm drive support (with High/Low Gain switch) 250 Ohm nominal impedance, 95 dB SPL / 1 mW
Frequency / Resolution PCM 24-bit / 44.1 - 192 kHz (USB), 0.003% THD+N 10 Hz - 25,000 Hz frequency range

Thanks to the Texas Instruments TPA6120A2 high-current amplifier chip inside it and the High/Low Gain switch on the front panel, the AIYIMA DAC-A5 Pro is powerful enough to easily drive the 250 Ohm impedance Koss Pro/4AA drivers. However, when we first plugged the device into our Omarchy system, we identified three significant flaws on the software side.

1. First diagnosis with artificial intelligence: the "USB HIFI Audio" identity and the phantom microphone problem

After plugging the device into the USB port, when we examined the system outputs via Antigravity (lsusb, aplay -l, wpctl status and /proc/asound/card2/stream0), we encountered the following picture:

Bus 003 Device 008: ID 262a:9123 SAVITECH Corp. USB HIFI Audio

card 2: Audio [USB HIFI Audio], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

The hardware descriptor in the /proc/asound/card2/stream0 file, on the other hand, clearly showed all the device's capabilities:

Feixiang USB HIFI Audio at usb-0000:00:14.0-6.4, high speed : USB Audio

Playback:
  Interface 2 / Altset 1: Format: S16_LE, Channels: 2, Endpoint: 0x03 (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000 (Bits: 16)
  Interface 2 / Altset 2: Format: S24_3LE, Channels: 2, Endpoint: 0x03 (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000 (Bits: 24)

Capture:
  Interface 3 / Altset 1-2: Format: S16_LE / S24_3LE, Endpoint: 0x82 (ADAPTIVE)

This examination revealed three critical findings:

  1. Generic EEPROM Naming: The manufacturer (Feixiang/Aiyima) had written the generic "USB HIFI Audio" text into the memory of the Savitech SA9123L USB audio bridge instead of the device's real model. For this reason, the device appeared as "USB HIFI Audio" in the Omarchy sound menu and in all applications.
  2. The Phantom Microphone Input Seizing the Default Microphone: Although the AIYIMA DAC-A5 Pro has no physical microphone input, the Savitech SA9123L chip inside it reported a phantom audio input named Interface 3 Capture to the system due to its standard firmware. More importantly, because WirePlumber gives high priority to a newly plugged-in USB sound card, it had routed the system's default microphone to this phantom input (* 104. USB HIFI Audio Analog Stereo). If this situation had not been corrected, the microphone would have remained completely silent during voice calls.
  3. Missing Sample Rate (176,400 Hz): The 176400 value was not among the allowed clock rates in our PipeWire configuration; yet the DAC supported all of the hardware rates (44100, 48000, 88200, 96000, 176400 and 192000 Hz).

2. Lossless 24-bit / 192 kHz configuration on PipeWire and WirePlumber

As a first step, by updating our ~/.config/pipewire/pipewire.conf.d/99-custom-audio.conf file, we defined all the native frequencies supported by the DAC-A5 Pro and the highest resampling quality (resample.quality = 10):

context.properties = {
    default.clock.rate = 48000
    default.clock.allowed-rates = [ 44100, 48000, 88200, 96000, 176400, 192000 ]
    default.clock.min-quantum = 32
    default.clock.max-quantum = 2048
    default.clock.quantum = 512
    resample.quality = 10
}

Then, by creating the ~/.config/wireplumber/wireplumber.conf.d/aiyima-dac-a5-pro.conf file, we solved three problems with a single set of rules:

  • We changed the device and output node name to AIYIMA DAC-A5 Pro.
  • We forced the S24_3LE (24-bit) format and disabled the idle suspend mode (session.suspend-timeout-seconds = 0, node.pause-on-idle = false).
  • We completely disabled the phantom microphone input created by the Savitech SA9123L chip (~alsa_input.usb-Feixiang_USB_HIFI_Audio-01.*) (node.disabled = true), so the computer's built-in digital microphone automatically became the default input again.
## AIYIMA DAC-A5 Pro (Savitech SA9123L + ESS ES9018K2M - USB ID 262a:9123)
## 1. Cihaz ve cikis adini "USB HIFI Audio" yerine "AIYIMA DAC-A5 Pro" olarak duzeltir.
## 2. 24-bit (S24_3LE) bit-perfect formatini, tum yerel frekanslari (44.1-192 kHz)
##    ve sifir uyku gecikmesini (pop/click onleme) zorunlu kilar.
## 3. SA9123L USB koprusunun olusturdugu sahte mikrofon girisini devre disi birakir.

monitor.alsa.rules = [
  {
    matches = [
      {
        device.name = "alsa_card.usb-Feixiang_USB_HIFI_Audio-01"
      }
    ]
    actions = {
      update-props = {
        device.description = "AIYIMA DAC-A5 Pro"
        device.nick = "AIYIMA DAC-A5 Pro"
      }
    }
  }
  {
    matches = [
      {
        node.name = "~alsa_output.usb-Feixiang_USB_HIFI_Audio-01.*"
      }
    ]
    actions = {
      update-props = {
        node.description = "AIYIMA DAC-A5 Pro"
        node.nick = "AIYIMA DAC-A5 Pro"
        audio.format = "S24_3LE"
        audio.allowed-rates = [ 44100, 48000, 88200, 96000, 176400, 192000 ]
        resample.quality = 10
        session.suspend-timeout-seconds = 0
        node.pause-on-idle = false
        priority.driver = 2000
        priority.session = 2000
      }
    }
  }
  {
    matches = [
      {
        node.name = "~alsa_input.usb-Feixiang_USB_HIFI_Audio-01.*"
      }
    ]
    actions = {
      update-props = {
        node.disabled = true
      }
    }
  }
]

We also verified in the ALSA hardware mixer (amixer -c 2 contents) that the PCM Playback Volume value is 7/7 (0.00 dB lossless full level).

3. PipeWire Biquad parametric equalizer design for the Koss Pro/4AA (250 Ohm)

In the second stage, we addressed the Koss Pro/4AA (250 Ohm) headphones connected to the output of the AIYIMA DAC-A5 Pro. Independent acoustic laboratory measurements (Audio Science Review and Innerfidelity reference measurements) reveal four fundamental acoustic characteristics of the Koss Pro/4AA arising from its heavy closed-cup structure:

  1. Deep sub-bass roll-off (60 - 110 Hz): Although the thick liquid/air-filled ear pads provide a seal, they damp energy below 100 Hz early.
  2. 1 kHz midrange dip: There is a pronounced dip centered at 1,000 Hz that pushes vocals and acoustic instruments back in the soundstage.
  3. 2.5 kHz closed-cup resonance: There is a narrow peak around 2,500 Hz caused by closed-cup reflection; it causes listening fatigue during long sessions.
  4. Treble damping above 3 kHz: The classic large-diaphragm structure sounds dark after 3,000 Hz and leaves air/cymbal details behind.

While standard automatic equalizer profiles correct this curve, they apply a very aggressive preamp cut such as -11.1 dB. However, on headphones with 250 Ohm impedance and 95 dB/mW sensitivity, a -11.1 dB digital cut unnecessarily lowers the loudness. Instead, we designed our 5-band Biquad Parametric Equalizer with -6.0 dB preamp profile, which fully prevents digital clipping while preserving the amplifier's drive power:

Stage PipeWire Filter Type Frequency ($F_c$) Gain $Q$ Factor Acoustic Purpose
Preamp bq_highshelf (0 Hz) 0.0 Hz -6.0 dB 1.0 Prevents digital clipping, preserves 250 Ohm drive power
Band 1 bq_lowshelf 61.0 Hz +5.0 dB 1.0 Restores deep sub-bass extension
Band 2 bq_lowshelf 108.0 Hz +3.5 dB 1.0 Balances the lower-mid body and bass warmth
Band 3 bq_peaking 1000.0 Hz +4.0 dB 2.0 Raises the 1 kHz vocal and instrument dip to its natural level
Band 4 bq_peaking 2500.0 Hz -3.0 dB 4.0 Smooths the harshness of the closed cup's 2.5 kHz resonance
Band 5 bq_highshelf 3000.0 Hz +5.5 dB 1.0 Opens up treble detail and soundstage openness above 3 kHz

We placed this filter chain directly as a PipeWire core module (libpipewire-module-filter-chain) in the file ~/.config/pipewire/pipewire.conf.d/98-koss-pro4aa-eq.conf, without needing to run an external application, and connected its output directly to the alsa_output.usb-Feixiang_USB_HIFI_Audio-01.analog-stereo hardware:

# Koss Pro/4AA (250 Ohm) Referans Parametrik EQ Profili (AIYIMA DAC-A5 Pro Hedefli)
# ASR / AutoEQ akustik olcumlerine dayali 5-bant Biquad PEQ + Preamp zinciri

context.modules = [
    { name = libpipewire-module-filter-chain
        args = {
            node.description = "AIYIMA DAC-A5 Pro (Koss Pro/4AA EQ)"
            media.name       = "AIYIMA DAC-A5 Pro (Koss Pro/4AA EQ)"
            filter.graph = {
                nodes = [
                    {
                        type    = builtin
                        name    = eq_preamp
                        label   = bq_highshelf
                        control = { "Freq" = 0.0 "Q" = 1.0 "Gain" = -6.0 }
                    }
                    {
                        type    = builtin
                        name    = eq_band_1
                        label   = bq_lowshelf
                        control = { "Freq" = 61.0 "Q" = 1.0 "Gain" = 5.0 }
                    }
                    {
                        type    = builtin
                        name    = eq_band_2
                        label   = bq_lowshelf
                        control = { "Freq" = 108.0 "Q" = 1.0 "Gain" = 3.5 }
                    }
                    {
                        type    = builtin
                        name    = eq_band_3
                        label   = bq_peaking
                        control = { "Freq" = 1000.0 "Q" = 2.0 "Gain" = 4.0 }
                    }
                    {
                        type    = builtin
                        name    = eq_band_4
                        label   = bq_peaking
                        control = { "Freq" = 2500.0 "Q" = 4.0 "Gain" = -3.0 }
                    }
                    {
                        type    = builtin
                        name    = eq_band_5
                        label   = bq_highshelf
                        control = { "Freq" = 3000.0 "Q" = 1.0 "Gain" = 5.5 }
                    }
                ]
                links = [
                    { output = "eq_preamp:Out" input = "eq_band_1:In" }
                    { output = "eq_band_1:Out" input = "eq_band_2:In" }
                    { output = "eq_band_2:Out" input = "eq_band_3:In" }
                    { output = "eq_band_3:Out" input = "eq_band_4:In" }
                    { output = "eq_band_4:Out" input = "eq_band_5:In" }
                ]
            }
            audio.channels = 2
            audio.position = [ FL FR ]
            capture.props = {
                node.name        = "effect_input.koss_pro4aa_eq"
                media.class      = Audio/Sink
                device.icon-name = "audio-headphones"
                priority.driver  = 2100
                priority.session = 2100
            }
            playback.props = {
                node.name          = "effect_output.koss_pro4aa_eq"
                node.passive       = true
                target.object      = "alsa_output.usb-Feixiang_USB_HIFI_Audio-01.analog-stereo"
                stream.dont-remix  = true
            }
        }
    }
]

Thanks to this architecture, the sound menu in the Omarchy top bar (Quickshell) now shows two separate outputs:

  1. AIYIMA DAC-A5 Pro (Koss Pro/4AA EQ): The default acoustically calibrated output used when the Koss Pro/4AA is connected.
  2. AIYIMA DAC-A5 Pro: The pure (flat) hardware output you can switch to with a single click when another headphone or a reference speaker is connected.

4. Hardware controls and YouTube Music (Opus 251) end-to-end verification

After completing the software layer, we verified live that YouTube Music (with the "Always High" audio quality setting) and the physical amplifier controls work in harmony.

Why does YouTube Music work perfectly with Opus 251?

At the high quality setting, YouTube Music streams audio in Opus 251 (160 kbps VBR, 48,000 Hz) format. Because our system clock (default.clock.rate = 48000) matches Opus 251's native sample rate (48,000 Hz) exactly, the audio data enters the 32-bit floating point (F32P) Biquad filter chain directly without undergoing any sample rate conversion (resampling), and from there reaches the AIYIMA DAC-A5 Pro as 24-bit (S24_3LE).

In the live pw-top output, the latency and format values of the entire chain are as follows:

S   ID  QUANT   RATE    WAIT    BUSY   W/Q   B/Q  ERR FORMAT           NAME
R   68   1024  48000 124,4us   9,8us  0,01  0,00    0    S24LE 2 48000 alsa_output.usb-Feixiang_USB_HIFI_Audio-01.analog-stereo
R   40      0      0   5,2us  10,4us  0,00  0,00    0         F32P 2 0  + effect_input.koss_pro4aa_eq
R   41      0      0   2,2us  47,1us  0,00  0,00    0         F32P 2 0  + effect_output.koss_pro4aa_eq
R  106   1024  48000  28,9us  29,9us  0,00  0,00    0    F32LE 2 48000  + Google Chrome

The load that the 5-band parametric equalizer and pre-gain calculation place on the processor is only 47.1 microseconds (0.00 B/Q), and the error counter is at 0 (ERR = 0).

Golden rules for physical amplifier and player settings

These are the physical rules we follow to get the widest dynamic range from the 250 Ohm Koss Pro/4AA and AIYIMA DAC-A5 Pro pairing:

  • Gain Switch: The gain switch on the DAC-A5 Pro must be kept in the High (H / High Gain) position; high voltage swing is essential for the sub-bass control and transient response of 250 Ohm drivers.
  • Bass and Treble Knobs: Since the frequency curve is corrected to the millimeter with the software Biquad PEQ, the physical Bass and Treble potentiometers on the device should be left exactly in the center (12 o'clock / 0 dB neutral).
  • Digital Audio 100%, Analog Control: Both the volume slider in the YouTube Music interface and the Omarchy system volume should be kept fixed at 100% (1.00); the volume should be controlled only from the analog volume wheel on the AIYIMA DAC-A5 Pro. This way, there is no bit depth loss caused by digital attenuation.

My reading

  • USB DAC optimization on Linux is not about installing drivers but about configuring the audio stack correctly: The AIYIMA DAC-A5 Pro, based on the Savitech SA9123L and ESS ES9018K2M, works out of the box as 24-bit / 192 kHz asynchronous (ASYNC) with the Linux kernel's snd-usb-audio driver. However, WirePlumber rules are critical for fixing the generic "USB HIFI Audio" name, preventing the phantom microphone input from muting the real microphone, and cutting out the popping sounds caused by sleep.
  • A classic 250 Ohm headphone like the Koss Pro/4AA takes on a completely different identity with the right parametric EQ: The Koss Pro/4AA, which sounds dark with recessed mids when listened to on its own, gains both deep sub-bass and clear vocals when combined with the 5-band Biquad filter chain we set up in PipeWire and the high gain (High Gain) driving power of the AIYIMA DAC-A5 Pro.
  • AI-assisted system management reduces diagnosis time to minutes: Analyzing every layer, from the /proc/asound stream tables to the ALSA hardware parameters, and from the phantom USB capture endpoints to the 32-bit DSP filter chain, with Antigravity in just a few minutes and turning it into persistent configuration files has directly elevated our daily work and music listening comfort on Omarchy.

References