alsa-project / alsa-ucm-conf

ALSA Use Case Manager configuration
BSD 3-Clause "New" or "Revised" License
76 stars 219 forks source link

ASUS RoG Strix Z790-F: No SPDIF Sound output #350

Closed Nightwing0815 closed 10 months ago

Nightwing0815 commented 1 year ago

Hey guys,

what Can I do to get my optical toslink output ( pcm signal undecoded ) working? Here are an inxi report of my system:

System:
  Host: Ultron Kernel: 6.1.0-1013-oem x86_64 bits: 64 compiler: N/A
    parameters: BOOT_IMAGE=/vmlinuz-6.1.0-1013-oem
    root=UUID=aa125f57-ee1e-4fd4-93fc-a77a180ec451 ro quiet splash
  Desktop: Cinnamon 5.6.8 tk: GTK 3.24.33 wm: muffin vt: 7
    dm: LightDM 1.30.0 Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: ROG STRIX Z790-F GAMING WIFI v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 0904
    date: 03/29/2023
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 62.57 GiB used: 2.13 GiB (3.4%)
  RAM Report:
    unknown-error: Unknown dmidecode error. Unable to generate data.
PCI Slots:
  Unknown-error: Unknown dmidecode error. Unable to generate data.
CPU:
  Info: model: 13th Gen Intel Core i7-13700K bits: 64 type: MST AMCP
    arch: N/A family: 6 model-id: 0xB7 (183) stepping: 1 microcode: 0x113
  Topology: cpus: 1x cores: 16 mt: 8 tpc: 2 st: 8 threads: 24 smt: enabled
    cache: L1: 1.4 MiB desc: d-8x32 KiB, 8x48 KiB; i-8x32 KiB, 8x64 KiB
    L2: 24 MiB desc: 8x2 MiB, 2x4 MiB L3: 30 MiB desc: 1x30 MiB
  Speed (MHz): avg: 3100 high: 3400 min/max: 800/5300:5400:4200 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1100 2: 3400 3: 3400
    4: 3400 5: 3400 6: 3400 7: 3400 8: 3400 9: 3400 10: 3400 11: 3400
    12: 3400 13: 3400 14: 3400 15: 1100 16: 3400 17: 800 18: 3400 19: 3400
    20: 3400 21: 3400 22: 3400 23: 3400 24: 3400 bogomips: 164044
