You are not logged in.

#1 2017-04-18 21:43:07

ebeem
Member
Registered: 2017-04-18
Posts: 4

[solved] pulseaudio, analog-output.conf.common, volume-limit

I would like to reduce my output volume, I know I can do this through
/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common

I did this before and it worked, but it was in a different distribution.
something to note is my pulseaudio version was 8.0 (I think)
my current pulseaudio is 10.0


changes I made

file: /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common
section: [Element PCM]

volume = ignore
volume-limit = 0.01



I made sure to kill pulseaudio after, I also rebooted
but with no luck ...


any help is appreciated ...

Last edited by ebeem (2017-04-20 10:01:16)

Offline

#2 2017-04-19 06:34:53

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [solved] pulseaudio, analog-output.conf.common, volume-limit

You are not making any sense here.

First of all, not all sound cards have the control "PCM", and even if yours does, it may not be the hardware/ALSA volume control that pulse would touch anyway. You have to find out what controls the card has, so you'll know which conf to modify; and you also have to find out which control changes when you change volume in pulse, so you'll know which section to modify.

Second, it makes no sense to use volume = ignore and volume-limit at the same time. The former prevent pulse from touching the hardware volume, while the latter lowers the limit pulse can go when it touches the hardware volume.

So you use EITHER of them, but not both. And if you use volume = ignore, you have to change the hardware volume to a desire value with a(lsa)mixer yourself, and pulse volume will be software-only.

Third, AFAIK volume steps in ALSA are always integer, so volume-limit = 0.01 makes no sense either. The actual step/limit can be checked with amixer, so you can set the volume to a value that you feels like to be the maximum, check its step value with amixer, and then use it as the value of volume-limit.

P.S. FWIW confs in /usr/share/pulseaudio are not in the backup array, which means they will be overwritten (without any notice) whenever you re-install or upgrade pulseaudio.

Last edited by tom.ty89 (2017-04-19 07:19:48)

Offline

#3 2017-04-19 06:57:48

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [solved] pulseaudio, analog-output.conf.common, volume-limit

This is the amixer output for a USB sound card of mine:

Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 175
  Mono:
  Front Left: Playback 175 [100%] [0.00dB] [on]
  Front Right: Playback 175 [100%] [0.00dB] [on]
Simple mixer control 'Mic',0
  Capabilities: cvolume cswitch cswitch-joined
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 67
  Front Left: Capture 67 [100%] [0.00dB] [on]
  Front Right: Capture 67 [100%] [0.00dB] [on]
Simple mixer control 'Extension Unit',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]

When I set volume = ignore under [Element Headphone] in analog-output-headphones.conf, pulse no longer touches the volume of the control 'Headphone', the flag HW_VOLUME_CTRL is gone from the pulse sink as well.

When I set volume-limit = 100 instead (volume = merge), and set volume to maximum in pulse, the control volume is the following:

Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 175
  Mono:
  Front Left: Playback 99 [57%] [-28.50dB] [on]
  Front Right: Playback 99 [57%] [-28.50dB] [on]

(There are 100 steps from 0 to 99)

Last edited by tom.ty89 (2017-04-19 07:01:27)

Offline

#4 2017-04-19 18:35:11

ebeem
Member
Registered: 2017-04-18
Posts: 4

Re: [solved] pulseaudio, analog-output.conf.common, volume-limit

thank you so much!!
I can see that you put a lot of effort out there trying to explain it to me
I understand now .. thank you again.

I tried what you said on a different GNU/Linux setup I have (non-arch) and it worked.
I moved the same config files of alsa-mixer to arch here (they were originally taken from arch)
but it does not work in arch ... could it be that I missed some package that's responsible for these customizations?

what made it look even worse .. is if I delete all files in alsa-mixer, all sound devices still work fine, if I add some invalid syntax in the configs .. still work fine as well

I will try to research .. I will appriciate it if you can help tho
Thanks.

Offline

#5 2017-04-20 03:07:25

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [solved] pulseaudio, analog-output.conf.common, volume-limit

Why don't you paste:

amixer -c N

where N is the index of the card you want to manipulate, which can been seen in:

aplay -l

(aplay and amixer are provided in the package alsa-utils)

Please capture this on your Arch machine. You said it worked on another distro, was it installed on the same machine?

