You are not logged in.

#1 2017-03-22 16:06:52

Lans9831
Member
Registered: 2017-03-07
Posts: 6

[SOLVED] Sometimes cards index change (aplay -l)

Hey, I have one problem with sound.
Sometime after shuting down pc or rebooting the cards index change when I use

 aplay -l 

This is a problem for me, because I need to load modules manually in default.pa

For example, first time I did that with aplay -l

 
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: STAC9221 A2 Analog [STAC9221 A2 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: STAC9221 A2 Digital [STAC9221 A2 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I put this on my default.pa

 
...

load-module module-alsa-sink device=hw:0,0 sink_name=analog_output
set-default-sink analog_output

...

But sometimes cards index just change and output from aplay -l verifies that

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: Intel [HDA Intel], device 0: STAC9221 A2 Analog [STAC9221 A2 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: Intel [HDA Intel], device 1: STAC9221 A2 Digital [STAC9221 A2 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

So now pulseaudio can't load modules manually and it fails.

Is there any way for making card index don't change like that ?
Or maybe I have to do an script that read index card first and then manually load modules?

Last edited by Lans9831 (2017-03-24 18:42:37)

Offline

#2 2017-03-22 20:33:48

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: [SOLVED] Sometimes cards index change (aplay -l)

Try hw:Intel,0 instead (or hw:HDMI if that's what you want).

Or see here.

BTW, it seems index 0 is missing in the second case. I think it shouldn't happen unless you had some USB audio gadget connected during bootup which later got removed.

Last edited by mich41 (2017-03-22 20:37:03)

Offline

#3 2017-03-22 20:45:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,676

Re: [SOLVED] Sometimes cards index change (aplay -l)

hmmm? Why do you need to load modules manually in pulseaudio? I very much doubt that. in general to define a correct index order you set up the indexes on a per module basis in modprobe: https://wiki.archlinux.org/index.php/Ad … sound_card but we should still focus on why you think that you have to load the pulse module manually, why do you think you need to do that, what is your usecase? there might be a better solution than what you are attempting to do here.

Edit: Ahh we have the fallout from: https://bbs.archlinux.org/viewtopic.php?id=223842 as I told you there, this isn't really a good way to try and fix that. Remove the manual load and default sink set again, then reboot, then post

pacmd list-cards
pacmd list-sinks

(or better yet after the reboot use this command:

pacmd set-card-profile alsa_card.pci-0000_00_1b.0  output:analog-stereo+input:analog-stereo

) and make sure you install pavucontrol, it will help you visualize the dependencies and relations better (you could do the same thing I told you with that command in the Configuration tab of pavucontrol)

Last edited by V1del (2017-03-22 20:58:40)

Offline

#4 2017-03-24 18:42:11

Lans9831
Member
Registered: 2017-03-07
Posts: 6

Re: [SOLVED] Sometimes cards index change (aplay -l)

I installed pavucontrol, and finally can set the porperty configuration for my audio (Duplex) now OP's theme is useless.

Offline

Board footer

Powered by FluxBB