- 积分
- 179
- 最后登录
- 2019-5-3
- 精华
- 0
- 阅读权限
- 20
- 主题
- 69
- UID
- 1725762
- 帖子
- 372
- PB币
- 744
- 威望
- 5
- 贡献
- 0
- 技术
- 36
- 活跃
- 195
- UID
- 1725762
- 帖子
- 372
- PB币
- 744
- 贡献
- 0
- 技术
- 36
- 活跃
- 195
|
18F
发表于 2017-10-8 14:11:23
IP属地湖南
|只看该作者
本帖最后由 WSPE 于 2017-10-8 15:07 编辑
完善声卡驱动系列之CodecCommander:
解决开机爆音,然后启动进系统偶尔无声音,需要睡眠唤醒一次才有声音。
应该是开机声卡没静音电流过大引起了声卡关闭输出保护措施,但驱动认为声卡还在工作所以不给声卡启动相关的指令。
解决办法是开机用Codeccommander让声卡先静音,等进系统后再由AppleHDA自己来开启声音。
用Rehabman版的Codeccommander,可通过SSDT来写开机需要Codeccommander发送给声卡的Command,代码如下,ALC898-MSI-GP62-6QG-1281CN 专用仅供参考(复制请去除中文注释)
除了解决问题以外还增加了一些增加稳定性的Command
需要自己设置的可以参考https://bbs.pcbeta.com/viewthread-1663564-1-2.html[/url]这篇帖子command的设置方法,以及https://bitbucket.org/RehabMan/os-x-eapd-codec-commander 这里的README
- // SSDT-ALC899.dsl
- // This SSDT demonstrates a custom configuration with certain features
- // disabled when using AppleALC.kext.
- // AppleALC.kext has some extra patches for AppleHDA that interfere with these
- // features breaking audio after wake from sleep.
- //
- // Customize to suit your needs.
- // 这里关于Command的设置参考codec描述文件
- // 需要了解具体的设置对应的buffer可以用rehabman驱动里面的hda-verb工具
- // 比如hda-verb 0x12 SET_PIN_WIDGET_CONTROL 0x20会返回,至于为什么是0x20,参考codec描述文件
- // command 0x01270720 --> result = 0x00000000
- // 那么command对应的buffer就是0x01,0x27,0x07,0x20
- // 另外参考https://bbs.pcbeta.com/viewthread-1663564-1-2.html这篇帖子
- // 复制下面的代码时请去掉中文
- DefinitionBlock ("", "SSDT", 1, "hack", "CC-ALC", 0)
- {
- External(_SB.PCI0.HDEF, DeviceObj)
- Name(_SB.PCI0.HDEF.RMCF, Package()
- {
- "CodecCommander", Package()
- {
- "Custom Commands", Package()
- {
- Package(){}, // signifies Array instead of Dictionary
- // Set Pin Controls
- // 防止接口切换出问题
- Package()
- {
- // Node 0x12 - Pin Control (In Enable)
- "Command", Buffer() { 0x01, 0x27, 0x07, 0x20 },
- "On Init", ">y",
- "On Sleep", ">n",
- "On Wake", ">y",
- },
- Package()
- {
- // Node 0x14 - Pin Control (In Enable)
- "Command", Buffer() { 0x01, 0x47, 0x07, 0xc0 },
- "On Init", ">y",
- "On Sleep", ">n",
- "On Wake", ">y",
- },
- Package()
- {
- // Node 0x15 - Pin Control (In Enable)
- "Command", Buffer() { 0x01, 0x57, 0x07, 0x40 },
- "On Init", ">y",
- "On Sleep", ">n",
- "On Wake", ">y",
- },
- Package()
- {
- // Node 0x18 - Pin Control (In Enable)
- "Command", Buffer() { 0x01, 0x87, 0x07, 0x21 },
- "On Init", ">y",
- "On Sleep", ">n",
- "On Wake", ">y",
- },
- Package()
- {
- // Node 0x1e - Pin Control (In Enable)
- "Command", Buffer() { 0x01, 0xe7, 0x07, 0x40 },
- "On Init", ">y",
- "On Sleep", ">n",
- "On Wake", ">y",
- },
- //Set UNSOLICITED
- //防止有时候耳机只有杂音无声音
- Package()
- {
- // 0x14 SET_UNSOLICITED_ENABLE 0x82
- "Command", Buffer() { 0x01, 0x47, 0x08, 0x82 },
- "On Init", ">y",
- "On Sleep", ">n",
- "On Wake", ">y",
- },
- Package()
- {
- // 0x18 SET_UNSOLICITED_ENABLE 0x83
- "Command", Buffer() { 0x01, 0x87, 0x08, 0x83 },
- "On Init", ">y",
- "On Sleep", ">n",
- "On Wake", ">y",
- },
- //SET_POWER_STATE
- //我分析开机无声可能和开机时两声很响的爆音有关
- //0x02和0x05是我的音频输出控制器,这里将其中一个设为0x03即静音状态,另一个设为0x00
- Package()
- {
- // 0x02 SET_POWER_STATE 0x00
- "Command", Buffer() { 0x00, 0x27, 0x05, 0x00 },
- "On Init", ">y",
- "On Sleep", ">n",
- "On Wake", ">n",
- },
- Package()
- {
- // 0x05 SET_POWER_STATE 0x03
- "Command", Buffer() { 0x00, 0x57, 0x05, 0x03 },
- "On Init", ">y",
- "On Sleep", ">n",
- "On Wake", ">n",
- },
- },
- "Perform Reset", ">n",
- "Perform Reset on External Wake", ">n",
- "Send Delay", 10,
- "Sleep Nodes", ">n",
- },
- })
- }
- //EOF
复制代码 我的Codec描述文件片段,结合上面的SSDT代码看吧
- Node 0x12 [Pin Complex] wcaps 0x400401: Stereo
- Pincap 0x00000020: IN
- Pin Default 0x90a60170: [Fixed] Mic at Int N/A
- Conn = Digital, Color = Unknown
- DefAssociation = 0x7, Sequence = 0x0
- Misc = NO_PRESENCE
- Pin-ctls: 0x20: IN
- Power states: D0 D1 D2 D3 EPSS
- Power: setting=D0, actual=D0
- Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
- Control: name="Headphone Playback Switch", index=0, device=0
- ControlAmp: chs=3, dir=Out, idx=0, ofs=0
- Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
- Amp-Out vals: [0x80 0x80]
- Pincap 0x0001003c: IN OUT HP EAPD Detect
- EAPD 0x2: EAPD
- Pin Default 0x01214010: [Jack] HP Out at Ext Rear
- Conn = 1/8, Color = Green
- DefAssociation = 0x1, Sequence = 0x0
- Pin-ctls: 0xc0: OUT HP
- Unsolicited: tag=01, enabled=1
- Power states: D0 D1 D2 D3 EPSS
- Power: setting=D0, actual=D0
- Connection: 5
- 0x0c 0x0d 0x0e 0x0f* 0x26
- Node 0x15 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
- Control: name="Front Playback Switch", index=0, device=0
- ControlAmp: chs=3, dir=Out, idx=0, ofs=0
- Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
- Amp-Out vals: [0x00 0x00]
- Pincap 0x0000003c: IN OUT HP Detect
- Pin Default 0x90170120: [Fixed] Speaker at Int N/A
- Conn = Analog, Color = Unknown
- DefAssociation = 0x2, Sequence = 0x0
- Misc = NO_PRESENCE
- Pin-ctls: 0x40: OUT
- Unsolicited: tag=00, enabled=0
- Power states: D0 D1 D2 D3 EPSS
- Power: setting=D0, actual=D0
- Connection: 5
- 0x0c* 0x0d 0x0e 0x0f 0x26
- Node 0x18 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
- Control: name="Mic Boost Volume", index=0, device=0
- ControlAmp: chs=3, dir=In, idx=0, ofs=0
- Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
- Amp-In vals: [0x00 0x00]
- Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
- Amp-Out vals: [0x80 0x80]
- Pincap 0x0000373c: IN OUT HP Detect
- Vref caps: HIZ 50 GRD 80 100
- Pin Default 0x01a19060: [Jack] Mic at Ext Rear
- Conn = 1/8, Color = Pink
- DefAssociation = 0x6, Sequence = 0x0
- Pin-ctls: 0x21: IN VREF_50
- Unsolicited: tag=02, enabled=1
- Power states: D0 D1 D2 D3 EPSS
- Power: setting=D0, actual=D0
- Connection: 5
- 0x0c* 0x0d 0x0e 0x0f 0x26
- Node 0x1e [Pin Complex] wcaps 0x400701: Stereo Digital
- Pincap 0x00000010: OUT
- Pin Default 0x01454150: [Jack] SPDIF Out at Ext Rear
- Conn = Optical, Color = Green
- DefAssociation = 0x5, Sequence = 0x0
- Misc = NO_PRESENCE
- Pin-ctls: 0x40: OUT
- Power states: D0 D1 D2 D3 EPSS
- Power: setting=D0, actual=D0
- Connection: 1
- 0x06
- Node 0x05 [Audio Output] wcaps 0x411: Stereo
- Converter: stream=1, channel=0
- PCM:
- rates [0x5e0]: 44100 48000 88200 96000 192000
- bits [0xe]: 16 20 24
- formats [0x1]: PCM
- Power states: D0 D1 D2 D3 EPSS
- Power: setting=D0, actual=D0
- Node 0x02 [Audio Output] wcaps 0x411: Stereo
- Device: name="ALC898 Analog", type="Audio", device=0
- Converter: stream=1, channel=0
- PCM:
- rates [0x5e0]: 44100 48000 88200 96000 192000
- bits [0xe]: 16 20 24
- formats [0x1]: PCM
- Power states: D0 D1 D2 D3 EPSS
- Power: setting=D0, actual=D0
-
复制代码
改好的东西我已经一并传到网盘了,关键就在CLOVER/ACPI/patched/SSDT-AppleALC.aml
另外加了hda-verb:
链接: [url]https://pan.baidu.com/s/1c2pPMlM 密码: b2wb
|
|