# No sound from earphones



## tim-m89 (Jul 22, 2009)

Hi my laptop has freebsd amd64 7.2. Sound from the speakers works fine. Sound from the earphone port does not work at all. I can reboot into windows xp to confirm that this is not a physical problem. I have tried turning up the volume with no luck. Last time it worked I was using freebsd 7.1. I think the upgrade may have broke it. Please help.


----------



## SirDice (Jul 22, 2009)

Would you mind telling us which audio card (and driver) you have?


----------



## tim-m89 (Jul 22, 2009)

picconf -lv


```
vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) High Definition Audio'
    class      = multimedia
    subclass   = HDA
```

kldstat


```
kernel
snd_hda.ko
sound.ko
acpi_sony.ko
atapicam.ko
sem.ko
linux.ko
rtc.ko
i915.ko
drm.ko
ntfs.ko
if_wpi.ko
wpifw.ko
```

Thanks


----------



## SirDice (Jul 22, 2009)

IIRC the hda driver has had some major updates between 7.1 and 7.2. 

You may need to play with the device.hints a bit to get the headphone jack to work. 
See snd_hda(4) for more information about this.


----------



## mdg583 (Jul 22, 2009)

This probably isn't the problem, but I think you can mute and unmute the internal speaker and headphones separately with the mixer program.


----------



## aragon (Jul 22, 2009)

What laptop do you have?

And can you post /var/run/dmesg.boot after a verbose boot (boot -v)?


----------



## ale (Jul 22, 2009)

What is the output of _cat /dev/sndstat_ and _sysctl -a hw.snd.default_unit_ ?


----------



## tim-m89 (Jul 23, 2009)

vaio sz483n

sysctl hw.snd.default_unit:


> hw.snd.default_unit: 0



cat /dev/sndstat:


> FreeBSD Audio Driver (newpcm: 64bit 2007061600/amd64)
> Installed devices:
> pcm0: <HDA Sigmatel STAC9872AK PCM #0 Analog> at cad 0 nid 1 on hdac0 kld snd_hda [MPSAFE] (1p:1v/1r:1v channels duplex default)
> pcm1: <HDA Sigmatel STAC9872AK PCM #1 Analog> at cad 0 nid 1 on hdac0 kld snd_hda [MPSAFE] (1p:1v/0r:0v channels)



My verbose dmesg.txt is tard bziped and attached.

Thanks.


----------



## ale (Jul 23, 2009)

Can you try setting the sysctl to 1 and try again?
`# sysctl hw.snd.default_unit=1`


----------



## shuxuef (Jul 23, 2009)

SirDice said:
			
		

> IIRC the hda driver has had some major updates between 7.1 and 7.2.
> 
> You may need to play with the device.hints a bit to get the headphone jack to work.
> See snd_hda(4) for more information about this.



As SirDice said, you should use the device.hints. You need to use this information from dmesg.boot

```
hdac0:  nid 10 0x03211020 as  2 seq  0    Headphones  Jack jack  1 loc  3 color   Black misc 0
hdac0:  nid 11 0x411111f0 as 15 seq  0       Speaker  None jack  1 loc  1 color   Black misc 1 [DISABLED]
hdac0:  nid 12 0x411111f0 as 15 seq  0       Speaker  None jack  1 loc  1 color   Black misc 1 [DISABLED]
hdac0:  nid 13 0x03a15030 as  3 seq  0           Mic  Jack jack  1 loc  3 color     Red misc 0
hdac0:  nid 14 0x411111f0 as 15 seq  0       Speaker  None jack  1 loc  1 color   Black misc 1 [DISABLED]
hdac0:  nid 15 0x90170110 as  1 seq  0       Speaker Fixed jack  7 loc 16 color Unknown misc 1
hdac0:  nid 17 0x411111f0 as 15 seq  0       Speaker  None jack  1 loc  1 color   Black misc 1 [DISABLED]
hdac0:  nid 19 0x411111f0 as 15 seq  0       Speaker  None jack  1 loc  1 color   Black misc 1 [DISABLED]
hdac0:  nid 20 0x90a7013e as  3 seq 14           Mic Fixed jack  7 loc 16 color Unknown misc 1
hdac0: 3 associations found:
hdac0: Association 0 (1) out:
hdac0:  Pin nid=15 seq=0
hdac0: Association 1 (2) out:
hdac0:  Pin nid=10 seq=0
hdac0: Association 2 (3) in:
hdac0:  Pin nid=13 seq=0
hdac0:  Pin nid=20 seq=14
```
to set the 

```
nid 10 0x03211020 as  2 seq  0    Headphones  Jack jack  1 loc  3 color   Black misc 0
```
to 

```
nid 10 0x03211020 as  1 seq  15    Headphones  Jack jack  1 loc  3 color   Black misc 0
```

I believe adding the following to the device.hints would work:

```
hint.hdac.0.cad0.nid10.config="as=1 seq=15"
```
But please remember to reboot.


----------



## tim-m89 (Jul 23, 2009)

ale said:
			
		

> Can you try setting the sysctl to 1 and try again?
> `# sysctl hw.snd.default_unit=1`



That made the earphones work but also prevented speakers from working.


----------



## tim-m89 (Jul 23, 2009)

shuxuef said:
			
		

> I believe adding the following to the device.hints would work:
> 
> ```
> hint.hdac.0.cad0.nid10.config="as=1 seq=15"
> ...



Is that from experience? I'd hate to know the kind of num lock errors you have to go throw. :e

Thanks a lot that solution was 100% spot on.


----------



## shuxuef (Jul 23, 2009)

tim-m89 said:
			
		

> Is that from experience? I'd hate to know the kind of num lock errors you have to go throw. :e
> 
> Thanks a lot that solution was 100% spot on.



Yes, I had the same problem before. All I did was just the reading the manual page of snd_hda(4).


----------

