Not sound to headphones

joplass

Active Member

Reaction score: 15
Messages: 136

I feel I am very close but I also have to admit that after a few trials I not sure I know what I am doing. I am following the thread here to sort out the issue with my headphones output. When I really did not know anything about pins I opened up another thread a few weeks back.

Hopefully someone can come along and help out.

/boot/device.hints
Code:
hint.hdac.1.cad1.nid22.config="as=0"
hint.hdac.1.cad1.nid21.config="as=0 seq=15"
Code:
$ cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0041) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0041) (HDMI/DP 8ch)> (play)
pcm2: <Realtek ALC292 (Analog 2.0+HP/2.0)> (play/rec)
pcm3: <Realtek ALC292 (Analog)> (play/rec) default
No devices installed from userspace.
Code:
$ sysctl -a | grep snd
device    snd_cmi
device    snd_csa
device    snd_emu10kx
device    snd_es137x
device    snd_hda
device    snd_ich
device    snd_via8233
hw.snd.maxautovchans: 16
hw.snd.default_unit: 3
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 0
hw.snd.verbose: 0
hw.snd.vpc_mixer_bypass: 1
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.basename_clone: 1
hw.snd.compat_linux_mmap: 0
hw.snd.syncdelay: -1
hw.snd.usefrags: 0
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.timeout: 5
hw.snd.latency_profile: 1
hw.snd.latency: 2
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1
Code:
sysctl -a | grep hda

dev.hdaa.1.nid27_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid27_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid27: pin: Speaker (None) [DISABLED]
dev.hdaa.1.nid26_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid26_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid26: pin: Speaker (None) [DISABLED]
dev.hdaa.1.nid25_original: 0x01a1903e as=3 seq=14 device=Mic conn=Jack ctype=1/8 loc=Rear color=Pink misc=0
dev.hdaa.1.nid25_config: 0x01a1903e as=3 seq=14 device=Mic conn=Jack ctype=1/8 loc=Rear color=Pink misc=0
dev.hdaa.1.nid25: pin: Mic (Pink Jack)
dev.hdaa.1.nid24_original: 0x02a19031 as=3 seq=1 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=0
dev.hdaa.1.nid24_config: 0x02a19031 as=3 seq=1 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=0
dev.hdaa.1.nid24: pin: Mic (Pink Jack)
dev.hdaa.1.nid23: vendor widget [DISABLED]
dev.hdaa.1.nid22_original: 0x01014020 as=2 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid22_config: 0x01014020 as=2 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid22: pin: Line-out (Green Jack)
dev.hdaa.1.nid21_original: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.1.nid21_config: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.1.nid21: pin: Headphones (Green Jack)
dev.hdaa.1.nid20_original: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20_config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20: pin: Speaker (Fixed)
dev.hdaa.1.nid19_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid19_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid19: pin: Speaker (None) [DISABLED]
dev.hdaa.1.nid18_original: 0x90a60140 as=4 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.1.nid18_config: 0x90a60140 as=4 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
Code:
dmesg

