AspireVn7Dash572GHdaVerbTables.c 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. /** @file
  2. HDA Verb table for Acer Aspire VN7-572G
  3. Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef _ASPIRE_VN7_572G_HDA_VERB_TABLES_H_
  7. #define _ASPIRE_VN7_572G_HDA_VERB_TABLES_H_
  8. #include <Ppi/SiPolicy.h>
  9. HDAUDIO_VERB_TABLE HdaVerbTableAlc255AspireVn7Dash572G = HDAUDIO_VERB_TABLE_INIT (
  10. //
  11. // VerbTable: (Realtek ALC255) for Aspire VN7-572G
  12. // Revision ID = 0xff
  13. // Codec Verb Table for SKL PCH boards
  14. // Codec Address: CAd value (0/1/2)
  15. // Codec Vendor: 0x10EC0255
  16. //
  17. 0x10EC, 0x0255,
  18. 0xFF, 0xFF,
  19. // The number of verb command block : 20
  20. // NID 0x12 : 0x411111C0
  21. // NID 0x14 : 0x90172120
  22. // NID 0x17 : 0x40000000
  23. // NID 0x18 : 0x411111F0
  24. // NID 0x19 : 0x411111F0
  25. // NID 0x1A : 0x411111F0
  26. // NID 0x1B : 0x411111F0
  27. // NID 0x1D : 0x40700001
  28. // NID 0x1E : 0x411111F0
  29. // NID 0x21 : 0x02211030
  30. // Codec Address: Bits 31:28
  31. // Node ID: Bits 27:20
  32. // Verb ID: Bits 19:8 / Bits 19:16
  33. // Payload: Bits 7:0 / Bits 15:0
  34. //Widget node 0x01 : Reset Codec
  35. 0x0017FF00,
  36. 0x0017FF00,
  37. 0x0017FF00,
  38. 0x0017FF00,
  39. //===== HDA Codec Subsystem ID Verb-table =====
  40. //HDA Codec Subsystem ID : 0x10251037
  41. 0x00172037,
  42. 0x00172110,
  43. 0x00172225,
  44. 0x00172310,
  45. //===== Pin Widget Verb-table =====
  46. //Pin widget 0x12
  47. 0x01271CC0,
  48. 0x01271D11,
  49. 0x01271E11,
  50. 0x01271F41,
  51. //Pin widget 0x14 - Speaker
  52. 0x01471C20,
  53. 0x01471D21,
  54. 0x01471E17,
  55. 0x01471F90,
  56. //Pin widget 0x17
  57. 0x01771C00,
  58. 0x01771D00,
  59. 0x01771E00,
  60. 0x01771F40,
  61. //Pin widget 0x18 - NC
  62. 0x01871CF0,
  63. 0x01871D11,
  64. 0x01871E11,
  65. 0x01871F41,
  66. //Pin widget 0x19 - NC
  67. 0x01971CF0,
  68. 0x01971D11,
  69. 0x01971E11,
  70. 0x01971F41,
  71. //Pin widget 0x1A - NC
  72. 0x01A71CF0,
  73. 0x01A71D11,
  74. 0x01A71E11,
  75. 0x01A71F41,
  76. //Pin widget 0x1B - NC
  77. 0x01B71CF0,
  78. 0x01B71D11,
  79. 0x01B71E11,
  80. 0x01B71F41,
  81. //Pin widget 0x1D
  82. 0x01D71C01,
  83. 0x01D71D00,
  84. 0x01D71E70,
  85. 0x01D71F40,
  86. //Pin widget 0x1E - NC
  87. 0x01E71CF0,
  88. 0x01E71D11,
  89. 0x01E71E11,
  90. 0x01E71F41,
  91. //Pin widget 0x21 - Headphone
  92. 0x02171C30,
  93. 0x02171D10,
  94. 0x02171E21,
  95. 0x02171F02,
  96. /* See data blob in "InstallPchHdaVerbTablePei" of vendor firmware
  97. * (some appear in https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_realtek.c).
  98. * - Largely coefficient programming (undocumented): Select coeff; write data
  99. * - Also programs speaker amplifier gain
  100. * - Sets speaker output
  101. * NOTE: NID 0x20 holds the "Realtek Defined Hidden registers" */
  102. 0x02050038, /* Set coeff idx: 0x38 */
  103. 0x02048981, /* Set processing coeff: 0x8981 */
  104. 0x02050045, /* Set coeff idx: 0x45 */
  105. 0x0204c489, /* Set processing coeff: 0xc489 */
  106. 0x02050037, /* Set coeff idx: 0x37 */
  107. 0x02044a05, /* Set processing coeff: 0x4a05 */
  108. 0x05750003, /* Set coeff idx on NID 0x57?: 0x3 */
  109. 0x057486a6, /* Set processing coeff on NID 0x57?: 0x86a6 */
  110. 0x02050046, /* Set coeff idx: 0x46 */
  111. 0x02040004, /* Set processing coeff: 0x4 */
  112. 0x0205001b, /* Set coeff idx: 0x1b */
  113. 0x02040a0b, /* Set processing coeff: 0xa0b */
  114. 0x02050008, /* Set coeff idx: 0x8 */
  115. 0x02046a0c, /* Set processing coeff: 0x6a0c */
  116. 0x02050009, /* Set coeff idx: 0x9 */
  117. 0x0204e003, /* Set processing coeff: 0xe003 */
  118. 0x0205000a, /* Set coeff idx: 0xa */
  119. 0x02047770, /* Set processing coeff: 0x7770 */
  120. 0x02050040, /* Set coeff idx: 0x40 */
  121. 0x02049800, /* Set processing coeff: 0x9800 */
  122. 0x02050010, /* Set coeff idx: 0x10 */
  123. 0x02040e20, /* Set processing coeff: 0xe20 */
  124. 0x0205000d, /* Set coeff idx: 0xd */
  125. 0x02042801, /* Set processing coeff: 0x2801 */
  126. 0x0143b000, /* Set amplifier gain on speaker: Set output, L+R amp; Unmuted; No gain */
  127. 0x0143b000, /* Repeated for units? */
  128. 0x01470740, /* Set widget control on speaker: Out enabled; VrefEn: Hi-Z (disabled) */
  129. 0x01470740, /* Repeated for units? */
  130. 0x01470740, /* Repeated for units? */
  131. 0x01470740, /* Repeated for units? */
  132. 0x02050010, /* Set coeff idx: 0x10 */
  133. 0x02040f20 /* Set processing coeff: 0xf20 */
  134. );
  135. HDAUDIO_VERB_TABLE HdaVerbTableDisplayAudio = HDAUDIO_VERB_TABLE_INIT (
  136. //
  137. // VerbTable: Intel Skylake HDMI
  138. // Revision ID = 0xFF
  139. // Codec Vendor: 0x80862809
  140. // Subsystem ID: 0x80860101
  141. //
  142. 0x8086, 0x2809,
  143. 0xFF, 0xFF,
  144. // Codec Address: Bits 31:28
  145. // Node ID: Bits 27:20
  146. // Verb ID: Bits 19:8 / Bits 19:16
  147. // Payload: Bits 7:0 / Bits 15:0
  148. // NOTE: Corrected the table in vendor FW, codec address 0x2, not 0x0
  149. //
  150. // Display Audio Verb Table
  151. //
  152. // For GEN9, the Vendor Node ID is 08h
  153. // Enable the third converter and pin first
  154. 0x20878101,
  155. 0x20878101,
  156. 0x20878101,
  157. 0x20878101,
  158. // Pin Widget 5 - PORT B - Configuration Default: 0x18560010
  159. 0x20571C10,
  160. 0x20571D00,
  161. 0x20571E56,
  162. 0x20571F18,
  163. // Pin Widget 6 - PORT C - Configuration Default: 0x18560020
  164. 0x20671C20,
  165. 0x20671D00,
  166. 0x20671E56,
  167. 0x20671F18,
  168. // Pin Widget 7 - PORT D - Configuration Default: 0x18560030
  169. 0x20771C30,
  170. 0x20771D00,
  171. 0x20771E56,
  172. 0x20771F18,
  173. // Disable the third converter and third pin
  174. 0x20878100,
  175. 0x20878100,
  176. 0x20878100,
  177. 0x20878100
  178. );
  179. #endif // _ASPIRE_VN7_572G_HDA_VERB_TABLES_H_