Contribute
Register

Glitchy audio.. Realtek 236 rev 2

Status
Not open for further replies.
Maybe because your ACPI setup is wrong. You forgot to apply "IRQ Fix" to your DSDT.
I have actually applied that one and tested it. It didn’t help, so I reverted to the original DSDT. But I can try again. Is this one good?

#Maintained by: RehabMan for: Laptop Patches
#system_IRQ.txt

# This can fix non-working audio and also has an affect on HPET.
#
# Use this if you have issues with patched AppleHDA (required on almost all laptops)
# or if you have issues with HPET (restart after wake).

# IRQ fix
into device name_hid PNP0000 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0100 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0B00 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0103 code_regex IRQNoFlags\s\(\)\n\s+\{.*\} removeall_matched;
into device name_hid PNP0103 code_regex Name\s\(([^,]+),\sResourceTemplate\s\(\).*\n\s+\{((?:.|\n)*)\}\) replace_matched
begin
Name (%1, ResourceTemplate()\n
{\n
IRQNoFlags() { 0, 8, 11, 15 }\n
%2
})\n
end;


edit: Nope, it is still not working with the new DSDT. I applied the patch, which did 4 changes, and saved. Replaced old DSDT, rebooted. Same problem..
 
Last edited:
I have actually applied that one and tested it. It didn’t help, so I reverted to the original DSDT. But I can try again. Is this one good?

#Maintained by: RehabMan for: Laptop Patches
#system_IRQ.txt

# This can fix non-working audio and also has an affect on HPET.
#
# Use this if you have issues with patched AppleHDA (required on almost all laptops)
# or if you have issues with HPET (restart after wake).

# IRQ fix
into device name_hid PNP0000 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0100 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0B00 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0103 code_regex IRQNoFlags\s\(\)\n\s+\{.*\} removeall_matched;
into device name_hid PNP0103 code_regex Name\s\(([^,]+),\sResourceTemplate\s\(\).*\n\s+\{((?:.|\n)*)\}\) replace_matched
begin
Name (%1, ResourceTemplate()\n
{\n
IRQNoFlags() { 0, 8, 11, 15 }\n
%2
})\n
end;


edit: Nope, it is still not working with the new DSDT. I applied the patch, which did 4 changes, and saved. Replaced old DSDT, rebooted. Same problem..

Read FAQ, "Problem Reporting"
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
Included the CodecCommander, aDummyHDA and AppleHDA kext from my SLE, don't know if useful.

Try without patch "patching AppleHDAController's id 8680709d with id 8680719d"...
config.plist/RtVariables/CsrActiveConfig should be 0x67 (probably not related, but thought I should mention it...)
Why did you attach AppleHDA.kext? (it should be vanilla when using an AppleHDA injector).

It is possible the pathmaps/pinconfigs/etc are not matched to your codec.
 
Try without patch "patching AppleHDAController's id 8680709d with id 8680719d"...
config.plist/RtVariables/CsrActiveConfig should be 0x67 (probably not related, but thought I should mention it...)
Why did you attach AppleHDA.kext? (it should be vanilla when using an AppleHDA injector).

It is possible the pathmaps/pinconfigs/etc are not matched to your codec.
The 0x3 value for CsrActiveConfig enables partial SIP. It allows unsigned kexts but not the other thing. Can't recall what is was called. It seemed like a good compromise. I read this on this board some time ago.

I disabled the patch, but the result is the same. Still this
Skärmavbild 2017-04-27 kl. 16.31.34.png


Pressing volume keys shows volume changing and mic works, but no sound in iTunes or system sounds (or from any source)

How can I fix the pinconfigs?
 
The 0x3 value for CsrActiveConfig enables partial SIP. It allows unsigned kexts but not the other thing. Can't recall what is was called. It seemed like a good compromise. I read this on this board some time ago.

I am aware of what it does!
But 0x67 is the recommended value (it is what I use...)

Pressing volume keys shows volume changing and mic works, but no sound in iTunes or system sounds (or from any source)

How can I fix the pinconfigs?

Try a different set of XML files (AppleALC is a good source), or learn about patching AppleHDA...
 
I am aware of what it does!
But 0x67 is the recommended value (it is what I use...)



Try a different set of XML files (AppleALC is a good source), or learn about patching AppleHDA...
Ok sorry. Why is it recommended? I thought SIP was a good thing for protection.

Where can I learn about patching AppleHDA? I have a hardpatched unsigned .kext that I can try as well. Will do it now.
 
Ok sorry. Why is it recommended?

Experience in this board shows that 0x3 causes a lot of problems that don't occur with 0x67.

Where can I learn about patching AppleHDA? I have a hardpatched unsigned .kext that I can try as well. Will do it now.

Google about AppleHDA patching.
Read Intel HDA specification.
 
Experience in this board shows that 0x3 causes a lot of problems that don't occur with 0x67.



