summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorNicholas Sudsgaard <devel+coreboot@nsudsgaard.com>2024-02-25 09:32:33 +0900
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2024-02-29 03:13:08 +0000
commit4e8bbc11d08e2fb63fb3530e091f8387fd94c039 (patch)
treed8f4aa2f7dd98a21836e6c46aa07cbe957b8e27c /src/include
parent4a62b8a5997873229f5342bffdee3e6b21772b06 (diff)
include/device/azalia_device.h: Merge location1 and location2
This changes the location to be expressed as a combination of ORs. This allows aliases for special locations. For example, `AZALIA_REAR_PANEL` is easier to read than `AZALIA_EXTERNAL_PRIMARY_CHASSIS, AZALIA_SPECIAL7`. References: - Intel High Definition Audio Specification, rev. 1.0a, page 180, Table 110. Location. Change-Id: I5a61a37ed70027700f07f1532c500f04d7a16ce1 Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80740 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/device/azalia_device.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/include/device/azalia_device.h b/src/include/device/azalia_device.h
index 4d9298cf95..1fc0baf49b 100644
--- a/src/include/device/azalia_device.h
+++ b/src/include/device/azalia_device.h
@@ -50,10 +50,10 @@ enum azalia_pin_connection {
};
enum azalia_pin_location_gross {
- AZALIA_EXTERNAL_PRIMARY_CHASSIS = 0x0,
- AZALIA_INTERNAL = 0x1,
- AZALIA_SEPARATE_CHASSIS = 0x2,
- AZALIA_LOCATION_OTHER = 0x3,
+ AZALIA_EXTERNAL_PRIMARY_CHASSIS = 0x00,
+ AZALIA_INTERNAL = 0x10,
+ AZALIA_SEPARATE_CHASSIS = 0x20,
+ AZALIA_LOCATION_OTHER = 0x30,
};
enum azalia_pin_location_geometric {
@@ -69,6 +69,16 @@ enum azalia_pin_location_geometric {
AZALIA_SPECIAL9 = 0x9,
};
+enum azalia_pin_location_special {
+ AZALIA_REAR_PANEL = AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_SPECIAL7,
+ AZALIA_DRIVE_BAY = AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_SPECIAL8,
+ AZALIA_RISER = AZALIA_INTERNAL | AZALIA_SPECIAL7,
+ AZALIA_DIGITAL_DISPLAY = AZALIA_INTERNAL | AZALIA_SPECIAL8,
+ AZALIA_ATAPI = AZALIA_INTERNAL | AZALIA_SPECIAL9,
+ AZALIA_MOBILE_LID_INSIDE = AZALIA_LOCATION_OTHER | AZALIA_SPECIAL7,
+ AZALIA_MOBILE_LID_OUTSIDE = AZALIA_LOCATION_OTHER | AZALIA_SPECIAL8,
+};
+
enum azalia_pin_device {
AZALIA_LINE_OUT = 0x0,
AZALIA_SPEAKER = 0x1,
@@ -123,16 +133,14 @@ enum azalia_pin_misc {
AZALIA_NO_JACK_PRESENCE_DETECT = 0x1,
};
-#define AZALIA_PIN_DESC(conn, location2, location1, dev, type, color, misc, \
- association, sequence) \
- ((((conn) << 30) & 0xc0000000) | \
- (((location2) << 28) & 0x30000000) | \
- (((location1) << 24) & 0x0f000000) | \
- (((dev) << 20) & 0x00f00000) | \
- (((type) << 16) & 0x000f0000) | \
- (((color) << 12) & 0x0000f000) | \
- (((misc) << 8) & 0x00000f00) | \
- (((association) << 4) & 0x000000f0) | \
+#define AZALIA_PIN_DESC(conn, location, dev, type, color, misc, association, sequence) \
+ ((((conn) << 30) & 0xc0000000) | \
+ (((location) << 24) & 0x3f000000) | \
+ (((dev) << 20) & 0x00f00000) | \
+ (((type) << 16) & 0x000f0000) | \
+ (((color) << 12) & 0x0000f000) | \
+ (((misc) << 8) & 0x00000f00) | \
+ (((association) << 4) & 0x000000f0) | \
(((sequence) << 0) & 0x0000000f))
#define AZALIA_ARRAY_SIZES const u32 pc_beep_verbs_size = \