Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED]no sound - Unable to set hw params for playback (Read 5307 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED]no sound - Unable to set hw params for playback

hi, i did a fresh install with the last iso available, then upgrade with pacman -Syu --overwrite /usr/lib\*/p11-kit-trust.so, cause nss: /usr/lib/p11-kit-trust.so exists in filesystem.
i got no sound.
Code: [Select]
speaker-test

speaker-test 1.2.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 8544000
Period size range from 32 to 4272000
Using max buffer size 8544000
Periods = 4
Unable to set hw params for playback: Cannot allocate memory
Setting of hwparams failed: Cannot allocate memory
Code: [Select]
$ cat /proc/asound/pcm
00-03: HDMI 0 : HDMI 0 : playback 1
01-00: ALC887-VD Analog : ALC887-VD Analog : playback 1 : capture 1
01-01: ALC887-VD Digital : ALC887-VD Digital : playback 1
01-02: ALC887-VD Alt Analog : ALC887-VD Alt Analog : capture 1

$ cat /proc/asound/cards
 0 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfe964000 irq 46
 1 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfe960000 irq 47

$ cat /proc/asound/devices
  2: [ 0- 3]: digital audio playback
  3: [ 0- 0]: hardware dependent
  4: [ 0]   : control
  5: [ 1- 0]: digital audio playback
  6: [ 1- 0]: digital audio capture
  7: [ 1- 1]: digital audio playback
  8: [ 1- 2]: digital audio capture
  9: [ 1- 0]: hardware dependent
 10: [ 1]   : control
 33:        : timer

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$  lsmod | grep '^snd' | column -t
snd_hda_codec_realtek  126976  1  
snd_hda_codec_generic  94208   1   snd_hda_codec_realtek
snd_hda_codec_hdmi     73728   1  
snd_hda_intel          57344   1  
snd_intel_dspcfg       28672   1   snd_hda_intel
snd_hda_codec          163840  4   snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core           106496  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                143360  4   snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              40960   1   snd_pcm
snd                    110592  10  snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
Code: [Select]
$  amixer
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 45 [70%] [-19.00dB] [off]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Front 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 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Line 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 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 28 [61%] [12.00dB] [on]
  Front Right: Capture 28 [61%] [12.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 0 [0%] [-16.00dB] [off]
  Front Right: Capture 0 [0%] [-16.00dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Channel Mode',0
  Capabilities: enum
  Items: '2ch' '4ch' '6ch'
  Item0: '2ch'
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Rear 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]

then create the /etc/asound.conf
Code: [Select]
pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}

doesnt work so:
Code: [Select]
pcm.!default {
    type plug
        slave {
                pcm "hw:0,3"
        }
}

ctl.!default {
    type hw
    card 1
}
with this last config i got no error when
Code: [Select]
 aplay /usr/share/sounds/alsa/Noise.wav 
Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
but still same error when speaker test

Code: [Select]
$ uname -r
5.6.4-artix1-1
$ groups myuser
log network scanner power users wheel audio optical lp storage video autologin myuser

more info here http://alsa-project.org/db/?f=a8a6b5159bc99406b3c0afeb9ce8777ee290cf2d
thanks

Re: no sound - Unable to set hw params for playback

Reply #1
Do you have just one card? I am using pulseaudio, no asound.conf file and also have pulseaudio-Alda from AUR installed

Re: no sound - Unable to set hw params for playback

Reply #2
i suppose there are 2 cards: HDMI and Generic, as you can see above.
about pulseaudio... i don't touch anything, i repeat, did a fresh install n then pacman -Syyu.

$ ps -C pulseaudio
  PID TTY          TIME CMD
$ pulseaudio
bash: pulseaudio: command not found
$ pactl list
Connection failure: Connection refused
pa_context_connect() failed: Connection refused


Re: no sound - Unable to set hw params for playback

Reply #3
Not sure why you can't even see pactl list, with my user account I can. Check alsamixer to make sure audio settings are not muted and not too low in volume to hear

Re: no sound - Unable to set hw params for playback

Reply #4
checked
i run $ aplay /whatever.wav
and then
$dmesg
[  191.326333] snd_hda_intel 0000:00:01.1: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.

that line is new in kernel log

news: it seems like a kernel bug https://bugzilla.kernel.org/show_bug.cgi?id=207223

edit: after updates and trying to fix, i delete the /etc/asound.conf and now is working again