Google about AppleHDA patching.
Read Intel HDA specification.
I have my codec verbs, layout.xml and Platforms.xml. Have tried many configs and variations. Have had some help over at InsanelyMac as well... but nothing that led me further.

The old partially working verbs have been replaced with my own calculated verbs. xmls are set accordingly. The issue still persists.

As a last resort I started messing with CodecCommander Info.plist.

Setting UNSOLICITED_ENABLED to 0 made sound a whole lot worse. I didn't know CCommander had that much of an impact on the audio out. I am pretty sure a setting here will be the solution, but I find it hard to get info about the different hda-verbs commands.

Are there any usual commands I could try?

The important part of my codec dump:
Code:
10ec0236 283902518

Codec: Realtek Generic
Adress 0
Subsystem ID 17aa389a 397031578

Node 0x12 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Control: name="Internal Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0x90a60120: [Fixed] Mic at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0


Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x00010014: OUT EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x02


Node 0x19 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Control: name="Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x04a11030: [Jack] Mic at Ext Right
    Conn = 1/8, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=02, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0

Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x0421101f: [Jack] HP Out at Ext Right
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02 0x03*

AUDIO SELECTOR

Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 5
     0x18 0x19 0x1a 0x1b 0x1d
Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x00 0x00]
  Connection: 6
     0x18 0x19 0x1a 0x1b 0x1d 0x12

Node 0x24 [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x12* 0x13

AUDIO OUTPUT

Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x3d 0x3d]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="Generic Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0

AUDIO INPUT

Node 0x07 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x24
Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="Generic Analog", type="Audio", device=0
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x27 0x27]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x23
Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x22

My final codec verbs:

01271C10 01271D01 01271EA0 01271F90
01471C30 01471D01 01471E10 01471F90 01470C02
01971C20 01971D10 01971E81 01971F04
02171C40 02171D10 02171E21 02171F04 02170C02

Output PathMap calc:

14 & 21
14, Decimal 20
21, decimal 33

0x14-> 0x02 , decimal 20->2
0x21-> 0x03, decimal 33->3

All properly set in AppleHDA.kext / AppleHardwareConfig.kext.

The problem: Sound from both speaker and headphones sounds like a scratched vinyl. The distortion comes and goes. It's persistent when switching balance to only left or right out. It is the same on cold boot and after wake, and reboot.
And rarely, sound disappears while playing for a few seconds and then resumes.
 
I have my codec verbs, layout.xml and Platforms.xml. Have tried many configs and variations. Have had some help over at InsanelyMac as well... but nothing that led me further.

The old partially working verbs have been replaced with my own calculated verbs. xmls are set accordingly. The issue still persists.

As a last resort I started messing with CodecCommander Info.plist.

Setting UNSOLICITED_ENABLED to 0 made sound a whole lot worse. I didn't know CCommander had that much of an impact on the audio out. I am pretty sure a setting here will be the solution, but I find it hard to get info about the different hda-verbs commands.

Are there any usual commands I could try?

The important part of my codec dump:
Code:
10ec0236 283902518

Codec: Realtek Generic
Adress 0
Subsystem ID 17aa389a 397031578

Node 0x12 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Control: name="Internal Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0x90a60120: [Fixed] Mic at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0


Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x00010014: OUT EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x02


Node 0x19 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Control: name="Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x04a11030: [Jack] Mic at Ext Right
    Conn = 1/8, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=02, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0

Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x0421101f: [Jack] HP Out at Ext Right
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02 0x03*

AUDIO SELECTOR

Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 5
     0x18 0x19 0x1a 0x1b 0x1d
Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x00 0x00]
  Connection: 6
     0x18 0x19 0x1a 0x1b 0x1d 0x12

Node 0x24 [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x12* 0x13

AUDIO OUTPUT

Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x3d 0x3d]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="Generic Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0

AUDIO INPUT

Node 0x07 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x24
Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="Generic Analog", type="Audio", device=0
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x27 0x27]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x23
Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x22

My final codec verbs:

01271C10 01271D01 01271EA0 01271F90
01471C30 01471D01 01471E10 01471F90 01470C02
01971C20 01971D10 01971E81 01971F04
02171C40 02171D10 02171E21 02171F04 02170C02

Output PathMap calc:

14 & 21
14, Decimal 20
21, decimal 33

0x14-> 0x02 , decimal 20->2
0x21-> 0x03, decimal 33->3

All properly set in AppleHDA.kext / AppleHardwareConfig.kext.

The problem: Sound from both speaker and headphones sounds like a scratched vinyl. The distortion comes and goes. It's persistent when switching balance to only left or right out. It is the same on cold boot and after wake, and reboot.
And rarely, sound disappears while playing for a few seconds and then resumes.

I recently created an AppleHDA_ALC236.kext based on the codec dump.
And changes to CodecCommander.kext to match...
You might search for it... (it was in a Lenovo Yoga 14 thread).

Here.. I dug it up...
https://www.tonymacx86.com/threads/...vo-yoga-710-14ikb.218058/page-15#post-1493801
 
Status
Not open for further replies.
Back
Top