Score:2

Headphone Sound Output Gets Mixed with the Line-Out Output

th flag

Problem Summary

When the line-out speaker is selected as the sound output, the sound is fine. Sound comes only from the speakers connected to the line-out port. However, when the headphone is selected as the output device, sound comes out both from the headphone and the speakers.

(EDIT 1) I tested in Windows 10 (using a live USB), and the problem does not occur there. So, this is definitely a software issue.

Details

My desktop computer has three sound output options:

  • HDMI/Display port (not used)
  • Headphone port at the front (headphone connected)
  • Line-out port at the back (speakers connected)

When line-out is selected as the output device, the sound is heard only from the speakers connected to the line-out port. No problem there.

enter image description here

However, when headphone is selected as the output device, the sound is heard both from headphones and the speakers connected to the line out port.

enter image description here

This is really strange and beats the very purpose of the headphone, namely, privacy and not disturbing others.

Current Settings

My sound card as found is as follows.

sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]

rest snipped

I even tried setting the sound volume of the line-out to zero in settings. This works for the line-out speakers. However, this does not seem to have any effect on the sound volume when the headphone is selected. The line-out speakers are equally loud, even with the sound volume set to zero.

enter image description here

I am not sure whether the output from alsamixer will be useful. But here it goes anyway.

enter image description here

EDIT 1

I booted the PC in Windows 10 using a live USB. And tested the sound outputs again. The problem does not occur there. So, this is definitely a software (some configuration file?) issue.


EDIT 2

Output from pacmd list-sinks (produced when the problem was happening)

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: 18352 /  28% / -33.17 dB,   front-right: 18352 /  28% / -33.17 dB
          balance 0.00
  base volume: 65536 / 100% / 0.00 dB
  volume steps: 65537
  muted: no
  current latency: 22.61 ms
  max request: 4 KiB
  max rewind: 4 KiB
  monitor source: 1
  sample spec: s16le 2ch 44100Hz
  channel map: front-left,front-right
               Stereo
  used by: 1
  linked by: 1
  configured latency: 23.22 ms; range is 0.50 .. 2000.00 ms
  card: 0 <alsa_card.pci-0000_00_1f.3>
  module: 23
  properties:
      alsa.resolution_bits = "16"
      device.api = "alsa"
      device.class = "sound"
      alsa.class = "generic"
      alsa.subclass = "generic-mix"
      alsa.name = "ALC3234 Analog"
      alsa.id = "ALC3234 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 0xf7040000 irq 129"
      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 = "a170"
      device.product.name = "100 Series/C230 Series Chipset Family HD Audio Controller"
      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: unknown)
          properties:
              device.icon_name = "audio-headphones"
  active port: <analog-output-headphones>

EDIT 3

Output from pactl list sink-inputs (while playing through the speakers, non-problem scenario)

Sink Input #20
  Driver: protocol-native.c
  Owner Module: 10
  Client: 34
  Sink: 1
  Sample Specification: float32le 2ch 44100Hz
  Channel Map: front-left,front-right
  Format: pcm, format.sample_format = "\"float32le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
  Corked: no
  Mute: no
  Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
          balance 0.00
  Buffer Latency: 42811 usec
  Sink Latency: 23180 usec
  Resample method: copy
  Properties:
      application.icon_name = "google-chrome"
      media.name = "Playback"
      application.name = "Google Chrome"
      native-protocol.peer = "UNIX socket client"
      native-protocol.version = "34"
      application.process.id = "3091"
      application.process.user = "masroor"
      application.process.host = "masroor-OptiPlex-5040"
      application.process.binary = "chrome"
      application.language = "en_US.UTF-8"
      window.x11.display = ":0"
      application.process.machine_id = "749ee17244e440b5b766e258f177b412"
      module-stream-restore.id = "sink-input-by-application-name:Google Chrome"

Output from pactl list sink-inputs (while playing through the headphones, problem scenario, sound coming out both from the headphones and speakers, though supposed to be coming out only from the headphones)

