Realtek Audio Driver?

I’m connecting my surround system directly into the motherboard’s audio ports (meaning I’m not using audio over GPU’s HDMI/DP port) and I want to ensure that I get the best possible audio quality. With Windows, you’re supposed to install Realtek Audio Drivers from ASUS’ website to achieve this. What about Linux?


My motherboard comes with SupremeFX8-Channel High Definition Audio CODEC S1220A which from my understanding is a re-branded/customized version of Realtek® *ALC1220 codec:

$ grep Codec /proc/asound/card*/codec*
/proc/asound/card0/codec#0:Codec: Nvidia GPU 9a HDMI/DP
/proc/asound/card1/codec#0:Codec: Realtek ALC1220

If I investigate available audio interfaces I get:

$ nix-shell -p hwinfo --run "hwinfo --sound"
29: PCI 900.1: 0403 Audio device
  [Created at pci.386]
  Unique ID: oM_+.mQ47OqZy502
  Parent ID: w+J7.wfd8oV4+v2B
  SysFS ID: /devices/pci0000:00/0000:00:03.1/0000:09:00.1
  SysFS BusID: 0000:09:00.1
  Hardware Class: sound
  Model: "nVidia GA102 High Definition Audio Controller"
  Vendor: pci 0x10de "nVidia Corporation"
  Device: pci 0x1aef "GA102 High Definition Audio Controller"
  SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
  SubDevice: pci 0x8802 
  Revision: 0xa1
  Driver: "snd_hda_intel"
  Driver Modules: "snd_hda_intel"
  Memory Range: 0xfc080000-0xfc083fff (rw,non-prefetchable)
  IRQ: 134 (1294 events)
  Module Alias: "pci:v000010DEd00001AEFsv00001043sd00008802bc04sc03i00"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #6 (PCI bridge)

49: PCI b00.4: 0403 Audio device
  [Created at pci.386]
  Unique ID: l2so.Fd4pBJ95he8
  Parent ID: JZZT.R4auG4CiRRB
  SysFS ID: /devices/pci0000:00/0000:00:08.1/0000:0b:00.4
  SysFS BusID: 0000:0b:00.4
  Hardware Class: sound
  Model: "AMD Starship/Matisse HD Audio Controller"
  Vendor: pci 0x1022 "AMD"
  Device: pci 0x1487 "Starship/Matisse HD Audio Controller"
  SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
  SubDevice: pci 0x87c5 
  Driver: "snd_hda_intel"
  Driver Modules: "snd_hda_intel"
  Memory Range: 0xfca00000-0xfca07fff (rw,non-prefetchable)
  IRQ: 136 (5442 events)
  Module Alias: "pci:v00001022d00001487sv00001043sd000087C5bc04sc03i00"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #26 (PCI bridge)