hdacc0: <NVIDIA (0x0041) HDA CODEC> at cad 0 on hdac0
hdaa0: <NVIDIA (0x0041) Audio Function Group> at nid 1 on hdacc0
pcm0: <NVIDIA (0x0041) (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm1: <NVIDIA (0x0041) (HDMI/DP 8ch)> at nid 7 on hdaa0
hdacc1: <Realtek ALC292 HDA CODEC> at cad 0 on hdac1
hdaa1: <Realtek ALC292 Audio Function Group> at nid 1 on hdacc1
pcm2: <Realtek ALC292 (Analog 2.0+HP/2.0)> at nid 20,21 and 24,25 on hdaa1
pcm3: <Realtek ALC292 (Analog)> at nid 22 and 18 on hdaa1
 

mickey

Aspiring Daemon

Reaction score: 150
Messages: 522

/boot/device.hints
Code:
hint.hdac.1.cad1.nid22.config="as=0"
hint.hdac.1.cad1.nid21.config="as=0 seq=15"
Code:
sysctl -a | grep hda

dev.hdaa.1.nid22_original: 0x01014020 as=2 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid22_config: 0x01014020 as=2 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid22: pin: Line-out (Green Jack)
dev.hdaa.1.nid21_original: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.1.nid21_config: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.1.nid21: pin: Headphones (Green Jack)
dev.hdaa.1.nid20_original: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20_config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20: pin: Speaker (Fixed)
It looks like your settings never really got applied correctly, the configuration for nids 20, 21 and 22 is still identical to the original ones. I guess a verbose boot could reveal more information about what is going wrong. Where did you get the association number 0 from? Your original configuration seems to use as 1 for headphones and some internal speaker (which is kinda odd) and as 2 for the green line-out jack on the back of your computer. So if your goal is to group your headphones and the green line-out jack (with auto-mute if headphones are plugged in), the following should work:
Code:
hint.hdaa.1.nid21.config="as=2 seq=15"
This puts your headphones (nid21) into the same association (as=2) as your green line-out jack (nid22) with a sequence number of 15 (auto mute), and leaves the internal speaker in association 1.
 
OP
J

joplass

Active Member

Reaction score: 15
Messages: 136

I used that configuration with "0" after trying so many options, out of frustration I guess.
Code:
hint.hdaa.1.nid21.config="as=2 seq=15"
Did not fix the headphones issue but what it does internal speakers are still playing even with headphones plugged in. I also try playing with
Code:
sysctl
but sound only going to speakers even with headphones plugged in.
 
OP
J

joplass

Active Member

Reaction score: 15
Messages: 136

Ok I find out how to boot in verbose but there must be a way to slow down the process. That I can't find. Help please.
 

mickey

Aspiring Daemon

Reaction score: 150
Messages: 522

I used that configuration with "0" after trying so many options, out of frustration I guess.
Code:
hint.hdaa.1.nid21.config="as=2 seq=15"
Did not fix the headphones issue but what it does internal speakers are still playing even with headphones plugged in. I also try playing with
Code:
sysctl
but sound only going to speakers even with headphones plugged in.
So I am guessing this is a notebook computer that actually has integrated speakers, which you did not mention, and that you do not use the green line-out jack for anything. In that case the original configuration made by your BIOS should be ok, as it already groups your headphones and internal speakers into the same association (as=1 with auto-mute) and puts the green line-out jack into a separate association (as=2):

Code:
dev.hdaa.1.nid22_original: 0x01014020 as=2 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid22_config: 0x01014020 as=2 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid22: pin: Line-out (Green Jack)
dev.hdaa.1.nid21_original: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.1.nid21_config: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.1.nid21: pin: Headphones (Green Jack)
dev.hdaa.1.nid20_original: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20_config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20: pin: Speaker (Fixed)
So if that is how you want it (internal speakers auto-mute when headphones plugged in and the green line-out jack as a separate pcm device), then there is no need at all to change the pin configuration and you should remove those lines from your /boot/device.hints.

Code:
$ cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0041) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0041) (HDMI/DP 8ch)> (play)
pcm2: <Realtek ALC292 (Analog 2.0+HP/2.0)> (play/rec)
pcm3: <Realtek ALC292 (Analog)> (play/rec) default
No devices installed from userspace.
This suggests that pcm2 is where you would want sound to go by default, as it has the headphones attached (+HP), but pcm3 is being used as the default sound device, which is probably due to:
Code:
hw.snd.default_unit: 3
hw.snd.default_auto: 0
This disables the automatic configuration of the default sound device and sets the default sound unit to 3. I'd suggest you to either re-enable the automatic configuration and see if the kernel auto-configures it properly to use unit 2 instead, or to manually set it to use unit 2 and then try if sound output works right for you.
 
OP
J

joplass

Active Member

Reaction score: 15
Messages: 136

Hi Mickey,

Thank you for all your help.
My apologies, I should have mentioned that this is a laptop.

I removed all sound hints from /boot/device.hints

Not sure but you are suggesting both
Code:
hw.snd.default_unit: 3
hw.snd.default_auto: 0
in
/etc/sysctl.conf correct?
 

tyson

Member

Reaction score: 16
Messages: 45

People should sometimes read manual pages for real :D.
snd_hda()
The following options are supported:

as

Association number. Associations are used to group
individual pins to form a complex multi-pin device.
For example, to group 4 connectors for 7.1
input/output, or to treat several input connectors as
sources for the same input device. Association
numbers can be specified as numeric values from 0 to
15. A value of 0 means disabled pin. A value of 15
is a set of independent unassociated pins. Each
association includes only pins of the same direction
(in/out) and is detected atomically (all pins or
none). A separate PCM audio device is created for
every pair of input and output associations.

seq

