blob: 1d0586318530e60f53732f031be04d3a3d10c49e [file] [log] [blame]
Angel Pons89ab2502020-04-03 01:22:28 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Tobias Diedrichcee930a2017-02-12 14:09:06 +01002
Angel Pons30129482019-12-06 00:31:22 +01003/* Bits 31:28 - Codec Address */
4/* Bits 27:20 - NID */
5/* Bits 19:8 - Verb ID */
6/* Bits 7:0 - Payload */
Tobias Diedrichcee930a2017-02-12 14:09:06 +01007
8#include <device/azalia_device.h>
9
10const u32 cim_verb_data[] = {
Angel Pons30129482019-12-06 00:31:22 +010011 /* --- Codec #0 --- */
12 0x10ec0269, /* Codec Vendor / Device ID: Realtek ALC269VC */
13 0x17aa21fa, /* Subsystem ID */
14 12, /* Number of 4 dword sets */
Angel Ponsec211702019-12-19 19:37:21 +010015 AZALIA_SUBVENDOR(0, 0x17aa21fa),
Tobias Diedrichcee930a2017-02-12 14:09:06 +010016
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 Pons30129482019-12-06 00:31:22 +010049 /* Digital MIC: Fixed function, mic in, digital */
Angel Ponsec211702019-12-19 19:37:21 +010050 AZALIA_PIN_CFG(0, 0x12, 0x90a60940),
Angel Pons30129482019-12-06 00:31:22 +010051
52 /* SPK out: Fixed function, speaker, analog */
Angel Ponsec211702019-12-19 19:37:21 +010053 AZALIA_PIN_CFG(0, 0x14, 0x90170110),
Angel Pons30129482019-12-06 00:31:22 +010054
55 /* HP out: Location left, headphone out, 1/8" jack, black */
Angel Ponsec211702019-12-19 19:37:21 +010056 AZALIA_PIN_CFG(0, 0x15, 0x03211020),
Angel Pons30129482019-12-06 00:31:22 +010057
58 /* Unknown: (Unconnected) */
Angel Ponsca9f9482024-06-06 18:07:54 +020059 AZALIA_PIN_CFG(0, 0x17, AZALIA_PIN_CFG_NC(0)),
Angel Pons30129482019-12-06 00:31:22 +010060
61 /* MIC1 in: Location left, mic in, 1/8" jack, black */
Angel Ponsec211702019-12-19 19:37:21 +010062 AZALIA_PIN_CFG(0, 0x18, 0x03a11830),
Angel Pons30129482019-12-06 00:31:22 +010063
64 /* MIC2 in: (Unconnected) */
Angel Ponsca9f9482024-06-06 18:07:54 +020065 AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_CFG_NC(0)),
Angel Pons30129482019-12-06 00:31:22 +010066
67 /* Line1 in: (Unconnected) */
Angel Ponsca9f9482024-06-06 18:07:54 +020068 AZALIA_PIN_CFG(0, 0x1a, AZALIA_PIN_CFG_NC(0)),
Angel Pons30129482019-12-06 00:31:22 +010069
70 /* Line2 in: (Unconnected) */
Angel Ponsca9f9482024-06-06 18:07:54 +020071 AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_CFG_NC(0)),
Angel Pons30129482019-12-06 00:31:22 +010072
73 /* PCBEEP */
Angel Ponsec211702019-12-19 19:37:21 +010074 AZALIA_PIN_CFG(0, 0x1d, 0x40148605),
Angel Pons30129482019-12-06 00:31:22 +010075
76 /* S/PDIF out: (Unconnected) */
Angel Ponsca9f9482024-06-06 18:07:54 +020077 AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_CFG_NC(0)),
Tobias Diedrichcee930a2017-02-12 14:09:06 +010078
Angel Pons30129482019-12-06 00:31:22 +010079 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 Diedrichcee930a2017-02-12 14:09:06 +010083
Angel Pons30129482019-12-06 00:31:22 +010084 /* --- Codec #3 --- */
85 0x80862806, /* Codec Vendor / Device ID: Intel PantherPoint HDMI */
86 0x80860101, /* Subsystem ID */
87 4, /* Number of 4 dword sets */
Angel Ponsec211702019-12-19 19:37:21 +010088 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 Diedrichcee930a2017-02-12 14:09:06 +010092};
93
94const u32 pc_beep_verbs[] = {
95 /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */
96 0x02177a00,
97};
98
99AZALIA_ARRAY_SIZES;