How to remap audio jack in BIOS?

I have tried to replace these 2 modules myself in the past.It doesn’t work.Nothing happened.

Did you do what I said to correct the issue presented when you replace them (correcting the TE image base values)?
Please test the BIOS anyway. Not everyone does mod the same even when it’s the same mod, and different software versions do not always do same process with same mod, so not always the same outcome although it may seem like it should be.

I believe you though, but it would be great if you could test BIOS I made and let me know what happens. Also, please upload that verb table PDF for me, I cannot figure out how to download from that site.

I will look at other modification areas too later, that was just my first look and guess at trying to get it sorted out, but only if you want to try BIOS mods I do.
I mean I don’t want to waste long periods of time trying to help you figure out, then you say again “doesn’t work that way, already tried” without even trying the BIOS I spent hours (literally) trying to fix for you.
I’m happy to keep trying to help, but you have to be ready to test and play, otherwise there’s no point in me trying if you’ve “already tried” everything.
Maybe you probably didn’t mean anything by what you said, maybe translation makes it sound negative in your replies?

Lets work together and fix this! Let me know what all other things you have already tried, so I don’t spend long time looking into those routes

Why not do what seems easier, modify the original BIOS to support coffee lake?
Seems like working against yourself on using another board BIOS, especially after you now confirm it’s all compatible and will run on the original model board.

I will test your modified BIOS sometime later. I have no time to test at the moment.

Thanks for your work.

I can’t download that PDF file too.

Modify on original BIOS even cannot boot kaby lake.Not the microcode or ME problem.
I don’t have such ability to add kaby and coffee support to skylake BIOS.
Even work on kaby BIOS , I cannot make it boot with CPU more than 8 thread.
So port Z370 BIOS is the easiest I can find.

You’re welcome! Did you try, original BIOS mod, with update correct microcode for your CPU, and when clean the ME change the SKU to Z370?
This probably all that’s needed for original BIOS mod, many guides don’t say change SKU, but many users report SKU change help fix mod

If you did not try that, I will make you BIOS for that later to try too, when you have time of course. You have to test though

So no download the PDF for you either? Well, that’s no good, who show you that and say “this verb table” stuff fix the BIOS?

Flashed and it wont boot.I guess the PEI module isn’t easy to replace.

I tried original bios mod long time ago. Turst me it won’t boot any kaby or coffee CPU by just add mircocode and switch SKU to Z370.


too hard work, you need manualy rewrite some asm parts in about 15-20 pei&dxe modules in uefi, add new cpuid/logic and etc.



look for CRB*** modules, pei smm and dxe variants. in 2014 ami bioses, HDA pins assigned in file CRBLib.c, so this is "verb" table.
in modern bioses it may moved to acpi tables


look for CRB*** modules, pei smm and dxe variants. in 2014 ami bioses, HDA pins assigned in file CRBLib.c, so this is "verb" table.
in modern bioses it may moved to acpi tables



I searched CRB but find nothing.I will look into ACPI tables.Thanks for your advice.


try to hexfind all modules for ven/dev_id

for example i have realtek hda ven=10EC, dev=0887. hexfind for "EC 10 87 08" result two pei modules PlatformInit and PlatformInitPreMem
these modules very important and replacing from old bios probably will hang bios.

verb table embedded into these modules and look like this:



UINT32 CrbHdaVerbTbl1 = {
//
// Rear Audio Verb Table - 10EC0880/0000/03
//
// Pin Complex 1 (NID 1Eh)
0x01E71F01,
0x01E71E44,
0x01E71D21,
0x01E71C00,

// Pin Complex 2 (NID 1Fh)
0x01F71F01,
0x01F71EC4,
0x01F71D21,
0x01F71C10,

// Pin Complex 3 (NID 14h)
0x01471F01,
0x01471E01,
0x01471D40,
0x01471C20,

// Pin Complex 4 (NID 15h)
0x01571F01,
0x01571E01,
0x01571D40,
0x01571C21,

// Pin Complex 5 (NID 16h)
0x01671F01,
0x01671E01,
0x01671D90,
0x01671C22,

// Pin Complex 6 (NID 17h)
0x01771F01,
0x01771E01,
0x01771D30,
0x01771C23,

// Pin Complex 7 (NID 1Ah)
0x01A71F01,
0x01A71E81,
0x01A71D30,
0x01A71C30,

// Pin Complex 8 (NID 18h)
0x01871F01,
0x01871EA1,
0x01871D90,
0x01871C31,

// Pin Complex 11 (NID 1Ch)
0x01C71F99,
0x01C71E33,
0x01C71DF1,
0x01C71C70,

// Pin Complex 12 (NID 1Dh)
0x01D71F99,
0x01D71EF3,
0x01D71DF1,
0x01D71C80,

//
// front panel
//

// Pin Complex 9 (NID 1Bh)
0x01B71F02,
0x01B71E21,
0x01B71D40,
0x01B71C50,

// Pin Complex 10 (NID 19h)
0x01971F02,
0x01971EA1,
0x01971D90,
0x01971C60
};