Sequence number. A unique, per-association number
used to order pins inside the particular association.
Sequence numbers can be specified as numeric values
from 0 to 15.

The sequence number 15 has a special meaning for
output associations. Output pins with this number and
device type “Headphones”
will duplicate (with
automatic mute if jack detection is supported) the
first pin in that association.

The sequence numbers 14 and 15 has a special meaning
for input associations. Their presence in association
defines it as multiplexed or mixed respectively. If
none of them are present and there are more than one
pin in association, the association will provide
multichannel input.

For multichannel input/output associations sequence
numbers encode channel pairs positions: 0 - Front, 1 -
Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side.
Standard combinations are: (0) - Stereo; (0, 2), (0,
4) - Quadro; (0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4)
- 7.1.
Code:
hint.hdaa.1.nid22.config="as=1 seq=0"
hint.hdaa.1.nid21.config="as=1 seq=15"
is what u should set, and remove any changes(regarding hw.snd.default) from sysctl.conf, than reboot.
 

mickey

Aspiring Daemon

Reaction score: 150
Messages: 522

I removed all sound hints from /boot/device.hints

Not sure but you are suggesting both
Code:
hw.snd.default_unit: 3
hw.snd.default_auto: 0
in
/etc/sysctl.conf correct?
According to the information you posted that is what you got right now, and it doesn't seem to do what you want, as you need pcm2 to be the default sound device. Normally the sound driver in the kernel automatically tries to guess the default sound device, but as hw.snd.default_auto is set to 0 that auto-configuration is disabled explicitly. So it seems you already set those in your /etc/sysctl.conf. Now there are two ways to go about this:
  1. Remove both, hw.snd.default_auto and hw.snd.default_unit (this should re-enable auto-configuration of the default sound device), reboot the machine, then check which pcm device has the default tag using cat /dev/sndstat. If pcm2 has the default tag, check if sound works as you want it to.
  2. Leave hw.snd.default_auto at a value of 0 (auto-configuration disabled) and set hw.snd.default_unit to a value of 2, reboot the machine, then confirm that pcm2 now has the default tag using cat /dev/sndstat, check if sound works as you want it to.
 
OP
J

joplass

Active Member

Reaction score: 15
Messages: 136

Sir., Madame, I alway read the handbook and scan this forum for any possible solution before starting a thread. Both options you posted I have tried and they did not work.

People should sometimes read manual pages for real :D.
snd_hda()


Code:
hint.hdaa.1.nid22.config="as=1 seq=0"
hint.hdaa.1.nid21.config="as=1 seq=15"
is what u should set, and remove any changes(regarding hw.snd.default) from sysctl.conf, than reboot.
 
OP
J

joplass

Active Member

Reaction score: 15
Messages: 136

Change or no change to /etc/sysctl.conf, default is 2 and no sound to headphones.

According to the information you posted that is what you got right now, and it doesn't seem to do what you want, as you need pcm2 to be the default sound device. Normally the sound driver in the kernel automatically tries to guess the default sound device, but as hw.snd.default_auto is set to 0 that auto-configuration is disabled explicitly. So it seems you already set those in your /etc/sysctl.conf. Now there are two ways to go about this:
  1. Remove both, hw.snd.default_auto and hw.snd.default_unit (this should re-enable auto-configuration of the default sound device), reboot the machine, then check which pcm device has the default tag using cat /dev/sndstat. If pcm2 has the default tag, check if sound works as you want it to.
  2. Leave hw.snd.default_auto at a value of 0 (auto-configuration disabled) and set hw.snd.default_unit to a value of 2, reboot the machine, then confirm that pcm2 now has the default tag using cat /dev/sndstat, check if sound works as you want it to.
 
OP
J

joplass

Active Member

Reaction score: 15
Messages: 136