$ lsmod
Module                  Size  Used by
snd_seq_dummy          16384  0
snd_hrtimer            16384  1
snd_seq               102400  7 snd_seq_dummy
snd_seq_device         16384  1 snd_seq
msr                    16384  0
btrfs                1953792  0
snd_hda_codec_realtek   192512  1
snd_hda_codec_generic   110592  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     90112  1
nls_iso8859_1          16384  1
nls_cp437              20480  1
vfat                   24576  1
fat                    98304  1 vfat
snd_hda_intel          61440  4
snd_intel_dspcfg       36864  1 snd_hda_intel
edac_mce_amd           40960  0
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
edac_core              86016  0
intel_rapl_msr         20480  0
snd_hda_codec         208896  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
intel_rapl_common      32768  1 intel_rapl_msr
polyval_clmulni        16384  0
polyval_generic        16384  1 polyval_clmulni
gf128mul               16384  1 polyval_generic
ghash_clmulni_intel    16384  0
sha512_ssse3           53248  0
sha512_generic         16384  1 sha512_ssse3
snd_hda_core          135168  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
eeepc_wmi              16384  0
aesni_intel           401408  0
asus_wmi               69632  1 eeepc_wmi
snd_hwdep              20480  1 snd_hda_codec
libaes                 16384  1 aesni_intel
battery                28672  1 asus_wmi
crypto_simd            16384  1 aesni_intel
blake2b_generic        20480  0
sparse_keymap          16384  1 asus_wmi
snd_pcm               184320  5 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
cryptd                 28672  2 crypto_simd,ghash_clmulni_intel
xor                    24576  1 btrfs
ledtrig_audio          16384  2 snd_hda_codec_generic,asus_wmi
asus_ec_sensors        24576  0
platform_profile       16384  1 asus_wmi
snd_timer              53248  3 snd_seq,snd_hrtimer,snd_pcm
r8169                 110592  0
rfkill                 40960  2 asus_wmi
raid6_pq              122880  1 btrfs
rapl                   16384  0
snd                   143360  19 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
mxm_wmi                16384  0
sp5100_tco             20480  0
wmi_bmof               16384  0
realtek                40960  1
mdio_devres            16384  1 r8169
libcrc32c              16384  1 btrfs
watchdog               40960  1 sp5100_tco
soundcore              16384  1 snd
crc32c_generic         16384  0
k10temp                16384  0
libphy                184320  3 r8169,mdio_devres,realtek
crc32c_intel           24576  1
evdev                  28672  40
input_leds             16384  0
mousedev               24576  0
led_class              20480  3 snd_hda_codec_generic,input_leds,asus_wmi
joydev                 28672  0
mac_hid                16384  0
tiny_power_button      16384  0
button                 24576  0
acpi_cpufreq           32768  0
sch_fq_codel           20480  2
atkbd                  36864  0
libps2                 20480  1 atkbd
serio                  28672  1 atkbd
vivaldi_fmap           16384  1 atkbd
loop                   36864  0
tun                    69632  0
tap                    32768  0
macvlan                36864  0
bridge                380928  0
stp                    16384  1 bridge
llc                    16384  2 bridge,stp
i2c_piix4              28672  0
i2c_dev                28672  0
kvm_amd               188416  0
ccp                   135168  1 kvm_amd
rng_core               24576  1 ccp
kvm                  1290240  1 kvm_amd
fuse                  180224  3
deflate                16384  1
efi_pstore             16384  0
configfs               65536  1
efivarfs               28672  1
dmi_sysfs              24576  0
ip_tables              36864  0
x_tables               61440  1 ip_tables
dm_mod                180224  0
dax                    53248  1 dm_mod
nvidia_uvm           1572864  0
nvidia_drm             81920  26
nvidia_modeset       1712128  6 nvidia_drm
f2fs                  901120  1
sd_mod                 61440  0
video                  73728  2 asus_wmi,nvidia_modeset
hid_generic            16384  0
crc32_generic          16384  0
lz4hc_compress         24576  1 f2fs
usbhid                 69632  0
hid                   163840  2 usbhid,hid_generic
nvidia               7106560  465 nvidia_uvm,nvidia_modeset
lz4_compress           28672  1 f2fs
ahci                   49152  0
libahci                53248  1 ahci
xhci_pci               24576  0
xhci_pci_renesas       20480  1 xhci_pci
libata                430080  2 libahci,ahci
xhci_hcd              352256  1 xhci_pci
nvme                   61440  3
usbcore               385024  3 xhci_hcd,usbhid,xhci_pci
nvme_core             180224  5 nvme
scsi_mod              307200  2 sd_mod,libata
drm_kms_helper        233472  1 nvidia_drm
t10_pi                 20480  2 sd_mod,nvme_core
crc32_pclmul           16384  1
syscopyarea            16384  1 drm_kms_helper
crc64_rocksoft         20480  1 t10_pi
sysfillrect            16384  1 drm_kms_helper
crc64                  20480  1 crc64_rocksoft
sysimgblt              16384  1 drm_kms_helper
crc_t10dif             20480  1 t10_pi
crct10dif_generic      16384  0
usb_common             16384  2 xhci_hcd,usbcore
scsi_common            16384  2 scsi_mod,libata
crct10dif_pclmul       16384  1
crct10dif_common       16384  3 crct10dif_generic,crc_t10dif,crct10dif_pclmul
rtc_cmos               28672  1
wmi                    36864  4 video,asus_wmi,wmi_bmof,mxm_wmi
drm                   675840  21 drm_kms_helper,nvidia,nvidia_drm
i2c_core              131072  5 drm_kms_helper,nvidia,i2c_piix4,i2c_dev,drm
backlight              28672  4 video,asus_wmi,drm,nvidia_modeset
vfio_pci               16384  0
vfio_pci_core          86016  1 vfio_pci
irqbypass              16384  2 vfio_pci_core,kvm
vfio_iommu_type1       49152  0
vfio                   61440  3 vfio_pci_core,vfio_iommu_type1,vfio_pci
iommufd                81920  1 vfio
autofs4                57344  0

There’s actually a snd_hda_codec_realtek module loaded but it seems like my Realtek audio controller is using the snd_hda_intel driver?


For reference, audio works after enabling Digital Stereo (IC958) Output (what about surround though?) for Starship/Matisse HD Audio Controller in pavucontrol (since no other option works). Nix configuration:

security.rtkit.enable = true; # Realtime audio support
services.pipewire = {
  enable = true;

  # Kernel-level API support
  alsa.enable = true;

  # 3rd party support
  pulse.enable = true;

  # Todo add realtime audio conf here
};

Is there actually a Linux driver for Realtek which I should install or/and should I configure it to use different drivers (like snd_hda_codec_realtek) to get the best possible audio?

Here’s the conclusion that I came to: Reddit - Dive into anything