summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/apple/macbook21/hda_verb.h55
-rw-r--r--src/mainboard/asus/m2n-e/hda_verb.h70
-rw-r--r--src/mainboard/dmp/vortex86ex/hda_verb.h70
-rw-r--r--src/mainboard/getac/p470/hda_verb.h65
-rw-r--r--src/mainboard/google/bolt/hda_verb.h71
-rw-r--r--src/mainboard/google/butterfly/hda_verb.h55
-rw-r--r--src/mainboard/google/butterfly/mainboard.c2
-rw-r--r--src/mainboard/google/falco/hda_verb.h71
-rw-r--r--src/mainboard/google/falco/mainboard.c2
-rw-r--r--src/mainboard/google/link/hda_verb.h70
-rw-r--r--src/mainboard/google/link/mainboard.c2
-rw-r--r--src/mainboard/google/panther/hda_verb.h67
-rw-r--r--src/mainboard/google/parrot/hda_verb.h95
-rw-r--r--src/mainboard/google/parrot/mainboard.c2
-rw-r--r--src/mainboard/google/peppy/hda_verb.h75
-rw-r--r--src/mainboard/google/peppy/mainboard.c2
-rw-r--r--src/mainboard/google/slippy/gma.c1
-rw-r--r--src/mainboard/google/slippy/hda_verb.h71
-rw-r--r--src/mainboard/google/slippy/mainboard.c2
-rw-r--r--src/mainboard/google/stout/hda_verb.h75
-rw-r--r--src/mainboard/google/stout/mainboard.c2
-rw-r--r--src/mainboard/intel/baskingridge/hda_verb.h55
-rw-r--r--src/mainboard/intel/baskingridge/mainboard.c2
-rw-r--r--src/mainboard/intel/cougar_canyon2/hda_verb.h20
-rw-r--r--src/mainboard/intel/cougar_canyon2/mainboard.c2
-rw-r--r--src/mainboard/intel/emeraldlake2/hda_verb.h55
-rw-r--r--src/mainboard/intel/emeraldlake2/mainboard.c2
-rw-r--r--src/mainboard/intel/wtm2/hda_verb.h55
-rw-r--r--src/mainboard/intel/wtm2/mainboard.c2
-rw-r--r--src/mainboard/kontron/ktqm77/hda_verb.h25
-rw-r--r--src/mainboard/lenovo/t520/hda_verb.h102
-rw-r--r--src/mainboard/lenovo/t520/mainboard.c2
-rw-r--r--src/mainboard/lenovo/t530/hda_verb.h102
-rw-r--r--src/mainboard/lenovo/t530/mainboard.c2
-rw-r--r--src/mainboard/lenovo/x201/hda_verb.h75
-rw-r--r--src/mainboard/lenovo/x220/hda_verb.h86
-rw-r--r--src/mainboard/lenovo/x220/mainboard.c2
-rw-r--r--src/mainboard/lenovo/x230/hda_verb.h102
-rw-r--r--src/mainboard/lenovo/x230/mainboard.c2
-rw-r--r--src/mainboard/nvidia/l1_2pvv/hda_verb.h65
-rw-r--r--src/mainboard/packardbell/ms2290/hda_verb.h50
-rw-r--r--src/mainboard/packardbell/ms2290/mainboard.c2
-rw-r--r--src/mainboard/samsung/lumpy/hda_verb.h35
-rw-r--r--src/mainboard/samsung/lumpy/mainboard.c2
-rw-r--r--src/mainboard/samsung/stumpy/hda_verb.h55
-rw-r--r--src/mainboard/samsung/stumpy/mainboard.c2
46 files changed, 451 insertions, 1378 deletions
diff --git a/src/mainboard/apple/macbook21/hda_verb.h b/src/mainboard/apple/macbook21/hda_verb.h
index 4e1687d3d1..07fa6bc81e 100644
--- a/src/mainboard/apple/macbook21/hda_verb.h
+++ b/src/mainboard/apple/macbook21/hda_verb.h
@@ -25,69 +25,36 @@ static const u32 mainboard_cim_verb_data[] = {
0x0000000B, /* Number of 4 dword sets */
/* NID 0x01: Subsystem ID. */
- 0x00172000,
- 0x00172122,
- 0x0017226B,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x106B2200),
/* NID 0x0A. */
- 0x00A71C1F,
- 0x00A71DE2,
- 0x00A71E21,
- 0x00A71F03,
+ AZALIA_PIN_CFG(0x0, 0x0A, 0x0321E21F),
/* NID 0x0B. */
- 0x00B71C2E,
- 0x00B71DE0,
- 0x00B71EA1,
- 0x00B71F03,
+ AZALIA_PIN_CFG(0x0, 0x0B, 0x03A1E02E),
/* NID 0x0C. */
- 0x00C71C10,
- 0x00C71DE1,
- 0x00C71E17,
- 0x00C71F90,
+ AZALIA_PIN_CFG(0x0, 0x0C, 0x9017E110),
/* NID 0x0D. */
- 0x00D71C1F,
- 0x00D71DE1,
- 0x00D71E17,
- 0x00D71F90,
+ AZALIA_PIN_CFG(0x0, 0x0D, 0x9017E11F),
/* NID 0x0E. */
- 0x00E71CFE,
- 0x00E71D00,
- 0x00E71E00,
- 0x00E71F40,
+ AZALIA_PIN_CFG(0x0, 0x0E, 0x400000FE),
/* NID 0x0F */
- 0x00F71C20,
- 0x00F71DE0,
- 0x00F71E81,
- 0x00F71F03,
+ AZALIA_PIN_CFG(0x0, 0x0F, 0x0381E020),
/* NID 0x10 */
- 0x01071C30,
- 0x01071DE2,
- 0x01071E45,
- 0x01071F13,
+ AZALIA_PIN_CFG(0x0, 0x10, 0x1345E230),
/* NID 0x11 */
- 0x01171C40,
- 0x01171DE2,
- 0x01171EC5,
- 0x01171F13,
+ AZALIA_PIN_CFG(0x0, 0x11, 0x13C5E240),
/* NID 0x15 */
- 0x01571CFC,
- 0x01571D00,
- 0x01571E00,
- 0x01571F40,
+ AZALIA_PIN_CFG(0x0, 0x15, 0x400000FC),
/* NID 0x1B. */
- 0x01B71CFB,
- 0x01B71D00,
- 0x01B71E00,
- 0x01B71F40,
+ AZALIA_PIN_CFG(0x0, 0x1B, 0x400000FB),
};
diff --git a/src/mainboard/asus/m2n-e/hda_verb.h b/src/mainboard/asus/m2n-e/hda_verb.h
index 3adbd38859..9dd3d88ec9 100644
--- a/src/mainboard/asus/m2n-e/hda_verb.h
+++ b/src/mainboard/asus/m2n-e/hda_verb.h
@@ -32,89 +32,47 @@ static const u32 mainboard_cim_verb_data[] = {
/* NID 0x01, FUNCTION, Designates this device as an audio codec */
/* Set the Implementation ID (IID), here: 0x104381f6. */
- 0x001720f6,
- 0x00172181,
- 0x00172243,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x104381f6),
/* "Pin complex" HDA widgets. Comments: Node ID, Name, Description. */
/* NID 0x11, Port A, Front panel headphone jack */
- 0x01171c30,
- 0x01171d41,
- 0x01171e21,
- 0x01171f02,
+ AZALIA_PIN_CFG(0x0, 0x11, 0x02214130),
/* NID 0x12, Port D, Rear panel front speaker jack */
- 0x01271c10,
- 0x01271d40,
- 0x01271e01,
- 0x01271f01,
+ AZALIA_PIN_CFG(0x0, 0x12, 0x01014010),
/* NID 0x13, MONO_OUT, Monaural output pin */
- 0x01371cf0,
- 0x01371d11,
- 0x01371e17,
- 0x01371f51,
+ AZALIA_PIN_CFG(0x0, 0x13, 0x511711f0),
/* NID 0x14, Port B, Front panel microphone jack */
- 0x01471c22,
- 0x01471d91,
- 0x01471ea1,
- 0x01471f02,
+ AZALIA_PIN_CFG(0x0, 0x14, 0x02a19122),
/* NID 0x15, Port C, Rear panel line-in jack */
- 0x01571c21,
- 0x01571d30,
- 0x01571e81,
- 0x01571f01,
+ AZALIA_PIN_CFG(0x0, 0x15, 0x01813021),
/* NID 0x16, Port F, Rear panel surround-back (5.1) jack */
- 0x01671c12,
- 0x01671d10,
- 0x01671e01,
- 0x01671f01,
+ AZALIA_PIN_CFG(0x0, 0x16, 0x01011012),
/* NID 0x17, Port E, Rear panel microphone jack */
- 0x01771c20,
- 0x01771d90,
- 0x01771ea1,
- 0x01771f01,
+ AZALIA_PIN_CFG(0x0, 0x17, 0x01a19020),
/* NID 0x18, CD IN, Analog CD input */
- 0x01871c2e,
- 0x01871d11,
- 0x01871e33,
- 0x01871f99,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x9933112e),
/* NID 0x1a, Analog PCBEEP, External analog PCBEEP signal input */
- 0x01a71cf0,
- 0x01a71d01,
- 0x01a71ef3,
- 0x01a71f99,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x99f301f0),
/* NID 0x1b, S/PDIF Out, S/PDIF output pin */
- 0x01b71cf0,
- 0x01b71df1,
- 0x01b71e45,
- 0x01b71f01,
+ AZALIA_PIN_CFG(0x0, 0x1b, 0x0145f1f0),
/* NID 0x1c, S/PDIF In, S/PDIF input pin */
- 0x01c71cf0,
- 0x01c71df1,
- 0x01c71ec5,
- 0x01c71f41,
+ AZALIA_PIN_CFG(0x0, 0x1c, 0x41c5f1f0),
/* NID 0x24, Port G, Rear panel C/LFE jack */
- 0x02471c11,
- 0x02471d60,
- 0x02471e01,
- 0x02471f01,
+ AZALIA_PIN_CFG(0x0, 0x24, 0x01016011),
/* NID 0x25, Port H, Rear panel surround-side (7.1) jack */
- 0x02571c14,
- 0x02571d20,
- 0x02571e01,
- 0x02571f01,
+ AZALIA_PIN_CFG(0x0, 0x25, 0x01012014),
};
diff --git a/src/mainboard/dmp/vortex86ex/hda_verb.h b/src/mainboard/dmp/vortex86ex/hda_verb.h
index 6b1620ba13..5402b621ef 100644
--- a/src/mainboard/dmp/vortex86ex/hda_verb.h
+++ b/src/mainboard/dmp/vortex86ex/hda_verb.h
@@ -25,10 +25,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* ===== HDA Codec Subsystem ID Verb-table ===== */
/* HDA Codec Subsystem ID : 0x10EC0000 */
- 0x00172000,
- 0x00172100,
- 0x001722ec,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10ec0000),
/* ===== Pin Widget Verb-table ===== */
/* Widget node 0x01 : */
@@ -37,68 +34,29 @@ static const u32 mainboard_cim_verb_data[] = {
0x0017ff00,
0x0017ff00,
/* Pin widget 0x11 - S/PDIF-OUT2 */
- 0x01171c00,
- 0x01171d00,
- 0x01171e00,
- 0x01171f40,
+ AZALIA_PIN_CFG(0x0, 0x11, 0x40000000),
/* Pin widget 0x12 - DMIC */
- 0x01271cf0,
- 0x01271d11,
- 0x01271e11,
- 0x01271f41,
+ AZALIA_PIN_CFG(0x0, 0x12, 0x411111f0),
/* Pin widget 0x14 - LINE-OUT (Port-D) */
- 0x01471c10,
- 0x01471d41,
- 0x01471e01,
- 0x01471f01,
+ AZALIA_PIN_CFG(0x0, 0x14, 0x01014110),
/* Pin widget 0x15 - HP-OUT (Port-A) */
- 0x01571cf0,
- 0x01571d11,
- 0x01571e11,
- 0x01571f41,
+ AZALIA_PIN_CFG(0x0, 0x15, 0x411111f0),
/* Pin widget 0x16 - MONO-OUT */
- 0x01671cf0,
- 0x01671d11,
- 0x01671e11,
- 0x01671f41,
+ AZALIA_PIN_CFG(0x0, 0x16, 0x411111f0),
/* Pin widget 0x18 - MIC1 (Port-B) */
- 0x01871cf0,
- 0x01871d11,
- 0x01871e11,
- 0x01871f41,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0),
/* Pin widget 0x19 - MIC2 (Port-F) */
- 0x01971c30,
- 0x01971d91,
- 0x01971ea1,
- 0x01971f02,
+ AZALIA_PIN_CFG(0x0, 0x19, 0x02a19130),
/* Pin widget 0x1A - LINE1 (Port-C) */
- 0x01a71c40,
- 0x01a71d31,
- 0x01a71e81,
- 0x01a71f01,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x01813140),
/* Pin widget 0x1B - LINE2 (Port-E) */
- 0x01b71cf0,
- 0x01b71d11,
- 0x01b71e11,
- 0x01b71f41,
+ AZALIA_PIN_CFG(0x0, 0x1b, 0x411111f0),
/* Pin widget 0x1C - CD-IN */
- 0x01c71cf0,
- 0x01c71d11,
- 0x01c71e11,
- 0x01c71f41,
+ AZALIA_PIN_CFG(0x0, 0x1c, 0x411111f0),
/* Pin widget 0x1D - BEEP-IN */
- 0x01d71c29,
- 0x01d71d46,
- 0x01d71e35,
- 0x01d71f40,
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x40354629),
/* Pin widget 0x1E - S/PDIF-OUT */
- 0x01e71c20,
- 0x01e71d11,
- 0x01e71e56,
- 0x01e71f18,
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x18561120),
/* Pin widget 0x1F - S/PDIF-IN */
- 0x01f71cf0,
- 0x01f71d11,
- 0x01f71e11,
- 0x01f71f41,
+ AZALIA_PIN_CFG(0x0, 0x1f, 0x411111f0),
};
diff --git a/src/mainboard/getac/p470/hda_verb.h b/src/mainboard/getac/p470/hda_verb.h
index dfc4d79f2e..280d6f2604 100644
--- a/src/mainboard/getac/p470/hda_verb.h
+++ b/src/mainboard/getac/p470/hda_verb.h
@@ -24,82 +24,43 @@ static const u32 mainboard_cim_verb_data[] = {
0x0000000d, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10ec0000 */
- 0x00172000,
- 0x00172100,
- 0x001722EC,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10EC0000),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x12), DMIC */
- 0x01271CF0,
- 0x01271D11,
- 0x01271E11,
- 0x01271F41,
+ AZALIA_PIN_CFG(0x0, 0x12, 0x411111F0),
/* Pin Complex (NID 0x14), LINE_OUT (port D) */
- 0x01471C10,
- 0x01471D01,
- 0x01471E13,
- 0x01471F99,
+ AZALIA_PIN_CFG(0x0, 0x14, 0x99130110),
/* Pin Complex (NID 0x15), HP_OUT (port A) */
- 0x01571C20,
- 0x01571D40,
- 0x01571E21,
- 0x01571F01,
+ AZALIA_PIN_CFG(0x0, 0x15, 0x01214020),
/* Pin Complex (NID 0x16), MONO-OUT */
- 0x01671CF0,
- 0x01671D11,
- 0x01671E11,
- 0x01671F41,
+ AZALIA_PIN_CFG(0x0, 0x16, 0x411111F0),
/* Pin Complex (NID 0x18), MIC1 (port B) */
- 0x01871C30,
- 0x01871D98,
- 0x01871EA1,
- 0x01871F01,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x01A19830),
/* Pin Complex (NID 0x19), MIC2 (port F) */
- 0x01971C31,
- 0x01971D09,
- 0x01971EA3,
- 0x01971F99,
+ AZALIA_PIN_CFG(0x0, 0x19, 0x99A30931),
/* Pin Complex (NID 0x1A), LINE1 (port C) */
- 0x01A71C3F,
- 0x01A71D98,
- 0x01A71EA1,
- 0x01A71F02,
+ AZALIA_PIN_CFG(0x0, 0x1A, 0x02A1983F),
/* Pin Complex (NID 0x1B), LINE2 (port E) */
- 0x01B71C1F,
- 0x01B71D40,
- 0x01B71E21,
- 0x01B71F02,
+ AZALIA_PIN_CFG(0x0, 0x1B, 0x0221401F),
/* Pin Complex (NID 0x1C), CD_IN */
- 0x01C71CF0,
- 0x01C71D11,
- 0x01C71E11,
- 0x01C71F41,
+ AZALIA_PIN_CFG(0x0, 0x1C, 0x411111F0),
/* Pin Complex (NID 0x1D), PCBEEP */
- 0x01D71CF0,
- 0x01D71D11,
- 0x01D71E11,
- 0x01D71F41,
+ AZALIA_PIN_CFG(0x0, 0x1D, 0x411111F0),
/* Pin Complex (NID 0x1E), S/PDIF-OUT */
- 0x01E71CF0,
- 0x01E71D11,
- 0x01E71E11,
- 0x01E71F41,
+ AZALIA_PIN_CFG(0x0, 0x1E, 0x411111F0),
/* Pin Complex (NID 0x1F), S/PDIF-IN */
- 0x01F71CF0,
- 0x01F71D11,
- 0x01F71E11,
- 0x01F71F41,
+ AZALIA_PIN_CFG(0x0, 0x1F, 0x411111F0),
};
diff --git a/src/mainboard/google/bolt/hda_verb.h b/src/mainboard/google/bolt/hda_verb.h
index f27480d69b..54f27f13ae 100644
--- a/src/mainboard/google/bolt/hda_verb.h
+++ b/src/mainboard/google/bolt/hda_verb.h
@@ -24,71 +24,54 @@ static const u32 mainboard_cim_verb_data[] = {
0x0000000b, // Number of jacks (NID entries)
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10ec0283 */
- 0x00172083,
- 0x00172102,
- 0x001722ec,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10ec0283),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x12) DMIC - interior mobile lid */
- 0x01271c10,
- 0x01271d10,
- 0x01271ea6,
- 0x01271fb7,
+ AZALIA_PIN_CFG(0x0, 0x12, 0xb7a61010),
/* Pin Complex (NID 0x14) SPKR-OUT PORTD */
- 0x01471c10, // group 1, front left/right
- 0x01471d01, // no connector, no jack detect
- 0x01471e17, // speaker out, analog
- 0x01471f90, // fixed function, internal
+ // group 1, front left/right
+ // no connector, no jack detect
+ // speaker out, analog
+ // fixed function, internal
+ AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
/* Pin Complex (NID 0x17) */
- 0x01771cf0,
- 0x01771d11,
- 0x01771e11,
- 0x01771f41,
+ AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
/* Pin Complex (NID 0x18) MIC1 PORTB */
- 0x01971c11, // group 1, cap 1
- 0x01971d10, // black, jack detect
- 0x01971ea7, // mic in, analog
- 0x01971f03, // connector, left panel
+ // group 1, cap 1
+ // black, jack detect
+ // mic in, analog
+ // connector, left panel
+ AZALIA_PIN_CFG(0x0, 0x19, 0x03a71011),
/* Pin Complex (NID 0x19) MIC2 PORTF */
- 0x01871cf0,
- 0x01871d11,
- 0x01871e11,
- 0x01871f41,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0),
/* Pin Complex (NID 0x1A) LINE1 PORTC */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1B) LINE2 PORTE */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1d) PCBeep */
- 0x01d71c2d, // eapd low on ex-amp, laptop, custom enable
- 0x01d71d81, // mute spkr on hpout
- 0x01d71e15, // pcbeep en able, checksum
- 0x01d71f40, // no physical, internal
+ // eapd low on ex-amp, laptop, custom enable
+ // mute spkr on hpout
+ // pcbeep en able, checksum
+ // no physical, internal
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x4015812d),
/* Pin Complex (NID 0x1E) SPDIF-OUT */
- 0x01e71cf0,
- 0x01e71d11,
- 0x01e71e11,
- 0x01e71f41,
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
/* Pin Complex (NID 0x21) HPOUT PORT-I */
- 0x02171c1f, // group1,
- 0x02171d10, // black, jack detect
- 0x02171e21, // HPOut, 1/8 stereo
- 0x02171f03, // connector, left panel
+ // group1,
+ // black, jack detect
+ // HPOut, 1/8 stereo
+ // connector, left panel
+ AZALIA_PIN_CFG(0x0, 0x21, 0x0321101f),
};
diff --git a/src/mainboard/google/butterfly/hda_verb.h b/src/mainboard/google/butterfly/hda_verb.h
index 89a81fef71..e06a1bea49 100644
--- a/src/mainboard/google/butterfly/hda_verb.h
+++ b/src/mainboard/google/butterfly/hda_verb.h
@@ -36,58 +36,37 @@ static const u32 mainboard_cim_verb_data[] = {
/* Bits 7:0 - Payload */
/* NID 0x01 - NodeInfo */
- 0x001720F9,
- 0x00172118,
- 0x0017223C,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x103C18F9),
/* NID 0x0A - External Microphone Connector
* Config=0x04A11020 (External,Right; MicIn,3.5mm; Black,JD; DA,Seq)
*/
- 0x00A71C20,
- 0x00A71D10,
- 0x00A71EA1,
- 0x00A71F04,
+ AZALIA_PIN_CFG(0x0, 0x0A, 0x04A11020),
/* NID 0x0B - Headphone Connector
* Config=0x0421101F (External,Right; HP,3.5mm; Black,JD; DA,Seq)
*/
- 0x00B71C1F,
- 0x00B71D10,
- 0x00B71E21,
- 0x00B71F04,
+ AZALIA_PIN_CFG(0x0, 0x0B, 0x0421101F),
/* NID 0x0C - Not connected
* Config=0x40F000F0 (N/A,N/A; Other,Unknown; Unknown,JD; DA,Seq)
*/
- 0x00C71CF0,
- 0x00C71D00,
- 0x00C71EF0,
- 0x00C71F40,
+ AZALIA_PIN_CFG(0x0, 0x0C, 0x40F000F0),
/* NID 0x0D - Internal Speakers
* Config=0x90170110 (Fixed,Int; Speaker,Other Analog; Unknown,nJD; DA,Seq)
*/
- 0x00D71C10,
- 0x00D71D01,
- 0x00D71E17,
- 0x00D71F90,
+ AZALIA_PIN_CFG(0x0, 0x0D, 0x90170110),
/* NID 0x0F - Not connected
* Config=0x40F000F0
*/
- 0x00F71CF0,
- 0x00F71D00,
- 0x00F71EF0,
- 0x00F71F40,
+ AZALIA_PIN_CFG(0x0, 0x0F, 0x40F000F0),
/* NID 0x11 - Internal Microphone
* Config=0xD5A30140 (Fixed internal,Top; Mic In,ATIPI; Unknown,nJD; DA,Seq)
*/
- 0x01171C40,
- 0x01171D01,
- 0x01171EA3,
- 0x01171FD5,
+ AZALIA_PIN_CFG(0x0, 0x11, 0xD5A30140),
/*
* Hardware EQ Parameters
@@ -232,28 +211,16 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of IDs
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x30172001,
- 0x30172101,
- 0x30172286,
- 0x30172380,
+ AZALIA_SUBVENDOR(0x3, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
static const u32 mainboard_pc_beep_verbs[] = {
diff --git a/src/mainboard/google/butterfly/mainboard.c b/src/mainboard/google/butterfly/mainboard.c
index 85b86cbbaa..19e7926667 100644
--- a/src/mainboard/google/butterfly/mainboard.c
+++ b/src/mainboard/google/butterfly/mainboard.c
@@ -32,7 +32,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include "onboard.h"
#include "ec.h"
#include <southbridge/intel/bd82x6x/pch.h>
@@ -40,6 +39,7 @@
#include <device/pci.h>
#include <ec/quanta/ene_kb3940q/ec.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
#if CONFIG_CHROMEOS
#include <vendorcode/google/chromeos/fmap.h>
#else
diff --git a/src/mainboard/google/falco/hda_verb.h b/src/mainboard/google/falco/hda_verb.h
index ae7dbb31bc..5c37f510ea 100644
--- a/src/mainboard/google/falco/hda_verb.h
+++ b/src/mainboard/google/falco/hda_verb.h
@@ -29,72 +29,55 @@ static const u32 mainboard_cim_verb_data[] = {
0x000F0002, // Pad - get revision id
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10ec0283 */
- 0x00172083,
- 0x00172102,
- 0x001722ec,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10ec0283),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x12) DMIC - interior mobile lid */
- 0x01271c10,
- 0x01271d10,
- 0x01271ea6,
- 0x01271fb7,
+ AZALIA_PIN_CFG(0x0, 0x12, 0xb7a61010),
/* Pin Complex (NID 0x14) SPKR-OUT PORTD */
- 0x01471c10, // group 1, front left/right
- 0x01471d01, // no connector, no jack detect
- 0x01471e17, // speaker out, analog
- 0x01471f90, // fixed function, internal
+ // group 1, front left/right
+ // no connector, no jack detect
+ // speaker out, analog
+ // fixed function, internal
+ AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
/* Pin Complex (NID 0x17) */
- 0x01771cf0,
- 0x01771d11,
- 0x01771e11,
- 0x01771f41,
+ AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
/* Pin Complex (NID 0x18) MIC1 PORTB */
- 0x01971c11, // group 1, cap 1
- 0x01971d10, // black, jack detect
- 0x01971ea7, // mic in, analog
- 0x01971f03, // connector, left panel
+ // group 1, cap 1
+ // black, jack detect
+ // mic in, analog
+ // connector, left panel
+ AZALIA_PIN_CFG(0x0, 0x19, 0x03a71011),
/* Pin Complex (NID 0x19) MIC2 PORTF */
- 0x01871cf0,
- 0x01871d11,
- 0x01871e11,
- 0x01871f41,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0),
/* Pin Complex (NID 0x1A) LINE1 PORTC */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1B) LINE2 PORTE */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1d) PCBeep */
- 0x01d71c2d, // eapd low on ex-amp, laptop, custom enable
- 0x01d71d81, // mute spkr on hpout
- 0x01d71e15, // pcbeep en able, checksum
- 0x01d71f40, // no physical, internal
+ // eapd low on ex-amp, laptop, custom enable
+ // mute spkr on hpout
+ // pcbeep en able, checksum
+ // no physical, internal
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x4015812d),
/* Pin Complex (NID 0x1E) SPDIF-OUT */
- 0x01e71cf0,
- 0x01e71d11,
- 0x01e71e11,
- 0x01e71f41,
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
/* Pin Complex (NID 0x21) HPOUT PORT-I */
- 0x02171c1f, // group1,
- 0x02171d10, // black, jack detect
- 0x02171e21, // HPOut, 1/8 stereo
- 0x02171f03, // connector, left panel
+ // group1,
+ // black, jack detect
+ // HPOut, 1/8 stereo
+ // connector, left panel
+ AZALIA_PIN_CFG(0x0, 0x21, 0x0321101f),
/* Undocumented settings from Realtek (needed for beep_gen) */
/* Widget node 0x20 */
diff --git a/src/mainboard/google/falco/mainboard.c b/src/mainboard/google/falco/mainboard.c
index 38edb5ca48..824b1ff3b4 100644
--- a/src/mainboard/google/falco/mainboard.c
+++ b/src/mainboard/google/falco/mainboard.c
@@ -34,9 +34,9 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/lynxpoint/pch.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
#include "ec.h"
#include "onboard.h"
diff --git a/src/mainboard/google/link/hda_verb.h b/src/mainboard/google/link/hda_verb.h
index ed18d63231..bb5ff106c5 100644
--- a/src/mainboard/google/link/hda_verb.h
+++ b/src/mainboard/google/link/hda_verb.h
@@ -78,64 +78,34 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Widget Verb Table */
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x144DC0C2 */
- 0x001720c2,
- 0x001721c0,
- 0x0017224d,
- 0x00172314,
+ AZALIA_SUBVENDOR(0x0, 0x144dc0c2),
/* Pin Complex (NID 0x0B) Port-G Analog Unknown Speaker at Int N/A */
- 0x00b71cf0,
- 0x00b71d00,
- 0x00b71e17,
- 0x00b71f90,
+ AZALIA_PIN_CFG(0x0, 0x0b, 0x901700f0),
/* Pin Complex (NID 0x0C) N/C */
- 0x00c71cf0,
- 0x00c71d00,
- 0x00c71ef0,
- 0x00c71f70,
+ AZALIA_PIN_CFG(0x0, 0x0c, 0x70f000f0),
/* Pin Complex (NID 0x0D) N/C */
- 0x00d71cf0,
- 0x00d71d00,
- 0x00d71ef0,
- 0x00d71f70,
+ AZALIA_PIN_CFG(0x0, 0x0d, 0x70f000f0),
/* Pin Complex (NID 0x0E) N/C */
- 0x00e71cf0,
- 0x00e71d00,
- 0x00e71ef0,
- 0x00e71f70,
+ AZALIA_PIN_CFG(0x0, 0x0e, 0x70f000f0),
/* Pin Complex (NID 0x0F) N/C */
- 0x00f71cf0,
- 0x00f71d00,
- 0x00f71ef0,
- 0x00f71f70,
+ AZALIA_PIN_CFG(0x0, 0x0f, 0x70f000f0),
/* Pin Complex (NID 0x10) Port-D 1/8 Black HP Out at Ext Left */
- 0x01071cf0,
- 0x01071d10,
- 0x01071e21,
- 0x01071f03,
+ AZALIA_PIN_CFG(0x0, 0x10, 0x032110f0),
/* Pin Complex (NID 0x11) Port-B Click Mic */
- 0x01171cf0,
- 0x01171d00,
- 0x01171ea7,
- 0x01171f90,
+ AZALIA_PIN_CFG(0x0, 0x11, 0x90a700f0),
/* Pin Complex (NID 0x12) Port-C Combo Jack Mic or D-Mic */
- 0x01271cf0,
- 0x01271d10,
- 0x01271ea1,
- 0x01271f03,
+ AZALIA_PIN_CFG(0x0, 0x12, 0x03a110f0),
/* Pin Complex (NID 0x13) What you hear */
- 0x01371cf0,
- 0x01371d00,
- 0x01371ed6,
- 0x01371f90,
+ AZALIA_PIN_CFG(0x0, 0x13, 0x90d600f0),
/* coreboot specific header */
0x80862806, // Codec Vendor / Device ID: Intel CougarPoint HDMI
@@ -143,28 +113,16 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x30172001,
- 0x30172101,
- 0x30172286,
- 0x30172380,
+ AZALIA_SUBVENDOR(0x3, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
diff --git a/src/mainboard/google/link/mainboard.c b/src/mainboard/google/link/mainboard.c
index ee83089bbe..9d86458912 100644
--- a/src/mainboard/google/link/mainboard.c
+++ b/src/mainboard/google/link/mainboard.c
@@ -33,7 +33,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include "onboard.h"
#include "ec.h"
#include <southbridge/intel/bd82x6x/pch.h>
@@ -41,6 +40,7 @@
#include <device/pci.h>
#include <ec/google/chromeec/ec.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
/* placeholder for evenual link post. Not sure what we'll
* do but it will look nice
diff --git a/src/mainboard/google/panther/hda_verb.h b/src/mainboard/google/panther/hda_verb.h
index 456561b6d5..47311e308d 100644
--- a/src/mainboard/google/panther/hda_verb.h
+++ b/src/mainboard/google/panther/hda_verb.h
@@ -29,72 +29,51 @@ static const u32 mainboard_cim_verb_data[] = {
0x0000000c, // Number of jacks (NID entries)
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10ec0283 */
- 0x00172083,
- 0x00172102,
- 0x001722ec,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10ec0283),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x12) DMIC */
- 0x01271cf0,
- 0x01271d11,
- 0x01271e11,
- 0x01271f41,
+ AZALIA_PIN_CFG(0x0, 0x12, 0x411111f0),
/* Pin Complex (NID 0x14) SPKR-OUT PORTD */
- 0x01471cf0,
- 0x01471d11,
- 0x01471e11,
- 0x01471f40,
+ AZALIA_PIN_CFG(0x0, 0x14, 0x401111f0),
/* Pin Complex (NID 0x17) */
- 0x01771cf0,
- 0x01771d11,
- 0x01771e11,
- 0x01771f41,
+ AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
/* Pin Complex (NID 0x18) MIC1 PORTB */
- 0x01971c11, // group 1, cap 1
- 0x01971d10, // black, jack detect
- 0x01971ea7, // mic in, analog
- 0x01971f03, // connector, left panel
+ // group 1, cap 1
+ // black, jack detect
+ // mic in, analog
+ // connector, left panel
+ AZALIA_PIN_CFG(0x0, 0x19, 0x03a71011),
/* Pin Complex (NID 0x19) MIC2 PORTF */
- 0x01871cf0,
- 0x01871d11,
- 0x01871e11,
- 0x01871f41,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0),
/* Pin Complex (NID 0x1A) LINE1 PORTC */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1B) LINE2 PORTE */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1d) PCBeep */
- 0x01d71c2d, // eapd low on ex-amp, laptop, custom enable
- 0x01d71d81, // mute spkr on hpout
- 0x01d71e15, // pcbeep en able, checksum
- 0x01d71f40, // no physical, internal
+ // eapd low on ex-amp, laptop, custom enable
+ // mute spkr on hpout
+ // pcbeep en able, checksum
+ // no physical, internal
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x4015812d),
/* Pin Complex (NID 0x1E) SPDIF-OUT */
- 0x01e71cf0,
- 0x01e71d11,
- 0x01e71e11,
- 0x01e71f41,
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
/* Pin Complex (NID 0x21) HPOUT PORT-I */
- 0x02171c1f, // group1,
- 0x02171d10, // black, jack detect
- 0x02171e21, // HPOut, 1/8 stereo
- 0x02171f03, // connector, left panel
+ // group1,
+ // black, jack detect
+ // HPOut, 1/8 stereo
+ // connector, left panel
+ AZALIA_PIN_CFG(0x0, 0x21, 0x0321101f),
/* Undocumented settings from Realtek (needed for beep_gen) */
/* Widget node 0x20 */
diff --git a/src/mainboard/google/parrot/hda_verb.h b/src/mainboard/google/parrot/hda_verb.h
index ca68ad32fc..dfa7a817a3 100644
--- a/src/mainboard/google/parrot/hda_verb.h
+++ b/src/mainboard/google/parrot/hda_verb.h
@@ -40,72 +40,59 @@ static const u32 mainboard_cim_verb_data[] = {
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10250742 */
- 0x00172042,
- 0x00172107,
- 0x00172225,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10250742),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x12) DMIC */
- 0x01271cf0,
- 0x01271d11,
- 0x01271e11,
- 0x01271f41,
+ AZALIA_PIN_CFG(0x0, 0x12, 0x411111f0),
/* Pin Complex (NID 0x14) SPKR-OUT PORTD */
- 0x01471c10, // group 1, front left/right
- 0x01471d01, // no connector, no jack detect
- 0x01471e17, // speaker out, analog
- 0x01471f90, // fixed function, internal
+ // group 1, front left/right
+ // no connector, no jack detect
+ // speaker out, analog
+ // fixed function, internal
+ AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
/* Pin Complex (NID 0x17) */
- 0x01771cf0,
- 0x01771d11,
- 0x01771e11,
- 0x01771f41,
+ AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
/* Pin Complex (NID 0x18) MIC1 PORTB */
- 0x01871cf0,
- 0x01871d11,
- 0x01871e11,
- 0x01871f41,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0),
/* Pin Complex (NID 0x19) MIC2 PORTF */
- 0x01971c21, // group 2, cap 1
- 0x01971d10, // black, jack detect
- 0x01971ea7, // mic in, analog
- 0x01971f04, // connector, right panel
+ // group 2, cap 1
+ // black, jack detect
+ // mic in, analog
+ // connector, right panel
+ AZALIA_PIN_CFG(0x0, 0x19, 0x04a71021),
/* Pin Complex (NID 0x1A) LINE1 PORTC */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1B) LINE2 PORTE */
- 0x01b71c20, // group 2, cap 0
- 0x01b71d01, // no connector, no jack detect
- 0x01b71ea7, // mic in, analog
- 0x01b71f90, // fixed function, internal
+ // group 2, cap 0
+ // no connector, no jack detect
+ // mic in, analog
+ // fixed function, internal
+ AZALIA_PIN_CFG(0x0, 0x1b, 0x90a70120),
/* Pin Complex (NID 0x1d) PCBeep */
- 0x01d71c2d, // eapd low on ex-amp, laptop, custom enable
- 0x01d71d81, // mute spkr on hpout
- 0x01d71e15, // pcbeep en able, checksum
- 0x01d71f40, // no physical, internal
+ // eapd low on ex-amp, laptop, custom enable
+ // mute spkr on hpout
+ // pcbeep en able, checksum
+ // no physical, internal
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x4015812d),
/* Pin Complex (NID 0x1E) SPDIF-OUT */
- 0x01e71cf0,
- 0x01e71d11,
- 0x01e71e11,
- 0x01e71f41,
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
/* Pin Complex (NID 0x21) HPOUT PORTA? */
- 0x02171c1f, // group1,
- 0x02171d10, // black, jack detect
- 0x02171e21, // HPOut, 1/8 stereo
- 0x02171f04, // connector, right panel
+ // group1,
+ // black, jack detect
+ // HPOut, 1/8 stereo
+ // connector, right panel
+ AZALIA_PIN_CFG(0x0, 0x21, 0x0421101f),
/* Undocumented speaker output volume settings from Compal and Realtek */
/* Widget node 0x20 */
@@ -132,28 +119,16 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x00172001,
- 0x00172101,
- 0x00172286,
- 0x00172380,
+ AZALIA_SUBVENDOR(0x0, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
static const u32 mainboard_pc_beep_verbs[] = {
diff --git a/src/mainboard/google/parrot/mainboard.c b/src/mainboard/google/parrot/mainboard.c
index 6aa3fcaffb..3e0c05268b 100644
--- a/src/mainboard/google/parrot/mainboard.c
+++ b/src/mainboard/google/parrot/mainboard.c
@@ -32,7 +32,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include "onboard.h"
#include "ec.h"
#include <southbridge/intel/bd82x6x/pch.h>
@@ -40,6 +39,7 @@
#include <device/pci.h>
#include <ec/compal/ene932/ec.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/google/peppy/hda_verb.h b/src/mainboard/google/peppy/hda_verb.h
index ec1b57d02e..9203522443 100644
--- a/src/mainboard/google/peppy/hda_verb.h
+++ b/src/mainboard/google/peppy/hda_verb.h
@@ -29,72 +29,59 @@ static const u32 mainboard_cim_verb_data[] = {
/* Bits 7:0 - Payload */
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10ec0283 */
- 0x00172083,
- 0x00172102,
- 0x001722ec,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10ec0283),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x12) DMIC - Disabled */
- 0x01271cf0, //
- 0x01271d11, //
- 0x01271e11, //
- 0x01271f41, //
+ AZALIA_PIN_CFG(0x0, 0x12, 0x411111f0),
/* Pin Complex (NID 0x14) SPKR-OUT - Internal Speakers */
- 0x01471c10, // group 1, cap 0
- 0x01471d01, // no connector, no jack detect
- 0x01471e17, // speaker out, analog
- 0x01471f90, // fixed function, internal, Location N/A
+ // group 1, cap 0
+ // no connector, no jack detect
+ // speaker out, analog
+ // fixed function, internal, Location N/A
+ AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
/* Pin Complex (NID 0x17) MONO Out - Disabled */
- 0x01771cf0, //
- 0x01771d11, //
- 0x01771e11, //
- 0x01771f41, //
+ AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
/* Pin Complex (NID 0x18) Disabled */
- 0x01871cf0, //
- 0x01871d11, //
- 0x01871e11, //
- 0x01871f41, //
+ AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0),
/* Pin Complex (NID 0x19) MIC2 - 3.5mm Jack */
- 0x01971c20, // group2, cap 0
- 0x01971d10, // black, jack detect
- 0x01971ea1, // Mic in, 3.5mm Jack
- 0x01971f03, // connector, External left panel
+ // group2, cap 0
+ // black, jack detect
+ // Mic in, 3.5mm Jack
+ // connector, External left panel
+ AZALIA_PIN_CFG(0x0, 0x19, 0x03a11020),
/* Pin Complex (NID 0x1A) LINE1 - Internal Mic */
- 0x01a71c11, // group 1, cap 1
- 0x01a71d01, // no connector, no jack detect
- 0x01a71ea7, // mic in, analog connection
- 0x01a71f90, // Fixed function, internal, Location N/A
+ // group 1, cap 1
+ // no connector, no jack detect
+ // mic in, analog connection
+ // Fixed function, internal, Location N/A
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x90a70111),
/* Pin Complex (NID 0x1B) LINE2 - Disabled */
- 0x01b71cf0, //
- 0x01b71d11, //
- 0x01b71e11, //
- 0x01b71f41, //
+ AZALIA_PIN_CFG(0x0, 0x1b, 0x411111f0),
/* Pin Complex (NID 0x1D) PCBeep */
- 0x01d71c2d, // eapd low on ex-amp, laptop, custom enable
- 0x01d71d81, // mute spkr on hpout
- 0x01d71e15, // pcbeep en able, checksum
- 0x01d71f40, // no physical, Internal, Location N/A
+ // eapd low on ex-amp, laptop, custom enable
+ // mute spkr on hpout
+ // pcbeep en able, checksum
+ // no physical, Internal, Location N/A
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x4015812d),
/* Pin Complex (NID 0x1E) SPDIF-OUT - Disabled*/
- 0x01e71cf0, //
- 0x01e71d11, //
- 0x01e71e11, //
- 0x01e71f41, //
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
/* Pin Complex (NID 0x21) HP-OUT - 3.5mm Jack*/
- 0x02171c21, // group2, cap 1
- 0x02171d10, // black, jack detect
- 0x02171e21, // HPOut, 3.5mm Jack
- 0x02171f03, // connector, left panel
+ // group2, cap 1
+ // black, jack detect
+ // HPOut, 3.5mm Jack
+ // connector, left panel
+ AZALIA_PIN_CFG(0x0, 0x21, 0x03211021),
/* Undocumented settings from Realtek (needed for beep_gen) */
/* Widget node 0x20 */
diff --git a/src/mainboard/google/peppy/mainboard.c b/src/mainboard/google/peppy/mainboard.c
index 38edb5ca48..ec3322abf5 100644
--- a/src/mainboard/google/peppy/mainboard.c
+++ b/src/mainboard/google/peppy/mainboard.c
@@ -34,11 +34,11 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/lynxpoint/pch.h>
#include <device/azalia_device.h>
#include "ec.h"
#include "onboard.h"
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/google/slippy/gma.c b/src/mainboard/google/slippy/gma.c
index f3316f4a47..bbb4e7218e 100644
--- a/src/mainboard/google/slippy/gma.c
+++ b/src/mainboard/google/slippy/gma.c
@@ -31,7 +31,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <smbios.h>
#include <device/pci.h>
#include <ec/google/chromeec/ec.h>
diff --git a/src/mainboard/google/slippy/hda_verb.h b/src/mainboard/google/slippy/hda_verb.h
index ba0da1c1a4..b1f1cb6bf9 100644
--- a/src/mainboard/google/slippy/hda_verb.h
+++ b/src/mainboard/google/slippy/hda_verb.h
@@ -24,72 +24,55 @@ static const u32 mainboard_cim_verb_data[] = {
0x0000000c, // Number of jacks (NID entries)
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10ec0283 */
- 0x00172083,
- 0x00172102,
- 0x001722ec,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10ec0283),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x12) DMIC - interior mobile lid */
- 0x01271c10,
- 0x01271d10,
- 0x01271ea6,
- 0x01271fb7,
+ AZALIA_PIN_CFG(0x0, 0x12, 0xb7a61010),
/* Pin Complex (NID 0x14) SPKR-OUT PORTD */
- 0x01471c10, // group 1, front left/right
- 0x01471d01, // no connector, no jack detect
- 0x01471e17, // speaker out, analog
- 0x01471f90, // fixed function, internal
+ // group 1, front left/right
+ // no connector, no jack detect
+ // speaker out, analog
+ // fixed function, internal
+ AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
/* Pin Complex (NID 0x17) */
- 0x01771cf0,
- 0x01771d11,
- 0x01771e11,
- 0x01771f41,
+ AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
/* Pin Complex (NID 0x18) MIC1 PORTB */
- 0x01971c11, // group 1, cap 1
- 0x01971d10, // black, jack detect
- 0x01971ea7, // mic in, analog
- 0x01971f03, // connector, left panel
+ // group 1, cap 1
+ // black, jack detect
+ // mic in, analog
+ // connector, left panel
+ AZALIA_PIN_CFG(0x0, 0x19, 0x03a71011),
/* Pin Complex (NID 0x19) MIC2 PORTF */
- 0x01871cf0,
- 0x01871d11,
- 0x01871e11,
- 0x01871f41,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0),
/* Pin Complex (NID 0x1A) LINE1 PORTC */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1B) LINE2 PORTE */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1d) PCBeep */
- 0x01d71c2d, // eapd low on ex-amp, laptop, custom enable
- 0x01d71d81, // mute spkr on hpout
- 0x01d71e15, // pcbeep en able, checksum
- 0x01d71f40, // no physical, internal
+ // eapd low on ex-amp, laptop, custom enable
+ // mute spkr on hpout
+ // pcbeep en able, checksum
+ // no physical, internal
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x4015812d),
/* Pin Complex (NID 0x1E) SPDIF-OUT */
- 0x01e71cf0,
- 0x01e71d11,
- 0x01e71e11,
- 0x01e71f41,
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
/* Pin Complex (NID 0x21) HPOUT PORT-I */
- 0x02171c1f, // group1,
- 0x02171d10, // black, jack detect
- 0x02171e21, // HPOut, 1/8 stereo
- 0x02171f03, // connector, left panel
+ // group1,
+ // black, jack detect
+ // HPOut, 1/8 stereo
+ // connector, left panel
+ AZALIA_PIN_CFG(0x0, 0x21, 0x0321101f),
/* Undocumented settings from Realtek (needed for beep_gen) */
/* Widget node 0x20 */
diff --git a/src/mainboard/google/slippy/mainboard.c b/src/mainboard/google/slippy/mainboard.c
index 022c1e8be0..a0e6ffa359 100644
--- a/src/mainboard/google/slippy/mainboard.c
+++ b/src/mainboard/google/slippy/mainboard.c
@@ -34,11 +34,11 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/lynxpoint/pch.h>
#include "ec.h"
#include "onboard.h"
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/google/stout/hda_verb.h b/src/mainboard/google/stout/hda_verb.h
index 08fc10c51c..43dae91f85 100644
--- a/src/mainboard/google/stout/hda_verb.h
+++ b/src/mainboard/google/stout/hda_verb.h
@@ -24,72 +24,39 @@ static const u32 mainboard_cim_verb_data[] = {
0x0000000c, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x17aa21fe */
- 0x001720fe,
- 0x00172121,
- 0x001722aa,
- 0x00172317,
+ AZALIA_SUBVENDOR(0x0, 0x17aa21fe),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x12): 0x90a60930 DMIC */
- 0x01271c30,
- 0x01271d09,
- 0x01271ea6,
- 0x01271f90,
+ AZALIA_PIN_CFG(0x0, 0x12, 0x90a60930),
/* Pin Complex (NID 0x14): 0x90170110 SPEAKER-OUT (Port-D) */
- 0x01471c10,
- 0x01471d01,
- 0x01471e17,
- 0x01471f90,
+ AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
/* Pin Complex (NID 0x15): 0x0321101f HP-OUT (Port-A) */
- 0x01571c1f,
- 0x01571d10,
- 0x01571e21,
- 0x01571f03,
+ AZALIA_PIN_CFG(0x0, 0x15, 0x0321101f),
/* Pin Complex (NID 0x17): 0x411111f0 MONO-OUT (Port-H) */
- 0x01771cf0,
- 0x01771d11,
- 0x01771e11,
- 0x01771f41,
+ AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
/* Pin Complex (NID 0x18): 0x03a11820 MIC1 (Port-B) */
- 0x01871c20,
- 0x01871d18,
- 0x01871ea1,
- 0x01871f03,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x03a11820),
/* Pin Complex (NID 0x19): 0x411111f0 MIC2 (Port-F) */
- 0x01971cf0,
- 0x01971d11,
- 0x01971e11,
- 0x01971f41,
+ AZALIA_PIN_CFG(0x0, 0x19, 0x411111f0),
/* Pin Complex (NID 0x1a): 0x411111f0 LINE1 (Port-C) */
- 0x01a71cf0,
- 0x01a71d11,
- 0x01a71e11,
- 0x01a71f41,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
/* Pin Complex (NID 0x1b): 0x411111f0 LINE2 (Port-E) */
- 0x01b71cf0,
- 0x01b71d11,
- 0x01b71e11,
- 0x01b71f41,
+ AZALIA_PIN_CFG(0x0, 0x1b, 0x411111f0),
/* Pin Complex (NID 0x1d): 0x4016862d PC-BEEP */
- 0x01d71c2d,
- 0x01d71d86,
- 0x01d71e16,
- 0x01d71f40,
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x4016862d),
/* Pin Complex (NID 0x1e): 0x411111f0 S/PDIF-OUT */
- 0x01e71cf0,
- 0x01e71d11,
- 0x01e71e11,
- 0x01e71f41,
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
/* Stout MIC detect setup */
0x02050018,
@@ -103,28 +70,16 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x30172001,
- 0x30172101,
- 0x30172286,
- 0x30172380,
+ AZALIA_SUBVENDOR(0x3, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Not Connected */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f58,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x58560020),
/* Pin Complex (NID 0x07) Not Connected */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f58
+ AZALIA_PIN_CFG(0x3, 0x07, 0x58560030)
};
static const u32 mainboard_pc_beep_verbs[] = {
diff --git a/src/mainboard/google/stout/mainboard.c b/src/mainboard/google/stout/mainboard.c
index b0ed3c11f7..aaa78e9ce0 100644
--- a/src/mainboard/google/stout/mainboard.c
+++ b/src/mainboard/google/stout/mainboard.c
@@ -32,7 +32,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include "onboard.h"
#include "ec.h"
#include <southbridge/intel/bd82x6x/pch.h>
@@ -40,6 +39,7 @@
#include <device/pci.h>
#include <ec/quanta/it8518/ec.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/intel/baskingridge/hda_verb.h b/src/mainboard/intel/baskingridge/hda_verb.h
index 52e5a3dd0b..2796e92682 100644
--- a/src/mainboard/intel/baskingridge/hda_verb.h
+++ b/src/mainboard/intel/baskingridge/hda_verb.h
@@ -24,48 +24,27 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000007, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10134210 */
- 0x00172010,
- 0x00172142,
- 0x00172213,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10134210),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x05) 1/8 Gray HP Out at Ext Front */
- 0x00571cf0,
- 0x00571d20,
- 0x00571e21,
- 0x00571f02,
+ AZALIA_PIN_CFG(0x0, 0x05, 0x022120f0),
/* Pin Complex (NID 0x06) Analog Unknown Speaker at Int N/A */
- 0x00671c10,
- 0x00671d00,
- 0x00671e17,
- 0x00671f90,
+ AZALIA_PIN_CFG(0x0, 0x06, 0x90170010),
/* Pin Complex (NID 0x07) 1/8 Grey Line In at Ext Front */
- 0x00771cf0,
- 0x00771d20,
- 0x00771ea1,
- 0x00771f02,
+ AZALIA_PIN_CFG(0x0, 0x07, 0x02a120f0),
/* Pin Complex (NID 0x08) Analog Unknown Mic at Oth Mobile-In */
- 0x00871c37,
- 0x00871d00,
- 0x00871ea7,
- 0x00871f77,
+ AZALIA_PIN_CFG(0x0, 0x08, 0x77a70037),
/* Pin Complex (NID 0x09) Digital Unknown Mic at Oth Mobile-In */
- 0x00971c3e,
- 0x00971d00,
- 0x00971ea6,
- 0x00971f77,
+ AZALIA_PIN_CFG(0x0, 0x09, 0x77a6003e),
/* Pin Complex (NID 0x0a) Optical Black SPDIF Out at Ext N/A */
- 0x00a71cf0,
- 0x00a71d10,
- 0x00a71e45,
- 0x00a71f43,
+ AZALIA_PIN_CFG(0x0, 0x0a, 0x434510f0),
/* coreboot specific header */
0x80862805, // Codec Vendor / Device ID: Intel CougarPoint HDMI
@@ -73,26 +52,14 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x00172001,
- 0x00172101,
- 0x00172286,
- 0x00172380,
+ AZALIA_SUBVENDOR(0x0, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
diff --git a/src/mainboard/intel/baskingridge/mainboard.c b/src/mainboard/intel/baskingridge/mainboard.c
index 61ba4aff68..d1f540505c 100644
--- a/src/mainboard/intel/baskingridge/mainboard.c
+++ b/src/mainboard/intel/baskingridge/mainboard.c
@@ -33,9 +33,9 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/lynxpoint/pch.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/intel/cougar_canyon2/hda_verb.h b/src/mainboard/intel/cougar_canyon2/hda_verb.h
index f8e83b4df4..381e338c45 100644
--- a/src/mainboard/intel/cougar_canyon2/hda_verb.h
+++ b/src/mainboard/intel/cougar_canyon2/hda_verb.h
@@ -24,26 +24,14 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x00172001,
- 0x00172101,
- 0x00172286,
- 0x00172380,
+ AZALIA_SUBVENDOR(0x0, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
diff --git a/src/mainboard/intel/cougar_canyon2/mainboard.c b/src/mainboard/intel/cougar_canyon2/mainboard.c
index 1a29992103..e9277d0356 100644
--- a/src/mainboard/intel/cougar_canyon2/mainboard.c
+++ b/src/mainboard/intel/cougar_canyon2/mainboard.c
@@ -31,9 +31,9 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/fsp_bd82x6x/pch.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
void mainboard_suspend_resume(void)
diff --git a/src/mainboard/intel/emeraldlake2/hda_verb.h b/src/mainboard/intel/emeraldlake2/hda_verb.h
index 52e5a3dd0b..2796e92682 100644
--- a/src/mainboard/intel/emeraldlake2/hda_verb.h
+++ b/src/mainboard/intel/emeraldlake2/hda_verb.h
@@ -24,48 +24,27 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000007, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10134210 */
- 0x00172010,
- 0x00172142,
- 0x00172213,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10134210),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x05) 1/8 Gray HP Out at Ext Front */
- 0x00571cf0,
- 0x00571d20,
- 0x00571e21,
- 0x00571f02,
+ AZALIA_PIN_CFG(0x0, 0x05, 0x022120f0),
/* Pin Complex (NID 0x06) Analog Unknown Speaker at Int N/A */
- 0x00671c10,
- 0x00671d00,
- 0x00671e17,
- 0x00671f90,
+ AZALIA_PIN_CFG(0x0, 0x06, 0x90170010),
/* Pin Complex (NID 0x07) 1/8 Grey Line In at Ext Front */
- 0x00771cf0,
- 0x00771d20,
- 0x00771ea1,
- 0x00771f02,
+ AZALIA_PIN_CFG(0x0, 0x07, 0x02a120f0),
/* Pin Complex (NID 0x08) Analog Unknown Mic at Oth Mobile-In */
- 0x00871c37,
- 0x00871d00,
- 0x00871ea7,
- 0x00871f77,
+ AZALIA_PIN_CFG(0x0, 0x08, 0x77a70037),
/* Pin Complex (NID 0x09) Digital Unknown Mic at Oth Mobile-In */
- 0x00971c3e,
- 0x00971d00,
- 0x00971ea6,
- 0x00971f77,
+ AZALIA_PIN_CFG(0x0, 0x09, 0x77a6003e),
/* Pin Complex (NID 0x0a) Optical Black SPDIF Out at Ext N/A */
- 0x00a71cf0,
- 0x00a71d10,
- 0x00a71e45,
- 0x00a71f43,
+ AZALIA_PIN_CFG(0x0, 0x0a, 0x434510f0),
/* coreboot specific header */
0x80862805, // Codec Vendor / Device ID: Intel CougarPoint HDMI
@@ -73,26 +52,14 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x00172001,
- 0x00172101,
- 0x00172286,
- 0x00172380,
+ AZALIA_SUBVENDOR(0x0, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
diff --git a/src/mainboard/intel/emeraldlake2/mainboard.c b/src/mainboard/intel/emeraldlake2/mainboard.c
index 3c93e05926..fc948cb3bc 100644
--- a/src/mainboard/intel/emeraldlake2/mainboard.c
+++ b/src/mainboard/intel/emeraldlake2/mainboard.c
@@ -33,9 +33,9 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/bd82x6x/pch.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/intel/wtm2/hda_verb.h b/src/mainboard/intel/wtm2/hda_verb.h
index cb33addc63..48750356c0 100644
--- a/src/mainboard/intel/wtm2/hda_verb.h
+++ b/src/mainboard/intel/wtm2/hda_verb.h
@@ -24,48 +24,27 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000007, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10134210 */
- 0x00172010,
- 0x00172142,
- 0x00172213,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10134210),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x05) 1/8 Gray HP Out at Ext Front */
- 0x00571cf0,
- 0x00571d20,
- 0x00571e21,
- 0x00571f02,
+ AZALIA_PIN_CFG(0x0, 0x05, 0x022120f0),
/* Pin Complex (NID 0x06) Analog Unknown Speaker at Int N/A */
- 0x00671c10,
- 0x00671d00,
- 0x00671e17,
- 0x00671f90,
+ AZALIA_PIN_CFG(0x0, 0x06, 0x90170010),
/* Pin Complex (NID 0x07) 1/8 Grey Line In at Ext Front */
- 0x00771cf0,
- 0x00771d20,
- 0x00771ea1,
- 0x00771f02,
+ AZALIA_PIN_CFG(0x0, 0x07, 0x02a120f0),
/* Pin Complex (NID 0x08) Analog Unknown Mic at Oth Mobile-In */
- 0x00871c37,
- 0x00871d00,
- 0x00871ea7,
- 0x00871f77,
+ AZALIA_PIN_CFG(0x0, 0x08, 0x77a70037),
/* Pin Complex (NID 0x09) Digital Unknown Mic at Oth Mobile-In */
- 0x00971c3e,
- 0x00971d00,
- 0x00971ea6,
- 0x00971f77,
+ AZALIA_PIN_CFG(0x0, 0x09, 0x77a6003e),
/* Pin Complex (NID 0x0a) Optical Black SPDIF Out at Ext N/A */
- 0x00a71cf0,
- 0x00a71d10,
- 0x00a71e45,
- 0x00a71f43,
+ AZALIA_PIN_CFG(0x0, 0x0a, 0x434510f0),
/* coreboot specific header */
0x80862805, // Codec Vendor / Device ID: Intel CougarPoint HDMI
@@ -73,26 +52,14 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x00172001,
- 0x00172101,
- 0x00172286,
- 0x00172380,
+ AZALIA_SUBVENDOR(0x0, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
diff --git a/src/mainboard/intel/wtm2/mainboard.c b/src/mainboard/intel/wtm2/mainboard.c
index 6f6e464334..cd61a4a7cd 100644
--- a/src/mainboard/intel/wtm2/mainboard.c
+++ b/src/mainboard/intel/wtm2/mainboard.c
@@ -33,9 +33,9 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/lynxpoint/pch.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/kontron/ktqm77/hda_verb.h b/src/mainboard/kontron/ktqm77/hda_verb.h
index 34c2b7a5b0..ccec18c752 100644
--- a/src/mainboard/kontron/ktqm77/hda_verb.h
+++ b/src/mainboard/kontron/ktqm77/hda_verb.h
@@ -25,10 +25,7 @@ static const u32 mainboard_cim_verb_data[] = {
0x0000000c, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x11060000 */
- 0x00172000,
- 0x00172100,
- 0x00172206,
- 0x00172311,
+ AZALIA_SUBVENDOR(0x0, 0x11060000),
/* Pin Widget Verb Table */
@@ -105,26 +102,14 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x00172001,
- 0x00172101,
- 0x00172286,
- 0x00172380,
+ AZALIA_SUBVENDOR(0x0, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f58,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x58560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
diff --git a/src/mainboard/lenovo/t520/hda_verb.h b/src/mainboard/lenovo/t520/hda_verb.h
index 7d5e75ad1f..4248a7d74d 100644
--- a/src/mainboard/lenovo/t520/hda_verb.h
+++ b/src/mainboard/lenovo/t520/hda_verb.h
@@ -37,83 +37,42 @@ static const u32 mainboard_cim_verb_data[] = {
/* Bits 7:0 - Payload */
/* NID 0x01 - NodeInfo */
- 0x001720FA,
- 0x00172121,
- 0x001722AA,
- 0x00172317,
+ AZALIA_SUBVENDOR(0x0, 0x17AA21FA),
/* NID 0x0A - External Microphone Connector
* Config=0x04A11020 (External,Right; MicIn,3.5mm; Black,JD; DA,Seq)
*/
- 0x00A71C20,
- 0x00A71D10,
- 0x00A71EA1,
- 0x00A71F04,
+ AZALIA_PIN_CFG(0x0, 0x0A, 0x04A11020),
/* NID 0x0B - Headphone Connector
* Config=0x0421101F (External,Right; HP,3.5mm; Black,JD; DA,Seq)
*/
- 0x00B71C1F,
- 0x00B71D10,
- 0x00B71E21,
- 0x00B71F04,
+ AZALIA_PIN_CFG(0x0, 0x0B, 0x0421101F),
/* NID 0x0C - Not connected
* Config=0x40F000F0 (N/A,N/A; Other,Unknown; Unknown,JD; DA,Seq)
*/
- 0x00C71CF0,
- 0x00C71D00,
- 0x00C71EF0,
- 0x00C71F40,
+ AZALIA_PIN_CFG(0x0, 0x0C, 0x40F000F0),
/* NID 0x0D - Internal Speakers
* Config=0x90170110 (Fixed,Int; Speaker,Other Analog; Unknown,nJD; DA,Seq)
*/
- 0x00D71C10,
- 0x00D71D01,
- 0x00D71E17,
- 0x00D71F90,
+ AZALIA_PIN_CFG(0x0, 0x0D, 0x90170110),
/* NID 0x0F - Not connected
* Config=0x40F000F0
*/
- 0x00F71CF0,
- 0x00F71D00,
- 0x00F71EF0,
- 0x00F71F40,
+ AZALIA_PIN_CFG(0x0, 0x0F, 0x40F000F0),
/* NID 0x11 - Internal Microphone
* Config=0xD5A30140 (Fixed internal,Top; Mic In,ATIPI; Unknown,nJD; DA,Seq)
*/
- 0x01171C40,
- 0x01171D01,
- 0x01171EA3,
- 0x01171FD5,
-
- 0x01271C40,
- 0x01271D01,
- 0x01271EA6,
- 0x01271F90,
-
- 0x01471C10,
- 0x01471D01,
- 0x01471E17,
- 0x01471F90,
-
- 0x01571C20,
- 0x01571D10,
- 0x01571E21,
- 0x01571F03,
-
- 0x01871C30,
- 0x01871D18,
- 0x01871EA1,
- 0x01871F03,
-
- 0x01971CF0,
- 0x01971D11,
- 0x01971E11,
- 0x01971F41,
+ AZALIA_PIN_CFG(0x0, 0x11, 0xD5A30140),
+ AZALIA_PIN_CFG(0x0, 0x12, 0x90A60140),
+ AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
+ AZALIA_PIN_CFG(0x0, 0x15, 0x03211020),
+ AZALIA_PIN_CFG(0x0, 0x18, 0x03A11830),
+ AZALIA_PIN_CFG(0x0, 0x19, 0x411111F0),
0x01970804,
0x01870803,
@@ -125,20 +84,9 @@ static const u32 mainboard_cim_verb_data[] = {
0x00270600,
0x00270600,
- 0x01A71CF0,
- 0x01A71D11,
- 0x01A71E11,
- 0x01A71F41,
-
- 0x01D71C05,
- 0x01D71D82,
- 0x01D71E13,
- 0x01D71F40,
-
- 0x01E71CF0,
- 0x01E71D11,
- 0x01E71E11,
- 0x01E71F41,
+ AZALIA_PIN_CFG(0x0, 0x1A, 0x411111F0),
+ AZALIA_PIN_CFG(0x0, 0x1D, 0x40138205),
+ AZALIA_PIN_CFG(0x0, 0x1E, 0x411111F0),
/*
* Hardware EQ Parameters
@@ -283,28 +231,16 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of IDs
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x30172001,
- 0x30172101,
- 0x30172286,
- 0x30172380,
+ AZALIA_SUBVENDOR(0x3, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
static const u32 mainboard_pc_beep_verbs[] = {
diff --git a/src/mainboard/lenovo/t520/mainboard.c b/src/mainboard/lenovo/t520/mainboard.c
index f89001aeea..a93ba706bc 100644
--- a/src/mainboard/lenovo/t520/mainboard.c
+++ b/src/mainboard/lenovo/t520/mainboard.c
@@ -33,7 +33,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/bd82x6x/pch.h>
#include <smbios.h>
#include <device/pci.h>
@@ -41,6 +40,7 @@
#include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/lenovo/t530/hda_verb.h b/src/mainboard/lenovo/t530/hda_verb.h
index cc280a1574..f04eae7e71 100644
--- a/src/mainboard/lenovo/t530/hda_verb.h
+++ b/src/mainboard/lenovo/t530/hda_verb.h
@@ -37,83 +37,42 @@ static const u32 mainboard_cim_verb_data[] = {
/* Bits 7:0 - Payload */
/* NID 0x01 - NodeInfo */
- 0x001720FA,
- 0x00172121,
- 0x001722AA,
- 0x00172317,
+ AZALIA_SUBVENDOR(0x0, 0x17AA21FA),
/* NID 0x0A - External Microphone Connector
* Config=0x04A11020 (External,Right; MicIn,3.5mm; Black,JD; DA,Seq)
*/
- 0x00A71C20,
- 0x00A71D10,
- 0x00A71EA1,
- 0x00A71F04,
+ AZALIA_PIN_CFG(0x0, 0x0A, 0x04A11020),
/* NID 0x0B - Headphone Connector
* Config=0x0421101F (External,Right; HP,3.5mm; Black,JD; DA,Seq)
*/
- 0x00B71C1F,
- 0x00B71D10,
- 0x00B71E21,
- 0x00B71F04,
+ AZALIA_PIN_CFG(0x0, 0x0B, 0x0421101F),
/* NID 0x0C - Not connected
* Config=0x40F000F0 (N/A,N/A; Other,Unknown; Unknown,JD; DA,Seq)
*/
- 0x00C71CF0,
- 0x00C71D00,
- 0x00C71EF0,
- 0x00C71F40,
+ AZALIA_PIN_CFG(0x0, 0x0C, 0x40F000F0),
/* NID 0x0D - Internal Speakers
* Config=0x90170110 (Fixed,Int; Speaker,Other Analog; Unknown,nJD; DA,Seq)
*/
- 0x00D71C10,
- 0x00D71D01,
- 0x00D71E17,
- 0x00D71F90,
+ AZALIA_PIN_CFG(0x0, 0x0D, 0x90170110),
/* NID 0x0F - Not connected
* Config=0x40F000F0
*/
- 0x00F71CF0,
- 0x00F71D00,
- 0x00F71EF0,
- 0x00F71F40,
+ AZALIA_PIN_CFG(0x0, 0x0F, 0x40F000F0),
/* NID 0x11 - Internal Microphone
* Config=0xD5A30140 (Fixed internal,Top; Mic In,ATIPI; Unknown,nJD; DA,Seq)
*/
- 0x01171C40,
- 0x01171D01,
- 0x01171EA3,
- 0x01171FD5,
-
- 0x01271C40,
- 0x01271D01,
- 0x01271EA6,
- 0x01271F90,
-
- 0x01471C10,
- 0x01471D01,
- 0x01471E17,
- 0x01471F90,
-
- 0x01571C20,
- 0x01571D10,
- 0x01571E21,
- 0x01571F03,
-
- 0x01871C30,
- 0x01871D18,
- 0x01871EA1,
- 0x01871F03,
-
- 0x01971CF0,
- 0x01971D11,
- 0x01971E11,
- 0x01971F41,
+ AZALIA_PIN_CFG(0x0, 0x11, 0xD5A30140),
+ AZALIA_PIN_CFG(0x0, 0x12, 0x90A60140),
+ AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
+ AZALIA_PIN_CFG(0x0, 0x15, 0x03211020),
+ AZALIA_PIN_CFG(0x0, 0x18, 0x03A11830),
+ AZALIA_PIN_CFG(0x0, 0x19, 0x411111F0),
0x01970804,
0x01870803,
@@ -125,20 +84,9 @@ static const u32 mainboard_cim_verb_data[] = {
0x00270600,
0x00270600,
- 0x01A71CF0,
- 0x01A71D11,
- 0x01A71E11,
- 0x01A71F41,
-
- 0x01D71C05,
- 0x01D71D82,
- 0x01D71E13,
- 0x01D71F40,
-
- 0x01E71CF0,
- 0x01E71D11,
- 0x01E71E11,
- 0x01E71F41,
+ AZALIA_PIN_CFG(0x0, 0x1A, 0x411111F0),
+ AZALIA_PIN_CFG(0x0, 0x1D, 0x40138205),
+ AZALIA_PIN_CFG(0x0, 0x1E, 0x411111F0),
/*
* Hardware EQ Parameters
@@ -283,28 +231,16 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of IDs
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x30172001,
- 0x30172101,
- 0x30172286,
- 0x30172380,
+ AZALIA_SUBVENDOR(0x3, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
static const u32 mainboard_pc_beep_verbs[] = {
diff --git a/src/mainboard/lenovo/t530/mainboard.c b/src/mainboard/lenovo/t530/mainboard.c
index c3425b3d01..e529d452fc 100644
--- a/src/mainboard/lenovo/t530/mainboard.c
+++ b/src/mainboard/lenovo/t530/mainboard.c
@@ -33,7 +33,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/bd82x6x/pch.h>
#include <smbios.h>
#include <device/pci.h>
@@ -41,6 +40,7 @@
#include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/lenovo/x201/hda_verb.h b/src/mainboard/lenovo/x201/hda_verb.h
index d5a8e7c9c5..17069292af 100644
--- a/src/mainboard/lenovo/x201/hda_verb.h
+++ b/src/mainboard/lenovo/x201/hda_verb.h
@@ -25,96 +25,51 @@ static const u32 mainboard_cim_verb_data[] = {
0x0000000B, /* Number of 4 dword sets */
/* NID 0x01: Subsystem ID. */
- 0x00172055,
- 0x00172121,
- 0x001722AA,
- 0x00172317,
+ AZALIA_SUBVENDOR(0x0, 0x17AA2155),
/* NID 0x19: Headphone jack. */
- 0x01971CF0,
- 0x01971D40,
- 0x01971E21,
- 0x01971F04,
+ AZALIA_PIN_CFG(0x0, 0x19, 0x042140F0),
/* NID 0x1A: Dock mic jack. */
- 0x01A71CF0,
- 0x01A71D90,
- 0x01A71EA1,
- 0x01A71F61,
+ AZALIA_PIN_CFG(0x0, 0x1A, 0x61A190F0),
/* NID 0x1B: Mic jack. */
- 0x01B71CF0,
- 0x01B71D90,
- 0x01B71EA1,
- 0x01B71F04,
+ AZALIA_PIN_CFG(0x0, 0x1B, 0x04A190F0),
/* NID 0x1C: Dock headphone jack. */
- 0x01C71CF0,
- 0x01C71D40,
- 0x01C71E21,
- 0x01C71F61,
+ AZALIA_PIN_CFG(0x0, 0x1C, 0x612140F0),
/* NID 0x1D: EAPD detect. */
- 0x01D71CF0,
- 0x01D71D00,
- 0x01D71E17,
- 0x01D71F60,
+ AZALIA_PIN_CFG(0x0, 0x1D, 0x601700F0),
/* NID 0x1E */
- 0x01E71CF0,
- 0x01E71D01,
- 0x01E71EF0,
- 0x01E71F40,
+ AZALIA_PIN_CFG(0x0, 0x1E, 0x40F001F0),
/* NID 0x1F */
- 0x01F71CF0,
- 0x01F71D01,
- 0x01F71E17,
- 0x01F71F90,
+ AZALIA_PIN_CFG(0x0, 0x1F, 0x901701F0),
/* NID 0x20 */
- 0x02071CF0,
- 0x02071D01,
- 0x02071EF0,
- 0x02071F40,
+ AZALIA_PIN_CFG(0x0, 0x20, 0x40F001F0),
/* NID 0x22 */
- 0x02271CF0,
- 0x02271D01,
- 0x02271EF0,
- 0x02271F40,
+ AZALIA_PIN_CFG(0x0, 0x22, 0x40F001F0),
/* NID 0x23: Internal mic boost volume. */
- 0x02371CF0,
- 0x02371D01,
- 0x02371EA6,
- 0x02371F90,
+ AZALIA_PIN_CFG(0x0, 0x23, 0x90A601F0),
0x80862804, /* Codec Vendor / Device ID: Intel Ibexpeak HDMI. */
0x17aa21b5, /* Subsystem ID */
0x00000004, /* Number of 4 dword sets */
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x17aa21b5 */
- 0x301720B5,
- 0x30172121,
- 0x301722AA,
- 0x30172317,
+ AZALIA_SUBVENDOR(0x3, 0x17AA21B5),
/* NID 0x04. */
- 0x30471C10,
- 0x30471D00,
- 0x30471E56,
- 0x30471F58,
+ AZALIA_PIN_CFG(0x3, 0x04, 0x58560010),
/* NID 0x05. */
- 0x30571C20,
- 0x30571D00,
- 0x30571E56,
- 0x30571F18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560020),
/* NID 0x06. */
- 0x30671C30,
- 0x30671D00,
- 0x30671E56,
- 0x30671F58,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x58560030),
};
diff --git a/src/mainboard/lenovo/x220/hda_verb.h b/src/mainboard/lenovo/x220/hda_verb.h
index 6cf79c5fc6..ce980fc2a8 100644
--- a/src/mainboard/lenovo/x220/hda_verb.h
+++ b/src/mainboard/lenovo/x220/hda_verb.h
@@ -37,60 +37,18 @@ static const u32 mainboard_cim_verb_data[] = {
/* Bits 7:0 - Payload */
/* NID 0x01 - NodeInfo */
- 0x001720DB,
- 0x00172121,
- 0x001722AA,
- 0x00172317,
-
- 0x01971C40,
- 0x01971D10,
- 0x01971E21,
- 0x01971F04,
-
- 0x01A71C50,
- 0x01A71D90,
- 0x01A71EA1,
- 0x01A71F61,
-
- 0x01B71C60,
- 0x01B71D10,
- 0x01B71EA1,
- 0x01B71F04,
-
- 0x01C71C1F,
- 0x01C71D40,
- 0x01C71E21,
- 0x01C71F61,
-
- 0x01D71CF0,
- 0x01D71D01,
- 0x01D71EF0,
- 0x01D71F40,
-
- 0x01E71CF0,
- 0x01E71D01,
- 0x01E71EF0,
- 0x01E71F40,
-
- 0x01F71C10,
- 0x01F71D01,
- 0x01F71E17,
- 0x01F71F90,
-
- 0x02071CF0,
- 0x02071D01,
- 0x02071EF0,
- 0x02071F40,
-
- 0x02271CF0,
- 0x02271D01,
- 0x02271EF0,
- 0x02271F40,
-
- 0x02371C70,
- 0x02371D01,
- 0x02371EA6,
- 0x02371F90,
+ AZALIA_SUBVENDOR(0x0, 0x17AA21DB),
+
+ AZALIA_PIN_CFG(0x0, 0x19, 0x04211040),
+ AZALIA_PIN_CFG(0x0, 0x1A, 0x61A19050),
+ AZALIA_PIN_CFG(0x0, 0x1B, 0x04A11060),
+ AZALIA_PIN_CFG(0x0, 0x1C, 0x6121401F),
+ AZALIA_PIN_CFG(0x0, 0x1D, 0x40F001F0),
+ AZALIA_PIN_CFG(0x0, 0x1E, 0x40F001F0),
+ AZALIA_PIN_CFG(0x0, 0x1F, 0x90170110),
+ AZALIA_PIN_CFG(0x0, 0x20, 0x40F001F0),
+ AZALIA_PIN_CFG(0x0, 0x22, 0x40F001F0),
+ AZALIA_PIN_CFG(0x0, 0x23, 0x90A60170),
/*
* Hardware EQ Parameters
@@ -235,28 +193,16 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of IDs
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x30172001,
- 0x30172101,
- 0x30172286,
- 0x30172380,
+ AZALIA_SUBVENDOR(0x3, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
static const u32 mainboard_pc_beep_verbs[] = {
diff --git a/src/mainboard/lenovo/x220/mainboard.c b/src/mainboard/lenovo/x220/mainboard.c
index 28cd8142dc..3656c224e5 100644
--- a/src/mainboard/lenovo/x220/mainboard.c
+++ b/src/mainboard/lenovo/x220/mainboard.c
@@ -33,7 +33,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/bd82x6x/pch.h>
#include <smbios.h>
#include <device/pci.h>
@@ -42,6 +41,7 @@
#include <ec/lenovo/h8/h8.h>
#include <build.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/lenovo/x230/hda_verb.h b/src/mainboard/lenovo/x230/hda_verb.h
index cc280a1574..f04eae7e71 100644
--- a/src/mainboard/lenovo/x230/hda_verb.h
+++ b/src/mainboard/lenovo/x230/hda_verb.h
@@ -37,83 +37,42 @@ static const u32 mainboard_cim_verb_data[] = {
/* Bits 7:0 - Payload */
/* NID 0x01 - NodeInfo */
- 0x001720FA,
- 0x00172121,
- 0x001722AA,
- 0x00172317,
+ AZALIA_SUBVENDOR(0x0, 0x17AA21FA),
/* NID 0x0A - External Microphone Connector
* Config=0x04A11020 (External,Right; MicIn,3.5mm; Black,JD; DA,Seq)
*/
- 0x00A71C20,
- 0x00A71D10,
- 0x00A71EA1,
- 0x00A71F04,
+ AZALIA_PIN_CFG(0x0, 0x0A, 0x04A11020),
/* NID 0x0B - Headphone Connector
* Config=0x0421101F (External,Right; HP,3.5mm; Black,JD; DA,Seq)
*/
- 0x00B71C1F,
- 0x00B71D10,
- 0x00B71E21,
- 0x00B71F04,
+ AZALIA_PIN_CFG(0x0, 0x0B, 0x0421101F),
/* NID 0x0C - Not connected
* Config=0x40F000F0 (N/A,N/A; Other,Unknown; Unknown,JD; DA,Seq)
*/
- 0x00C71CF0,
- 0x00C71D00,
- 0x00C71EF0,
- 0x00C71F40,
+ AZALIA_PIN_CFG(0x0, 0x0C, 0x40F000F0),
/* NID 0x0D - Internal Speakers
* Config=0x90170110 (Fixed,Int; Speaker,Other Analog; Unknown,nJD; DA,Seq)
*/
- 0x00D71C10,
- 0x00D71D01,
- 0x00D71E17,
- 0x00D71F90,
+ AZALIA_PIN_CFG(0x0, 0x0D, 0x90170110),
/* NID 0x0F - Not connected
* Config=0x40F000F0
*/
- 0x00F71CF0,
- 0x00F71D00,
- 0x00F71EF0,
- 0x00F71F40,
+ AZALIA_PIN_CFG(0x0, 0x0F, 0x40F000F0),
/* NID 0x11 - Internal Microphone
* Config=0xD5A30140 (Fixed internal,Top; Mic In,ATIPI; Unknown,nJD; DA,Seq)
*/
- 0x01171C40,
- 0x01171D01,
- 0x01171EA3,
- 0x01171FD5,
-
- 0x01271C40,
- 0x01271D01,
- 0x01271EA6,
- 0x01271F90,
-
- 0x01471C10,
- 0x01471D01,
- 0x01471E17,
- 0x01471F90,
-
- 0x01571C20,
- 0x01571D10,
- 0x01571E21,
- 0x01571F03,
-
- 0x01871C30,
- 0x01871D18,
- 0x01871EA1,
- 0x01871F03,
-
- 0x01971CF0,
- 0x01971D11,
- 0x01971E11,
- 0x01971F41,
+ AZALIA_PIN_CFG(0x0, 0x11, 0xD5A30140),
+ AZALIA_PIN_CFG(0x0, 0x12, 0x90A60140),
+ AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
+ AZALIA_PIN_CFG(0x0, 0x15, 0x03211020),
+ AZALIA_PIN_CFG(0x0, 0x18, 0x03A11830),
+ AZALIA_PIN_CFG(0x0, 0x19, 0x411111F0),
0x01970804,
0x01870803,
@@ -125,20 +84,9 @@ static const u32 mainboard_cim_verb_data[] = {
0x00270600,
0x00270600,
- 0x01A71CF0,
- 0x01A71D11,
- 0x01A71E11,
- 0x01A71F41,
-
- 0x01D71C05,
- 0x01D71D82,
- 0x01D71E13,
- 0x01D71F40,
-
- 0x01E71CF0,
- 0x01E71D11,
- 0x01E71E11,
- 0x01E71F41,
+ AZALIA_PIN_CFG(0x0, 0x1A, 0x411111F0),
+ AZALIA_PIN_CFG(0x0, 0x1D, 0x40138205),
+ AZALIA_PIN_CFG(0x0, 0x1E, 0x411111F0),
/*
* Hardware EQ Parameters
@@ -283,28 +231,16 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of IDs
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x30172001,
- 0x30172101,
- 0x30172286,
- 0x30172380,
+ AZALIA_SUBVENDOR(0x3, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
static const u32 mainboard_pc_beep_verbs[] = {
diff --git a/src/mainboard/lenovo/x230/mainboard.c b/src/mainboard/lenovo/x230/mainboard.c
index c017712855..2df9069672 100644
--- a/src/mainboard/lenovo/x230/mainboard.c
+++ b/src/mainboard/lenovo/x230/mainboard.c
@@ -33,7 +33,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/bd82x6x/pch.h>
#include <smbios.h>
#include <device/pci.h>
@@ -42,6 +41,7 @@
#include <ec/lenovo/h8/h8.h>
#include <build.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/nvidia/l1_2pvv/hda_verb.h b/src/mainboard/nvidia/l1_2pvv/hda_verb.h
index 98e2a92eb9..ea3159e53d 100644
--- a/src/mainboard/nvidia/l1_2pvv/hda_verb.h
+++ b/src/mainboard/nvidia/l1_2pvv/hda_verb.h
@@ -26,80 +26,41 @@ static u32 mainboard_cim_verb_data[] = {
0x0000000d, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x0000e601 */
- 0x00172001,
- 0x001721e6,
- 0x00172200,
- 0x00172300,
+ AZALIA_SUBVENDOR(0x0, 0x0000e601),
/* NID 0x14, FRONT-OUT-L/R */
- 0x01471c10,
- 0x01471d44,
- 0x01471e01,
- 0x01471f01,
+ AZALIA_PIN_CFG(0x0, 0x14, 0x01014410),
/* NID 0x15, SURR-OUT-L/R */
- 0x01571c12,
- 0x01571d14,
- 0x01571e01,
- 0x01571f01,
+ AZALIA_PIN_CFG(0x0, 0x15, 0x01011412),
/* NID 0x16, CEN/LFE-OUT */
- 0x01671c11,
- 0x01671d60,
- 0x01671e01,
- 0x01671f01,
+ AZALIA_PIN_CFG(0x0, 0x16, 0x01016011),
/* NID 0x17, SIDE-SURR-L/R */
- 0x01771c14,
- 0x01771d20,
- 0x01771e01,
- 0x01771f01,
+ AZALIA_PIN_CFG(0x0, 0x17, 0x01012014),
/* NID 0x18, MIC1-L/R, VREFO */
- 0x01871c30,
- 0x01871d9c,
- 0x01871ea1,
- 0x01871f01,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x01a19c30),
/* NID 0x19, MIC2-L/R, VREFO */
- 0x01971c40,
- 0x01971d9c,
- 0x01971ea1,
- 0x01971f02,
+ AZALIA_PIN_CFG(0x0, 0x19, 0x02a19c40),
/* NID 0x1a, LINE1-L/R, VREFO */
- 0x01a71c31,
- 0x01a71d34,
- 0x01a71e81,
- 0x01a71f01,
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x01813431),
/* NID 0x1b, LINE2-L/R, VREFO */
- 0x01b71c1f,
- 0x01b71d44,
- 0x01b71e21,
- 0x01b71f02,
+ AZALIA_PIN_CFG(0x0, 0x1b, 0x0221441f),
/* NID 0x1c, CD-L/R / GND */
- 0x01c71cf0,
- 0x01c71d11,
- 0x01c71e11,
- 0x01c71f41,
+ AZALIA_PIN_CFG(0x0, 0x1c, 0x411111f0),
/* NID 0x1d, PCBEEP */
- 0x01d71c3e,
- 0x01d71d01,
- 0x01d71e83,
- 0x01d71f99,
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x9983013e),
/* NID 0x1e, S/PDIF-OUT */
- 0x01e71c20,
- 0x01e71d41,
- 0x01e71e45,
- 0x01e71f01,
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x01454120),
/* NID 0x1f, S/PDIF-IN */
- 0x01f71c50,
- 0x01f71d91,
- 0x01f71ec5,
- 0x01f71f01,
+ AZALIA_PIN_CFG(0x0, 0x1f, 0x01c59150),
};
diff --git a/src/mainboard/packardbell/ms2290/hda_verb.h b/src/mainboard/packardbell/ms2290/hda_verb.h
index 1e3ccc4fc1..3cc00dbe9c 100644
--- a/src/mainboard/packardbell/ms2290/hda_verb.h
+++ b/src/mainboard/packardbell/ms2290/hda_verb.h
@@ -25,66 +25,36 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000006, /* Number of 4 dword sets */
/* NID 0x01: Subsystem ID. */
- 0x00172079,
- 0x00172103,
- 0x00172225,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10250379),
/* NID 0x14. */
- 0x01471C10,
- 0x01471D01,
- 0x01471E13,
- 0x01471F99,
+ AZALIA_PIN_CFG(0x0, 0x14, 0x99130110),
/* NID 0x18. */
- 0x01871C30,
- 0x01871D18,
- 0x01871EA1,
- 0x01871F03,
+ AZALIA_PIN_CFG(0x0, 0x18, 0x03A11830),
/* NID 0x19. */
- 0x01971C20,
- 0x01971D09,
- 0x01971EA3,
- 0x01971F99,
+ AZALIA_PIN_CFG(0x0, 0x19, 0x99A30920),
/* NID 0x1D. */
- 0x01D71C2D,
- 0x01D71D99,
- 0x01D71E17,
- 0x01D71F40,
+ AZALIA_PIN_CFG(0x0, 0x1D, 0x4017992D),
/* NID 0x21. */
- 0x02171C1F,
- 0x02171D10,
- 0x02171E21,
- 0x02171F03,
+ AZALIA_PIN_CFG(0x0, 0x21, 0x0321101F),
0x80862804, /* Codec Vendor / Device ID: Intel Ibexpeak HDMI. */
0x80860101, /* Subsystem ID */
0x00000004, /* Number of 4 dword sets */
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x17aa21b5 */
- 0x30172001,
- 0x30172101,
- 0x30172286,
- 0x30172380,
+ AZALIA_SUBVENDOR(0x3, 0x80860101),
/* NID 0x04. */
- 0x30471C10,
- 0x30471D00,
- 0x30471E56,
- 0x30471F18,
+ AZALIA_PIN_CFG(0x3, 0x04, 0x18560010),
/* NID 0x05. */
- 0x30571C20,
- 0x30571D00,
- 0x30571E56,
- 0x30571F58,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x58560020),
/* NID 0x06. */
- 0x30671C30,
- 0x30671D00,
- 0x30671E56,
- 0x30671F58,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x58560030),
};
diff --git a/src/mainboard/packardbell/ms2290/mainboard.c b/src/mainboard/packardbell/ms2290/mainboard.c
index aca221a7b3..62e7fd906d 100644
--- a/src/mainboard/packardbell/ms2290/mainboard.c
+++ b/src/mainboard/packardbell/ms2290/mainboard.c
@@ -34,7 +34,6 @@
#include <ec/acpi/ec.h>
#include <pc80/mc146818rtc.h>
-#include "hda_verb.h"
#include <arch/x86/include/arch/acpigen.h>
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
#include <x86emu/regs.h>
@@ -45,6 +44,7 @@
#include <device/pci.h>
#include <smbios.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
static acpi_cstate_t cst_entries[] = {
{1, 1, 1000, {0x7f, 1, 2, {0}, 1, 0}},
diff --git a/src/mainboard/samsung/lumpy/hda_verb.h b/src/mainboard/samsung/lumpy/hda_verb.h
index dfadf5562a..4806b75f5b 100644
--- a/src/mainboard/samsung/lumpy/hda_verb.h
+++ b/src/mainboard/samsung/lumpy/hda_verb.h
@@ -24,50 +24,29 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000007, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x144dc0c2 */
- 0x00172082,
- 0x001721b0,
- 0x0017224d,
- 0x00172314,
+ AZALIA_SUBVENDOR(0x0, 0x144db082),
0x00170500,
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x05) */
- 0x00571cf0,
- 0x00571d10,
- 0x00571e21,
- 0x00571f02,
+ AZALIA_PIN_CFG(0x0, 0x05, 0x022110f0),
/* Pin Complex (NID 0x06) */
- 0x00671cf0,
- 0x00671d00,
- 0x00671e17,
- 0x00671f90,
+ AZALIA_PIN_CFG(0x0, 0x06, 0x901700f0),
/* Pin Complex (NID 0x07) */
- 0x00771cf0,
- 0x00771d10,
- 0x00771ea1,
- 0x00771f02,
+ AZALIA_PIN_CFG(0x0, 0x07, 0x02a110f0),
/* Pin Complex (NID 0x08) */
- 0x00871c37,
- 0x00871d00,
- 0x00871ea7,
- 0x00871f77,
+ AZALIA_PIN_CFG(0x0, 0x08, 0x77a70037),
/* Pin Complex (NID 0x09) */
- 0x00971c3e,
- 0x00971d00,
- 0x00971ea6,
- 0x00971fb7,
+ AZALIA_PIN_CFG(0x0, 0x09, 0xb7a6003e),
/* Pin Complex (NID 0x0a) */
- 0x00a71cf0,
- 0x00a71d10,
- 0x00a71e45,
- 0x00a71f43
+ AZALIA_PIN_CFG(0x0, 0x0a, 0x434510f0)
};
static const u32 mainboard_pc_beep_verbs[] = {
diff --git a/src/mainboard/samsung/lumpy/mainboard.c b/src/mainboard/samsung/lumpy/mainboard.c
index ee6728f6a2..bce20d6d98 100644
--- a/src/mainboard/samsung/lumpy/mainboard.c
+++ b/src/mainboard/samsung/lumpy/mainboard.c
@@ -33,12 +33,12 @@
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
#include <ec/smsc/mec1308/ec.h>
-#include "hda_verb.h"
#include "ec.h"
#include "onboard.h"
#include <southbridge/intel/bd82x6x/pch.h>
#include <smbios.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
diff --git a/src/mainboard/samsung/stumpy/hda_verb.h b/src/mainboard/samsung/stumpy/hda_verb.h
index b263fbe972..3992eeec04 100644
--- a/src/mainboard/samsung/stumpy/hda_verb.h
+++ b/src/mainboard/samsung/stumpy/hda_verb.h
@@ -24,48 +24,27 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000007, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10134210 */
- 0x00172010,
- 0x00172142,
- 0x00172213,
- 0x00172310,
+ AZALIA_SUBVENDOR(0x0, 0x10134210),
/* Pin Widget Verb Table */
/* Pin Complex (NID 0x05) 1/8 Gray HP Out at Ext Front */
- 0x00571cf0,
- 0x00571d20,
- 0x00571e21,
- 0x00571f02,
+ AZALIA_PIN_CFG(0x0, 0x05, 0x022120f0),
/* Pin Complex (NID 0x06) Analog Unknown Speaker at Int N/A */
- 0x00671c10,
- 0x00671d00,
- 0x00671e17,
- 0x00671f90,
+ AZALIA_PIN_CFG(0x0, 0x06, 0x90170010),
/* Pin Complex (NID 0x07) 1/8 Grey Line In at Ext Front */
- 0x00771cf0,
- 0x00771d20,
- 0x00771ea1,
- 0x00771f02,
+ AZALIA_PIN_CFG(0x0, 0x07, 0x02a120f0),
/* Pin Complex (NID 0x08) Analog Unknown Mic at Oth Mobile-In */
- 0x00871c37,
- 0x00871d00,
- 0x00871ea7,
- 0x00871f77,
+ AZALIA_PIN_CFG(0x0, 0x08, 0x77a70037),
/* Pin Complex (NID 0x09) Digital Unknown Mic at Oth Mobile-In */
- 0x00971c3e,
- 0x00971d00,
- 0x00971ea6,
- 0x00971f77,
+ AZALIA_PIN_CFG(0x0, 0x09, 0x77a6003e),
/* Pin Complex (NID 0x0a) Optical Black SPDIF Out at Ext N/A */
- 0x00a71cf0,
- 0x00a71d10,
- 0x00a71e45,
- 0x00a71f43,
+ AZALIA_PIN_CFG(0x0, 0x0a, 0x434510f0),
/* coreboot specific header */
0x80862805, // Codec Vendor / Device ID: Intel CougarPoint HDMI
@@ -73,28 +52,16 @@ static const u32 mainboard_cim_verb_data[] = {
0x00000004, // Number of jacks
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
- 0x00172001,
- 0x00172101,
- 0x00172286,
- 0x00172380,
+ AZALIA_SUBVENDOR(0x0, 0x80860101),
/* Pin Complex (NID 0x05) Digital Out at Int HDMI */
- 0x30571c10,
- 0x30571d00,
- 0x30571e56,
- 0x30571f18,
+ AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
/* Pin Complex (NID 0x06) Digital Out at Int HDMI */
- 0x30671c20,
- 0x30671d00,
- 0x30671e56,
- 0x30671f18,
+ AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
- 0x30771c30,
- 0x30771d00,
- 0x30771e56,
- 0x30771f18
+ AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
static const u32 mainboard_pc_beep_verbs[] = {
diff --git a/src/mainboard/samsung/stumpy/mainboard.c b/src/mainboard/samsung/stumpy/mainboard.c
index 99fe725498..2256b41ef4 100644
--- a/src/mainboard/samsung/stumpy/mainboard.c
+++ b/src/mainboard/samsung/stumpy/mainboard.c
@@ -33,9 +33,9 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include "hda_verb.h"
#include <southbridge/intel/bd82x6x/pch.h>
#include <device/azalia_device.h>
+#include "hda_verb.h"
void mainboard_suspend_resume(void)
{