You are not logged in.

#1 2019-02-27 19:04:06

Filip98
Member
Registered: 2018-06-20
Posts: 6

Separating headphones and speakers into different output's?

I get this might be asked a lot but after searching around I found no concrete answer as to what should be done to get this working either in pulseaudio or something else
So basically I have one sound card and the windows driver allowed me to split the speakers and aux port as speakers and headphones and to use them side by side.
I'm using pulseaudio with a default profile of "HDMI+Analog input" with hw:0:0 speakers loaded in pulse/Default.cfg to use in a combined built in audio(Speakers and Aux) and HDMI output which works wonderfully(I used to use different solutions on Windows like virtual audio cable but it stressed my CPU) so obviously the "ports" can work at the same time.
I searched around the wiki, following various tutorials about using combined audio, not muting speakers when headphones are plugged etc but the remap solution only works for splitting surround configurations as I don't have any "rear-left/right" in my channel maps
the only thing I did quite get at is making use of the information from cat /proc/asound/card*/codec\#*
Is this possible in pulseaudio? or should I look for Jack/Alsa only solutions(even tho I'm quite fond of the pavucontrol interface)

Offline

#2 2019-02-27 21:46:22

ivanoff
Member
Registered: 2012-03-18
Posts: 66

Re: Separating headphones and speakers into different output's?

Hello, not sure I get it right, but the default can only be "one" output. While pulse audio will certainly detect all your outputs devices, you have to rely on application config (sound output of smplayer for instance or KDE volume control) to direct any sound output to another device than the default one.
Was that your question?

Offline

#3 2019-02-27 22:43:08

Filip98
Member
Registered: 2018-06-20
Posts: 6

Re: Separating headphones and speakers into different output's?

Oh I can easily choose an output but what I'm saying is that I can't choose to have one thing go through the aux(headphones) port and another through the speakers at the same time, I can get them to work at the same time but only if they're emitting the same thing.
alsamixer allows me to at least control the volume of the two individually

Offline

#4 2019-02-28 01:36:02

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Separating headphones and speakers into different output's?

There's an article named "PulseAudio/Examples" in the ArchWiki. There's this section here "Splitting front/rear" that looks like it might be about what you want to do:

https://wiki.archlinux.org/index.php/Pu … front/rear

Last edited by Ropid (2019-02-28 01:36:59)

Offline

#5 2019-02-28 08:44:05

ivanoff
Member
Registered: 2012-03-18
Posts: 66

Re: Separating headphones and speakers into different output's?

Well, that is just very easy with pulseaudio. I just did the test, played music on the SPDIF, and played a movie on the HDMI output. You don't have to mess with the settings for that. First, make sure there are two different output devices in your devices.
But if you've got only one sound device, you may need to build a manual sink :
https://wiki.archlinux.org/index.php/Pu … ion_method

Offline

#6 2019-02-28 09:23:26

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

Re: Separating headphones and speakers into different output's?

Can you post

aplay -l
amixer -c$insert cardindex of the card you want to manipulate$
pacmd list-cards
pacmd list-sinks

so we can have an overview of what your options are? And maybe post that default.pa to see  which adjustments you made

@ivanoff if i'm interpreting right hdmi and internal soundcard isn't the problem nor question, but the analog speakers/headphones on the integrated card.

Last edited by V1del (2019-02-28 09:30:14)

Offline

#7 2019-02-28 10:36:15

Filip98
Member
Registered: 2018-06-20
Posts: 6

Re: Separating headphones and speakers into different output's?

@Ropid I already tried this, theres no channel map to remap
@ivanoff No I got HDMI running and I can choose to play through it or through all outputs
@V1del

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3227 Analog [ALC3227 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

amixer -c0

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [off]
  Front Right: Playback 87 [100%] [0.00dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 254 [100%] [-0.20dB]
  Front Right: Playback 254 [100%] [-0.20dB]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',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 - 63
  Front Left: Capture 63 [100%] [30.00dB] [off]
  Front Right: Capture 63 [100%] [30.00dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%] [36.00dB]
  Front Right: 3 [100%] [36.00dB]
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Mute-LED Mode',0
  Capabilities: enum
  Items: 'On' 'Off' 'Follow Master'
  Item0: 'Follow Master'

pacmd list-cards

1 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_00_1b.0>
        driver: <module-alsa-card.c>
        owner module: 26
        properties:
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xa1610000 irq 129"
                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.id = "2284"
                device.product.name = "Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "0"
                device.description = "Built-in Audio"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:analog-stereo: Analog Stereo Input (priority 65, available: unknown)
                output:analog-stereo: Analog Stereo Output (priority 6500, available: unknown)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: unknown)
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
                output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5965, available: unknown)
                output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
                output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (priority 865, available: unknown)
                output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
                output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (priority 865, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:hdmi-stereo+input:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_1b.0.hdmi-stereo/#3: Built-in Audio Digital Stereo (HDMI)
        sources:
                alsa_output.pci-0000_00_1b.0.hdmi-stereo.monitor/#3: Monitor of Built-in Audio Digital Stereo (HDMI)
                alsa_input.pci-0000_00_1b.0.analog-stereo/#4: Built-in Audio Analog Stereo
        ports:
                analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-speakers"
                analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"

pacmd list-sinks

4 sink(s) available.
  * index: 0
        name: <alsa_output.hw_0_0>
        driver: <module-alsa-sink.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9030
        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: s32le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 185.76 ms
        module: 0
        properties:
                alsa.resolution_bits = "32"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC3227 Analog"
                alsa.id = "ALC3227 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 0xa1610000 irq 129"
                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.id = "2284"
                device.product.name = "Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "hw:0,0"
                device.buffering.buffer_size = "65536"
                device.buffering.fragment_size = "32768"
                device.access_mode = "mmap+timer"
                device.description = "Built-in Audio"
                device.icon_name = "audio-card-pci"
    index: 1
        name: <nothingness>
        driver: <module-null-sink.c>
        flags: DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 1000
        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: 689 KiB
        max rewind: 689 KiB
        monitor source: 1
        sample spec: float32le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        module: 1
        properties:
                device.description = "Null Output"
                device.class = "abstract"
                device.icon_name = "audio-card"
    index: 2
        name: <combined>
        driver: <module-combine-sink.c>
        flags: DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 1000
        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: 63 KiB
        max rewind: 0 KiB
        monitor source: 2
        sample spec: float32le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 200.00 ms
        module: 2
        properties:
                device.class = "filter"
                device.description = "Simultaneous output to Built-in Audio, Built-in Audio Digital Stereo (HDMI)"
                device.icon_name = "audio-card"
    index: 3
        name: <alsa_output.pci-0000_00_1b.0.hdmi-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9030
        volume: front-left: 44463 /  68% / -10.11 dB,   front-right: 44463 /  68% / -10.11 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: 3
        sample spec: s32le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 185.76 ms
        card: 0 <alsa_card.pci-0000_00_1b.0>
        module: 26
        properties:
                alsa.resolution_bits = "32"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "HDMI 0"
                alsa.id = "HDMI 0"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "3"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xa1610000 irq 129"
                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.id = "2284"
                device.product.name = "Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "hdmi:0"
                device.buffering.buffer_size = "65536"
                device.buffering.fragment_size = "32768"
                device.access_mode = "mmap+timer"
                device.profile.name = "hdmi-stereo"
                device.profile.description = "Digital Stereo (HDMI)"
                device.description = "Built-in Audio Digital Stereo (HDMI)"
                alsa.mixer_name = "Realtek ALC3227"
                alsa.components = "HDA:10ec0282,103c81f2,00100003 HDA:80862883,80860101,00100000"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
        active port: <hdmi-output-0>

In my default.pa I put in the beginning:

load-module module-alsa-sink device=hw:0,0 <my profile is HDMI + Analog input so I add the analog output device
#load-module module-remap-sink sink_name=speakers remix=no master=alsa_output.pci-0000_00_1b.0.analog-stereo channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right
#load-module module-remap-sink sink_name=headphones remix=no master=alsa_output.pci-0000_00_1b.0.analog-stereo channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right
load-module module-null-sink sink_name=nothingness
load-module module-combine-sink sink_name=combined
#set-default-sink hw:0,0

Offline

#8 2020-04-06 08:53:59

Sant0s
Member
Registered: 2020-04-05
Posts: 11

Re: Separating headphones and speakers into different output's?

Any updates on this? I've been looking all around without any success.

Offline

#9 2020-04-06 09:05:44

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

Re: Separating headphones and speakers into different output's?

Please open a new thread post the outputs and configuration adjustments mentioned here.

This is almost certainly different on your system so hijacking into another poster's thread will almost certainly not be really useful to you even if they managed to fix it in the meantime.

Offline

#10 2020-04-06 09:54:36

Sant0s
Member
Registered: 2020-04-05
Posts: 11

Re: Separating headphones and speakers into different output's?

Okay I will do

Offline

Board footer

Powered by FluxBB