Graphics:
  Device-1: NVIDIA vendor: CardExpert driver: nvidia v: 530.41.03
    alternate: nvidiafb,nouveau,nvidia_drm ports: active: none
    off: DP-1,HDMI-A-1 empty: DP-2,DP-3 bus-ID: 0000:01:00.0
    chip-ID: 10de:2782 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: nvidia
    gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x2160 s-dpi: 46 s-size: 1060x1167mm (41.7x45.9")
    s-diag: 1577mm (62.1")
  Monitor-1: DP-1 pos: primary,bottom res: 1920x1080 hz: 60 dpi: 102
    size: 477x268mm (18.8x10.6") diag: 547mm (21.5")
  Monitor-2: HDMI-0 pos: primary,top res: 1920x1080 hz: 60 dpi: 38
    size: 1280x720mm (50.4x28.3") diag: 1469mm (57.8")
  OpenGL: renderer: NVIDIA GeForce RTX 4070 Ti/PCIe/SSE2
    v: 4.6.0 NVIDIA 530.41.03 direct render: Yes
Audio:
  Device-1: Intel vendor: ASUSTeK driver: snd_hda_intel v: kernel
    alternate: snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3 chip-ID: 8086:7a50
    class-ID: 0403
  Device-2: NVIDIA vendor: CardExpert driver: snd_hda_intel v: kernel
    bus-ID: 0000:01:00.1 chip-ID: 10de:22bc class-ID: 0403
  Device-3: ASUSTek USB Audio type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-2:2 chip-ID: 0b05:1a52
    class-ID: 0300
  Sound Server-1: ALSA v: k6.1.0-1013-oem running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: no
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel vendor: ASUSTeK driver: igc v: kernel port: N/A
    bus-ID: 0000:05:00.0 chip-ID: 8086:125c class-ID: 0200
  IF: eno2 state: up speed: 1000 Mbps duplex: full mac: c8:7f:54:6a:7e:55
  IP v4: 192.168.178.10/24 type: noprefixroute scope: global
    broadcast: 192.168.178.255
  IP v6: 2a02:8070:8a80:77c0:aac9:dade:e3e2:8611/64 type: temporary dynamic
    scope: global
  IP v6: 2a02:8070:8a80:77c0:64ef:c8d5:1d2b:3a7f/64
    type: dynamic mngtmpaddr noprefixroute scope: global
  IP v6: fe80::6d94:62d1:90b5:608b/64 type: noprefixroute scope: link
  IF-ID-1: virbr0 state: down mac: 52:54:00:e9:bf:38
  IP v4: 192.168.100.1/24 scope: global broadcast: 192.168.100.255
  WAN IP: 46.5.221.128
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Hardware-1: Intel Device driver: vmd v: 0.6 port: N/A bus-ID: 0000:00:0e.0
    chip-ID: 8086:a77f rev: class-ID: 0104
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-2:2 info: ASUSTek USB Audio type: Audio,HID
    driver: hid-generic,snd-usb-audio,usbhid interfaces: 8 rev: 2.0
    speed: 480 Mb/s power: 100mA chip-ID: 0b05:1a52 class-ID: 0300
  Device-2: 1-4:3 info: ASUSTek AURA LED Controller type: HID
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s
    power: 16mA chip-ID: 0b05:19af class-ID: 0300 serial: 9876543210
  Hub-2: 1-10:4 info: ASMedia ASM1074 High-Speed hub ports: 4 rev: 2.1
    speed: 480 Mb/s power: 100mA chip-ID: 174c:2074 class-ID: 0900
  Device-1: 1-10.3:6 info: Fujitsu Siemens s KB955 USB Keyboard
    type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 1.1
    speed: 1.5 Mb/s power: 100mA chip-ID: 0bf8:102e class-ID: 0300
  Device-2: 1-10.4:8 info: Logitech G5 Laser Mouse type: Mouse,HID
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s
    power: 98mA chip-ID: 046d:c049 class-ID: 0300
  Hub-3: 1-11:5 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s
    power: 100mA chip-ID: 05e3:0608 class-ID: 0900
  Hub-4: 1-13:7 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s
    power: 100mA chip-ID: 05e3:0608 class-ID: 0900
  Hub-5: 2-0:1 info: Super-speed hub ports: 8 rev: 3.1 speed: 20 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-6: 2-8:2 info: ASMedia ASM1074 SuperSpeed hub ports: 4 rev: 3.0
    speed: 5 Gb/s power: 8mA chip-ID: 174c:3074 class-ID: 0900
Sensors:
  System Temperatures: cpu: 32.5 C mobo: 30.0 C gpu: nvidia temp: 36 C
  Fan Speeds (RPM): fan-1: 0 fan-2: 808 fan-3: 0 fan-4: 0 fan-5: 447
    fan-6: 453 fan-7: 2288 gpu: nvidia fan: 0%

Thanks in advance,

ToM

marci-nlm commented 1 year ago

I'm having a similar issue on a Z790-A Board. Sound of for HDMI and Bluetooth but not for SPDIF

somejavadev commented 1 year ago

I am experiencing the same with an Asus Rog Maximus Z790 Hero on Ubuntu 22.04. It seems like both our boards have the USB Audio card. @andromedarion is yours also an Asus board with USB audio, perhaps you can add the inxi data (sudo apt install inxi && inxi --audio --machine --system)? I have bumped the kernel to 6.4.12 and updated the USB card to the latest firmware without success. Strangely if I switch to the alsamixer and select the USB sound card it doesn't show any SPDIF outputs. To ensure it's not a hardware issue I tested the SPDIF output on Windows 10 and the sound is playing.

inxi:

System:
  Host: 2fast Kernel: 6.4.12-060412-generic x86_64 bits: 64
    Desktop: GNOME 42.9 Distro: Ubuntu 22.04.3 LTS (Jammy Jellyfish)
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: ROG MAXIMUS Z790 HERO v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 1202
    date: 06/13/2023
Audio:
  Device-1: Intel driver: snd_hda_intel
  Device-2: AMD driver: snd_hda_intel
  Device-3: ASUSTek USB Audio type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Sound Server-1: ALSA v: k6.4.12-060412-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes

alsamixer:

Screenshot from 2023-08-30 07-22-40

pavucontrol

Screenshot from 2023-08-30 07-23-28

Screenshot from 2023-08-30 07-24-04

@Nightwing0815 Perhaps you can also add screenshots from pavucontrol and alsamixer as additional information to narrow down the issue.

BrettRyland commented 1 year ago

I also have this issue with a Z790-F motherboard.

$ sudo inxi --audio --machine --system
System:
  Host: brett-home Kernel: 6.4.6-060406-generic arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.27.4 Distro: Ubuntu 23.04 (Lunar Lobster)
Machine:
  Type: Desktop System: Komplett product: KomplettPC v: N/A serial: 25769254
  Mobo: ASUSTeK model: ROG STRIX Z790-F GAMING WIFI v: Rev 1.xx
    serial: 230215882500616 UEFI: American Megatrends v: 1202 date: 06/13/2023
Audio:
  Device-1: Intel driver: snd_hda_intel
  Device-2: NVIDIA AD102 High Definition Audio driver: snd_hda_intel
  Device-3: Logitech HD Pro Webcam C920 type: USB
    driver: snd-usb-audio,uvcvideo
  Device-4: ASUSTek USB Audio type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Sound API: ALSA v: k6.4.6-060406-generic running: yes
  Sound Server-1: PipeWire v: 0.3.65 running: yes

Interestingly, pavucontrol thinks that it is outputting audio, but the receiver says that there is no digital data. Screenshot_20230830_101647 I'll also note that switching to "Analogue Surround 5.1 Output" works (but I get RF interference since it's not SPDIF) and switching to "Pro Audio" gives stereo output over SPDIF on "USB Audio Pro 2" but no option for passing through 5.1 audio. Also, this used to work correctly with pulseaudio, but doesn't with pipewire, so I'm not sure that this is really an alsa-lib issue.

Nightwing0815 commented 1 year ago

@somejavadev of course I can, here we go:

~$ sudo inxi --audio --machine --system
System:
  Host: Ultron Kernel: 6.2.0-31-generic x86_64 bits: 64
    Desktop: Cinnamon 5.8.4 Distro: Linux Mint 21.2 Victoria
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: N/A
  Mobo: ASUSTeK model: ROG STRIX Z790-F GAMING WIFI v: Rev 1.xx
    serial: xxxxxxxxxxxxxxx UEFI: American Megatrends v: 1202 date: 06/13/2023
Audio:
  Device-1: Intel driver: snd_hda_intel
  Device-2: NVIDIA driver: snd_hda_intel
  Device-3: ASUSTek USB Audio type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Sound Server-1: ALSA v: k6.2.0-31-generic running: yes
  Sound Server-2: PipeWire v: 0.3.48 running: yes

pavucontrol: Bildschirmfoto vom 2023-08-30 14-58-47

alsamixer: Bildschirmfoto vom 2023-08-30 14-59-26

How can I check, if I'm using all drivers for the Board? I think, you have the same issues in dmesg, not only sound?

~$ sudo dmesg -x --color=always --level=err,warn
kern  :warn  : [    0.223080]  alsa-project/alsa-lib#17 alsa-project/alsa-lib#18 alsa-project/alsa-lib#19 alsa-project/alsa-lib#20 alsa-project/alsa-lib#21 alsa-project/alsa-lib#22 alsa-project/alsa-lib#23
kern  :warn  : [    0.256576] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
kern  :warn  : [    0.495972] hpet_acpi_add: no address or irqs in _CRS
kern  :warn  : [    0.507364] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
kern  :warn  : [    0.507383] platform eisa.0: EISA: Cannot allocate resource for mainboard
kern  :warn  : [    0.507384] platform eisa.0: Cannot allocate resource for EISA slot 1
kern  :warn  : [    0.507384] platform eisa.0: Cannot allocate resource for EISA slot 2
kern  :warn  : [    0.507384] platform eisa.0: Cannot allocate resource for EISA slot 3
kern  :warn  : [    0.507385] platform eisa.0: Cannot allocate resource for EISA slot 4
kern  :warn  : [    0.507385] platform eisa.0: Cannot allocate resource for EISA slot 5
kern  :warn  : [    0.507385] platform eisa.0: Cannot allocate resource for EISA slot 6
kern  :warn  : [    0.507386] platform eisa.0: Cannot allocate resource for EISA slot 7
kern  :warn  : [    0.507386] platform eisa.0: Cannot allocate resource for EISA slot 8
kern  :warn  : [    0.509378] efifb: Ignoring BGRT: unexpected or invalid BMP data
kern  :warn  : [    0.939514] acpi PNP0C14:06: duplicate WMI GUID 97845ED0-4E6D-11DE-8A39-0800200C9A66 (first instance was on PNP0C14:02)
kern  :warn  : [    0.945310] pci 10000:e0:06.0: Primary bus is hard wired to 0
kern  :warn  : [    0.945631] pci 10000:e0:1b.4: Primary bus is hard wired to 0
kern  :warn  : [    0.946143] pci 10000:e0:06.0: Primary bus is hard wired to 0
kern  :warn  : [    0.946146] pci 10000:e0:1b.4: Primary bus is hard wired to 0
kern  :err   : [    0.978182] i2c i2c-2: Failed to register i2c client ITE8853:00 at 0x40 (-16)
kern  :warn  : [    1.095516] nvidia: loading out-of-tree module taints kernel.
kern  :warn  : [    1.095520] nvidia: module license 'NVIDIA' taints kernel.
kern  :warn  : [    1.095521] Disabling lock debugging due to kernel taint
kern  :warn  : [    1.119413] pcieport 10000:e0:06.0: can't derive routing for PCI INT D
kern  :warn  : [    1.119413] pcieport 10000:e0:06.0: PCI INT D: no GSI
kern  :warn  : [    1.119540] pcieport 10000:e0:1b.4: can't derive routing for PCI INT A
kern  :warn  : [    1.119540] pcieport 10000:e0:1b.4: PCI INT A: no GSI
kern  :warn  : [    1.136850] ahci 10000:e0:17.0: can't derive routing for PCI INT A
kern  :warn  : [    1.136853] ahci 10000:e0:17.0: PCI INT A: no GSI
kern  :warn  : [    1.140166] pcieport 10000:e0:06.0: can't derive routing for PCI INT A
kern  :warn  : [    1.140167] nvme 10000:e1:00.0: PCI INT A: no GSI
kern  :warn  : [    1.140235] pcieport 10000:e0:1b.4: can't derive routing for PCI INT A
kern  :warn  : [    1.140236] nvme 10000:e2:00.0: PCI INT A: no GSI

kern  :warn  : [    1.224510] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  535.86.05  Fri Jul 14 20:46:33 UTC 2023
kern  :warn  : [    1.489043] ata8.00: supports DRM functions and may not be fully accessible
kern  :warn  : [    1.489211] ata6.00: supports DRM functions and may not be fully accessible
kern  :warn  : [    1.493984] ata8.00: supports DRM functions and may not be fully accessible
kern  :warn  : [    1.494279] ata6.00: supports DRM functions and may not be fully accessible
kern  :warn  : [    1.548573] ACPI Warning: \_SB.PC00.PEG1.PEGP._DSM: Argument alsa-project/alsa-lib#4 type mismatch - Found [Buffer], ACPI requires [Package] (20221020/nsarguments-61)
kern  :err   : [    1.736291] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.736305] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.736314] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.736314] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.736315]   Arg0:   00000000b74b9caa <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.736319]   Arg1:   000000009d43f637 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.736321]   Arg2:   00000000cb1837b2 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.736322]   Arg3:   00000000bb8e7412 <Obj>           Buffer(4) 00 10 52 44