#include <device/azalia_device.h>

const u32 cim_verb_data = {
/* coreboot specific header /
0x10ec0887, // Realtek 887
0x1458a002, // Subsystem ID
0x0000000e, // Number of entries

/
Pin Widget Verb Table */
AZALIA_PIN_CFG(0, 0x11, 0x411111f0),
AZALIA_PIN_CFG(0, 0x12, 0x411111f0),
AZALIA_PIN_CFG(0, 0x14, 0x01014410),
AZALIA_PIN_CFG(0, 0x15, 0x411111f0),
AZALIA_PIN_CFG(0, 0x16, 0x411111f0),
AZALIA_PIN_CFG(0, 0x17, 0x411111f0),
AZALIA_PIN_CFG(0, 0x18, 0x01a19c50),
AZALIA_PIN_CFG(0, 0x19, 0x02a19c60),
AZALIA_PIN_CFG(0, 0x1a, 0x0181345f),
AZALIA_PIN_CFG(0, 0x1b, 0x02214c20),
AZALIA_PIN_CFG(0, 0x1c, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1d, 0x4004c601),
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1f, 0x411111f0)
};

Thanks for testing BIOS and reporting back, I figured it might not boot. Any mod done to this BIOS may cause non-boot due to the Intel Boot Guard.
Maybe it’s only certain modules and that Realtek PEI one was a big hassle so I assumed it would probably fail. Then after several ways doing the insert I was finally able to make UEFITool output match for both your mod BIOS and the BIOS I mod so that gave me hope.

I found “CRB” at - AAC9B0AF-A46A-49D8-8016-9B9DAD2C7F5E > subGUID 39045756-FCA3-49BD-8DAE-C7BAE8389AFF (PE32) = DXEBoardConfigInit
Also at 39045756-FCA3-49BD-8DAE-C7BAE8389AFF > PE32 Module = TCG2DXE

lib.c I can only find references in CryptoPkgTest and RAIDModule (Maybe a TPM module too, but knew it wasn’t this) - nothing on easy search using CRBLib.c - will keep digging

I thought maybe I found at DevicePathDXE, still checking but I think not

Thanks for the latest update @Mov_AX_0xDEAD - so don’t copy/replace module, only edit sections from one to other, or do you think that still crash BIOS?
I do think this one is Realtek, found references to that yesterday. IS this work needed to be done in assembler, or can it be done in hex only? If assembler, I can’t do that so I wont be able to help further on this

@dsanke - can you get the hardware ID’s for the realtek controller from device manager - right click onto the Controller > “Properties” > “Details” > “Property” > “HardwareIDs”


Crash with wrong Platforminit is about 99.99%

Verb table in hex form, it has some unknow structure with repeating sequence, no asm needed.
Maybe replacing sequences from original bios may helps. Sequence in C files is short, but in bios modules long and have doubles
I see one way - replace some seq ->flash->check )


maybe this is answer, 4 bytes in sequences 01 x7 yy zz looks like in hex dump
in dump also i see incremental NIDs from 11 (01 17) to 1F(01 F7 )

Thank you Movax, I’ve noticed these hex pattern in modules long time ago but I don’t know what they are.
It works!
Now I get my audio work normally.

Thanks you sir,I’ve fixed that problem.


great news )

did you changed platforminit modules or else ?


I changed it too.Both 2 modules were changed.And I also corrected their subsystem id.

So audio is now working @dsanke ? That’s great if it is, very cool, thanks @Mov_AX_0xDEAD


I test it for whole day.
Realtek control panel show correct jacks and when I insert headphone , it report me that headphone inserted.
But there is no sound.I must edit Registry manually to get sound output.So weird.
Seems driver don’t change the value of proper Registry keys.
@Mov_AX_0xDEAD any ideas about this problem?
P7xxDM,DM3,TM official BIOS and my modified BIOS uploaded here :https://my.pcloud.com/publink/show?code=…5TOel48aQxHeUN7
P7xxDM 10EC0892
P7xxDM2,DM3,TM 10EC0899

Good it’s working, but bad on the issue still!
I noticed early on that RealtekPEI had lots more outputs (Audio outputs shown in text in there I mean) than the original realtekPEI module, maybe some part or all this still needs swapped in after above fix you found?


I have no ideas, i dont know how realtek control panel/driver works because i use native hda universal windows driver for realtek audio.
And it correct detect ejecting and inserting plug


The windows audio driver behaves the same as realtek driver.
Plug in headphone and speaker mutes , but no sound output to headphone.
Maybe other parts in BIOS need to be modified.