This could be a hardware issue and it could be a hardware issue that
Linux is "fixing" for you.
I have seen this exact broken behaviour before when connecting
headphones to a headset socket or vice versa. I can't remember which way
round it was.
It is entirely reasonable for modern OSes and audio chipsets to be able
to detect this and fix it. Hmm wikipedia says that some modern systems
do detect this.
You can buy or make your own headphone to headset adapter if we can't
fix the device driver, but fixing the device driver is probably easier
than buying an adapter. The adapters seem a bit rare, probably because
the device drivers always fix the problem these days. Or you could try
swapping out your headphones/headset with a headset/headphones?
An explanation of what is (probably) going on
=============================================
This appears to be what is going, but it is just FYI since it doesn't
fix NetBSD.
The poor audio quality from a fully inserted jack is because the what
you are hearing is the _difference_ between the left and right channels
played through both speakers at once. the left and right channels are
being driven normally, but the ground isn't connected, so instead of
getting full power across each speaker all you get is the voltage
difference of the left and right channels split over the two speakers. I
think that's what's going on here.
When you pull the jack out slightly, the ground ring now gets connected
fine, but the right audio channel is no longer connected. This gives you
a good left channel only. I'm pretty sure this is right.
See also https://en.wikipedia.org/wiki/Phone_connector_(audio) and
https://en.wikipedia.org/wiki/Phone_connector_(audio)#Interoperability
On 9/02/23 17:13, Mayuresh wrote:
On NetBSD 10.0 BETA, amd64, build of 10 Jan 23, on an asus laptop I face
this problem:
If I use a 3.5mm headphone jack the audio is of very poor quality, barely
some sort of a noise.
If I insert the jack partially, then the audio is proper, but only through
the left speaker.
The outputs.master2 control seems to be relevant to the headphone jack.
Have set others to 0.
$ mixerctl -a
outputs.master=0,0
outputs.master2=254,254
inputs.reclvl=92,92
inputs.reclvl.mute=on
outputs.master3=0,0
outputs.master3.mute=off
record.monitor=0,0
outputs.master4=0,0
outputs.master4.mute=off
inputs.reclvl2=0,0
inputs.reclvl2.mute=on
outputs.dacsel=DAC00,DAC01
record.source=ADC02
Possibly relevant bits of dmesg
$ grep audio /var/run/dmesg.boot
hdaudio0 at pci0 dev 14 function 0: HD Audio Controller
hdaudio0: interrupting at msi0 vec 0
hdaudio0: HDA ver. 1.0, OSS 6, ISS 7, BSS 0, SDO 1, 64-bit
hdafg0 at hdaudio0 vendor 0x10EC product 0x0256 nid 0x01: Realtek product
0256
nid=02 [audio output] [source: dac]
nid=03 [audio output] [source: dac]
audio0 at hdafg0: playback, capture, full duplex, independent
audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for playback
audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for recording
spkr0 at audio0: PC Speaker (synthesized)
hdafg1 at hdaudio0 vendor 0x8086 product 0x280D nid 0x01: Intel HDMI/DP
nid=02 [audio output] [source: dac]
audio1 at hdafg1: playback, capture, full duplex, independent
audio1: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for playback
audio1: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for recording
spkr1 at audio1: PC Speaker (synthesized)
Note: On Linux the headphone jack works fine, with fully inserted jack
both left and right speakers work. So no hardware issue.
Please help.