kern  :err   : [    1.736325] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.736447] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.736457] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.736465] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.736465] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.736466]   Arg0:   00000000bb8e7412 <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.736469]   Arg1:   00000000cb1837b2 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.736470]   Arg2:   000000009d43f637 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.736471]   Arg3:   00000000b74b9caa <Obj>           Buffer(4) 00 20 52 44

kern  :err   : [    1.736474] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.736593] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.736603] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.736611] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.736611] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.736612]   Arg0:   00000000b74b9caa <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.736615]   Arg1:   000000009d43f637 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.736616]   Arg2:   00000000cb1837b2 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.736617]   Arg3:   00000000bb8e7412 <Obj>           Buffer(4) 00 30 52 44

kern  :err   : [    1.736620] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.736743] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.736753] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.736761] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.736761] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.736762]   Arg0:   00000000bb8e7412 <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.736765]   Arg1:   00000000cb1837b2 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.736766]   Arg2:   000000009d43f637 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.736767]   Arg3:   00000000b74b9caa <Obj>           Buffer(4) 00 40 52 44

kern  :err   : [    1.736770] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.736888] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.736898] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.736905] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.736906] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.736906]   Arg0:   00000000b74b9caa <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.736909]   Arg1:   000000009d43f637 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.736911]   Arg2:   00000000cb1837b2 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.736912]   Arg3:   00000000bb8e7412 <Obj>           Buffer(4) 00 50 52 44

kern  :err   : [    1.736914] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.737033] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.737043] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.737050] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.737051] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.737051]   Arg0:   00000000bb8e7412 <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.737054]   Arg1:   00000000cb1837b2 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.737055]   Arg2:   000000009d43f637 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.737057]   Arg3:   00000000b74b9caa <Obj>           Buffer(4) 00 60 52 44

kern  :err   : [    1.737059] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.737178] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.737188] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.737195] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.737196] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.737196]   Arg0:   00000000b74b9caa <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.737199]   Arg1:   000000009d43f637 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.737200]   Arg2:   00000000cb1837b2 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.737202]   Arg3:   00000000bb8e7412 <Obj>           Buffer(4) 00 70 52 44

kern  :err   : [    1.737204] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.737323] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.737332] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.737340] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.737340] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.737341]   Arg0:   00000000bb8e7412 <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.737344]   Arg1:   00000000cb1837b2 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.737345]   Arg2:   000000009d43f637 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.737346]   Arg3:   00000000b74b9caa <Obj>           Buffer(4) 00 80 52 44

kern  :err   : [    1.737349] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.737467] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.737477] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.737484] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.737485] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.737485]   Arg0:   00000000b74b9caa <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.737488]   Arg1:   000000009d43f637 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.737489]   Arg2:   00000000cb1837b2 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.737490]   Arg3:   00000000bb8e7412 <Obj>           Buffer(4) 00 90 52 44

kern  :err   : [    1.737493] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.737611] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.737621] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.737628] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.737629] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.737629]   Arg0:   00000000bb8e7412 <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.737632]   Arg1:   00000000cb1837b2 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.737634]   Arg2:   000000009d43f637 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.737635]   Arg3:   00000000b74b9caa <Obj>           Buffer(4) 00 A0 52 44

