How to solve tiny sound on a MacBook Pro 9,2 (Mid-2012)

Machiaveli

Member

Reaction score: 25
Messages: 58

I have finally found how to solve tiny sound on internal speakers on a MacBook Pro 13 Mid-2012 (macbookpro9,2 model) running FreeBSD 12.2-RELEASE-p7 (should also works on 12.1).

This laptop has 2 internal speakers (the right is tied to a tiny sub-woofer) so the default pin assignment should be corrected by inverting sequence of internal speakers pins that are in the same association to correctly power up the sub-woofer. From snd_hda(4) sequences are explained:

Code:
            For multichannel input/output associations sequence num-
            bers encode    channel    pairs positions: 0 - Front, 1 -    Cen-
            ter/LFE, 2 - Back, 3 - Front Wide Center, 4    - Side.     Stan-
            dard combinations are: (0) - Stereo; (0, 2), (0, 4)    -
            Quadro; (0,    1, 2), (0, 1, 4) - 5.1;    (0, 1, 2, 4) - 7.1.

Solution? Add this to /boot/device.hints:
Code:
hint.hdaa.0.nid10.config="seq=0"
hint.hdaa.0.nid11.config="seq=1"

This will assign the front channel to left speaker (nid10) and the Center/LFE to the right speaker (nid11).

Code:
 % cat /dev/sndstat
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <Cirrus Logic CS4206 (Internal Analog 3.1/2.0)> on hdaa0  (1p:4v/1r:4v) default
pcm1: <Cirrus Logic CS4206 (Analog Headphones)> on hdaa0  (1p:1v/0r:0v)
pcm2: <Cirrus Logic CS4206 (Digital)> on hdaa0  (1p:1v/0r:0v)
No devices installed from userspace.

