I am having the EXACT same problem as is described in this question: Headphone Sound Output Gets Mixed with the Line-Out Output. Unfortunately, that question does not have a posted answer. I am not sure that posting a question in this way is appropriate (I'm new to these forums) but I've been unsuccessfully trying to figure this out for a couple weeks.
The system I am having this problem on uses a CS4207 with three analog outputs. Only two of the three outputs are connected: Headphones and Line Out. I have tested the audio hardware on Windows and verified that all hardware is working as expected (which along with some other testing I've done leads me to believe this is a driver issue with Alsa or pulseaudio).
The problem I am seeing is as follows: When Line Out is selected as the sound output the sound works as expected (i.e. sound only comes out of the speakers connected to the Line Out port), however when Headphones is selected as the sound output, sound comes from both the speakers connected to the Headphones port and the speakers connected to the Line Out port.
Viewing sound settings via Alsamixer while changing the selected output device helps to illustrate the problem.
When Line Out is the selected output:
When Headphones is the selected output:
As you can see here when Line Out is the selected output, Headphones is automatically muted and set to a volume of zero, however when Headphones is the selected output the Line Out volume and mute settings are not touched.
To address this problem I have been making changes to /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
and although I can see that the changes are being applied (the sound settings change and alsamixer changes) I have not found a modification that has the desired effect.
I am not sure of any of the following will be useful, but I will reproduce the outputs generated in the original post which called out this issue (the following outputs are from my system, I'm just running the same commands as the original post). Note that I reverted all modifications to analog-output-headphones.conf before running these.
sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CS4207 Analog [CS4207 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: CS4207 Digital [CS4207 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [DELL U2713HM]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [BenQ LCD]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
When the problem is occurring (headphones selected as output):
pacmd list-sinks
1 sink(s) available.
* index: 1
name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
priority: 9039
volume: front-left: 27022 / 41% / -23.09 dB, front-right: 27023 / 41% / -23.08 dB
balance 0.00
base volume: 52057 / 79% / -6.00 dB
volume steps: 65537
muted: no
current latency: 4.86 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 1
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 4
linked by: 4
configured latency: 4.00 ms; range is 4.00 .. 2000.00 ms
card: 0 <alsa_card.pci-0000_00_1f.3>
module: 21
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "CS4207 Analog"
alsa.id = "CS4207 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 0x6001110000 irq 155"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1f.3"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "51ca"
device.form_factor = "internal"
device.string = "front:0"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Built-in Audio Analog Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
properties:
analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-speakers"
analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)
properties:
device.icon_name = "audio-headphones"
active port: <analog-output-headphones>
When the problem is occurring (Headphones selected as output)
pactl list sink-inputs
Sink Input #1
Driver: protocol-native.c
Owner Module: 10
Client: 10
Sink: 1
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "1" format.channel_map = "\"mono\""
Corked: no
Mute: no
Volume: mono: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 4851 usec
Resample method: copy
Properties:
media.name = "playback"
application.name = "speech-dispatcher"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "34"
application.process.id = "4710"
application.process.user = [removed]
application.process.host = "localhost.localdomain"
application.process.binary = "sd_espeak-ng"
application.language = "C"
window.x11.display = ":0"
application.process.machine_id = "cbd63041d9194224ad624e9ddb6a37da"
application.process.session_id = "2"
module-stream-restore.id = "sink-input-by-application-name:speech-dispatcher"
Sink Input #2
Driver: protocol-native.c
Owner Module: 10
Client: 11
Sink: 1
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "1" format.channel_map = "\"mono\""
Corked: no
Mute: no
Volume: mono: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 4839 usec
Resample method: copy
Properties:
media.name = "playback"
application.name = "speech-dispatcher"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "34"
application.process.id = "4724"
application.process.user = [removed]
application.process.host = "localhost.localdomain"
application.process.binary = "sd_cicero"
application.language = "C"
window.x11.display = ":0"
application.process.machine_id = "cbd63041d9194224ad624e9ddb6a37da"
application.process.session_id = "2"
module-stream-restore.id = "sink-input-by-application-name:speech-dispatcher"
Sink Input #3
Driver: protocol-native.c
Owner Module: 10
Client: 12
Sink: 1
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "1" format.channel_map = "\"mono\""
Corked: no
Mute: no
Volume: mono: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 4829 usec
Resample method: copy
Properties:
media.name = "playback"
application.name = "speech-dispatcher"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "34"
application.process.id = "4728"
application.process.user = [removed]
application.process.host = "localhost.localdomain"
application.process.binary = "sd_dummy"
application.language = "C"
window.x11.display = ":0"
application.process.machine_id = "cbd63041d9194224ad624e9ddb6a37da"
application.process.session_id = "2"
module-stream-restore.id = "sink-input-by-application-name:speech-dispatcher"
Sink Input #4
Driver: protocol-native.c
Owner Module: 10
Client: 13
Sink: 1
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "1" format.channel_map = "\"mono\""
Corked: no
Mute: no
Volume: mono: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 4818 usec
Resample method: copy
Properties:
media.name = "playback"
application.name = "speech-dispatcher"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "34"
application.process.id = "4731"
application.process.user = [removed]
application.process.host = "localhost.localdomain"
application.process.binary = "sd_generic"
application.language = "C"
window.x11.display = ":0"
application.process.machine_id = "cbd63041d9194224ad624e9ddb6a37da"
application.process.session_id = "2"
module-stream-restore.id = "sink-input-by-application-name:speech-dispatcher"
When the problem is not occurring (Line Out selected as output):
pactl list sink-inputs
Sink Input #1
Driver: protocol-native.c
Owner Module: 10
Client: 10
Sink: 1
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "1" format.channel_map = "\"mono\""
Corked: no
Mute: no
Volume: mono: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 3734 usec
Resample method: copy
Properties:
media.name = "playback"
application.name = "speech-dispatcher"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "34"
application.process.id = "4710"
application.process.user = [removed]
application.process.host = "localhost.localdomain"
application.process.binary = "sd_espeak-ng"
application.language = "C"
window.x11.display = ":0"
application.process.machine_id = "cbd63041d9194224ad624e9ddb6a37da"
application.process.session_id = "2"
module-stream-restore.id = "sink-input-by-application-name:speech-dispatcher"
Sink Input #2
Driver: protocol-native.c
Owner Module: 10
Client: 11
Sink: 1
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "1" format.channel_map = "\"mono\""
Corked: no
Mute: no
Volume: mono: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 4804 usec
Resample method: copy
Properties:
media.name = "playback"
application.name = "speech-dispatcher"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "34"
application.process.id = "4724"
application.process.user = [removed]
application.process.host = "localhost.localdomain"
application.process.binary = "sd_cicero"
application.language = "C"
window.x11.display = ":0"
application.process.machine_id = "cbd63041d9194224ad624e9ddb6a37da"
application.process.session_id = "2"
module-stream-restore.id = "sink-input-by-application-name:speech-dispatcher"
Sink Input #3
Driver: protocol-native.c
Owner Module: 10
Client: 12
Sink: 1
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "1" format.channel_map = "\"mono\""
Corked: no
Mute: no
Volume: mono: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 4794 usec
Resample method: copy
Properties:
media.name = "playback"
application.name = "speech-dispatcher"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "34"
application.process.id = "4728"
application.process.user = [removed]
application.process.host = "localhost.localdomain"
application.process.binary = "sd_dummy"
application.language = "C"
window.x11.display = ":0"
application.process.machine_id = "cbd63041d9194224ad624e9ddb6a37da"
application.process.session_id = "2"
module-stream-restore.id = "sink-input-by-application-name:speech-dispatcher"
Sink Input #4
Driver: protocol-native.c
Owner Module: 10
Client: 13
Sink: 1
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "1" format.channel_map = "\"mono\""
Corked: no
Mute: no
Volume: mono: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 4788 usec
Resample method: copy
Properties:
media.name = "playback"
application.name = "speech-dispatcher"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "34"
application.process.id = "4731"
application.process.user = [removed]
application.process.host = "localhost.localdomain"
application.process.binary = "sd_generic"
application.language = "C"
window.x11.display = ":0"
application.process.machine_id = "cbd63041d9194224ad624e9ddb6a37da"
application.process.session_id = "2"
module-stream-restore.id = "sink-input-by-application-name:speech-dispatcher"
At long last I figured it out. Many thanks to:
The solution is as follows...
Add the bottom of
/usr/share/pulseaudio/alsa-mixer/paths/analog-output-lineout.conf
add:Add the bottom of
/usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
add:Note: the order in which the declarations appear in these
.conf
files matters. I had been adding these[Element <name>]
declarations to the middle of these files but that caused problems. I suggest starting by putting them at the bottom, and if that doesn't work move them around a bit (I haven't thoroughly tested moving them around so this suggestion may be a red herring, sorry if you find that to be the case).