kern  :err   : [    1.737637] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.737756] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.737766] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.737773] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.737774] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.737774]   Arg0:   00000000b74b9caa <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.737777]   Arg1:   000000009d43f637 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.737778]   Arg2:   00000000cb1837b2 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.737780]   Arg3:   00000000bb8e7412 <Obj>           Buffer(4) 00 B0 52 44

kern  :err   : [    1.737782] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.737901] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.737911] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.737919] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.737919] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.737919]   Arg0:   00000000bb8e7412 <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.737922]   Arg1:   00000000cb1837b2 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.737924]   Arg2:   000000009d43f637 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.737925]   Arg3:   00000000b74b9caa <Obj>           Buffer(4) 00 C0 52 44

kern  :err   : [    1.737928] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.738047] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.738056] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.738064] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.738065] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.738065]   Arg0:   00000000b74b9caa <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.738068]   Arg1:   000000009d43f637 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.738069]   Arg2:   00000000cb1837b2 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.738070]   Arg3:   00000000bb8e7412 <Obj>           Buffer(4) 00 D0 52 44

kern  :err   : [    1.738073] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.738192] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.738202] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.738209] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.738210] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.738210]   Arg0:   00000000bb8e7412 <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.738213]   Arg1:   00000000cb1837b2 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.738214]   Arg2:   000000009d43f637 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.738216]   Arg3:   00000000b74b9caa <Obj>           Buffer(4) 00 E0 52 44

kern  :err   : [    1.738218] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    1.738337] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    1.738347] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    1.738354] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    1.738355] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    1.738355]   Arg0:   00000000b74b9caa <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    1.738358]   Arg1:   000000009d43f637 <Obj>           Integer 0000000000000102
kern  :warn  : [    1.738360]   Arg2:   00000000cb1837b2 <Obj>           Integer 0000000000000010
kern  :warn  : [    1.738361]   Arg3:   00000000bb8e7412 <Obj>           Buffer(4) 00 F0 52 44

kern  :err   : [    1.738363] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    2.303458] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    2.303472] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    2.303480] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    2.303481] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    2.303482]   Arg0:   00000000bb8e7412 <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    2.303486]   Arg1:   000000005e44b2f7 <Obj>           Integer 0000000000000102
kern  :warn  : [    2.303487]   Arg2:   000000001666f675 <Obj>           Integer 0000000000000010
kern  :warn  : [    2.303489]   Arg3:   000000007db9d82a <Obj>           Buffer(4) 00 00 4B 56

kern  :err   : [    2.303492] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :err   : [    2.303615] ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.PEG1.PEGP._DSM.USRG], AE_ALREADY_EXISTS (20221020/dsfield-184)
kern  :err   : [    2.303625] ACPI Error: AE_ALREADY_EXISTS, CreateBufferField failure (20221020/dswload2-477)

kern  :warn  : [    2.303633] No Local Variables are initialized for Method [_DSM]

kern  :warn  : [    2.303633] Initialized Arguments for Method [_DSM]:  (4 arguments defined for method invocation)
kern  :warn  : [    2.303634]   Arg0:   000000007db9d82a <Obj>           Buffer(16) 75 0B A5 D4 C7 65 F7 46
kern  :warn  : [    2.303637]   Arg1:   000000001666f675 <Obj>           Integer 0000000000000102
kern  :warn  : [    2.303638]   Arg2:   000000005e44b2f7 <Obj>           Integer 0000000000000010
kern  :warn  : [    2.303639]   Arg3:   00000000bb8e7412 <Obj>           Buffer(4) 00 00 50 4F

kern  :err   : [    2.303642] ACPI Error: Aborting method \_SB.PC00.PEG1.PEGP._DSM due to previous error (AE_ALREADY_EXISTS) (20221020/psparse-529)
kern  :warn  : [    4.049202] nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
kern  :warn  : [    4.071680] asus_wmi: Failed to get WMI notify code: AE_NOT_FOUND
kern  :warn  : [    4.071681] asus_wmi: Failed to get event during flush: -5
kern  :err   : [    4.256642] snd_hda_intel 0000:00:1f.3: no codecs found!

THX in advance,

ToM

somejavadev commented 1 year ago

My dmesg logs are fairly clean:

sudo dmesg -x --color=always --level=err,warn

kern  :warn  : [    0.215427]  alsa-project/alsa-lib#17 alsa-project/alsa-lib#18 alsa-project/alsa-lib#19 alsa-project/alsa-lib#20 alsa-project/alsa-lib#21 alsa-project/alsa-lib#22 alsa-project/alsa-lib#23 alsa-project/alsa-lib#24 alsa-project/alsa-lib#25 alsa-project/alsa-lib#26 alsa-project/alsa-lib#27 alsa-project/alsa-lib#28 alsa-project/alsa-lib#29 alsa-project/alsa-lib#30 alsa-project/alsa-lib#31
kern  :warn  : [    0.263351] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
kern  :warn  : [    0.522861] hpet_acpi_add: no address or irqs in _CRS
kern  :warn  : [    0.529139] tpm_crb: probe of MSFT0101:00 failed with error 378
kern  :warn  : [    0.533730] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
kern  :warn  : [    0.533753] platform eisa.0: EISA: Cannot allocate resource for mainboard
kern  :warn  : [    0.533753] platform eisa.0: Cannot allocate resource for EISA slot 1
kern  :warn  : [    0.533754] platform eisa.0: Cannot allocate resource for EISA slot 2
kern  :warn  : [    0.533754] platform eisa.0: Cannot allocate resource for EISA slot 3
kern  :warn  : [    0.533755] platform eisa.0: Cannot allocate resource for EISA slot 4
kern  :warn  : [    0.533755] platform eisa.0: Cannot allocate resource for EISA slot 5
kern  :warn  : [    0.533756] platform eisa.0: Cannot allocate resource for EISA slot 6
kern  :warn  : [    0.533756] platform eisa.0: Cannot allocate resource for EISA slot 7
kern  :warn  : [    0.533756] platform eisa.0: Cannot allocate resource for EISA slot 8
kern  :warn  : [    0.774138] acpi PNP0C14:06: duplicate WMI GUID 97845ED0-4E6D-11DE-8A39-0800200C9A66 (first instance was on PNP0C14:02)
kern  :warn  : [    0.786894] usb: port power management may be unreliable
kern  :warn  : [    0.788325] nvme nvme1: missing or invalid SUBNQN field.
kern  :err   : [    0.808626] i2c i2c-2: Failed to register i2c client ITE8853:00 at 0x4e (-16)
kern  :warn  : [    7.749647] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=1 'systemd'
kern  :warn  : [    7.767034] block nvme0n1: the capability attribute has been deprecated.
daemon:warn  : [    7.805703] systemd[1]: Configuration file /lib/systemd/system/urbackupclientbackend.service is marked executable. Please remove executable permission bits. Proceeding anyway.
syslog:warn  : [    7.986212] systemd-journald[592]: File /var/log/journal/1a3c567e85da4f0b9d38eb143bdffa10/system.journal corrupted or uncleanly shut down, renaming and replacing.
kern  :err   : [    8.062349] Serial bus multi instantiate pseudo device driver INT3515:00: error -ENXIO: IRQ index 1 not found
kern  :err   : [    8.062381] Serial bus multi instantiate pseudo device driver INT3515:00: error -ENXIO: Error requesting irq at index 1
kern  :warn  : [    8.091553] asus_wmi: Failed to get WMI notify code: AE_NOT_FOUND
kern  :warn  : [    8.091553] asus_wmi: Failed to get event during flush: -5
kern  :warn  : [    8.105483] iwlwifi 0000:00:14.3: api flags index 2 larger than supported by driver
kern  :err   : [    8.284262] snd_hda_intel 0000:00:1f.3: no codecs found!
kern  :warn  : [    8.299278] thermal thermal_zone1: failed to read out thermal zone (-61)
kern  :err   : [    8.306945] iwlwifi 0000:00:14.3: WRT: Invalid buffer destination
kern  :warn  : [    9.332786] amdgpu 0000:03:00.0: Direct firmware load for amdgpu/gc_11_0_0_mes_2.bin failed with error -2
kern  :err   : [    9.661834] Bluetooth: hci0: Malformed MSFT vendor event: 0x02
kern  :warn  : [   10.350337] amdgpu: SRAT table not found
kern  :warn  : [   16.583397] kauditd_printk_skb: 46 callbacks suppressed
Nightwing0815 commented 1 year ago