Code:
% dmesg | grep hda
hdac0: <Intel Panther Point HDA Controller> mem 0xa0810000-0xa0813fff at device 27.0 on pci0
hdac0: PCI card vendor: 0x8086, device: 0x7270
hdac0: HDA Driver Revision: 20120126_0002
hdac0: Config options: on=0x00000000 off=0x00000000
hdac0: attempting to allocate 1 MSI vectors (1 supported)
hdac0: using IRQ 265 for MSI
hdac0: Caps: OSS 4, ISS 4, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256
ahcich0: hdacc0: acpi_acad0: <Cirrus Logic CS4206 HDA CODEC> at cad 0 on hdac0
hdaa0: <Cirrus Logic CS4206 Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x106b5200
hdaa0: ahcich0: AHCI reset: device found
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: disabled
ahcich1: hdaa0:  GPIO2: disabled
hdaa0:  GPIO3: output state=0
hdaa0: ahcich1: AHCI reset: device ready after 0ms
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0:  9 002b4030 3  0  Headphones    Jack  Combo   0x00       Green   0
hdaa0: 10 90100121 2  1  Speaker       Fixed Unknown Internal   Unknown 1
hdaa0: 11 90100120 2  0  Speaker       Fixed Unknown Internal   Unknown 1
hdaa0: 12 400000f0 15 0  Line-out      None  Unknown 0x00       Unknown 0
hdaa0: 13 90a00110 1  0  Mic           Fixed Unknown Internal   Unknown 1
hdaa0: 14 400000f0 15 0  Line-out      None  Unknown 0x00       Unknown 0
hdaa0: 15 400000f0 15 0  Line-out      None  Unknown 0x00       Unknown 0
hdaa0: 16 004be040 4  0  SPDIF-out     Jack  Combo   0x00       White   0
hdaa0: 18 400000f0 15 0  Line-out      None  Unknown 0x00       Unknown 0
hdaa0: 21 400000f0 15 0  Line-out      None  Unknown 0x00       Unknown 0
hdaa0: Patching pin config nid=10 0x90100121 -> 0x90100120
hdaa0: Patching pin config nid=11 0x90100120 -> 0x90100121
hdaa0: Patched pins configuration:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0:  9 002b4030 3  0  Headphones    Jack  Combo   0x00       Green   0
battery0: hdaa0: 10 90100120 2  0  Speaker       Fixed Unknown Internal   Unknown 1
hdaa0: 11 90100121 2  1  Speaker       Fixed Unknown Internal   Unknown 1
battery0: hdaa0: 12 400000f0 15 0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa0: 13 90a00110 1  0  Mic           Fixed Unknown Internal   Unknown 1
battery0: hdaa0: 14 400000f0 15 0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa0: gra1 = 0
ahcich0: hdaa0: 16 004be040 4  0  SPDIF-out     Jack  Combo   0x00       White   0
hdaa0: 18 400000f0 15 0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa0: AHCI reset: device ready after 100ms
hdaa0: 4 associations found:
hdaa0: Association 0 (1) in:
hdaa0:  Pin nid=13 seq=0
hdaa0: Association 1 (2) out:
hdaa0:  Pin nid=10 seq=0
hdaa0:  Pin nid=11 seq=1
hdaa0: Association 2 (3) out:
hdaa0:  Pin nid=9 seq=0
hdaa0: Association 3 (4) out:
hdaa0:  Pin nid=16 seq=0
hdaa0: Tracing association 0 (1)
hdaa0:  Unable to trace pin 13 to ADC 5, undo traces
hdaa0:  Pin 13 traced to ADC 6
hdaa0: Association 0 (1) trace succeeded
hdaa0: Tracing association 1 (2)
hdaa0:  Pin 10 traced to DAC 3
hdaa0:  Pin 11 traced to DAC 4
hdaa0: Association 1 (2) trace succeeded
hdaa0: Tracing association 2 (3)
hdaa0:  Pin 9 traced to DAC 2
hdaa0: Association 2 (3) trace succeeded
hdaa0: Tracing association 3 (4)
hdaa0:  Pin 16 traced to DAC 8
hdaa0: Association 3 (4) trace succeeded
hdaa0: Looking for additional ADC for association 0 (1)
hdaa0: Looking for additional DAC for association 1 (2)
hdaa0: Looking for additional DAC for association 2 (3)
hdaa0: Looking for additional DAC for association 3 (4)
hdaa0: Tracing input monitor
hdaa0: Tracing other input monitors
hdaa0:  Tracing nid 13 to out
hdaa0: Tracing beeper
hdaa0: GPIO commit
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: output state=1
hdaa0:  GPIO2: disabled
hdaa0:  GPIO3: output state=1
hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm0: <Cirrus Logic CS4206 (Internal Analog 3.1/2.0)> at nid 10,11 and 13 on hdaa0
pcm1: <Cirrus Logic CS4206 (Analog Headphones)> at nid 9 on hdaa0
pcm2: <Cirrus Logic CS4206 (Digital)> at nid 16 on hdaa0
hdacc1: <Intel Panther Point HDA CODEC> at cad 3 on hdac0
hdaa1: <Intel Panther Point Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x80860101
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  6 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  7 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1: Patched pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  6 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  7 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1: hdaa_audio_as_parse: Duplicate pin 0 (6) in association 1! Disabling association.
hdaa1: hdaa_audio_as_parse: Duplicate pin 0 (7) in association 1! Disabling association.
hdaa1: 1 associations found:
hdaa1: Association 0 (1) out (disabled):
hdaa1:  Pin nid=7 seq=0
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1: Tracing beeper
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
hdaa0: Pin sense: nid=9 sense=0x80000000 (connected)
hdaa0: Pin sense: nid=9 sense=0x00000000 (disconnected)
hdaa0: GPIO commit
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: output state=1
hdaa0:  GPIO2: disabled
hdaa0:  GPIO3: output state=1
hdaa0: GPIO commit
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: output state=1
hdaa0:  GPIO2: disabled
hdaa0:  GPIO3: output state=1
hdaa0: GPIO commit
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: output state=1
hdaa0:  GPIO2: disabled
hdaa0:  GPIO3: output state=1
 
Top