Skip to main content
Topic: How to configure pulse for volume controls (Read 809 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to configure pulse for volume controls

Hey guys, I have this problem with all of my computers and it drives me nuts and I don't know why I've ignored it so long, what can I do to make my volume control actually control the right device? I have 2 computers running Artix, in alsamixer it shows my volume buttons are controlling 'PCM', I can see S/PDIF that I want on but it doesn't switch over to it. In Pavucontrol I have all the other sound devices disabled and I've got it set to only S/PDIF + made default, but the volume control buttons don't actually slide that device's volume. On my main desktop, it only controls the audio line out and won't let me control the volume of the TV. I have tried playing with ~/.config/pulse/default.pa and adding set-default-sink output 0, set-default-sink 0 and nothing works. I've also tried adding the alsa_output.usb-C-Media_INC._USB_Sound_Device-00.iec958-ac3-surround-51 & module-alsa-card.c with set-default-sink and set-default-sink output infront of it

Re: How to configure pulse for volume controls

Reply #1
This one is my main desktop, where I can't configure the nvidia sound to be default and it only controls the audio-jack:
https://imgur.com/a/WyFtdBS


this is from my side PC where I can't configure the S/PDIF USB port to be my default sound device, this one has a 'PCM' I can control the volume of but it does nothing and the volume doesn't actually change, it stays still in pavucontrol and the videos I play the volume doesn't change either
https://imgur.com/a/SqJo84K

Re: How to configure pulse for volume controls

Reply #2
On either computer changing these around does nothing, and on my main PC it doesn't even see a channel for the nvidia card which is weird because sound comes through it and pavucontrol can see it just fine. I just want my volume control on the keyboard to register with the actual audio device.
https://imgur.com/a/axwi3us

Re: How to configure pulse for volume controls

Reply #3
main computer:
Code: [Select]
Found hardware: "HDA-Intel" "Realtek ALC887-VD" "HDA:10ec0887,10438444,00100302" "0x1043" "0x8444"
Hardware is initialized using a generic method
Found hardware: "HDA-Intel" "Nvidia GPU 83 HDMI/DP" "HDA:10de0083,38425671,00100100" "0x3842" "0x5671"
Hardware is initialized using a generic method
alsactl info
#
# Sound card
#
- card: 0
  id: SB
  name: HDA ATI SB
  longname: HDA ATI SB at 0xfe300000 irq 16
  driver_name: HDA-Intel
  mixer_name: Realtek ALC887-VD
  components: HDA:10ec0887,10438444,00100302
  controls_count: 51
  pcm:
    - stream: PLAYBACK
      devices:
        - device: 0
          id: ALC887-VD Analog
          name: ALC887-VD Analog
          subdevices:
            - subdevice: 0
              name: subdevice #0
        - device: 1
          id: ALC887-VD Digital
          name: ALC887-VD Digital
          subdevices:
            - subdevice: 0
              name: subdevice #0
    - stream: CAPTURE
      devices:
        - device: 0
          id: ALC887-VD Analog
          name: ALC887-VD Analog
          subdevices:
            - subdevice: 0
              name: subdevice #0
        - device: 2
          id: ALC887-VD Alt Analog
          name: ALC887-VD Alt Analog
          subdevices:
            - subdevice: 0
              name: subdevice #0
alsactl: rawmidi_device_list:105: snd_ctl_rawmidi_next_device

Re: How to configure pulse for volume controls

Reply #4
Side PC(I want this one to use the USB):

Code: [Select]
Found hardware: "USB-Audio" "USB Mixer" "USB0d8c:0103" "" ""
Hardware is initialized using a generic method
Found hardware: "HDA-Intel" "Realtek ALC3220" "HDA:10ec0280,10280612,00100003" "0x1028" "0x0612"
Hardware is initialized using a generic method
Found hardware: "HDA-Intel" "Nvidia GPU 81 HDMI/DP" "HDA:10de0081,1458375d,00100100" "0x1458" "0x375d"
Hardware is initialized using a generic method


alsactl info
#
# Sound card
#
- card: 0
  id: MicroII
  name: Audio Advantage MicroII
  longname: C-Media INC. Audio Advantage MicroII at usb-0000:00:14.0-4, full speed
  driver_name: USB-Audio
  mixer_name: USB Mixer
  components: USB0d8c:0103
  controls_count: 7
  pcm:
    - stream: PLAYBACK
      devices:
        - device: 0
          id: USB Audio
          name: USB Audio
          subdevices:
            - subdevice: 0
              name: subdevice #0
#
# Sound card
#
- card: 1
  id: PCH
  name: HDA Intel PCH
  longname: HDA Intel PCH at 0xf7210000 irq 31
  driver_name: HDA-Intel
  mixer_name: Realtek ALC3220
  components: HDA:10ec0280,10280612,00100003
  controls_count: 25
  pcm:
    - stream: PLAYBACK
      devices:
        - device: 0
          id: ALC3220 Analog
          name: ALC3220 Analog
          subdevices:
            - subdevice: 0
              name: subdevice #0
    - stream: CAPTURE
      devices:
        - device: 0
          id: ALC3220 Analog
          name: ALC3220 Analog
          subdevices:
            - subdevice: 0
              name: subdevice #0
  hwdep:
    - device: 2
      id: HDA Codec 2
      name: HDA Codec 2
      iface: 16
#
# Sound card
#
- card: 2
  id: NVidia
  name: HDA NVidia
  longname: HDA NVidia at 0xf7080000 irq 17
  driver_name: HDA-Intel
  mixer_name: Nvidia GPU 81 HDMI/DP
  components: HDA:10de0081,1458375d,00100100
  controls_count: 28
  pcm:
    - stream: PLAYBACK
      devices:
        - device: 3
          id: HDMI 0
          name: HDMI 0
          subdevices:
            - subdevice: 0
              name: subdevice #0
        - device: 7
          id: HDMI 1
          name: HDMI 1
          subdevices:
            - subdevice: 0
              name: subdevice #0
        - device: 8
          id: HDMI 2
          name: HDMI 2
          subdevices:
            - subdevice: 0
              name: subdevice #0
        - device: 9
          id: HDMI 3
          name: HDMI 3
          subdevices:
            - subdevice: 0
              name: subdevice #0
  hwdep:
    - device: 0
      id: HDA Codec 0
      name: HDA Codec 0
      iface: 16



Re: How to configure pulse for volume controls

Reply #6
Try setting the default sound card either in your alsa config (not pulseaudio), or via kernel module options. https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Set_the_default_sound_card

Code: [Select]
amixer scontrols
Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'Speaker',0
Simple mixer control 'Speaker+LO',0
Simple mixer control 'PCM',0
Simple mixer control 'Front Mic',0
Simple mixer control 'Front Mic Boost',0
Simple mixer control 'Line Out',0
Simple mixer control 'Capture',0
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Loopback Mixing',0
Simple mixer control 'Rear Mic',0
Simple mixer control 'Rear Mic Boost',0
I don't see my USB device. Which one do I pick???

Re: How to configure pulse for volume controls

Reply #7
 amixer -c 0 cset name='IEC958 Playback Switch' on

how do I use this? I replace the "name" part or I replace the IEC958 Playback Switch part?

Code: [Select]
amixer -c 0 cset Master='IEC958 Playback Switch' on
Wrong control identifier: Master=IEC958 Playback Switch

what am I doing wrong with this command I don't understand how to use it

Re: How to configure pulse for volume controls

Reply #8
Why do I have to do this for something as simple as volume controls? I should be able to select the default device in pavucontrol.... this is just tedious. I don't see either an IEC958 USB device on my side PC nor do I see the HDMI on my main pc as options in amixer scontrols

Re: How to configure pulse for volume controls

Reply #9
Code: [Select]
amixer -c 0 cset name='IEC958 Default PCM Playback Switch' on
numid=34,iface=MIXER,name='IEC958 Default PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
[kz@kz-desktop ~]$ amixer -c 0 cset name='IEC958 Playback Switch' on
numid=33,iface=MIXER,name='IEC958 Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
[kz@kz-desktop ~]$ amixer -c 0 cset name='Capture Playback Switch' on
amixer: Cannot find the given element from control sysdefault:0

none of this even changes the sound device when I turn volume up or down on the keyboard, on my main desktop it only controls the line out for headphones and won't control the HDMI I want it on. When I select a default device in pavucontrol it should just work that way. Volumeicon won't even let me select Nvidia. It says nothing is there, no channel.

I just want the volume controls to actually work for the main device I use. This shouldn't be so hard. Why can't pavucontrol manage this stuff? I want an easy to use interface I don't want to run commands every time I change sound devices

I cannot change the volume levels of my Nvidia in alsamixer at all. It shows 4 S/PDIF's and not a single one of them has a meter.

Code: [Select]
sudo alsactl init 1
Found hardware: "HDA-Intel" "Nvidia GPU 83 HDMI/DP" "HDA:10de0083,38425671,00100100" "0x3842" "0x5671"
Hardware is initialized using a generic method

Re: How to configure pulse for volume controls

Reply #10
If you're not going to read the section I linked and just try random other commands from the page instead then I'm sorry, but I can't help you.

Re: How to configure pulse for volume controls

Reply #11
If you're not going to read the section I linked and just try random other commands from the page instead then I'm sorry, but I can't help you.
I did read it, none of what you linked solved my issue.
I found this: https://askubuntu.com/questions/150851/how-do-i-select-a-default-sound-card-with-alsa

I've got the sound controls working on my main PC now, just my side PC is giving me problems for some reason.

pactl list short sources
pactl list short sinks
pactl set-default-source NameOfDevice
pactl set-default-sink NameOfDevice

Re: How to configure pulse for volume controls

Reply #12
Hello,

A few years ago I had the same issues with pulseaudio which I was trying to set up but was just doing whatever it wanted...

I removed all pulse packets except libpulse and libcanberra.

I use alsa and the nice and very practical qastools mixer on different pc:
https://forum.artixlinux.org/index.php/topic,4318.msg27848.html#msg27848

Note: I don't play games and don't use wine or steam.
But I have sound in all my apps.

Re: How to configure pulse for volume controls

Reply #13
I've got it somewhat solved, at least I've narrowed down the problem. After setting pactl commands above, I have to go into volumeicon and toggle it off and back onto default, then the volume control works for the devices that have been set!  :)
but, I have to do this after every reboot which is a problem. So somehow we've gotta figure this out.

https://imgur.com/a/vvknXDb

This is the window in question where I have to toggle default.