Sink Input #20
  Driver: protocol-native.c
  Owner Module: 10
  Client: 34
  Sink: 1
  Sample Specification: float32le 2ch 44100Hz
  Channel Map: front-left,front-right
  Format: pcm, format.sample_format = "\"float32le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
  Corked: no
  Mute: no
  Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
          balance 0.00
  Buffer Latency: 45714 usec
  Sink Latency: 22927 usec
  Resample method: copy
  Properties:
      application.icon_name = "google-chrome"
      media.name = "Playback"
      application.name = "Google Chrome"
      native-protocol.peer = "UNIX socket client"
      native-protocol.version = "34"
      application.process.id = "3091"
      application.process.user = "masroor"
      application.process.host = "masroor-OptiPlex-5040"
      application.process.binary = "chrome"
      application.language = "en_US.UTF-8"
      window.x11.display = ":0"
      application.process.machine_id = "749ee17244e440b5b766e258f177b412"
      module-stream-restore.id = "sink-input-by-application-name:Google Chrome"
fr flag
Just to be on the safe side, be sure that you have all your sound connectors fully plugged in. I had my "best" facepalm many years ago when I consumed 3 working days and a full re-install of Windows 98 to fix a mono sound issue just to find that my 3.5mm connector was not fully seated...
Masroor avatar
th flag
@NiclasBörlin I just checked. That does not seem to be the issue. Thanks anyway for the concern.
sancho.s ReinstateMonicaCellio avatar
pl flag
Do you see the same problem if you exchange the ports of speakers and headphones? (I would expect you do, but just in case).
Nate T avatar
it flag
Could you run `pacmd list-sinks` and post the result? Be sure to reproduce the issue and run cmd while audio is running. Thanks.
Nate T avatar
it flag
Also can you run the command `pactl list sink-inputs`_twice_ (once while playing through speakers and again while playing through, erm.. both XD ) and post result. This should be more than enough to derive a solution.
Masroor avatar
th flag
@NateT Please see my edits. Please let me know should you need any more debugging information. And thanks in advance.
Nate T avatar
it flag
It is showing that you have only a single output. In pulse audio sink is an output device and a sink input is the connection between an output and a stream. There should be two separate sinks, one for each output device. What app are you using (that is interfacing pa / producing the sound)?
Nate T avatar
it flag
Nevermind, I see it is chrome.. Yea, your headphones aren't even registering w/ pulseaudio. This may be a chrome thing. Ill check.
Masroor avatar
th flag
@NateT Would it help if the tests are done with other native sound applications?
Nate T avatar
it flag
Sorry I missed this comment. If the issue is not fixed, would you be willing to start a chat? I can help you fix it, but I don't want to fill up the comments doing so. Also, try pactl list. I was expecting more than one sink. You'll have to make a stream and a sink to split them. Im guessing its an alsa driver issue, but you can do the driver's extra work w/ commands.
Masroor avatar
th flag
@NateT, Why not? Please let me know a time convenient for both of us. I live in a zone with time UTC+6.
Nate T avatar
it flag
Im in Indy; +6 as well. I work until 4 or 5p weekdays, but I'm usually free in the evenings. I have plans tomorrow, but I can keep Wednesday free. Would that work for you?
Masroor avatar
th flag
@NateT I am occupied this evening. Can we make it some other day?
Nate T avatar
it flag
Sry. yea. This weekend okay? Let me know when you are available. Don't think I have any plans.
Masroor avatar
th flag
@NateT Given that we have different weekends, and the overall busy lifestyle of both, looks like it will be difficult to match our schedules. Do you want to move to email communication? Slower, but should solve the problem eventually. If you please provide your email address, I can send an email.
Nate T avatar
it flag
My email contains private info (the rest of my name), which makes me uncomfortable. I (as do you most likely : ) ) know the full extent of what can be achieved with access to a full name and a social media account. A few more comments, and AU will make us a chat room where we can both just type whatever whenever and it will persist. Should work the same as email for our purposes. As a bonus, it will port all of our previous comments there, and clean up the mess we've made of your question space. XD
Nate T avatar
it flag
I am surprised it hasn't done so already. This many comments always makes me uncomfortable. SO has conditioned me properly, I guess.
Score:0
pl flag

You could try enabling the feature of simultaneous output, check how it works, and then disabling it. Perhaps that fixes your problem.

Install paprefs, run it, and enable Simultaneous output. Then run pavucontrol and go to Output devices, and try tinkering with the options (you should see Simultaneous output...). Or go to Settings -> Sound -> Output -> Simultaneous output..., and also tinker with that.

In the meantime, you could check if you see anything strange in pavucontrol -> Configuration.

Sources:

  1. Play sound through two or more outputs/devices
Masroor avatar
th flag
I tried extensively with your answer and the answer in the link. I have explored all the possible combinations. Unfortunately, it did not work.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.