You only kept on saying "it worked" but you haven't really showed how exactly it worked as I did.

Why don't you start with pasting:
(Assuming pulse is (re-)started with all confs UNMODIFIED)

pacmd list-sinks

Then change volume = to ignore in the conf/section you find appropriate, restart pulse, then paste this again

pacmd list-sinks

Capture this on the machine/setup "it worked". No volume-limit please.

Also is pulse even running when you test?

P.S. Use code tags for all pasting.

Last edited by tom.ty89 (2017-04-20 03:13:03)

Offline

#6 2017-04-20 04:07:52

ebeem
Member
Registered: 2017-04-18
Posts: 4

Re: [solved] pulseaudio, analog-output.conf.common, volume-limit

output of pacmd list-sinks

index: 1
        name: <alsa_output.usb-0a12_CSR8645_ABCDEF0123456789-00.iec958-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: 
	priority: 9048
	volume: front-left: 15185 /  23% / -38.10 dB,   front-right: 15185 /  23% / -38.10 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 94.37 ms
	max request: 16 KiB
	max rewind: 375 KiB
	monitor source: 1
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 1
	configured latency: 90.00 ms; range is 4.00 .. 2000.00 ms
	card: 2 <alsa_card.usb-0a12_CSR8645_ABCDEF0123456789-00>
	module: 8
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "USB Audio"
		alsa.id = "USB Audio"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "2"
		alsa.card_name = "CSR8645"
		alsa.long_card_name = "CSR8645 at usb-0000:04:00.0-1.3, full speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:04:00.0-usb-0:1.3:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1c.5/0000:04:00.0/usb2/2-1/2-1.3/2-1.3:1.0/sound/card2"
		udev.id = "usb-0a12_CSR8645_ABCDEF0123456789-00"
		device.bus = "usb"
		device.vendor.id = "0a12"
		device.vendor.name = "Cambridge Silicon Radio, Ltd"
		device.product.id = "1243"
		device.product.name = "CSR8645"
		device.serial = "0a12_CSR8645_ABCDEF0123456789"
		device.string = "iec958:2"
		device.buffering.buffer_size = "384000"
		device.buffering.fragment_size = "192000"
		device.access_mode = "mmap+timer"
		device.profile.name = "iec958-stereo"
		device.profile.description = "Digital Stereo (IEC958)"
		device.description = "CSR8645 Digital Stereo (IEC958)"
		alsa.mixer_name = "USB Mixer"
		alsa.components = "USB0a12:1243"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	ports:
		iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
			properties:
				
	active port: <iec958-stereo-output>

amixer -c n

Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 16
  Mono:
  Front Left: Playback 9 [56%] [-20.13dB] [on]
  Front Right: Playback 9 [56%] [-20.13dB] [on]

yes, the other distro is on the same macheine and using same device
I will try to get the output from there as soon as possible ..

according to what I understood .. changing valume-limit to something like 20000 will make the output

volume: front-left: 20000 /  100% / -38.10 dB,   front-right: 20000 /  100% / -38.10 dB

so the volume bcomes 20000 at 100% right?

thanks

Offline

#7 2017-04-20 04:31:09

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [solved] pulseaudio, analog-output.conf.common, volume-limit

SIGH. Apparently you haven't done anything in the way I said...

Your list-sinks output shows only one sink that isn't even the default sink. Obviously you have given me a random cut of the output. Also what I asked for are outputS _before and after_ you changed volume = to ignore. (on the setup it worked)

I need full output of amixer -c N as well, not a cut you _think_ worth looking at. I doubt the card has only one control. (on Arch)

And no, that is NOT how volume-limit works. Pulse volume will remain 65536-step (1 - 65536, 0 not counted here because it's -inf dB, while 0 in ALSA is not a "special" step as this). What volume-limit changes is the ALSA range that the pulse volume range will be mapped to. You should understand how it works if you have read my case carefully.

Last edited by tom.ty89 (2017-04-20 04:33:38)

Offline

#8 2017-04-20 09:59:21

ebeem
Member
Registered: 2017-04-18
Posts: 4

Re: [solved] pulseaudio, analog-output.conf.common, volume-limit

Thank you so much!!
I just read your replies again and realized what I need to do ...

I will mark as solved .. thanks

Offline

Board footer

Powered by FluxBB