Angel Pons | 89ab250 | 2020-04-03 01:22:28 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 2 | |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 3 | /* Bits 31:28 - Codec Address */ |
| 4 | /* Bits 27:20 - NID */ |
| 5 | /* Bits 19:8 - Verb ID */ |
| 6 | /* Bits 7:0 - Payload */ |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 7 | |
| 8 | #include <device/azalia_device.h> |
| 9 | |
| 10 | const u32 cim_verb_data[] = { |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 11 | /* --- Codec #0 --- */ |
| 12 | 0x10ec0269, /* Codec Vendor / Device ID: Realtek ALC269VC */ |
| 13 | 0x17aa21fa, /* Subsystem ID */ |
| 14 | 12, /* Number of 4 dword sets */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 15 | AZALIA_SUBVENDOR(0, 0x17aa21fa), |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 16 | |
| 17 | /* |
| 18 | * PIN_CFG: |
| 19 | * 31:30 Port connectivity |
| 20 | * 00 Connected to jack |
| 21 | * 01 No physical connection |
| 22 | * 10 Fixed function (integrated speaker/mic) |
| 23 | * 11 Jack + internal |
| 24 | * 29:24 Location |
| 25 | * See HDA spec for full matrix |
| 26 | * 23:20 Default device |
| 27 | * 0 Line out 4 S/PDIF out 8 Line in c S/PDIF in |
| 28 | * 1 Speaker 5 Digital out 9 Aux d Digital in |
| 29 | * 2 HP out 6 Modem line a Mic in e Reserved |
| 30 | * 3 CD 7 Modem handse b Telephony f Other |
| 31 | * 19:16 Connection type |
| 32 | * 0 Unknown 4 RCA 8 Multichannel analog DIN |
| 33 | * 1 1/8" jack 5 Optical 9 XLR |
| 34 | * 2 1/4" jack 6 Digital a RJ-11 |
| 35 | * 3 ATAPI 7 Analog b Combination f Other |
| 36 | * 15:12 Color |
| 37 | * 0 Unknown 4 Green 8 Purple |
| 38 | * 1 Black 5 Red 9 Pink |
| 39 | * 2 Grey 6 Orange a-d Reserved |
| 40 | * 3 Blue 7 Yellow e White f Other |
| 41 | * 11:8 Misc |
| 42 | * bit0 Jack detect override 1-3 Reserved |
| 43 | * 7:4 Default association |
| 44 | * 0 Reserved/Not initialized |
| 45 | * f Lowest priority |
| 46 | * 3:0 Sequence |
| 47 | * For stream channel to in/out mapping |
| 48 | */ |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 49 | /* Digital MIC: Fixed function, mic in, digital */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 50 | AZALIA_PIN_CFG(0, 0x12, 0x90a60940), |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 51 | |
| 52 | /* SPK out: Fixed function, speaker, analog */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 53 | AZALIA_PIN_CFG(0, 0x14, 0x90170110), |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 54 | |
| 55 | /* HP out: Location left, headphone out, 1/8" jack, black */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 56 | AZALIA_PIN_CFG(0, 0x15, 0x03211020), |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 57 | |
| 58 | /* Unknown: (Unconnected) */ |
Angel Pons | ca9f948 | 2024-06-06 18:07:54 +0200 | [diff] [blame] | 59 | AZALIA_PIN_CFG(0, 0x17, AZALIA_PIN_CFG_NC(0)), |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 60 | |
| 61 | /* MIC1 in: Location left, mic in, 1/8" jack, black */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 62 | AZALIA_PIN_CFG(0, 0x18, 0x03a11830), |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 63 | |
| 64 | /* MIC2 in: (Unconnected) */ |
Angel Pons | ca9f948 | 2024-06-06 18:07:54 +0200 | [diff] [blame] | 65 | AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_CFG_NC(0)), |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 66 | |
| 67 | /* Line1 in: (Unconnected) */ |
Angel Pons | ca9f948 | 2024-06-06 18:07:54 +0200 | [diff] [blame] | 68 | AZALIA_PIN_CFG(0, 0x1a, AZALIA_PIN_CFG_NC(0)), |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 69 | |
| 70 | /* Line2 in: (Unconnected) */ |
Angel Pons | ca9f948 | 2024-06-06 18:07:54 +0200 | [diff] [blame] | 71 | AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_CFG_NC(0)), |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 72 | |
| 73 | /* PCBEEP */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 74 | AZALIA_PIN_CFG(0, 0x1d, 0x40148605), |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 75 | |
| 76 | /* S/PDIF out: (Unconnected) */ |
Angel Pons | ca9f948 | 2024-06-06 18:07:54 +0200 | [diff] [blame] | 77 | AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_CFG_NC(0)), |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 78 | |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 79 | 0x01470740, /* Enable output for NID 0x14 (Speaker out) */ |
| 80 | 0x015707C0, /* Enable output & HP amp for NID 0x15 (HP out) */ |
| 81 | 0x01870724, /* Enable Vrefout NID 0x18 (MIC1 in) */ |
| 82 | 0x00170500, /* Set power state to D0 */ |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 83 | |
Angel Pons | 3012948 | 2019-12-06 00:31:22 +0100 | [diff] [blame] | 84 | /* --- Codec #3 --- */ |
| 85 | 0x80862806, /* Codec Vendor / Device ID: Intel PantherPoint HDMI */ |
| 86 | 0x80860101, /* Subsystem ID */ |
| 87 | 4, /* Number of 4 dword sets */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 88 | AZALIA_SUBVENDOR(3, 0x80860101), |
| 89 | AZALIA_PIN_CFG(3, 0x05, 0x18560010), |
| 90 | AZALIA_PIN_CFG(3, 0x06, 0x18560020), |
| 91 | AZALIA_PIN_CFG(3, 0x07, 0x58560030), |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 92 | }; |
| 93 | |
| 94 | const u32 pc_beep_verbs[] = { |
| 95 | /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */ |
| 96 | 0x02177a00, |
| 97 | }; |
| 98 | |
| 99 | AZALIA_ARRAY_SIZES; |