Bruce Griffith | 5bdcff5 | 2013-08-23 19:48:17 -0600 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2013 Sage Electronic Engineering, LLC |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | #ifndef AZALIA_H_ |
| 20 | #define AZALIA_H_ |
| 21 | |
| 22 | /* |
| 23 | * The tables found in this file are derived from the Intel High Definition |
| 24 | * Audio Specification Revision 1.0a, published 17 June 2010 |
| 25 | */ |
| 26 | |
| 27 | /* |
| 28 | * Page 177: Default Pin Configuration |
| 29 | */ |
| 30 | |
| 31 | enum AzaliaPinCfgPortConnectivity { |
| 32 | AZALIA_PINCFG_PORT_JACK = 0b00, |
| 33 | AZALIA_PINCFG_PORT_NC = 0b01, |
| 34 | AZALIA_PINCFG_PORT_FIXED = 0b10, |
| 35 | AZALIA_PINCFG_PORT_MULTIPLE = 0b11, |
| 36 | }; |
| 37 | |
| 38 | enum AzaliaPinCfgLocationGross { |
| 39 | AZALIA_PINCFG_LOCATION_EXTERNAL = 0x00, |
| 40 | AZALIA_PINCFG_LOCATION_INTERNAL = 0x10, |
| 41 | AZALIA_PINCFG_LOCATION_EXT_CHASSIS = 0x20, |
| 42 | AZALIA_PINCFG_LOCATION_OTHER = 0x30, |
| 43 | }; |
| 44 | |
| 45 | enum AzaliaPinCfgLocationFine { |
| 46 | AZALIA_PINCFG_LOCATION_NOT_APPLICABLE = 0x00, |
| 47 | AZALIA_PINCFG_LOCATION_REAR = 0x01, |
| 48 | AZALIA_PINCFG_LOCATION_FRONT = 0x02, |
| 49 | AZALIA_PINCFG_LOCATION_LEFT = 0x03, |
| 50 | AZALIA_PINCFG_LOCATION_RIGHT = 0x04, |
| 51 | AZALIA_PINCFG_LOCATION_TOP = 0x05, |
| 52 | AZALIA_PINCFG_LOCATION_BOTTOM = 0x06, |
| 53 | }; |
| 54 | |
| 55 | enum AzaliaPinCfgLocationSpecial { |
| 56 | AZALIA_PINCFG_LOCATION_REAR_PANEL = 0x07, |
| 57 | AZALIA_PINCFG_LOCATION_DRIVE_BAY = 0x08, |
| 58 | AZALIA_PINCFG_LOCATION_RISER_CARD = 0x17, |
| 59 | AZALIA_PINCFG_LOCATION_DIGITAL_DISPLAY = 0x18, |
| 60 | AZALIA_PINCFG_LOCATION_ATAPI = 0x19, |
| 61 | AZALIA_PINCFG_LOCATION_INSIDE_LID = 0x37, |
| 62 | AZALIA_PINCFG_LOCATION_OUTSIDE_LID = 0x38, |
| 63 | }; |
| 64 | |
| 65 | enum AzaliaPinCfgDefaultDevice { |
| 66 | AZALIA_PINCFG_DEVICE_LINEOUT = 0x0, |
| 67 | AZALIA_PINCFG_DEVICE_SPEAKER = 0x1, |
| 68 | AZALIA_PINCFG_DEVICE_HP_OUT = 0x2, |
| 69 | AZALIA_PINCFG_DEVICE_CD = 0x3, |
| 70 | AZALIA_PINCFG_DEVICE_SPDIF_OUT = 0x4, |
| 71 | AZALIA_PINCFG_DEVICE_DIGITAL_OUT = 0x5, |
| 72 | AZALIA_PINCFG_DEVICE_MODEM_LINE = 0x6, |
| 73 | AZALIA_PINCFG_DEVICE_MODEM_HANDSET = 0x7, |
| 74 | AZALIA_PINCFG_DEVICE_LINEIN = 0x8, |
| 75 | AZALIA_PINCFG_DEVICE_AUX = 0x9, |
| 76 | AZALIA_PINCFG_DEVICE_MICROPHONE = 0xA, |
| 77 | AZALIA_PINCFG_DEVICE_TELEPHONY = 0xB, |
| 78 | AZALIA_PINCFG_DEVICE_SPDIF_IN = 0xC, |
| 79 | AZALIA_PINCFG_DEVICE_DIGITAL_IN = 0xD, |
| 80 | AZALIA_PINCFG_DEVICE_OTHER = 0xF, |
| 81 | }; |
| 82 | |
| 83 | enum AzaliaPinCfgConnectionType { |
| 84 | AZALIA_PINCFG_CONN_UNKNOWN = 0x0, |
| 85 | AZALIA_PINCFG_CONN_MINI_HEADPHONE_JACK = 0x1, |
| 86 | AZALIA_PINCFG_CONN_STEREO_PHONE_JACK = 0x2, |
| 87 | AZALIA_PINCFG_CONN_INTERNAL_ATAPI = 0x3, |
| 88 | AZALIA_PINCFG_CONN_RCA = 0x4, |
| 89 | AZALIA_PINCFG_CONN_OPTICAL = 0x5, |
| 90 | AZALIA_PINCFG_CONN_OTHER_DIGITAL = 0x6, |
| 91 | AZALIA_PINCFG_CONN_OTHER_ANALOG = 0x7, |
| 92 | AZALIA_PINCFG_CONN_DIN_PLUG = 0x8, |
| 93 | AZALIA_PINCFG_CONN_XLR = 0x9, |
| 94 | AZALIA_PINCFG_CONN_MODEM_RJ11 = 0xA, |
| 95 | AZALIA_PINCFG_CONN_COMBINATION = 0xB, |
| 96 | AZALIA_PINCFG_CONN_OTHER = 0xF, |
| 97 | }; |
| 98 | |
| 99 | enum AzaliaPinCfgColor { |
| 100 | AZALIA_PINCFG_COLOR_UNKNOWN = 0x0, |
| 101 | AZALIA_PINCFG_COLOR_BLACK = 0x1, |
| 102 | AZALIA_PINCFG_COLOR_GREY = 0x2, |
| 103 | AZALIA_PINCFG_COLOR_BLUE = 0x3, |
| 104 | AZALIA_PINCFG_COLOR_GREEN = 0x4, |
| 105 | AZALIA_PINCFG_COLOR_RED = 0x5, |
| 106 | AZALIA_PINCFG_COLOR_ORANGE = 0x6, |
| 107 | AZALIA_PINCFG_COLOR_YELLOW = 0x7, |
| 108 | AZALIA_PINCFG_COLOR_PURPLE = 0x8, |
| 109 | AZALIA_PINCFG_COLOR_PINK = 0x9, |
| 110 | AZALIA_PINCFG_COLOR_WHITE = 0xE, |
| 111 | AZALIA_PINCFG_COLOR_OTHER = 0xF, |
| 112 | }; |
| 113 | |
| 114 | enum AzaliaPinCfgMisc { |
| 115 | AZALIA_PINCFG_MISC_IGNORE_PRESENCE = 0x1, |
| 116 | }; |
| 117 | |
| 118 | union AzaliaPinConfiguration { |
| 119 | unsigned int value; |
| 120 | struct __attribute__((aligned(4),packed)) { |
| 121 | enum AzaliaPinCfgPortConnectivity port:2; |
| 122 | unsigned char location:6; |
| 123 | enum AzaliaPinCfgDefaultDevice device:4; |
| 124 | enum AzaliaPinCfgConnectionType connection:4; |
| 125 | enum AzaliaPinCfgColor color:4; |
| 126 | unsigned char misc:4; |
| 127 | unsigned char association:4; |
| 128 | unsigned char sequence:4; |
| 129 | }; |
| 130 | }; |
| 131 | |
| 132 | #endif /* AZALIA_H_ */ |