You are not logged in.

#1 2021-07-30 00:47:43

zwa
Member
Registered: 2005-12-05
Posts: 106

[Solved]Amd renoir no audio, (snd_pcm_dmix_open) unable to open slave

Using alsa directly, not pulseaudio (AFAIK)

pacman -Qs pulse

local/libcanberra 0.30+2+gc0620e4-5
    A small and lightweight implementation of the XDG Sound Theme Specification
local/libpulse 15.0-1
    A featureful, general-purpose sound server (client library)

inxi:

Audio:     Device-1: Advanced Micro Devices [AMD/ATI] vendor: Lenovo driver: snd_hda_intel v: kernel bus-ID: 03:00.1
           Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Lenovo driver: N/A
           bus-ID: 03:00.5
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel
           bus-ID: 03:00.6
           Sound Server-1: ALSA v: k5.13.5-arch1-1 running: yes
           Sound Server-2: JACK v: 1.9.19 running: no
           Sound Server-3: PulseAudio v: 15.0 running: no

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC257 Analog [ALC257 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

lsmod|grep snd

snd_hda_codec_realtek   155648  1
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_codec_hdmi     73728  1
snd_hda_intel          57344  0
snd_intel_dspcfg       28672  1 snd_hda_intel
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
snd_hda_codec         176128  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          110592  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               147456  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              45056  1 snd_pcm
snd                   114688  8 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
snd_rn_pci_acp3x       20480  0
snd_pci_acp3x          20480  0
soundcore              16384  1 snd

dmesg|grep -i -E "snd|audio|hd|sound|alsa"

[    0.192592] NMI watchdog: Enabled. Permanently consumes one hw-PMU counter.
[    0.210225] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    1.153382] sp5100_tco: SP5100/SB800 TCO WatchDog Timer Driver
[    1.153488] sp5100-tco sp5100-tco: Using 0xfeb00000 for watchdog MMIO address
[    1.153594] snd_rn_pci_acp3x 0000:03:00.5: enabling device (0000 -> 0002)
[    1.255978] snd_hda_intel 0000:03:00.1: enabling device (0000 -> 0002)
[    1.256083] snd_hda_intel 0000:03:00.1: Handle vga_switcheroo audio client
[    1.256254] snd_hda_intel 0000:03:00.6: enabling device (0000 -> 0002)
[    1.264292] input: HD-Audio Generic HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:08.1/0000:03:00.1/sound/card0/input10
[    1.412508] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC257: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    1.412513] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    1.412514] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    1.412515] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    1.412516] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    1.412517] snd_hda_codec_realtek hdaudioC1D0:      Mic=0x19
[    1.412518] snd_hda_codec_realtek hdaudioC1D0:      Internal Mic=0x12
[    1.505015] input: HD-Audio Generic Mic as /devices/pci0000:00/0000:00:08.1/0000:03:00.6/sound/card1/input11
[    1.505111] input: HD-Audio Generic Headphone as /devices/pci0000:00/0000:00:08.1/0000:03:00.6/sound/card1/input12
[    2.249587] snd_hda_intel 0000:03:00.1: bound 0000:03:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])

amixer -c 1

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 39 [62%] [12.00dB] [on]
  Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]

aplay /usr/share/sounds/alsa/Front_Center.wav

ALSA lib pcm_dmix.c:1035:(snd_pcm_dmix_open) unable to open slave
aplay: main:831: audio open error: No such file or directory

ls -lh /usr/share/sounds/alsa/Front_Center.wav

-rw-r--r-- 1 root root 134K Jun 14 18:43 /usr/share/sounds/alsa/Front_Center.wav

alsactl init 0

alsa-lib parser.c:242:(error_node) UCM is not supported for this HDA model (HD-Audio Generic at 0xfd4c8000 irq 74)
alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -6
Found hardware: "HDA-Intel" "ATI R6xx HDMI" "HDA:1002aa01,00aa0100,00100700" "0x17aa" "0x3802"
Hardware is initialized using a generic method

alsactl init 1

alsa-lib parser.c:242:(error_node) UCM is not supported for this HDA model (HD-Audio Generic at 0xfd4c0000 irq 75)
alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -6
Found hardware: "HDA-Intel" "Realtek ALC257" "HDA:10ec0257,17aa38bb,00100001" "0x17aa" "0x3805"
Hardware is initialized using a generic method

Last edited by zwa (2021-07-30 04:00:33)

Offline

#2 2021-07-30 04:00:15

zwa
Member
Registered: 2005-12-05
Posts: 106

Re: [Solved]Amd renoir no audio, (snd_pcm_dmix_open) unable to open slave

Solved by writing

options snd_hda_intel index=1

to /etc/modprobe.d/default.conf

Offline

#3 2021-10-03 13:49:48

freaxtux
Member
Registered: 2012-07-17
Posts: 38

Re: [Solved]Amd renoir no audio, (snd_pcm_dmix_open) unable to open slave

Thanks! I was using another workaround and then accidentally stumbled upon this thread. Your solution works like a charm big_smile
My system is Asus Q407IQ, Ryzen 5 4500U.

My workaround was from https://www.linux.org/threads/solved-as … lem.27384/ (involving hda-verb).
I still don't understand how it works but it was quite noisy, somewhat low quality, and wasn't permanent
(yes you could put it in an autorun script or cron but I'm not a fan of creating one, especially when it requires root permission and is something I don't understand - what if it b0rks something one day?!)

EDIT 220424: After some time, it only worked some of the time, and then later it started not working at all tongue.
Leaving this edit here, seeing this post sometimes show up on google search: The hda-verb workaround seems to be legit.
After following a few chain of sources, I could find it mainlined into the kernel for some other laptop models:
https://git.kernel.org/pub/scm/linux/ke … cbce5463cc

Last edited by freaxtux (2022-04-24 12:10:16)

Offline

Board footer

Powered by FluxBB