# How to unmute?



## UglyJoe (Sep 4, 2012)

I've posted my sound issues in the Mobile Computing board, but not had any response. I'm dual booting FreeBSD and OS X on a Macbook, and I can't get sound in FreeBSD. I've dug around a lot, and it appears that the internal speaker is muted, and I have no clue how to unmute it. From a verbose boot dmesg here is the relevant info:


```
hdac0: Patched pins configuration:
hdac0:  nid 20 0x012b4050 as  5 seq  0    Headphones  Jack jack 11 loc  1 color   Green misc 0
hdac0:  nid 21 0x018b3020 as  2 seq  0       Line-in  Jack jack 11 loc  1 color    Blue misc 0
hdac0:  nid 22 0x400000f0 as 15 seq  0      Line-out  None jack  0 loc  0 color Unknown misc 0 [DISABLED]
hdac0:  nid 23 0x400000f0 as 15 seq  0      Line-out  None jack  0 loc  0 color Unknown misc 0 [DISABLED]
hdac0:  nid 24 0x90100140 as  4 seq  0       Speaker Fixed jack  0 loc 16 color Unknown misc 1
hdac0:  nid 25 0x90a00110 as  1 seq  0           Mic Fixed jack  0 loc 16 color Unknown misc 1
hdac0:  nid 26 0x90100141 as  4 seq  1       Speaker Fixed jack  0 loc 16 color Unknown misc 1
hdac0:  nid 27 0x400000f0 as 15 seq  0      Line-out  None jack  0 loc  0 color Unknown misc 0 [DISABLED]
hdac0:  nid 28 0x400000f0 as 15 seq  0      Line-out  None jack  0 loc  0 color Unknown misc 0 [DISABLED]
hdac0:  nid 30 0x014be060 as  6 seq  0     SPDIF-out  Jack jack 11 loc  1 color   White misc 0
hdac0:  nid 31 0x01cbe030 as  3 seq  0      SPDIF-in  Jack jack 11 loc  1 color   White misc 0
...
hdac0:             nid: 24
hdac0:            Name: pin: Speaker (Fixed)
hdac0:      Widget cap: 0x0040018f
hdac0:                  UNSOL STEREO
hdac0:     Association: 3 (0x00000001)
hdac0:         Pin cap: 0x0000373c
hdac0:                  PDC HP OUT IN VREF[ 50 80 100 GROUND HIZ ]
hdac0:      Pin config: 0x90100140
hdac0:     Pin control: 0x00000040 OUT
hdac0:      Output amp: 0x80000000
hdac0:                  mute=1 step=0 size=0 offset=0
hdac0:       Input amp: 0x00270300
hdac0:                  mute=0 step=3 size=39 offset=0
hdac0:     connections: 5
hdac0:           |
hdac0:           + <- nid=12 [audio mixer] (selected)
hdac0:           + [DISABLED] <- nid=13 [audio mixer]
hdac0:           + [DISABLED] <- nid=14 [audio mixer]
hdac0:           + [DISABLED] <- nid=15 [audio mixer] [DISABLED]
hdac0:           + [DISABLED] <- nid=38 [audio mixer] [DISABLED]
...
pcm0: Playback:
pcm0: 
pcm0:     nid=24 [pin: Speaker (Fixed)]
pcm0:       |
pcm0:       + <- nid=12 [audio mixer] [src: pcm, mix]
pcm0:              |
pcm0:              + <- nid=2 [audio output] [src: pcm]
pcm0:              + <- nid=11 [audio mixer] [src: mix]
pcm0: 
pcm0:     nid=26 [pin: Speaker (Fixed)]
pcm0:       |
pcm0:       + <- nid=13 [audio mixer] [src: pcm, mix]
pcm0:              |
pcm0:              + <- nid=3 [audio output] [src: pcm]
pcm0:              + <- nid=11 [audio mixer] [src: mix]
...
pcm0: Master Volume (OSS: vol)
pcm0:    |
pcm0:    +- ctl 14 (nid  12 out):    -64/0dB (65 steps)
pcm0:    +- ctl 15 (nid  12 in   0): mute
pcm0:    +- ctl 16 (nid  12 in   1): mute
pcm0:    +- ctl 17 (nid  13 out):    -64/0dB (65 steps)
pcm0:    +- ctl 18 (nid  13 in   0): mute
pcm0:    +- ctl 19 (nid  13 in   1): mute
pcm0:    +- ctl 34 (nid  24 in ):    mute
pcm0:    +- ctl 38 (nid  26 in ):    mute
pcm0: 
pcm0: PCM Volume (OSS: pcm)
pcm0:    |
pcm0:    +- ctl 15 (nid  12 in   0): mute
pcm0:    +- ctl 18 (nid  13 in   0): mute
pcm0:
```

It appears to me that nid 24, the internal speaker, is simply muted, and I have no idea how to unmute it. mixer returns:


```
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to  75:75
Mixer speaker  is currently set to  75:75
Mixer mix      is currently set to   0:0
Mixer rec      is currently set to  75:75
Mixer igain    is currently set to  75:75
Mixer monitor  is currently set to  75:75
Recording source: monitor
```

I've set gpio as = 0 --> 7 as mentioned in the snd_hda man page, but no luck.

Am I missing something simple here? Any help would be greatly appreciated.


----------



## gentoobob (Oct 4, 2012)

what happens when you plug in headphones?  I had the same issue but it was only on the speakers, not the headphone jack.  turn your mix up to 75 as well.  

I had an issue with a laptop running Fedora that if you pushed mute button on the laptop, in Fedora it would mute.  If I unmuted in Fedora, it wouldnt unmute, I had to actually hit the button again and it would unmute.  

Might choose a different driver?  may think its just muted instead of not working.


----------



## m6tt (Oct 5, 2012)

Nid problems are fun. So if you look at the man page, you'll see there are three really important numbers for every input and output:

NID, AS and SEQ

Nid is just a unique identifier for each input/output.

AS is an "Association", in other words these outputs should all be treated as one, these inputs are together as one input, etc. AS=0 is disabled, AS=15 is the association of the unassociated.

SEQ is the order of the inputs within the AS, although 15 is magic and creates auto-muting headphone / speaker pairs.

In your case, I think headphones (nid20) needs to move to association 4, sequence 15 to fix something happening with jack detection?

put this in /boot/device.hints and reboot


```
hint.hdac.0.cad0.nid20.config="as=4 seq=15"
```

For a detailed explanation (I had to read it a few times before it sunk in)

```
man snd_hda
```

Other guesses:

You may have to swap the seq numbers for your two speaker devices if you have muting issues (esp once headphones and speakers are in the same AS)

You could also try disabling jack autodetection once they're in the same AS. 

I recommend setting each speaker up as a different AS and see if either dsp device makes sound when you cat large files at it  Getting your nid config correct can be very challenging but rewarding once it works...


----------