For the devs, here's an output of alsa-info script

perexg commented 1 year ago

USB ID 0b05:1a52 is covered in UCM: https://github.com/alsa-project/alsa-ucm-conf/blob/fbe59343b1cbdd271219fb23beab8749f37d480d/ucm2/USB-Audio/USB-Audio.conf#L58

You should select HiFi + S/PDIF Output . If you don't see HiFi, you are probably using legacy pa/pw profile which does not cover the s/pdif output for this device. Check if you have UCM configuration files installed. Moving to alsa-ucm-conf.

perexg commented 1 year ago

Note that this entry was added in version 1.2.10.

BrettRyland commented 1 year ago

That would explain why it's not working on Ubuntu 23.04, which is using 1.2.6.3.

brett@brett-home:~/Downloads$ apt-cache policy alsa-ucm-conf
alsa-ucm-conf:
  Installed: 1.2.6.3-1ubuntu9.1
  Candidate: 1.2.6.3-1ubuntu9.1
  Version table:
 *** 1.2.6.3-1ubuntu9.1 500
        500 http://no.archive.ubuntu.com/ubuntu lunar-updates/main amd64 Packages
        500 http://no.archive.ubuntu.com/ubuntu lunar-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1.2.6.3-1ubuntu8 500
        500 http://no.archive.ubuntu.com/ubuntu lunar/main amd64 Packages
        500 http://no.archive.ubuntu.com/ubuntu lunar/main i386 Packages
brett@brett-home:~/Downloads$ lsusb | grep '0b05:1a52'
Bus 001 Device 002: ID 0b05:1a52 ASUSTek Computer, Inc. USB Audio
brett@brett-home:~/Downloads$ grep -rI '0b05:1a52' /usr/share/alsa/
brett@brett-home:~/Downloads$ sudo inxi --audio --machine --system | grep Z790  # Note: Z790-F not Z790-E
  Mobo: ASUSTeK model: ROG STRIX Z790-F GAMING WIFI v: Rev 1.xx

Can we just add that entry into one of the files under /usr/share/alsa/ to get this working or do we need to wait for Ubuntu 23.10?

perexg commented 1 year ago

1.2.6 is almost two years old. I would recommend to use alsa-lib 1.2.8+ for latest configs.

BrettRyland commented 1 year ago

According to https://packages.ubuntu.com/search?searchon=sourcenames&keywords=alsa-lib, the binary packages for Ubuntu 23.04 (lunar) are using 1.2.8 for libasound2, but the package for alsa-ucm-conf seems somewhat behind. This could then be a packaging issue for Ubuntu, maybe? The next version of Ubuntu looks to be switching to 1.2.9 for both.

BrettRyland commented 1 year ago

OK. I did a release upgrade to Ubuntu 23.10 (libasound2=1.2.9-2, alsa-ucm-conf=1.2.9-1ubuntu1) and now I get the "HiFi 5.1 channels" profile. However, it doesn't work correctly when testing with the HE-AAC Bitstream (from https://www2.iis.fraunhofer.de/AAC/multichannel.html).

Nightwing0815 commented 1 year ago

@perexg @BrettRyland

Thank you both for your effort, but I've got one question: Whats the right way to update the libs and ucm with linuxmint, which is based on 22.04? Just deleting files and extract the new ones seems not right, am I right?

ToM

somejavadev commented 1 year ago

@Nightwing0815 did you manage to update yours?

Nightwing0815 commented 1 year ago

@somejavadev sadly: no I don't know, which files i have to overwrite, or which packages are to update ignoring dependencies... Did you manage to update yours?

somejavadev commented 1 year ago

@Nightwing0815 not as yet, looking at building alsa locally but not sure if that would resolve the issue. I am on ubuntu 22.04. @perexg or @BrettRyland do you perhaps have an idea on the best approach here and which steps to take? I loaded Fedora 38 but it also seems to have the same issue.

BrettRyland commented 1 year ago

@Nightwing0815 not as yet, looking at building alsa locally but not sure if that would resolve the issue. I am on ubuntu 22.04. @perexg or @BrettRyland do you perhaps have an idea on the best approach here and which steps to take?

You could upgrade ubuntu to the devel-release version like I did with sudo do-release-upgrade -d. It has the caveats that I mentioned above though.

Nightwing0815 commented 1 year ago

@BrettRyland I have LinuxMint 21.2 (latest release) and i want to stay with mint, so is there a solution to only upgrade the whole alsa libs and configs, without updating operating system?