Code:
dmesg | grep nid | less
Code:
pcm1: <NVIDIA (0x0041) (HDMI/DP 8ch)> at nid 7 on hdaa0
pcm1:     nid=7 [pin: Digital-out (Jack)]
pcm1:       + <- nid=9 [audio output] [src: pcm]
hdaa1: <Realtek ALC292 Audio Function Group> at nid 1 on hdacc1
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1: Patching widget caps nid=29 0x00400400 -> 0x00700400
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  Pin nid=20 seq=0
hdaa1:  Pin nid=21 seq=15
hdaa1:  Pin nid=22 seq=0
hdaa1:  Pin nid=24 seq=1
hdaa1:  Pin nid=25 seq=14
hdaa1:  Pin nid=18 seq=0
hdaa1:  Tracing nid 11 to out
hdaa1:  nid 11 is input monitor
hdaa1:  Tracing nid 18 to out
hdaa1:  Tracing nid 24 to out
hdaa1:  Tracing nid 25 to out
hdaa1: Headphones redirection for association 0 nid=21 using unsolicited responses.
pcm2: <Realtek ALC292 (Analog 2.0+HP/2.0)> at nid 20,21 and 24,25 on hdaa1
pcm2:     nid=20 [pin: Speaker (Fixed)]
pcm2:       + <- nid=12 [audio mixer] [src: pcm, mix]
pcm2:              + <- nid=2 [audio output] [src: pcm]
pcm2:              + <- nid=11 [audio mixer] [src: mix]
pcm2:     nid=21 [pin: Headphones (Green Jack)]
pcm2:       + <- nid=12 [audio mixer] [src: pcm, mix]
pcm2:              + <- nid=2 [audio output] [src: pcm]
pcm2:              + <- nid=11 [audio mixer] [src: mix]
pcm2:     nid=8 [audio input]
pcm2:       + <- nid=35 [audio selector] [src: speaker, line, mic, mix]
pcm2:              + <- nid=24 [pin: Mic (Pink Jack)] [src: mic]
pcm2:              + <- nid=25 [pin: Mic (Pink Jack)] [src: line]
pcm2:              + <- nid=29 [beep widget] [src: speaker]
pcm2:              + <- nid=11 [audio mixer] [src: mix]
pcm2:     nid=11 [audio mixer]
pcm2:       + <- nid=24 [pin: Mic (Pink Jack)] [src: mic]
pcm2:       + <- nid=25 [pin: Mic (Pink Jack)] [src: line]
pcm2:       + <- nid=29 [beep widget] [src: speaker]
pcm2:    +- ctl  1 (nid   2 out):    -65/0dB (88 steps)
pcm2:    +- ctl 10 (nid  12 in   0): mute
pcm2:    +- ctl 11 (nid  12 in   1): mute
pcm2:    +- ctl 18 (nid  20 in ):    mute
pcm2:    +- ctl 19 (nid  21 in ):    mute
pcm2:    +- ctl  1 (nid   2 out):    -65/0dB (88 steps)
pcm2:    +- ctl 10 (nid  12 in   0): mute
pcm2:    +- ctl  3 (nid   8 in   0): -17/30dB (64 steps) + mute
pcm2:    +- ctl  5 (nid  11 in   0): -34/12dB (32 steps) + mute
pcm2:    +- ctl 22 (nid  24 out):    0/30dB (4 steps)
pcm2:    +- ctl  3 (nid   8 in   0): -17/30dB (64 steps) + mute
pcm2:    +- ctl  6 (nid  11 in   1): -34/12dB (32 steps) + mute
pcm2:    +- ctl 23 (nid  25 out):    0/36dB (4 steps)
pcm2:    +- ctl  3 (nid   8 in   0): -17/30dB (64 steps) + mute
pcm2:    +- ctl  9 (nid  11 in   4): -34/12dB (32 steps) + mute
pcm2:    +- ctl  3 (nid   8 in   0): -17/30dB (64 steps) + mute
pcm2:    +- ctl  3 (nid   8 in   0): -17/30dB (64 steps) + mute
pcm2:    +- ctl 11 (nid  12 in   1): mute
pcm2:    +- ctl 11 (nid  12 in   1): mute
pcm3: <Realtek ALC292 (Analog)> at nid 22 and 18 on hdaa1
pcm3:     nid=22 [pin: Line-out (Green Jack)]
pcm3:       + <- nid=13 [audio mixer] [src: pcm, mix]
pcm3:              + <- nid=3 [audio output] [src: pcm]
pcm3:              + <- nid=11 [audio mixer] [src: mix]
pcm3:     nid=9 [audio input]
pcm3:       + <- nid=34 [audio selector] [src: speaker, monitor]
pcm3:              + <- nid=29 [beep widget] [src: speaker]
pcm3:              + <- nid=18 [pin: Mic (Fixed)] [src: monitor]
pcm3:    +- ctl  2 (nid   3 out):    -65/0dB (88 steps)
pcm3:    +- ctl 12 (nid  13 in   0): mute
pcm3:    +- ctl 13 (nid  13 in   1): mute
 
Top