You are not logged in.

#1 2021-04-06 20:32:21

x_driver
Member
Registered: 2019-02-05
Posts: 2

Default ALSA sound card, device, subdevice

Per the wiki I can set the default card to "card 1: NVidia."  What I can't seem to do is set a default device, i.e. "card 1:  NVidia, device 3."  After waking from suspend or rebooting, sometimes "device 3" is being used and other times it is "device 7."  Compare the 2 outputs of aplay -l below and you can see that originally device 7 is being used, then after a suspend cycle device 3 is being used. 

[family@HTPC ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[family@HTPC Downloads]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I also referenced the link below to try and set a device but no success.

https://alsa.opensrc.org/Asoundrc#Default_PCM_device

What am I missing in order to have the NVidia card use a persistent device?

Offline

#2 2021-04-06 20:51:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,505

Re: Default ALSA sound card, device, subdevice

You can additionally pass the "device" in alsa config, however if I'm interpreting this right the issue is that the actual device nvidia registers as the connected ALSA device shifts between suspension cycles.

You probably want to use something with more flexibility. Though I do find it weird that this can be random here if that is the case you probably don't get around using something that actively keeps track of the actual device connected like pipewire or pulseaudio

Last edited by V1del (2021-04-06 20:52:02)

Offline

#3 2021-04-06 21:05:53

x_driver
Member
Registered: 2019-02-05
Posts: 2

Re: Default ALSA sound card, device, subdevice

Trying everything I can to avoid pulseaudio.  I had been using Gnome and other desktop environments with pulse as a dependency and just wasn't happy with the results.  The computer is used exclusively as a home theater pc so passthrough audio is quite important.  Now it's just an Arch install with i3 as the window manager that runs Kodi.

I'd entertain pipewire.  I know it's new and not much else about it.

And yes, you are correct, the actual device that Nvidia registers as connected shifts between suspension cycles.  So sometimes, not always, after a suspend cycle I'll have to manually select either HDMI 0 or HDMI 1 from the audio menu within Kodi, both of which are on the same Nvidia card.

card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Offline

Board footer

Powered by FluxBB