BrettRyland commented 1 year ago

@BrettRyland I have LinuxMint 21.2 (latest release) and i want to stay with mint, so is there a solution to only upgrade the whole alsa libs and configs, without updating operating system?

For Ubuntu, it was a matter of upgrading libasound2 and alsa-ucm-conf (plus whatever dependencies) to version 1.2.9 from versions 1.2.8 and 1.2.6 respectively. I don't know how LinuxMint's package versions are related to Ubuntu's, but if you can get those upgraded to more recent versions such that /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf (or similar) contains an entry for 0b05:1a52, e.g.,

$ grep '0b05:1a52' /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf 
                # 0b05:1a52 ASUS ROG Strix Z790-E Gaming Wifi

then I think it ought to work.

somejavadev commented 1 year ago

Thanks @BrettRyland I have installed from source the following (Ubuntu LTS 22.04):

alsa-lib alsa-utils alsa-ucm-conf

Install dependencies:

sudo apt install build-essential libfuse2 automake libtool apt-file libglib2.0-dev-bin gettext libncurses5-dev git libglib2.0-dev-bin gir1.2-gtk-2.0 libgtk2.0-dev libglib2.0-dev libfltk1.3-dev libfltk1.3

Configure git config:

git config --global core.eol lf
git config --global core.autocrlf false

Compile Install Alsa Lib

git clone https://github.com/alsa-project/alsa-lib.git
cd alsa-lib
git checkout -b tags/v1.2.10 v1.2.10
./gitcompile
sudo make install

Compile Install alsa-utils

git clone https://github.com/alsa-project/alsa-utils.git
cd alsa-utils
git checkout -b tags/v1.2.10 v1.2.10
./gitcompile
sudo make install

Install alsa-ucm-conf

wget ttps://github.com/alsa-project/alsa-ucm-conf/archive/refs/tags/v1.2.10.tar.gz
tar xvzf v1.2.10.tar.gz -C /usr/share/alsa --strip-components=1 --wildcards "*/ucm" "*/ucm2"

I can see my alasa-mixer (v1.2.10) have been successfully updated:

Screenshot from 2023-09-10 14-41-22

I don't see the HiFi options in pavucontrol (version 5.0)

Screenshot from 2023-09-10 14-43-46

Although I am not entirely sure my libasound2 has been updated/installed correctly, is there a way to verify this?

I have tried cat /proc/asound/version which shows:

Advanced Linux Sound Architecture Driver Version k6.2.0-32-generic.

I can confirm the config is available by:

grep '0b05:1a52' /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf 
        # 0b05:1a52 ASUS ROG Strix X670E-F & Z790-E Gaming Wifi
BrettRyland commented 1 year ago

I don't know, sorry. It worked for me (albeit with the above mentioned caveats). I presume you have rebooted since then? I'm on kernel 6.4.6-060406-generic via Ubuntu's mainline project if that makes any difference. sudo inxi --audio --machine --system should give which version is being used, I think.

somejavadev commented 1 year ago

No problem at all, let me check upgrading the kernel and see if it makes a difference. What I did notice is if I run: sudo dmesg | grep 0b05 the results are:

[    3.969873] usb 1-6: New USB device found, idVendor=0b05, idProduct=1a53, bcdDevice= 0.14
[    5.541268] usb 1-11: New USB device found, idVendor=0b05, idProduct=18f3, bcdDevice= 1.00

The usb listed is off by one: 1a53 instead of the 1a52 although this card is listed in the UCM configs:

grep '0b05:1a53' /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf 
        # 0b05:1a53 ALC4082 on ASUS ROG Crosshair X670E Extreme
somejavadev commented 1 year ago

@BrettRyland thanks but unfortunately no luck this side. I updated the kernel and rebuilt the libraries without any luck. I could verify that the latest libs which I built are being loaded via alsa-info.sh --no-upload should anyone else want to verify theirs.

Nightwing0815 commented 1 year ago

@BrettRyland I get segmention fault error while compiling, even with oem kernel 6.5.0, so I'm not able to update ... Maybe I have to wait, til the newest alsa is into a newer kernel?

somejavadev commented 1 year ago

Update: I managed to get it to work although not perfectly or entirely. I followed these steps https://github.com/alsa-project/alsa-ucm-conf/issues/350#issuecomment-1712805898. Then it seems like the wrong sync was being used. I tested it by playing around with (It would be possible that the below work without even compiling to the latest version):

aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Center.wav
aplay -D plughw:1,1 /usr/share/sounds/alsa/Front_Center.wav
aplay -D plughw:1,2 /usr/share/sounds/alsa/Front_Center.wav

plughw:1,2 was the one working for me. Manually calling pacmd load-module module-alsa-sink device=hw:1,2 then makes the sound setting temporary persistent.

For some reason adding load-module module-alsa-sink device=hw:1,2 in my /etc/pulse/default.pa or ~/.config/pulse/default.pa file doesn't work to make it persistent.

It seems that my HDMI sound on my ATI 7900XT Graphics card keeps defaulting to the sync to use for some reason.

for now I have added a function in my .bashrc which I run once my PC is started

fix_sound() {
pacmd load-module module-alsa-sink device=hw:1,2
}

I still think the ucm2 configs are not being loaded since none of the HiFi profiles are shown. dmesg shows

[    3.894813] usb 1-6: New USB device found, idVendor=0b05, idProduct=1a53, bcdDevice= 0.14
[    3.894822] usb 1-6: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[    3.894825] usb 1-6: Product: USB Audio
[    3.894828] usb 1-6: Manufacturer: Generic

I am not entirely sure how the loading of the profiles work but it might be the regex in the in the USB-Audio.conf not picking up mine specifically. Mine is the rog-maximus-z790

USB Audio card: Realtek ALC4080/ALC4082

dougfulop commented 1 year ago

@somejavadev your pacmd load-module command was the only solution I've found so far to get SPDIF out on my Z790 Hero. The new USB Audio output device in pavucontrol works great. Thank you!

BrettRyland commented 1 year ago

Is there any progress on this for the ROG STRIX Z790-F GAMING WIFI? I have audio output via the S/PDIF with the HiFi 5.1 channels profile, but the rear channels are played over the front speakers.

Edit: note, the receiver is a Logitech Z-5500 and uses the "PLII Movie" effect. Previously (with pulseaudio instead of pipewire), I was able to passthrough the audio stream directly to the receiver which would then decode it properly.

Edit 2: while playing

