Angel Pons | 32859fc | 2020-04-02 23:48:27 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Bruce Griffith | 5bdcff5 | 2013-08-23 19:48:17 -0600 | [diff] [blame] | 2 | #ifndef AZALIA_H_ |
| 3 | #define AZALIA_H_ |
| 4 | |
| 5 | /* |
| 6 | * The tables found in this file are derived from the Intel High Definition |
| 7 | * Audio Specification Revision 1.0a, published 17 June 2010 |
| 8 | */ |
| 9 | |
| 10 | /* |
| 11 | * Page 177: Default Pin Configuration |
| 12 | */ |
| 13 | |
| 14 | enum AzaliaPinCfgPortConnectivity { |
Lee Leahy | f0c8a8e | 2017-03-08 10:11:37 -0800 | [diff] [blame] | 15 | AZALIA_PINCFG_PORT_JACK = 0, |
| 16 | AZALIA_PINCFG_PORT_NC = 1, |
| 17 | AZALIA_PINCFG_PORT_FIXED = 2, |
| 18 | AZALIA_PINCFG_PORT_MULTIPLE = 3, |
Bruce Griffith | 5bdcff5 | 2013-08-23 19:48:17 -0600 | [diff] [blame] | 19 | }; |
| 20 | |
| 21 | enum AzaliaPinCfgLocationGross { |
| 22 | AZALIA_PINCFG_LOCATION_EXTERNAL = 0x00, |
| 23 | AZALIA_PINCFG_LOCATION_INTERNAL = 0x10, |
| 24 | AZALIA_PINCFG_LOCATION_EXT_CHASSIS = 0x20, |
| 25 | AZALIA_PINCFG_LOCATION_OTHER = 0x30, |
| 26 | }; |
| 27 | |
| 28 | enum AzaliaPinCfgLocationFine { |
| 29 | AZALIA_PINCFG_LOCATION_NOT_APPLICABLE = 0x00, |
| 30 | AZALIA_PINCFG_LOCATION_REAR = 0x01, |
| 31 | AZALIA_PINCFG_LOCATION_FRONT = 0x02, |
| 32 | AZALIA_PINCFG_LOCATION_LEFT = 0x03, |
| 33 | AZALIA_PINCFG_LOCATION_RIGHT = 0x04, |
| 34 | AZALIA_PINCFG_LOCATION_TOP = 0x05, |
| 35 | AZALIA_PINCFG_LOCATION_BOTTOM = 0x06, |
| 36 | }; |
| 37 | |
| 38 | enum AzaliaPinCfgLocationSpecial { |
| 39 | AZALIA_PINCFG_LOCATION_REAR_PANEL = 0x07, |
| 40 | AZALIA_PINCFG_LOCATION_DRIVE_BAY = 0x08, |
| 41 | AZALIA_PINCFG_LOCATION_RISER_CARD = 0x17, |
| 42 | AZALIA_PINCFG_LOCATION_DIGITAL_DISPLAY = 0x18, |
| 43 | AZALIA_PINCFG_LOCATION_ATAPI = 0x19, |
| 44 | AZALIA_PINCFG_LOCATION_INSIDE_LID = 0x37, |
| 45 | AZALIA_PINCFG_LOCATION_OUTSIDE_LID = 0x38, |
| 46 | }; |
| 47 | |
| 48 | enum AzaliaPinCfgDefaultDevice { |
| 49 | AZALIA_PINCFG_DEVICE_LINEOUT = 0x0, |
| 50 | AZALIA_PINCFG_DEVICE_SPEAKER = 0x1, |
| 51 | AZALIA_PINCFG_DEVICE_HP_OUT = 0x2, |
| 52 | AZALIA_PINCFG_DEVICE_CD = 0x3, |
| 53 | AZALIA_PINCFG_DEVICE_SPDIF_OUT = 0x4, |
| 54 | AZALIA_PINCFG_DEVICE_DIGITAL_OUT = 0x5, |
| 55 | AZALIA_PINCFG_DEVICE_MODEM_LINE = 0x6, |
| 56 | AZALIA_PINCFG_DEVICE_MODEM_HANDSET = 0x7, |
| 57 | AZALIA_PINCFG_DEVICE_LINEIN = 0x8, |
| 58 | AZALIA_PINCFG_DEVICE_AUX = 0x9, |
| 59 | AZALIA_PINCFG_DEVICE_MICROPHONE = 0xA, |
| 60 | AZALIA_PINCFG_DEVICE_TELEPHONY = 0xB, |
| 61 | AZALIA_PINCFG_DEVICE_SPDIF_IN = 0xC, |
| 62 | AZALIA_PINCFG_DEVICE_DIGITAL_IN = 0xD, |
| 63 | AZALIA_PINCFG_DEVICE_OTHER = 0xF, |
| 64 | }; |
| 65 | |
| 66 | enum AzaliaPinCfgConnectionType { |
| 67 | AZALIA_PINCFG_CONN_UNKNOWN = 0x0, |
| 68 | AZALIA_PINCFG_CONN_MINI_HEADPHONE_JACK = 0x1, |
| 69 | AZALIA_PINCFG_CONN_STEREO_PHONE_JACK = 0x2, |
| 70 | AZALIA_PINCFG_CONN_INTERNAL_ATAPI = 0x3, |
| 71 | AZALIA_PINCFG_CONN_RCA = 0x4, |
| 72 | AZALIA_PINCFG_CONN_OPTICAL = 0x5, |
| 73 | AZALIA_PINCFG_CONN_OTHER_DIGITAL = 0x6, |
| 74 | AZALIA_PINCFG_CONN_OTHER_ANALOG = 0x7, |
| 75 | AZALIA_PINCFG_CONN_DIN_PLUG = 0x8, |
| 76 | AZALIA_PINCFG_CONN_XLR = 0x9, |
| 77 | AZALIA_PINCFG_CONN_MODEM_RJ11 = 0xA, |
| 78 | AZALIA_PINCFG_CONN_COMBINATION = 0xB, |
| 79 | AZALIA_PINCFG_CONN_OTHER = 0xF, |
| 80 | }; |
| 81 | |
| 82 | enum AzaliaPinCfgColor { |
| 83 | AZALIA_PINCFG_COLOR_UNKNOWN = 0x0, |
| 84 | AZALIA_PINCFG_COLOR_BLACK = 0x1, |
| 85 | AZALIA_PINCFG_COLOR_GREY = 0x2, |
| 86 | AZALIA_PINCFG_COLOR_BLUE = 0x3, |
| 87 | AZALIA_PINCFG_COLOR_GREEN = 0x4, |
| 88 | AZALIA_PINCFG_COLOR_RED = 0x5, |
| 89 | AZALIA_PINCFG_COLOR_ORANGE = 0x6, |
| 90 | AZALIA_PINCFG_COLOR_YELLOW = 0x7, |
| 91 | AZALIA_PINCFG_COLOR_PURPLE = 0x8, |
| 92 | AZALIA_PINCFG_COLOR_PINK = 0x9, |
| 93 | AZALIA_PINCFG_COLOR_WHITE = 0xE, |
| 94 | AZALIA_PINCFG_COLOR_OTHER = 0xF, |
| 95 | }; |
| 96 | |
| 97 | enum AzaliaPinCfgMisc { |
| 98 | AZALIA_PINCFG_MISC_IGNORE_PRESENCE = 0x1, |
| 99 | }; |
| 100 | |
| 101 | union AzaliaPinConfiguration { |
| 102 | unsigned int value; |
Lee Leahy | ae3fd34 | 2017-03-07 12:55:23 -0800 | [diff] [blame] | 103 | struct __attribute__((aligned(4), packed)) { |
Bruce Griffith | 5bdcff5 | 2013-08-23 19:48:17 -0600 | [diff] [blame] | 104 | enum AzaliaPinCfgPortConnectivity port:2; |
| 105 | unsigned char location:6; |
| 106 | enum AzaliaPinCfgDefaultDevice device:4; |
| 107 | enum AzaliaPinCfgConnectionType connection:4; |
| 108 | enum AzaliaPinCfgColor color:4; |
| 109 | unsigned char misc:4; |
| 110 | unsigned char association:4; |
| 111 | unsigned char sequence:4; |
| 112 | }; |
| 113 | }; |
| 114 | |
| 115 | #endif /* AZALIA_H_ */ |