You are not logged in.

#1 2016-11-03 13:07:19

Demon
Member
From: Republic of Srpska, BA
Registered: 2008-03-02
Posts: 246

Pulseaudio simultaneous output on speakers and headphones

Back panel connected speakers and front panel connected headphones. In Plasma's System Settings I can select (under Output Devices) "Analog headphones" or "Line Out" port. In both cases sound plays on speakers. I want sound playing only on headphones if I select "Analog Headphones". I've tried reinstalling libpulse and pulseaudio (before that cleared all local and system pulseaudio configs), playing with module-switch-on-connect and module-switch-on-port-available options, removing "/var/lib/alsa" directory, but all I got is that now is that KDE's Notification Sounds volume slider always reverts to zero (altough notifications play sound).

% pacmd list-cards
2 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_00_05.0>
        driver: <module-alsa-card.c>
        owner module: 6
        properties:
                alsa.card = "0"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdfef4000 irq 22"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:05.0"
                sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "03f0"
                device.product.name = "MCP61 High Definition Audio (M4N68T series motherboard)"
                device.form_factor = "internal"
                device.string = "0"
                device.description = "Унутрашњи звук"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:analog-stereo: Аналогни стерео Input (priority 60, available: unknown)
                output:analog-stereo: Аналогни стерео Output (priority 6000, available: unknown)
                output:analog-stereo+input:analog-stereo: Двосмерни аналогни стерео (priority 6060, available: unknown)
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
                output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Аналогни стерео Input (priority 5460, available: unknown)
                off: Искључено (priority 0, available: unknown)
        active profile: <output:analog-stereo+input:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_05.0.analog-stereo/#0: Унутрашњи звук Аналогни стерео
        sources:
                alsa_output.pci-0000_00_05.0.analog-stereo.monitor/#0: Monitor of Унутрашњи звук Аналогни стерео
                alsa_input.pci-0000_00_05.0.analog-stereo/#1: Унутрашњи звук Аналогни стерео
        ports:
                analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-linein: Линија у (priority 8100, latency offset 0 usec, available: no)
                        properties:

                analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
                        properties:

                analog-output-headphones: Аналогне слушалице (priority 9000, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-headphones"
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "video-display"
    index: 1
        name: <alsa_card.pci-0000_02_00.1>
        driver: <module-alsa-card.c>
        owner module: 7
        properties:
                alsa.card = "1"
                alsa.card_name = "HDA ATI HDMI"
                alsa.long_card_name = "HDA ATI HDMI at 0xdffec000 irq 28"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:02:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:09.0/0000:02:00.1/sound/card1"
                device.bus = "pci"
                device.vendor.id = "1002"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                device.product.id = "aa20"
                device.product.name = "RV635 HDMI Audio [Radeon HD 3600 Series]"
                device.string = "1"
                device.description = "RV635 HDMI Audio [Radeon HD 3600 Series]"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
                output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
                output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
                off: Искључено (priority 0, available: unknown)
        active profile: <off>
        ports:
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
% pacmd list-sources
2 source(s) available.
    index: 0
        name: <alsa_output.pci-0000_00_05.0.analog-stereo.monitor>
        driver: <module-alsa-card.c>
        flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE 
        priority: 1950
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        base volume: 65536 / 100% / 0,00 dB
        volume steps: 65537
        muted: no
        current latency: 0,00 ms
        max rewind: 0 KiB
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Стерео
        used by: 0
        linked by: 0
        configured latency: 0,00 ms; range is 0,50 .. 1999,82 ms
        monitor_of: 0
        card: 0 <alsa_card.pci-0000_00_05.0>
        module: 6
        properties:
                device.description = "Monitor of Унутрашњи звук Аналогни стерео"
                device.class = "monitor"
                alsa.card = "0"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdfef4000 irq 22"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:05.0"
                sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "03f0"
                device.product.name = "MCP61 High Definition Audio (M4N68T series motherboard)"
                device.form_factor = "internal"
                device.string = "0"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
  * index: 1
        name: <alsa_input.pci-0000_00_05.0.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE 
        priority: 9959
        volume: front-left: 11002 /  17% / -46,50 dB,   front-right: 11002 /  17% / -46,50 dB
                balance 0,00
        base volume: 20724 /  32% / -30,00 dB
        volume steps: 65537
        muted: no
        current latency: 0,00 ms
        max rewind: 0 KiB
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Стерео
        used by: 0
        linked by: 0
        configured latency: 0,00 ms; range is 0,50 .. 1999,82 ms
        card: 0 <alsa_card.pci-0000_00_05.0>
        module: 6
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "Generic Analog"
                alsa.id = "Generic Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdfef4000 irq 22"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:05.0"
                sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "03f0"
                device.product.name = "MCP61 High Definition Audio (M4N68T series motherboard)"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352768"
                device.buffering.fragment_size = "176384"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Аналогни стерео"
                device.description = "Унутрашњи звук Аналогни стерео"
                alsa.mixer_name = "VIA Generic"
                alsa.components = "HDA:11060397,10438415,00100000"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-linein: Линија у (priority 8100, latency offset 0 usec, available: no)
                        properties:

        active port: <analog-input-rear-mic>
% pacmd list-sinks  
1 sink(s) available.
  * index: 0
        name: <alsa_output.pci-0000_00_05.0.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE 
        priority: 9959
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        base volume: 65536 / 100% / 0,00 dB
        volume steps: 65537
        muted: no
        current latency: 0,00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 0
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Стерео
        used by: 0
        linked by: 0
        configured latency: 0,00 ms; range is 0,50 .. 1999,82 ms
        card: 0 <alsa_card.pci-0000_00_05.0>
        module: 6
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "Generic Analog"
                alsa.id = "Generic Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdfef4000 irq 22"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:05.0"
                sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "03f0"
                device.product.name = "MCP61 High Definition Audio (M4N68T series motherboard)"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352768"
                device.buffering.fragment_size = "176384"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Аналогни стерео"
                device.description = "Унутрашњи звук Аналогни стерео"
                alsa.mixer_name = "VIA Generic"
                alsa.components = "HDA:11060397,10438415,00100000"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
                        properties:

                analog-output-headphones: Аналогне слушалице (priority 9000, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-headphones>

Last edited by Demon (2016-11-03 13:15:36)

Offline

#2 2016-11-03 13:38:06

Demon
Member
From: Republic of Srpska, BA
Registered: 2008-03-02
Posts: 246

Re: Pulseaudio simultaneous output on speakers and headphones

I can mute "Front" channel in alsamixer when "Analog Headphones" are selected in Pulseaudio settings, but the settings wont retain.

Offline

#3 2016-11-03 14:15:22

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Pulseaudio simultaneous output on speakers and headphones

Curious. In alsamixer, can you select the offending sound card, and scroll to the right until you see <Auto-Mute> ? If thats disabled, try enabling it. That was something that really caused me odd issues like you've been describing.

EDIT: Do you have any ".alsarc" or similar files in your home dir or /etc? Thinking of possible causes for faulty audio, mis-matched/stale/broken/conflicting configs would definitely do it. What does your current /etc/pulse/default.pa look like? In my case, I notice I have the following:

### Make some devices default
#set-default-sink output
#set-default-source input
set-sink-port 1 analog-output-headphones

Right at the bottom. I'm not sure what the purpose of that last line is. I do remember having a very similar issue to you at one point in time though. I'll see what I can do to help. smile

Last edited by JohnBobSmith (2016-11-03 14:21:01)


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#4 2016-11-03 16:12:40

Demon
Member
From: Republic of Srpska, BA
Registered: 2008-03-02
Posts: 246

Re: Pulseaudio simultaneous output on speakers and headphones

Thanks for replying! smile

There is no Auto-Mute, I already searched for it. And other than /etc/asoundrc created by pulseaudio-alsa package, I don't have any other alsa config files. My default.pa file is the pulseaudio package's default:

#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input

I'll try with set-sink-port 1 analog-output-headphones, thanks. smile

Offline

#5 2016-11-03 16:17:14

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

Re: Pulseaudio simultaneous output on speakers and headphones

Do you have a seperate control to switch? What does

amixer -c0

give? There's no way that set-sink-port is going to help you if the lineout and headphone switches in plasma's GUI have the same effect.

Offline

#6 2016-11-03 17:24:44

Demon
Member
From: Republic of Srpska, BA
Registered: 2008-03-02
Posts: 246

Re: Pulseaudio simultaneous output on speakers and headphones

% amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 0 [0%] [-63.00dB] [off]
  Front Right: Playback 0 [0%] [-63.00dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  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]
Simple mixer control 'Front Mic',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [off]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  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]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [off]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 0 [0%] [-16.50dB] [on]
  Front Right: Capture 30 [97%] [28.50dB] [on]
Simple mixer control 'Channel Mode',0
  Capabilities: enum
  Items: '2ch' '4ch' '6ch'
  Item0: '2ch'
Simple mixer control 'Rear Mic',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [on]

What do you mean with "seperate control to switch"?

Offline

#7 2016-11-04 23:35:03

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Pulseaudio simultaneous output on speakers and headphones

A separate control switch would be a hardware button IE fn + f10/11 for volume up/down. Or if you can directly turn your sound on/off (not mute) with a hardware switch. Some laptops do this with wifi.

I'm really not too sure how to troubleshoot this, audio simply isn't my thing unfortunately sad. However, I will direct you to the Pulse troubleshooting page: https://wiki.archlinux.org/index.php/Pu … leshooting and the ALSA troubleshooting page because there are some overlaps between pulse and ALSA: https://wiki.archlinux.org/index.php/Ad … leshooting

Good luck!


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#8 2022-01-04 19:13:50

mahdi
Member
Registered: 2021-12-17
Posts: 40

Re: Pulseaudio simultaneous output on speakers and headphones

I have same problem on endeavourOS (xfce)
I tested ubuntu 21.10 live usb and there was no such problem
can someone help (by probably comparing these two)

Last edited by mahdi (2022-01-04 19:17:52)

Offline

#9 2022-01-04 19:57:56

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,786
Website

Re: Pulseaudio simultaneous output on speakers and headphones

EndeavourOS is not supported here. Also, please do not necrobump.

https://bbs.archlinux.org/misc.php?action=rules
https://wiki.archlinux.org/title/Genera … bumping%22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

Board footer

Powered by FluxBB