$ mpv DTS\ 5.1.wav --loop
 (+) Audio --aid=1 (dts 6ch 44100Hz)
AO: [pipewire] 44100Hz 5.1 6ch floatp

I notice that the running sink only has 2 channels, despite the 5.1 profile being selected:

$ pactl list sinks | grep 'audio.position\|device.profile.name\|Name\|State'
  State: RUNNING
  Name: alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio_2__sink
    audio.position = "FL,FR"
    device.profile.name = "HiFi 5+1: hw:Audio,2: sink"
  State: SUSPENDED
  Name: alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio_1__sink
    audio.position = "FL,FR"
    device.profile.name = "HiFi 5+1: hw:Audio,1: sink"
  State: SUSPENDED
  Name: alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio__sink
    audio.position = "FL,FR,RL,RR,FC,LFE"
    device.profile.name = "HiFi 5+1: hw:Audio: sink"

The one with all 6 channels is the analogue out, which has the channels mixed up (it should be "FL,FR,FC,LFE,RL,RR"). The second one is headphones (I think). Is there some way to get the first one to use all 6 channels and to fix the order of the last one?

Nightwing0815 commented 10 months ago

Obviously, I had luck today with compiling, and with that command, I can hear a sound from my soundsystem: aplay -D plughw:1,2 /usr/share/sounds/alsa/Front_Center.wav

How can i tell pipewire, to use this hardware?

ToM

perexg commented 10 months ago

@Nightwing0815 : Could you show me amixer -c 1 info output ?

Nightwing0815 commented 10 months ago

@perexg : sure:

nightwing@Ultron:~$ amixer -c 1 info
Card sysdefault:1 'Audio'/'Generic USB Audio at usb-0000:00:14.0-2, high speed'
  Mixer name    : 'USB Mixer'
  Components    : 'USB0b05:1a52'
  Controls      : 29
  Simple ctrls  : 6

Command alsaucm dump text give me errors:

nightwing@Ultron:~$ alsaucm dump text
ALSA lib parser.c:2021:(parse_master_file) Incompatible syntax 6 in HDA-Intel.conf
ALSA lib main.c:1412:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -22
alsaucm: error failed to open sound card hw:0: Invalid argument

ToM

perexg commented 10 months ago

You should select the right soundcard for the alsaucm command: alsaucm -c hw:1 dump text . The 0b05:1a52 USB ID should use the device number 2 for S/PDIF in current configuration files: https://github.com/alsa-project/alsa-ucm-conf/blob/a0856afae4e8e071e7626958667cde049ec81e97/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf#L76-L83

Nightwing0815 commented 10 months ago

@perexg Sorry for that, but with your command, it won't change:

nightwing@Ultron:~$ alsaucm -c hw:1 dump text
ALSA lib parser.c:2021:(parse_master_file) Incompatible syntax 6 in HDA-Intel.conf
ALSA lib main.c:1412:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -22
alsaucm: error failed to open sound card hw:1: Invalid argument

Let me attach the alsa-info script, I think, this will help you a lot: click me softly

ToM

perexg commented 10 months ago

The card number is assigned dynamically and I just collected the number from your previous posts. Use aplay -l command or cat /proc/asound/cards to look for the current USB card number. With latest alsa-info, the number is 2.

Nightwing0815 commented 10 months ago
nightwing@Ultron:~$ alsaucm -c hw:2 dump text
ALSA lib parser.c:2021:(parse_master_file) Incompatible syntax 6 in USB-Audio.conf
ALSA lib main.c:1412:(snd_use_case_mgr_open) error: failed to import hw:2 use case configuration -22
alsaucm: error failed to open sound card hw:2: Invalid argument

nightwing@Ultron:~$ cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0x4001540000 irq 208
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0x93080000 irq 17
 2 [Audio          ]: USB-Audio - USB Audio
                      Generic USB Audio at usb-0000:00:14.0-2, high speed
