1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2018 Khamba Staring <k.staring@quickdecay.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * $FreeBSD$ 29 */ 30 31 #ifndef PIN_PATCH_REALTEK_H 32 #define PIN_PATCH_REALTEK_H 33 34 #include "hdac.h" 35 #include "pin_patch.h" 36 37 /* 38 * Pin patches 39 */ 40 static struct pin_patch_t pin_patches_lg_lw20[] = { 41 { 42 .nid = 26, 43 .type = PIN_PATCH_TYPE_MASK, 44 .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, 45 HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } 46 }, { 47 .nid = 27, 48 .type = PIN_PATCH_TYPE_MASK, 49 .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, 50 HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT } 51 }, { } 52 }; 53 54 static struct pin_patch_t pin_patches_clevo_d900t_asus_m5200[] = { 55 { 56 .nid = 24, 57 .type = PIN_PATCH_TYPE_MASK, 58 .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, 59 HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } 60 }, { 61 .nid = 25, 62 .type = PIN_PATCH_TYPE_MASK, 63 .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, 64 HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN } 65 }, { 66 .nid = 26, 67 .type = PIN_PATCH_TYPE_MASK, 68 .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, 69 HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } 70 }, { 71 .nid = 27, 72 .type = PIN_PATCH_TYPE_MASK, 73 .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, 74 HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } 75 }, { 76 .nid = 28, 77 .type = PIN_PATCH_TYPE_MASK, 78 .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, 79 HDA_CONFIG_DEFAULTCONF_DEVICE_CD } 80 }, { } 81 }; 82 83 static struct pin_patch_t pin_patches_msi_ms034a[] = { 84 { 85 .nid = 25, 86 .type = PIN_PATCH_TYPE_MASK, 87 .patch.mask = { 88 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 89 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 90 HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | 91 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } 92 }, { 93 .nid = 28, 94 .type = PIN_PATCH_TYPE_MASK, 95 .patch.mask = { 96 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 97 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 98 HDA_CONFIG_DEFAULTCONF_DEVICE_CD | 99 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } 100 }, { } 101 }; 102 103 static struct pin_patch_t pin_patches_asus_w6f[] = { 104 { 105 .nid = 11, 106 .type = PIN_PATCH_TYPE_MASK, 107 .patch.mask = { 108 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 109 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 110 HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | 111 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } 112 }, { 113 .nid = 12, 114 .type = PIN_PATCH_TYPE_MASK, 115 .patch.mask = { 116 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 117 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 118 HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | 119 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } 120 }, { 121 .nid = 14, 122 .type = PIN_PATCH_TYPE_MASK, 123 .patch.mask = { 124 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 125 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 126 HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | 127 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } 128 }, { 129 .nid = 15, 130 .type = PIN_PATCH_TYPE_MASK, 131 .patch.mask = { 132 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 133 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 134 HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | 135 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK } 136 }, { 137 .nid = 16, 138 .type = PIN_PATCH_TYPE_MASK, 139 .patch.mask = { 140 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 141 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 142 HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | 143 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } 144 }, { 145 .nid = 31, 146 .type = PIN_PATCH_TYPE_MASK, 147 .patch.mask = { 148 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 149 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 150 HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | 151 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } 152 }, { 153 .nid = 32, 154 .type = PIN_PATCH_TYPE_MASK, 155 .patch.mask = { 156 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 157 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 158 HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | 159 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } 160 }, { } 161 }; 162 163 static struct pin_patch_t pin_patches_uniwill_9075[] = { 164 { 165 .nid = 15, 166 .type = PIN_PATCH_TYPE_MASK, 167 .patch.mask = { 168 HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | 169 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, 170 HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | 171 HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK } 172 }, { } 173 }; 174 175 static struct pin_patch_t pin_patches_dell_xps_jack[] = { 176 PIN_PATCH_JACK_WO_DETECT(24), 177 PIN_PATCH_HPMIC_WO_DETECT(26), 178 { } 179 }; 180 181 /* 182 * List of models and patches 183 */ 184 static struct hdaa_model_pin_patch_t realtek_model_pin_patches[] = { 185 { /**** CODEC: HDA_CODEC_ALC255 ****/ 186 .id = HDA_CODEC_ALC255, 187 .patches = (struct model_pin_patch_t[]){ 188 { 189 .models = (struct pin_machine_model_t[]){ 190 PIN_SUBVENDOR(ASUS_X556UR_SUBVENDOR), 191 PIN_SUBVENDOR(ASUS_X540LA_SUBVENDOR), 192 PIN_SUBVENDOR(ASUS_Z550MA_SUBVENDOR), 193 { } 194 }, 195 .pin_patches = (struct pin_patch_t[]){ 196 PIN_PATCH_JACK_WO_DETECT(25), 197 { } 198 } 199 }, { 200 .models = (struct pin_machine_model_t[]){ 201 PIN_SUBVENDOR(DELL_9020M_SUBVENDOR), 202 { } 203 }, 204 .pin_patches = (struct pin_patch_t[]){ 205 PIN_PATCH_JACK_WO_DETECT(25), 206 PIN_PATCH_HPMIC_WO_DETECT(26), 207 { } 208 } 209 }, { } 210 } 211 }, { /**** CODEC: HDA_CODEC_ALC256 ****/ 212 .id = HDA_CODEC_ALC256, 213 .patches = (struct model_pin_patch_t[]){ 214 { 215 .models = (struct pin_machine_model_t[]){ 216 PIN_SUBVENDOR(DELL_9020M_SUBVENDOR), 217 PIN_SUBVENDOR(DELL_7000_SUBVENDOR), 218 { } 219 }, 220 .pin_patches = (struct pin_patch_t[]){ 221 PIN_PATCH_STRING(27, "seq=1 as=5 misc=1 ctype=Analog device=Speaker loc=Internal conn=Fixed"), 222 { } 223 } 224 }, { 225 .models = (struct pin_machine_model_t[]){ 226 PIN_SUBVENDOR(ASUS_X540A_SUBVENDOR), 227 PIN_SUBVENDOR(ASUS_X540SA_SUBVENDOR), 228 PIN_SUBVENDOR(ASUS_X541SA_SUBVENDOR), 229 PIN_SUBVENDOR(ASUS_X541UV_SUBVENDOR), 230 PIN_SUBVENDOR(ASUS_Z550SA_SUBVENDOR), 231 PIN_SUBVENDOR(ASUS_X705UD_SUBVENDOR), 232 PIN_SUBVENDOR(ASUS_X555UB_SUBVENDOR), 233 { } 234 }, 235 .pin_patches = (struct pin_patch_t[]){ 236 PIN_PATCH_MIC_INTERNAL(19), 237 PIN_PATCH_STRING(25, "as=2 misc=1 color=Black ctype=1/8 device=Mic loc=Right"), 238 { } 239 } 240 }, { } 241 } 242 }, { /**** CODEC: HDA_CODEC_ALC260 ****/ 243 .id = HDA_CODEC_ALC260, 244 .patches = (struct model_pin_patch_t[]){ 245 { 246 .models = (struct pin_machine_model_t[]){ 247 PIN_SUBVENDOR(SONY_S5_SUBVENDOR), 248 { } 249 }, 250 .pin_patches = (struct pin_patch_t[]){ 251 PIN_PATCH_STRING(16, "seq=15 device=Headphones"), 252 { } 253 } 254 }, { 255 .models = (struct pin_machine_model_t[]){ 256 PIN_SUBVENDOR(HP_DC5750_SUBVENDOR), 257 { } 258 }, 259 .pin_patches = (struct pin_patch_t[]){ 260 PIN_PATCH_STRING(17, "as=1 misc=1 ctype=ATAPI device=Speaker loc=Internal conn=Fixed"), 261 { } 262 } 263 }, { 264 .models = (struct pin_machine_model_t[]){ 265 PIN_SUBVENDOR(SONY_VAIO_TX_SUBVENDOR), 266 { } 267 }, 268 .pin_patches = (struct pin_patch_t[]){ 269 PIN_PATCH_STRING(15, "color=Green ctype=1/8 device=Headphones loc=Rear"), 270 { } 271 } 272 }, { 273 .models = (struct pin_machine_model_t[]){ 274 PIN_SUBVENDOR(SONY_81BBID_SUBVENDOR), 275 { } 276 }, 277 .pin_patches = (struct pin_patch_t[]){ 278 PIN_PATCH_STRING(15, "as=2 color=Black ctype=1/8 device=Headphones loc=Rear"), 279 PIN_PATCH_STRING(16, "seq=15 as=3 ctype=1/8"), 280 PIN_PATCH_NOT_APPLICABLE(17), 281 PIN_PATCH_STRING(18, "as=3 misc=9 color=Red ctype=1/8 device=Mic loc=Rear"), 282 PIN_PATCH_NOT_APPLICABLE(19), 283 PIN_PATCH_NOT_APPLICABLE(20), 284 PIN_PATCH_NOT_APPLICABLE(21), 285 PIN_PATCH_NOT_APPLICABLE(22), 286 PIN_PATCH_NOT_APPLICABLE(23), 287 PIN_PATCH_NOT_APPLICABLE(24), 288 PIN_PATCH_NOT_APPLICABLE(25), 289 { } 290 } 291 }, { } 292 } 293 }, { /**** CODEC: HDA_CODEC_ALC262 ****/ 294 .id = HDA_CODEC_ALC262, 295 .patches = (struct model_pin_patch_t[]){ 296 { 297 .models = (struct pin_machine_model_t[]){ 298 PIN_SUBVENDOR(FS_H270_SUBVENDOR), 299 { } 300 }, 301 .pin_patches = (struct pin_patch_t[]){ 302 PIN_PATCH_STRING(20, "as=1 misc=1 ctype=ATAPI device=Speaker loc=Onboard conn=Fixed"), 303 PIN_PATCH_STRING(21, "seq=15 as=2 misc=4 color=Black ctype=1/8 device=Headphones loc=Front"), 304 PIN_PATCH_STRING(22, "seq=15 as=1 misc=4 color=Black ctype=1/8 device=Headphones loc=Rear"), 305 { } 306 } 307 }, { 308 .models = (struct pin_machine_model_t[]){ 309 PIN_SUBVENDOR(FL_LB_S7110_SUBVENDOR), 310 { } 311 }, 312 .pin_patches = (struct pin_patch_t[]){ 313 PIN_PATCH_STRING(21, "as=1 misc=1 ctype=Analog device=Speaker loc=Internal conn=Fixed"), 314 { } 315 } 316 }, { 317 .models = (struct pin_machine_model_t[]){ 318 PIN_SUBVENDOR(HP_Z200_SUBVENDOR), 319 { } 320 }, 321 .pin_patches = (struct pin_patch_t[]){ 322 PIN_PATCH_STRING(22, "as=2 misc=1 ctype=ATAPI device=Speaker loc=Onboard conn=Fixed"), 323 { } 324 } 325 }, { 326 .models = (struct pin_machine_model_t[]){ 327 PIN_SUBVENDOR(TYAN_N6650W_SUBVENDOR), 328 { } 329 }, 330 .pin_patches = (struct pin_patch_t[]){ 331 PIN_PATCH_STRING(22, "as=15 misc=1 color=White ctype=ATAPI device=AUX loc=Onboard"), 332 { } 333 } 334 }, { 335 .models = (struct pin_machine_model_t[]){ 336 PIN_SUBVENDOR(LENOVO_3000_SUBVENDOR), 337 { } 338 }, 339 .pin_patches = (struct pin_patch_t[]){ 340 PIN_PATCH_STRING(22, "seq=1 as=2"), 341 { } 342 } 343 }, { } 344 } 345 }, { /**** CODEC: HDA_CODEC_ALC268 ****/ 346 .id = HDA_CODEC_ALC268, 347 .patches = (struct model_pin_patch_t[]){ 348 { 349 .models = (struct pin_machine_model_t[]){ 350 PIN_SUBVENDOR(ACER_T5320_SUBVENDOR), 351 { } 352 }, 353 .pin_patches = (struct pin_patch_t[]){ 354 PIN_PATCH_STRING(20, "as=1 seq=15"), 355 { } 356 } 357 }, { 358 .models = (struct pin_machine_model_t[]){ 359 PIN_SUBVENDOR(ACER_TM_6293_SUBVENDOR), 360 { } 361 }, 362 .pin_patches = (struct pin_patch_t[]){ 363 PIN_PATCH_STRING(30, "as=8 misc=1 color=Black ctype=Combo device=SPDIF-out loc=Rear"), 364 { } 365 } 366 }, { } 367 } 368 }, { /**** CODEC: HDA_CODEC_ALC269 ****/ 369 .id = HDA_CODEC_ALC269, 370 .patches = (struct model_pin_patch_t[]){ 371 { 372 .models = (struct pin_machine_model_t[]){ 373 PIN_SUBVENDOR(LENOVO_X1CRBN_SUBVENDOR), 374 { } 375 }, 376 .pin_patches = (struct pin_patch_t[]){ 377 PIN_PATCH_STRING(21, "as=1 seq=15"), 378 { } 379 } 380 }, { 381 .models = (struct pin_machine_model_t[]){ 382 PIN_SUBVENDOR(LENOVO_T430_SUBVENDOR), 383 PIN_SUBVENDOR(LENOVO_T430S_SUBVENDOR), 384 PIN_SUBVENDOR(LENOVO_X230_SUBVENDOR), 385 PIN_SUBVENDOR(LENOVO_X230T_SUBVENDOR), 386 PIN_SUBVENDOR(LENOVO_T431S_SUBVENDOR), 387 { } 388 }, 389 .pin_patches = (struct pin_patch_t[]){ 390 PIN_PATCH_DOCK_MIC_IN(25), 391 PIN_PATCH_DOCK_HP(27), 392 { } 393 } 394 }, { 395 .models = (struct pin_machine_model_t[]){ 396 PIN_SUBVENDOR(ASUS_UX31A_SUBVENDOR), 397 { } 398 }, 399 .pin_patches = (struct pin_patch_t[]){ 400 PIN_PATCH_STRING(33, "as=1 seq=15"), 401 { } 402 } 403 }, { 404 .models = (struct pin_machine_model_t[]){ 405 PIN_SUBVENDOR(ASUS_G73JW_SUBVENDOR), 406 { } 407 }, 408 .pin_patches = (struct pin_patch_t[]){ 409 PIN_PATCH_SUBWOOFER(23), 410 { } 411 } 412 }, { 413 .models = (struct pin_machine_model_t[]){ 414 PIN_SUBVENDOR(FL_1475ID_SUBVENDOR), 415 { } 416 }, 417 .pin_patches = (struct pin_patch_t[]){ 418 PIN_PATCH_DOCK_LINE_OUT(26), 419 PIN_PATCH_DOCK_MIC_IN(27), 420 { } 421 } 422 }, { 423 .models = (struct pin_machine_model_t[]){ 424 PIN_SUBVENDOR(FL_LB_U904_SUBVENDOR), 425 { } 426 }, 427 .pin_patches = (struct pin_patch_t[]){ 428 PIN_PATCH_HPMIC_WITH_DETECT(25), 429 { } 430 } 431 }, { 432 .models = (struct pin_machine_model_t[]){ 433 PIN_SUBVENDOR(FL_LB_T731_SUBVENDOR), 434 PIN_SUBVENDOR(FL_LB_E725_SUBVENDOR), 435 { } 436 }, 437 .pin_patches = (struct pin_patch_t[]){ 438 PIN_PATCH_STRING(33, "seq=15 as=2 color=Black ctype=1/8 device=Headphones loc=Front"), 439 { } 440 } 441 }, { 442 .models = (struct pin_machine_model_t[]){ 443 PIN_SUBVENDOR(DELL_05F4ID_SUBVENDOR), 444 PIN_SUBVENDOR(DELL_05F5ID_SUBVENDOR), 445 PIN_SUBVENDOR(DELL_05F6ID_SUBVENDOR), 446 { } 447 }, 448 .pin_patches = (struct pin_patch_t[]){ 449 PIN_PATCH_JACK_WO_DETECT(25), 450 PIN_PATCH_HPMIC_WO_DETECT(26), 451 { } 452 } 453 }, { 454 .models = (struct pin_machine_model_t[]){ 455 PIN_SUBVENDOR(ACER_V5_571G_SUBVENDOR), 456 PIN_SUBVENDOR(ACER_V5_122P_SUBVENDOR), 457 { } 458 }, 459 .pin_patches = (struct pin_patch_t[]){ 460 PIN_PATCH_JACK_WO_DETECT(25), 461 { } 462 } 463 }, { 464 .models = (struct pin_machine_model_t[]){ 465 PIN_SUBVENDOR(ASUS_X101CH_SUBVENDOR), 466 { } 467 }, 468 .pin_patches = (struct pin_patch_t[]){ 469 PIN_PATCH_STRING(24, "seq=12 as=2 misc=8 color=Black ctype=1/8 device=Mic loc=Right"), 470 { } 471 } 472 }, { 473 .models = (struct pin_machine_model_t[]){ 474 PIN_SUBVENDOR(ACER_AC700_SUBVENDOR), 475 { } 476 }, 477 .pin_patches = (struct pin_patch_t[]){ 478 PIN_PATCH_STRING(18, "seq=15 as=2 misc=9 ctype=ATAPI device=Mic loc=Onboard conn=Fixed"), 479 PIN_PATCH_STRING(20, "as=1 misc=1 ctype=ATAPI device=Speaker loc=Onboard conn=Fixed"), 480 PIN_PATCH_STRING(24, "as=1 misc=1 ctype=ATAPI device=Speaker loc=Onboard conn=Fixed"), 481 PIN_PATCH_STRING(30, "seq=14 as=1 color=Black ctype=Digital device=SPDIF-out loc=Left"), 482 PIN_PATCH_STRING(33, "seq=15 as=1 color=Black ctype=1/8 device=Headphones loc=Left"), 483 { } 484 } 485 }, { 486 .models = (struct pin_machine_model_t[]){ 487 PIN_SUBVENDOR(HP_225AID_SUBVENDOR), 488 { } 489 }, 490 .pin_patches = (struct pin_patch_t[]){ 491 PIN_PATCH_STRING(24, "seq=15 as=3 color=Black ctype=1/8 device=Line-in loc=Ext-Rear"), 492 PIN_PATCH_STRING(27, "as=2 color=Black ctype=1/8 loc=Ext-Rear"), 493 { } 494 } 495 }, { } 496 } 497 }, { /**** CODEC: HDA_CODEC_ALC271 ****/ 498 .id = HDA_CODEC_ALC271, 499 .patches = (struct model_pin_patch_t[]){ 500 { 501 .models = (struct pin_machine_model_t[]){ 502 PIN_SUBVENDOR(ACER_AO725_SUBVENDOR), 503 PIN_SUBVENDOR(ACER_AO756_SUBVENDOR), 504 PIN_SUBVENDOR(ACER_E1_472_SUBVENDOR), 505 PIN_SUBVENDOR(ACER_E1_572_SUBVENDOR), 506 { } 507 }, 508 .pin_patches = (struct pin_patch_t[]){ 509 PIN_PATCH_STRING(20, "as=1 misc=1 ctype=ATAPI device=Speaker loc=Onboard conn=Fixed"), 510 PIN_PATCH_STRING(25, "as=2 misc=12 color=Pink ctype=1/8 device=Mic loc=Rear"), 511 PIN_PATCH_STRING(27, "seq=15 as=2 misc=1 ctype=Analog device=Mic loc=Onboard conn=Fixed"), 512 PIN_PATCH_HP_OUT(33), 513 { } 514 } 515 }, { } 516 } 517 }, { /**** CODEC: HDA_CODEC_ALC280 ****/ 518 .id = HDA_CODEC_ALC280, 519 .patches = (struct model_pin_patch_t[]){ 520 { 521 .models = (struct pin_machine_model_t[]){ 522 PIN_SUBVENDOR(HP_2272ID_SUBVENDOR), 523 PIN_SUBVENDOR(HP_2273ID_SUBVENDOR), 524 { } 525 }, 526 .pin_patches = (struct pin_patch_t[]){ 527 PIN_PATCH_STRING(27, "as=2 color=Black ctype=1/8 loc=Ext-Rear"), 528 PIN_PATCH_HPMIC_WITH_DETECT(26), 529 PIN_PATCH_STRING(24, "seq=15 as=3 color=Black ctype=1/8 device=Line-in loc=Ext-Rear"), 530 { } 531 } 532 }, { } 533 } 534 }, { /**** CODEC: HDA_CODEC_ALC282 ****/ 535 .id = HDA_CODEC_ALC282, 536 .patches = (struct model_pin_patch_t[]){ 537 { 538 .models = (struct pin_machine_model_t[]){ 539 PIN_SUBVENDOR(ACER_V5_573G_SUBVENDOR), 540 { } 541 }, 542 .pin_patches = (struct pin_patch_t[]){ 543 PIN_PATCH_STRING(18, "as=3 misc=1 ctype=Digital device=Mic loc=Internal conn=Fixed"), 544 PIN_PATCH_STRING(20, "as=1 misc=1 ctype=Analog device=Speaker loc=Internal conn=Fixed"), 545 PIN_PATCH_STRING(23, "seq=8 conn=None"), 546 PIN_PATCH_NOT_APPLICABLE(24), 547 PIN_PATCH_JACK_WO_DETECT(25), 548 PIN_PATCH_NOT_APPLICABLE(26), 549 PIN_PATCH_NOT_APPLICABLE(27), 550 PIN_PATCH_STRING(29, "seq=13 as=2 misc=11 color=Pink ctype=DIN device=Other conn=None"), 551 PIN_PATCH_NOT_APPLICABLE(30), 552 PIN_PATCH_STRING(33, "seq=15 as=1 color=Black ctype=1/8 device=Headphones loc=Left"), 553 { } 554 } 555 }, { } 556 } 557 }, { /**** CODEC: HDA_CODEC_ALC286 ****/ 558 .id = HDA_CODEC_ALC286, 559 .patches = (struct model_pin_patch_t[]){ 560 { 561 .models = (struct pin_machine_model_t[]){ 562 PIN_SUBVENDOR(SONY_VAIO_P11_SUBVENDOR), 563 PIN_SUBVENDOR(SONY_VAIO_P13_SUBVENDOR), 564 { } 565 }, 566 .pin_patches = (struct pin_patch_t[]){ 567 PIN_PATCH_JACK_WO_DETECT(25), 568 { } 569 } 570 }, { } 571 } 572 }, { /**** CODEC: HDA_CODEC_ALC288 ****/ 573 .id = HDA_CODEC_ALC288, 574 .patches = (struct model_pin_patch_t[]){ 575 { 576 .models = (struct pin_machine_model_t[]){ 577 PIN_SUBVENDOR(DELL_E7240_SUBVENDOR), 578 { } 579 }, 580 .pin_patches = pin_patches_dell_xps_jack 581 }, { } 582 } 583 }, { /**** CODEC: HDA_CODEC_ALC290 ****/ 584 .id = HDA_CODEC_ALC290, 585 .patches = (struct model_pin_patch_t[]){ 586 { 587 .models = (struct pin_machine_model_t[]){ 588 PIN_SUBVENDOR(DELL_V5470_SUBVENDOR), 589 PIN_SUBVENDOR(DELL_V5470_1_SUBVENDOR), 590 PIN_SUBVENDOR(DELL_V5480_SUBVENDOR), 591 { } 592 }, 593 .pin_patches = (struct pin_patch_t[]){ 594 PIN_PATCH_STRING(18, "as=4 misc=1 ctype=Digital device=Mic loc=Internal conn=Fixed"), 595 PIN_PATCH_STRING(20, "as=1 misc=1 ctype=Analog device=Speaker loc=Internal conn=Fixed"), 596 PIN_PATCH_STRING(21, "seq=15 as=1 color=Green ctype=1/8 device=Headphones loc=Front"), 597 PIN_PATCH_STRING(23, "seq=2 as=1 misc=1 ctype=Analog device=Speaker loc=Internal conn=Fixed"), 598 PIN_PATCH_JACK_WO_DETECT(26), 599 { } 600 } 601 }, { } 602 } 603 }, { /**** CODEC: HDA_CODEC_ALC292 ****/ 604 .id = HDA_CODEC_ALC292, 605 .patches = (struct model_pin_patch_t[]){ 606 { 607 .models = (struct pin_machine_model_t[]){ 608 PIN_SUBVENDOR(LENOVO_X120BS_SUBVENDOR), 609 { } 610 }, 611 .pin_patches = (struct pin_patch_t[]){ 612 PIN_PATCH_STRING(21, "as=1 seq=15"), 613 { } 614 } 615 }, { } 616 } 617 }, { /**** CODEC: HDA_CODEC_ALC293 ****/ 618 .id = HDA_CODEC_ALC293, 619 .patches = (struct model_pin_patch_t[]){ 620 { 621 .models = (struct pin_machine_model_t[]){ 622 PIN_SUBVENDOR(DELL_064AID_SUBVENDOR), 623 PIN_SUBVENDOR(DELL_064BID_SUBVENDOR), 624 PIN_SUBVENDOR(DELL_06D9ID_SUBVENDOR), 625 PIN_SUBVENDOR(DELL_06DAID_SUBVENDOR), 626 PIN_SUBVENDOR(DELL_06DBID_SUBVENDOR), 627 PIN_SUBVENDOR(DELL_06DDID_SUBVENDOR), 628 PIN_SUBVENDOR(DELL_06DEID_SUBVENDOR), 629 PIN_SUBVENDOR(DELL_06DFID_SUBVENDOR), 630 PIN_SUBVENDOR(DELL_06E0ID_SUBVENDOR), 631 PIN_SUBVENDOR(DELL_164AID_SUBVENDOR), 632 PIN_SUBVENDOR(DELL_164BID_SUBVENDOR), 633 { } 634 }, 635 .pin_patches = (struct pin_patch_t[]){ 636 PIN_PATCH_HPMIC_WO_DETECT(24), 637 PIN_PATCH_JACK_WO_DETECT(26), 638 { } 639 } 640 }, { } 641 } 642 }, { /**** CODEC: HDA_CODEC_ALC298 ****/ 643 .id = HDA_CODEC_ALC298, 644 .patches = (struct model_pin_patch_t[]){ 645 { 646 .models = (struct pin_machine_model_t[]){ 647 PIN_SUBVENDOR(DELL_XPS9560_SUBVENDOR), 648 { } 649 }, 650 .pin_patches = pin_patches_dell_xps_jack 651 }, { } 652 } 653 }, { /**** CODEC: HDA_CODEC_ALC861 ****/ 654 .id = HDA_CODEC_ALC861, 655 .patches = (struct model_pin_patch_t[]){ 656 { 657 .models = (struct pin_machine_model_t[]){ 658 PIN_SUBVENDOR(ASUS_W6F_SUBVENDOR), 659 { } 660 }, 661 .pin_patches = pin_patches_asus_w6f 662 }, { 663 .models = (struct pin_machine_model_t[]){ 664 PIN_SUBVENDOR(UNIWILL_9075_SUBVENDOR), 665 { } 666 }, 667 .pin_patches = pin_patches_uniwill_9075 668 }, { } 669 } 670 }, { /**** CODEC: HDA_CODEC_ALC880 ****/ 671 .id = HDA_CODEC_ALC880, 672 .patches = (struct model_pin_patch_t[]){ 673 { // old patch 674 .models = (struct pin_machine_model_t[]){ 675 PIN_SUBVENDOR(LG_LW20_SUBVENDOR), 676 { } 677 }, 678 .pin_patches = pin_patches_lg_lw20 679 }, { // old patch 680 .models = (struct pin_machine_model_t[]){ 681 PIN_SUBVENDOR(CLEVO_D900T_SUBVENDOR), 682 PIN_SUBVENDOR(ASUS_M5200_SUBVENDOR), 683 { } 684 }, 685 .pin_patches = pin_patches_clevo_d900t_asus_m5200 686 }, { 687 .models = (struct pin_machine_model_t[]){ 688 PIN_SUBVENDOR(LG_M1_SUBVENDOR), 689 PIN_SUBVENDOR(LG_P1_SUBVENDOR), 690 PIN_SUBVENDOR(LG_W1_SUBVENDOR), 691 { } 692 }, 693 .pin_patches = (struct pin_patch_t[]){ 694 PIN_PATCH_NOT_APPLICABLE(22), 695 PIN_PATCH_NOT_APPLICABLE(24), 696 PIN_PATCH_NOT_APPLICABLE(26), 697 { } 698 } 699 }, { 700 .models = (struct pin_machine_model_t[]){ 701 PIN_SUBVENDOR(COEUS_G610P_SUBVENDOR), 702 PIN_SUBVENDOR(ARIMA_W810_SUBVENDOR), 703 { } 704 }, 705 .pin_patches = (struct pin_patch_t[]){ 706 PIN_PATCH_NOT_APPLICABLE(23), 707 { } 708 } 709 }, { 710 .models = (struct pin_machine_model_t[]){ 711 PIN_SUBVENDOR(FS_AMILO_M1437_SUBVENDOR), 712 PIN_SUBVENDOR(FS_AMILO_M1451G_SUBVENDOR), 713 PIN_SUBVENDOR(FS_AMILO_PI1556_SUBVENDOR), 714 { } 715 }, 716 .pin_patches = (struct pin_patch_t[]){ 717 PIN_PATCH_HP_OUT(20), 718 PIN_PATCH_SPEAKER(21), 719 PIN_PATCH_BASS_SPEAKER(22), 720 PIN_PATCH_NOT_APPLICABLE(23), 721 PIN_PATCH_NOT_APPLICABLE(24), 722 PIN_PATCH_MIC_IN(25), 723 PIN_PATCH_NOT_APPLICABLE(26), 724 PIN_PATCH_NOT_APPLICABLE(27), 725 PIN_PATCH_NOT_APPLICABLE(28), 726 PIN_PATCH_NOT_APPLICABLE(29), 727 PIN_PATCH_NOT_APPLICABLE(30), 728 { } 729 } 730 }, { 731 .models = (struct pin_machine_model_t[]){ 732 PIN_SUBVENDOR(UNIWILL_9054_SUBVENDOR), 733 PIN_SUBVENDOR(FS_AMILO_XI1526_SUBVENDOR), 734 { } 735 }, 736 .pin_patches = (struct pin_patch_t[]){ 737 PIN_PATCH_HP_OUT(20), 738 PIN_PATCH_SPEAKER(21), 739 PIN_PATCH_NOT_APPLICABLE(22), 740 PIN_PATCH_NOT_APPLICABLE(23), 741 PIN_PATCH_NOT_APPLICABLE(24), 742 PIN_PATCH_MIC_IN(25), 743 PIN_PATCH_NOT_APPLICABLE(26), 744 PIN_PATCH_NOT_APPLICABLE(27), 745 PIN_PATCH_NOT_APPLICABLE(28), 746 PIN_PATCH_NOT_APPLICABLE(29), 747 PIN_PATCH_SPDIF_OUT(30), 748 { } 749 } 750 }, { 751 .models = (struct pin_machine_model_t[]){ 752 PIN_SUBVENDOR(LG_LW25_SUBVENDOR), 753 { } 754 }, 755 .pin_patches = (struct pin_patch_t[]){ 756 PIN_PATCH_STRING(26, "seq=15 as=4 misc=4 color=Blue ctype=1/8 device=Line-in loc=Rear"), 757 PIN_PATCH_STRING(27, "seq=15 as=3 color=Green ctype=1/8 device=Headphones loc=Left"), 758 { } 759 } 760 }, { 761 .models = (struct pin_machine_model_t[]){ 762 PIN_SUBVENDOR(UNIWILL_9070_SUBVENDOR), 763 { } 764 }, 765 .pin_patches = (struct pin_patch_t[]){ 766 PIN_PATCH_HP(20), 767 PIN_PATCH_SPEAKER(21), 768 PIN_PATCH_BASS_SPEAKER(22), 769 { } 770 } 771 }, { 772 .models = (struct pin_machine_model_t[]){ 773 PIN_SUBVENDOR(UNIWILL_9050_SUBVENDOR), 774 { } 775 }, 776 .pin_patches = (struct pin_patch_t[]){ 777 PIN_PATCH_NOT_APPLICABLE(23), 778 PIN_PATCH_NOT_APPLICABLE(25), 779 PIN_PATCH_NOT_APPLICABLE(27), 780 PIN_PATCH_NOT_APPLICABLE(31), 781 { } 782 } 783 }, { 784 .models = (struct pin_machine_model_t[]){ 785 PIN_SUBVENDOR(ASUS_Z71V_SUBVENDOR), 786 { } 787 }, 788 .pin_patches = (struct pin_patch_t[]){ 789 PIN_PATCH_SPEAKER(20), 790 PIN_PATCH_HP(21), 791 PIN_PATCH_NOT_APPLICABLE(22), 792 PIN_PATCH_NOT_APPLICABLE(23), 793 PIN_PATCH_MIC_IN(24), 794 PIN_PATCH_NOT_APPLICABLE(25), 795 PIN_PATCH_LINE_IN(26), 796 { } 797 } 798 }, { 799 .models = (struct pin_machine_model_t[]){ 800 PIN_SUBVENDOR(ASUS_W5A_SUBVENDOR), 801 { } 802 }, 803 .pin_patches = (struct pin_patch_t[]){ 804 PIN_PATCH_HP(20), 805 PIN_PATCH_NOT_APPLICABLE(21), 806 PIN_PATCH_NOT_APPLICABLE(22), 807 PIN_PATCH_NOT_APPLICABLE(23), 808 PIN_PATCH_MIC_INTERNAL(24), 809 PIN_PATCH_NOT_APPLICABLE(25), 810 PIN_PATCH_NOT_APPLICABLE(26), 811 PIN_PATCH_NOT_APPLICABLE(27), 812 PIN_PATCH_NOT_APPLICABLE(28), 813 PIN_PATCH_NOT_APPLICABLE(29), 814 PIN_PATCH_STRING(30, "seq=14 as=1 misc=1 color=Black ctype=ATAPI device=SPDIF-out loc=Lid-In conn=Fixed"), 815 { } 816 } 817 }, { 818 .models = (struct pin_machine_model_t[]){ 819 PIN_SUBVENDOR(ACER_E310ID_SUBVENDOR), 820 PIN_SUBVENDOR(SONY_81A0ID_SUBVENDOR), 821 PIN_SUBVENDOR(SONY_81D6ID_SUBVENDOR), 822 { } 823 }, 824 .pin_patches = (struct pin_patch_t[]){ 825 PIN_PATCH_LINE_OUT(20), 826 PIN_PATCH_NOT_APPLICABLE(21), 827 PIN_PATCH_NOT_APPLICABLE(22), 828 PIN_PATCH_NOT_APPLICABLE(23), 829 PIN_PATCH_STRING(24, "as=3 misc=12 color=Pink ctype=1/8 device=Mic loc=Rear"), 830 PIN_PATCH_HP(25), 831 PIN_PATCH_LINE_IN(26), 832 PIN_PATCH_MIC_FRONT(27), 833 PIN_PATCH_NOT_APPLICABLE(28), 834 PIN_PATCH_NOT_APPLICABLE(29), 835 PIN_PATCH_NOT_APPLICABLE(30), 836 PIN_PATCH_NOT_APPLICABLE(31), 837 { } 838 } 839 }, { 840 .models = (struct pin_machine_model_t[]){ 841 PIN_SUBVENDOR(ACER_0070ID_SUBVENDOR), 842 PIN_SUBVENDOR(ACER_E309ID_SUBVENDOR), 843 PIN_SUBVENDOR(INTEL_D402ID_SUBVENDOR), 844 PIN_SUBVENDOR(INTEL_E305ID_SUBVENDOR), 845 PIN_SUBVENDOR(INTEL_E308ID_SUBVENDOR), 846 { } 847 }, 848 .pin_patches = (struct pin_patch_t[]){ 849 PIN_PATCH_LINE_OUT(20), 850 PIN_PATCH_NOT_APPLICABLE(21), 851 PIN_PATCH_NOT_APPLICABLE(22), 852 PIN_PATCH_NOT_APPLICABLE(23), 853 PIN_PATCH_STRING(24, "as=3 misc=12 color=Pink ctype=1/8 device=Mic loc=Rear"), 854 PIN_PATCH_HP(25), 855 PIN_PATCH_LINE_IN(26), 856 PIN_PATCH_MIC_FRONT(27), 857 PIN_PATCH_NOT_APPLICABLE(28), 858 PIN_PATCH_NOT_APPLICABLE(29), 859 PIN_PATCH_STRING(30, "seq=14 as=1 misc=1 color=Black ctype=RCA device=SPDIF-out loc=Rear"), 860 PIN_PATCH_NOT_APPLICABLE(31), 861 { } 862 } 863 }, { 864 .models = (struct pin_machine_model_t[]){ 865 PIN_SUBVENDOR(GATEWAY_3032ID_SUBVENDOR), 866 PIN_SUBVENDOR(GATEWAY_3033ID_SUBVENDOR), 867 PIN_SUBVENDOR(GATEWAY_4039ID_SUBVENDOR), 868 { } 869 }, 870 .pin_patches = (struct pin_patch_t[]){ 871 PIN_PATCH_LINE_OUT(20), 872 PIN_PATCH_NOT_APPLICABLE(21), 873 PIN_PATCH_CLFE(22), 874 PIN_PATCH_SURROUND(23), 875 PIN_PATCH_STRING(24, "as=3 misc=12 color=Pink ctype=1/8 device=Mic loc=Rear"), 876 PIN_PATCH_HP(25), 877 PIN_PATCH_LINE_IN(26), 878 PIN_PATCH_MIC_FRONT(27), 879 PIN_PATCH_NOT_APPLICABLE(28), 880 PIN_PATCH_NOT_APPLICABLE(29), 881 PIN_PATCH_NOT_APPLICABLE(30), 882 PIN_PATCH_NOT_APPLICABLE(31), 883 { } 884 } 885 }, { 886 .models = (struct pin_machine_model_t[]){ 887 PIN_SUBVENDOR(COEUS_A880ID_SUBVENDOR), 888 PIN_SUBVENDOR(BIOSTAR_8202ID_SUBVENDOR), 889 PIN_SUBVENDOR(EPOX_400DID_SUBVENDOR), 890 PIN_SUBVENDOR(EPOX_EP5LDA_SUBVENDOR), 891 PIN_SUBVENDOR(INTEL_A100ID_SUBVENDOR), 892 PIN_SUBVENDOR(INTEL_D400ID_SUBVENDOR), 893 PIN_SUBVENDOR(INTEL_D401ID_SUBVENDOR), 894 PIN_SUBVENDOR(INTEL_E224ID_SUBVENDOR), 895 PIN_SUBVENDOR(INTEL_E400ID_SUBVENDOR), 896 PIN_SUBVENDOR(INTEL_E401ID_SUBVENDOR), 897 PIN_SUBVENDOR(INTEL_E402ID_SUBVENDOR), 898 PIN_SUBVENDOR(AOPEN_I915GMMHFS_SUBVENDOR), 899 { } 900 }, 901 .pin_patches = (struct pin_patch_t[]){ 902 PIN_PATCH_LINE_OUT(20), 903 PIN_PATCH_NOT_APPLICABLE(21), 904 PIN_PATCH_CLFE(22), 905 PIN_PATCH_SURROUND(23), 906 PIN_PATCH_STRING(24, "as=3 misc=12 color=Pink ctype=1/8 device=Mic loc=Rear"), 907 PIN_PATCH_HP(25), 908 PIN_PATCH_LINE_IN(26), 909 PIN_PATCH_MIC_FRONT(27), 910 PIN_PATCH_NOT_APPLICABLE(28), 911 PIN_PATCH_NOT_APPLICABLE(29), 912 PIN_PATCH_STRING(30, "seq=14 as=1 misc=1 color=Black ctype=RCA device=SPDIF-out loc=Rear"), 913 PIN_PATCH_NOT_APPLICABLE(31), 914 { } 915 } 916 }, { 917 .models = (struct pin_machine_model_t[]){ 918 PIN_SUBVENDOR(ACER_APFV_SUBVENDOR), 919 { } 920 }, 921 .pin_patches = (struct pin_patch_t[]){ 922 PIN_PATCH_LINE_OUT(20), 923 PIN_PATCH_SURROUND(21), 924 PIN_PATCH_CLFE(22), 925 PIN_PATCH_STRING(23, "seq=4 as=1 misc=4 color=Grey ctype=1/8 loc=Rear"), 926 PIN_PATCH_STRING(24, "as=3 misc=12 color=Pink ctype=1/8 device=Mic loc=Rear"), 927 PIN_PATCH_MIC_FRONT(25), 928 PIN_PATCH_LINE_IN(26), 929 PIN_PATCH_HP(27), 930 PIN_PATCH_NOT_APPLICABLE(28), 931 PIN_PATCH_NOT_APPLICABLE(29), 932 PIN_PATCH_NOT_APPLICABLE(30), 933 PIN_PATCH_NOT_APPLICABLE(31), 934 { } 935 } 936 }, { 937 .models = (struct pin_machine_model_t[]){ 938 PIN_SUBVENDOR(ACER_0077ID_SUBVENDOR), 939 PIN_SUBVENDOR(ACER_0078ID_SUBVENDOR), 940 PIN_SUBVENDOR(ACER_0087ID_SUBVENDOR), 941 PIN_SUBVENDOR(SHUTTLE_ST20G5_SUBVENDOR), 942 PIN_SUBVENDOR(GB_K8_SUBVENDOR), 943 PIN_SUBVENDOR(MSI_1150ID_SUBVENDOR), 944 PIN_SUBVENDOR(FIC_P4M_SUBVENDOR), 945 { } 946 }, 947 .pin_patches = (struct pin_patch_t[]){ 948 PIN_PATCH_LINE_OUT(20), 949 PIN_PATCH_SURROUND(21), 950 PIN_PATCH_CLFE(22), 951 PIN_PATCH_STRING(23, "seq=4 as=1 misc=4 color=Grey ctype=1/8 loc=Rear"), 952 PIN_PATCH_STRING(24, "as=3 misc=12 color=Pink ctype=1/8 device=Mic loc=Rear"), 953 PIN_PATCH_MIC_FRONT(25), 954 PIN_PATCH_LINE_IN(26), 955 PIN_PATCH_HP(27), 956 PIN_PATCH_NOT_APPLICABLE(28), 957 PIN_PATCH_NOT_APPLICABLE(29), 958 PIN_PATCH_STRING(30, "seq=14 as=1 misc=1 color=Black ctype=RCA device=SPDIF-out loc=Rear"), 959 PIN_PATCH_NOT_APPLICABLE(31), 960 { } 961 } 962 }, { } 963 } 964 }, { /**** CODEC: HDA_CODEC_ALC883 ****/ 965 .id = HDA_CODEC_ALC883, 966 .patches = (struct model_pin_patch_t[]){ 967 { 968 .models = (struct pin_machine_model_t[]){ 969 PIN_SUBVENDOR(MSI_MS034A_SUBVENDOR), 970 { } 971 }, 972 .pin_patches = pin_patches_msi_ms034a 973 }, { } 974 } 975 }, { /**** CODEC: HDA_CODEC_ALC892 ****/ 976 .id = HDA_CODEC_ALC892, 977 .patches = (struct model_pin_patch_t[]){ 978 { 979 .models = (struct pin_machine_model_t[]){ 980 PIN_SUBVENDOR(INTEL_DH87RL_SUBVENDOR), 981 { } 982 }, 983 .pin_patches = (struct pin_patch_t[]){ 984 PIN_PATCH_STRING(27, "as=1 seq=15"), 985 { } 986 } 987 }, { } 988 } 989 } 990 }; 991 992 #endif /* PIN_PATCH_REALTEK_H */ 993