Bug 71025 - Volume controll bug if balans adjust
Summary: Volume controll bug if balans adjust
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: tools (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-30 02:18 UTC by 3draven
Modified: 2018-07-30 10:15 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
before (35.20 KB, text/plain)
2013-10-30 03:19 UTC, 3draven
Details
alsa-info after (35.20 KB, text/plain)
2013-10-30 03:20 UTC, 3draven
Details

Description 3draven 2013-10-30 02:18:54 UTC
To repeat the bug should:
1. If shift the balance between the output channels in the the left direction by 50%.
2. Try typing the command
pactl set-sink-volume 0 -- -10%
pactl set-sink-volume 0 +10%

As a result, +10 will be decreased volume! Just when shifted the balance of the channels may be other unexpected results adjustment of the sound.
Comment 1 Raymond 2013-10-30 02:25:04 UTC
post the output of alsa-info.sh before and after your test
Comment 2 3draven 2013-10-30 03:19:44 UTC
Created attachment 88336 [details]
before
Comment 3 3draven 2013-10-30 03:20:08 UTC
Created attachment 88337 [details]
alsa-info after
Comment 4 Raymond 2013-11-01 15:53:51 UTC
but your speaker volume are at 100% on both output

headphone and HDMI are not plugged and your USB audio have no playback volume control

Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 42 [100%] [0.00dB] [on]
  Front Right: Playback 42 [100%] [0.00dB] [on]


post output of

pactl list sinks

after you change the balance and volume
Comment 5 3draven 2013-11-01 17:23:55 UTC
Balance 25% to left
Volume 50%
Bug checked


pactl list sinks
Сток #0
	Область: SUSPENDED
	Имя: alsa_output.usb-E-MU_Systems__Inc._E-MU_0204___USB_E-MU-7E-3F19-07DC061E-08472-8740AT2A-00-USB.analog-stereo
	Описание: E-MU 0204 | USB Аналоговое стерео
	Драйвер: module-alsa-card.c
	Спецификация выборки: s24le 2ch 88200Гц
	Раскладка каналов: front-left,front-right
	Владелец модуля: 5
	Звук отключён: no
	Громкость: 0:  70% 1:  70%
	        0: -9,31 dB 1: -9,31 dB
	        баланс 0,00
	Основная громкость: 100%
	             0,00 dB
	Источник мониторинга: alsa_output.usb-E-MU_Systems__Inc._E-MU_0204___USB_E-MU-7E-3F19-07DC061E-08472-8740AT2A-00-USB.analog-stereo.monitor
	Латентность: 0 usec, настроено 0 usec
	Флаги: HARDWARE DECIBEL_VOLUME LATENCY 
	Свойства:
		alsa.resolution_bits = "24"
		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 = "1"
		alsa.card_name = "E-MU 0204 | USB"
		alsa.long_card_name = "E-MU Systems, Inc. E-MU 0204 | USB at usb-0000:00:14.0-1, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:00:14.0-usb-0:1:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card1"
		udev.id = "usb-E-MU_Systems__Inc._E-MU_0204___USB_E-MU-7E-3F19-07DC061E-08472-8740AT2A-00-USB"
		device.bus = "usb"
		device.vendor.id = "041e"
		device.vendor.name = "Creative Technology, Ltd"
		device.product.id = "3f19"
		device.product.name = "E-MU 0204 | USB"
		device.serial = "E-MU_Systems__Inc._E-MU_0204___USB_E-MU-7E-3F19-07DC061E-08472-8740AT2A"
		device.string = "hw:1"
		device.buffering.buffer_size = "1048572"
		device.buffering.fragment_size = "524286"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Аналоговое стерео"
		device.description = "E-MU 0204 | USB Аналоговое стерео"
		alsa.mixer_name = "USB Mixer"
		alsa.components = "USB041e:3f19"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	Порты:
		analog-output: Аналоговый вывод (priority: 9900)
	Активный порт: analog-output
	Форматы:
		pcm

Сток #1
	Область: SUSPENDED
	Имя: alsa_output.pci-0000_00_1b.0.analog-stereo
	Описание: Встроенное аудио Аналоговое стерео
	Драйвер: module-alsa-card.c
	Спецификация выборки: s32le 2ch 88200Гц
	Раскладка каналов: front-left,front-right
	Владелец модуля: 6
	Звук отключён: no
	Громкость: 0:  99% 1:  99%
	        0: -0,16 dB 1: -0,16 dB
	        баланс 0,00
	Основная громкость: 100%
	             0,00 dB
	Источник мониторинга: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
	Латентность: 0 usec, настроено 0 usec
	Флаги: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	Свойства:
		alsa.resolution_bits = "32"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "VT1802 Analog"
		alsa.id = "VT1802 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xf7a10000 irq 51"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Аналоговое стерео"
		device.description = "Встроенное аудио Аналоговое стерео"
		alsa.mixer_name = "Intel PantherPoint HDMI"
		alsa.components = "HDA:11068446,15582701,00100000 HDA:80862806,15582701,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Порты:
		analog-output-speaker: Громкоговорители (priority: 10000)
		analog-output-headphones: Аналоговые наушники (priority: 9000, not available)
	Активный порт: analog-output-speaker
	Форматы:
		pcm

Сток #2
	Область: RUNNING
	Имя: jack_out
	Описание: Jack sink (PulseAudio JACK Sink)
	Драйвер: module-jack-sink.c
	Спецификация выборки: float32le 2ch 88200Гц
	Раскладка каналов: front-left,front-right
	Владелец модуля: 22
	Звук отключён: no
	Громкость: 0:  38% 1:  18%
	        0: -25,06 dB 1: -44,44 dB
	        баланс -0,52
	Основная громкость: 100%
	             0,00 dB
	Источник мониторинга: jack_out.monitor
	Латентность: 58287 usec, настроено 46439 usec
	Флаги: DECIBEL_VOLUME LATENCY 
	Свойства:
		device.api = "jack"
		device.description = "Jack sink (PulseAudio JACK Sink)"
		jack.client_name = "PulseAudio JACK Sink"
		device.icon_name = "audio-card"
	Форматы:
		pcm
Comment 6 3draven 2013-11-01 17:26:41 UTC
Bug checked

pactl list sinks
Сток #0
	Область: SUSPENDED
	Имя: alsa_output.usb-E-MU_Systems__Inc._E-MU_0204___USB_E-MU-7E-3F19-07DC061E-08472-8740AT2A-00-USB.analog-stereo
	Описание: E-MU 0204 | USB Аналоговое стерео
	Драйвер: module-alsa-card.c
	Спецификация выборки: s24le 2ch 88200Гц
	Раскладка каналов: front-left,front-right
	Владелец модуля: 5
	Звук отключён: no
	Громкость: 0:  80% 1:  80%
	        0: -5,83 dB 1: -5,83 dB
	        баланс 0,00
	Основная громкость: 100%
	             0,00 dB
	Источник мониторинга: alsa_output.usb-E-MU_Systems__Inc._E-MU_0204___USB_E-MU-7E-3F19-07DC061E-08472-8740AT2A-00-USB.analog-stereo.monitor
	Латентность: 0 usec, настроено 0 usec
	Флаги: HARDWARE DECIBEL_VOLUME LATENCY 
	Свойства:
		alsa.resolution_bits = "24"
		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 = "1"
		alsa.card_name = "E-MU 0204 | USB"
		alsa.long_card_name = "E-MU Systems, Inc. E-MU 0204 | USB at usb-0000:00:14.0-1, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:00:14.0-usb-0:1:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card1"
		udev.id = "usb-E-MU_Systems__Inc._E-MU_0204___USB_E-MU-7E-3F19-07DC061E-08472-8740AT2A-00-USB"
		device.bus = "usb"
		device.vendor.id = "041e"
		device.vendor.name = "Creative Technology, Ltd"
		device.product.id = "3f19"
		device.product.name = "E-MU 0204 | USB"
		device.serial = "E-MU_Systems__Inc._E-MU_0204___USB_E-MU-7E-3F19-07DC061E-08472-8740AT2A"
		device.string = "hw:1"
		device.buffering.buffer_size = "1048572"
		device.buffering.fragment_size = "524286"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Аналоговое стерео"
		device.description = "E-MU 0204 | USB Аналоговое стерео"
		alsa.mixer_name = "USB Mixer"
		alsa.components = "USB041e:3f19"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	Порты:
		analog-output: Аналоговый вывод (priority: 9900)
	Активный порт: analog-output
	Форматы:
		pcm

Сток #1
	Область: RUNNING
	Имя: alsa_output.pci-0000_00_1b.0.analog-stereo
	Описание: Встроенное аудио Аналоговое стерео
	Драйвер: module-alsa-card.c
	Спецификация выборки: s32le 2ch 88200Гц
	Раскладка каналов: front-left,front-right
	Владелец модуля: 6
	Звук отключён: no
	Громкость: 0:  33% 1:  13%
	        0: -28,69 dB 1: -52,74 dB
	        баланс -0,60
	Основная громкость: 100%
	             0,00 dB
	Источник мониторинга: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
	Латентность: 19709 usec, настроено 20000 usec
	Флаги: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	Свойства:
		alsa.resolution_bits = "32"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "VT1802 Analog"
		alsa.id = "VT1802 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xf7a10000 irq 51"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Аналоговое стерео"
		device.description = "Встроенное аудио Аналоговое стерео"
		alsa.mixer_name = "Intel PantherPoint HDMI"
		alsa.components = "HDA:11068446,15582701,00100000 HDA:80862806,15582701,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Порты:
		analog-output-speaker: Громкоговорители (priority: 10000)
		analog-output-headphones: Аналоговые наушники (priority: 9000, not available)
	Активный порт: analog-output-speaker
	Форматы:
		pcm

Сток #2
	Область: SUSPENDED
	Имя: jack_out
	Описание: Jack sink (PulseAudio JACK Sink)
	Драйвер: module-jack-sink.c
	Спецификация выборки: float32le 2ch 88200Гц
	Раскладка каналов: front-left,front-right
	Владелец модуля: 22
	Звук отключён: no
	Громкость: 0:  38% 1:  18%
	        0: -25,14 dB 1: -44,53 dB
	        баланс -0,52
	Основная громкость: 100%
	             0,00 dB
	Источник мониторинга: jack_out.monitor
	Латентность: 0 usec, настроено 0 usec
	Флаги: DECIBEL_VOLUME LATENCY 
	Свойства:
		device.api = "jack"
		device.description = "Jack sink (PulseAudio JACK Sink)"
		jack.client_name = "PulseAudio JACK Sink"
		device.icon_name = "audio-card"
	Форматы:
		pcm
Comment 7 3draven 2013-11-01 17:30:16 UTC
I must clarify that I am using the following commands

For jack audio (pulse->jack)

pactl set-sink-volume jack_out -- -10%

For clean pulseaudio:

pactl set-sink-volume 0 -- -10%
or sink 1
Comment 8 Raymond 2013-11-02 06:19:12 UTC
do you select jack_out in sound preference as default sink when you change the balance and volume ?

seem pulseaudio only use software volume for jack_out

	Имя: jack_out
	Описание: Jack sink (PulseAudio JACK Sink)
	Драйвер: module-jack-sink.c
	Спецификация выборки: float32le 2ch 88200Гц
	Раскладка каналов: front-left,front-right
	Владелец модуля: 22
	Звук отключён: no
	Громкость: 0:  38% 1:  18%
	        0: -25,06 dB 1: -44,44 dB
	        баланс -0,52
	Основная громкость: 100%
	             0,00 dB
	Источник мониторинга: jack_out.monitor
	Латентность: 58287 usec, настроено 46439 usec
	Флаги: DECIBEL_VOLUME LATENCY

how do pulseaudio know the jack server use which sink or source since you can specify playback and capture on different alsa cards/devices ?

your jack server can even use alt analog device of vt1802 (independent headphone) or your USB emu 0204

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: VT1802 Analog [VT1802 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: VT1802 Alt Analog [VT1802 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USB [E-MU 0204 | USB], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
Comment 9 3draven 2013-11-02 13:30:02 UTC
I switch off EMU device and jack server. To simplify the problem.
1. set balance to 25% left
2. pactl set-sink-volume 1 +10%
3. sound decreased

pactl list sinks
Сток #1
	Область: SUSPENDED
	Имя: alsa_output.pci-0000_00_1b.0.analog-stereo
	Описание: Встроенное аудио Аналоговое стерео
	Драйвер: module-alsa-card.c
	Спецификация выборки: s32le 2ch 88200Гц
	Раскладка каналов: front-left,front-right
	Владелец модуля: 6
	Звук отключён: no
	Громкость: 0:   0% 1:   0%
	        0: -inf dB 1: -inf dB
	        баланс 0,00
	Основная громкость: 100%
	             0,00 dB
	Источник мониторинга: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
	Латентность: 0 usec, настроено 0 usec
	Флаги: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	Свойства:
		alsa.resolution_bits = "32"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "VT1802 Analog"
		alsa.id = "VT1802 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xf7a10000 irq 51"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Аналоговое стерео"
		device.description = "Встроенное аудио Аналоговое стерео"
		alsa.mixer_name = "Intel PantherPoint HDMI"
		alsa.components = "HDA:11068446,15582701,00100000 HDA:80862806,15582701,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Порты:
		analog-output-speaker: Громкоговорители (priority: 10000, not available)
		analog-output-headphones: Аналоговые наушники (priority: 9000, available)
	Активный порт: analog-output-headphones
	Форматы:
		pcm
Comment 10 Raymond 2013-11-07 01:00:57 UTC
http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/utils/pactl.c

if volume of each channel can really be adjusted by percentage, it should not use pa_volume_avg

static void volume_relative_adjust(pa_cvolume *cv) {
    pa_assert((volume_flags & VOL_RELATIVE) == VOL_RELATIVE);

    /* Relative volume change is additive in case of UINT or PERCENT
     * and multiplicative for LINEAR or DECIBEL */
    if ((volume_flags & 0x0F) == VOL_UINT || (volume_flags & 0x0F) == VOL_PERCENT) {
        pa_volume_t v = pa_cvolume_avg(cv);
        v = v + volume < PA_VOLUME_NORM ? PA_VOLUME_MUTED : v + volume - PA_VOLUME_NORM;
        pa_cvolume_set(cv, 1, v);
    }
Comment 11 GitLab Migration User 2018-07-30 10:15:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/296.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.