nightwing@Ultron:~$ aplay -l 
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 1: NVidia [HDA NVidia], Gerät 3: HDMI 0 [HDMI 0]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: NVidia [HDA NVidia], Gerät 7: HDMI 1 [HDMI 1]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: NVidia [HDA NVidia], Gerät 8: HDMI 2 [HDMI 2]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: NVidia [HDA NVidia], Gerät 9: HDMI 3 [HDMI 3]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 2: Audio [USB Audio], Gerät 0: USB Audio [USB Audio]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 2: Audio [USB Audio], Gerät 1: USB Audio [USB Audio #1]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 2: Audio [USB Audio], Gerät 2: USB Audio [USB Audio #2]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 2: Audio [USB Audio], Gerät 3: USB Audio [USB Audio #3]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
perexg commented 10 months ago

As discussed many times here. You are using old version of alsa-lib package. I cannot help you.

Nightwing0815 commented 10 months ago

I just compiled the 1.2.10 version, is there a newer one?

perexg commented 10 months ago

But it's not installed in your system. 1.2.8+ should be fine.

Nightwing0815 commented 10 months ago

Okay thank you very much. I think, I need to wait til may, when linuxmint will use the ubuntu 24.04 base, am I right?

ToM

Nightwing0815 commented 10 months ago

@perexg got a hint in mint-forums for a workaround

I've got now SPDIF working, only on 2 front channels, no profile available, no pcm. But it's a huge progress! Now, I don't need to turn on my TV for listening to music. :+1:

Here's my new output from command alsaucm -c hw:2 dump text:

nightwing@Ultron:~$ alsaucm -c hw:2 dump text
ALSA lib parser.c:1866:(parse_master_section) unknown field 0g0�� in master section
ALSA lib parser.c:937:(parse_sequence) error: sequence command 'disdevall' is ignored
Verb.HiFi {
    Device.Speaker {
        Comment Speakers
        Values {
            CaptureCTL "_ucm0001.hw:Audio"
            JackControl "Speaker - Output Jack"
            PlaybackCTL "_ucm0001.hw:Audio"
            PlaybackChannels 2
            PlaybackMixerElem PCM,0
            PlaybackPCM "_ucm0001.hw:Audio"
            PlaybackPriority 200
            TQ HiFi
        }
    }
    Device.Headphones {
        Comment "Front Headphones"
        Values {
            CaptureCTL "_ucm0001.hw:Audio"
            JackControl "Headphone - Output Jack"
            PlaybackCTL "_ucm0001.hw:Audio"
            PlaybackMixerElem PCM,1
            PlaybackPCM "_ucm0001.hw:Audio,1"
            PlaybackPriority 300
            TQ HiFi
        }
    }
    Device.SPDIF {
        Comment "S/PDIF Output"
        Values {
            CaptureCTL "_ucm0001.hw:Audio"
            PlaybackCTL "_ucm0001.hw:Audio"
            PlaybackMixerElem PCM,2
            PlaybackPCM "_ucm0001.hw:Audio,2"
            PlaybackPriority 100
            TQ HiFi
        }
    }
    Device.Line1 {
        Comment "Line Input"
        Values {
            CaptureCTL "_ucm0001.hw:Audio"
            CaptureMixerElem Line,0
            CapturePCM "_ucm0001.hw:Audio,1"
            CapturePriority 100
            JackControl "Line - Input Jack"
            PlaybackCTL "_ucm0001.hw:Audio"
            TQ HiFi
        }
    }
    Device.Mic1 {
        Comment Microphone
        Values {
            CaptureCTL "_ucm0001.hw:Audio"
            CaptureMixerElem Mic,0
            CapturePCM "_ucm0001.hw:Audio,2"
            CapturePriority 300
            JackControl "Mic - Input Jack"
            PlaybackCTL "_ucm0001.hw:Audio"
            TQ HiFi
        }
    }
}

ToM

perexg commented 10 months ago

Thanks for this update.

I'm closing this bug, because things seem to be fixed. The support for ubuntu/debian with old libraries is really pain. The Syntax changes are not recommended, because other USB hardware variants are using newer configuration syntax, so you can screw things for other USB hardware.

BrettRyland commented 10 months ago

Should I open a new issue for the misconfiguration that I reported above then?

apt-cache policy alsa-utils ``` alsa-utils: Installed: 1.2.9-1ubuntu1 Candidate: 1.2.9-1ubuntu1 Version table: *** 1.2.9-1ubuntu1 500 500 http://no.archive.ubuntu.com/ubuntu mantic/main amd64 Packages 100 /var/lib/dpkg/status ```
amixer -c 1 info ``` Card sysdefault:1 'Audio'/'Generic USB Audio at usb-0000:00:14.0-2, high speed' Mixer name : 'USB Mixer' Components : 'USB0b05:1a52' Controls : 29 Simple ctrls : 6 ```
alsaucm -c hw:1 dump text ``` Verb.HiFi { Comment "HiFi 2.0 channels" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 2 PlaybackMixerElem PCM,0 PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 TQ HiFi } } Device.Headphones { Comment "Front Headphones" Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Headphone - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,1 PlaybackPCM "_ucm0001.hw:Audio,1" PlaybackPriority 300 TQ HiFi } } Device.SPDIF { Comment "S/PDIF Output" Values { CaptureCTL "_ucm0001.hw:Audio" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,2 PlaybackPCM "_ucm0001.hw:Audio,2" PlaybackPriority 100 TQ HiFi } } Device.Line1 { Comment "Line Input" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line,0 CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic,0 CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 300 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } } Verb."HiFi 5+1" { Comment "HiFi 5.1 channels" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 6 PlaybackMixerElem PCM,0 PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 TQ HiFi } } Device.Headphones { Comment "Front Headphones" Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Headphone - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,1 PlaybackPCM "_ucm0001.hw:Audio,1" PlaybackPriority 300 TQ HiFi } } Device.SPDIF { Comment "S/PDIF Output" Values { CaptureCTL "_ucm0001.hw:Audio" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,2 PlaybackPCM "_ucm0001.hw:Audio,2" PlaybackPriority 100 TQ HiFi } } Device.Line1 { Comment "Line Input" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line,0 CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic,0 CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 300 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } } Verb."HiFi 7+1" { Comment "HiFi 7.1 channels" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 8 PlaybackMixerElem PCM,0 PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 TQ HiFi } } Device.Headphones { Comment "Front Headphones" Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Headphone - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,1 PlaybackPCM "_ucm0001.hw:Audio,1" PlaybackPriority 300 TQ HiFi } } Device.SPDIF { Comment "S/PDIF Output" Values { CaptureCTL "_ucm0001.hw:Audio" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,2 PlaybackPCM "_ucm0001.hw:Audio,2" PlaybackPriority 100 TQ HiFi } } Device.Line1 { Comment "Line Input" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line,0 CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic,0 CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 300 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } } ```
perexg commented 10 months ago

For S/PDIF device: The audio server should take UCM devices named as SPDIF (or SPDIF1/SPDIF2 etc.) as digital outputs and look for IEC958 controls to set the pass-through mode. It's not UCM thing. You should ask sound server developers to add proper support for the S/PDIF pass-through mode.

For channel positions (analog device): ALSA API has PCM channel mapping extension. For USB devices, the positions should be described in USB descriptors. Thus the driver is responsible to pass correct positions to applications. You may check /proc/asound/card?/stream? contents to get the positions obtained from hardware. If hardware does not provide correct list, we may eventually override this in UCM or driver. The driver is definitely best option, because all installations (even without UCM/sound servers) can benefit from it. So, I suggest to create a new discussion at linux-sound@vger.kernel.org about this issue. Also pipewire probably does not support channel mapping API by default: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2648 . But it's sound server issue.

BrettRyland commented 10 months ago

Ok, thanks.

For anyone coming across this later, creating the following config for wireplumber fixed my channel positions issue:

~/.config/wireplumber/main.lua.d/51-ASUS-RoG-Strix-Z790-F.lua ``` rule = { matches = { { { "node.name", "matches", "alsa_output.usb-Generic_USB_Audio-00.HiFi_5_1__hw_Audio__sink"}, { "device.profile.description", "matches", "Speakers" }, }, }, apply_properties = { ["api.alsa.use-chmap"] = true, }, } table.insert(alsa_monitor.rules,rule) ``` where the `"matches"` values come from examining `pactl list sinks`.
perexg commented 10 months ago

Could you report this to pipewire ? UCM devices should have use-chmap flag enabled by default.

BrettRyland commented 10 months ago

Could you report this to pipewire ? UCM devices should have use-chmap flag enabled by default.

OK, reported here 3801.

dtl131 commented 9 months ago

@perexg : I'm a bit confused on why the OP did not have the necessary components for libasound 1.2.10 after installing it manually and the ALSA info reporting 1.2.10 for the version of ALSA lib.

I was going to tell the OP to try upgrading libasound through PPA, but I wasn't sure if that would work since the user built and installed alsa-lib locally. https://launchpad.net/~dtl131/+archive/ubuntu/mediahacks2?field.series_filter=jammy