From 00f82ec9ff0f0ac1109a1e29b229dc4ee74c9e0e Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Fri, 13 Mar 2020 01:41:46 +0000 Subject: [PATCH] intel_hda: Add AMD RavenRidge vendor:device ids. Also, set memory space bit in PCI Command register at initialization. This enables sound at least on my laptop. git-svn-id: svn://kolibrios.org@7737 a494cfbc-eb01-0410-851d-a64ba20cac60 --- drivers/audio/intel_hda/intel_hda.asm | 11 ++++++++--- drivers/audio/sound.asm | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/audio/intel_hda/intel_hda.asm b/drivers/audio/intel_hda/intel_hda.asm index 412d9c2845..a63faa5ca0 100644 --- a/drivers/audio/intel_hda/intel_hda.asm +++ b/drivers/audio/intel_hda/intel_hda.asm @@ -137,6 +137,7 @@ CTRL_ATI_RV710 equ 0xaa40 CTRL_ATI_RV740 equ 0xaa48 ; AMD CTRL_AMD_HUDSON equ 0x780d +CTRL_AMD_RAVEN_RIDGE equ 0x15e3 ; VIA CTRL_VIA_VT82XX equ 0x3288 CTRL_VIA_VT61XX equ 0x9140 @@ -1131,9 +1132,11 @@ align 4 proc init_controller invoke PciRead32, [ctrl.bus], [ctrl.devfn], dword 4 - test eax, 0x4 ; Test Master bit - jnz @f - or eax, 0x4 ; Set Master bit + movi ebx, 0x6 + and ebx, eax + cmp ebx, 0x6 ; Test Master and Memory bits + jz @f + or eax, 0x6 ; Set Master and Memory bits invoke PciWrite32, [ctrl.bus], [ctrl.devfn], dword 4, eax invoke PciRead32, [ctrl.bus], [ctrl.devfn], dword 4 @@: @@ -2816,6 +2819,7 @@ devices: dd (CTRL_ATI_RV770 shl 16)+VID_ATI,msg_ATI_RV770, AZX_DRIVER_ATIHDMI ; AMD dd (CTRL_AMD_HUDSON shl 16)+VID_AMD,msg_AMD_HUDSON, AZX_DRIVER_GENERIC + dd (CTRL_AMD_RAVEN_RIDGE shl 16)+VID_AMD,msg_AMD_RAVEN_RIDGE, AZX_DRIVER_GENERIC ; VIA dd (CTRL_VIA_VT82XX shl 16)+VID_VIA,msg_VIA_VT82XX, AZX_DRIVER_VIA dd (CTRL_VIA_VT61XX shl 16)+VID_VIA,msg_VIA_VT61XX, AZX_DRIVER_GENERIC @@ -2912,6 +2916,7 @@ msg_ATI_RV770 db 'RV770', 13,10,0 msg_AMD db 'AMD ',0 msg_AMD_HUDSON db 'Hudson', 13,10,0 +msg_AMD_RAVEN_RIDGE db 'RavenRidge', 13,10,0 msg_VIA db 'VIA ',0 msg_VIA_VT82XX db 'VT8251/8237A', 13,10,0 diff --git a/drivers/audio/sound.asm b/drivers/audio/sound.asm index e14834dac9..ee0bc9234a 100644 --- a/drivers/audio/sound.asm +++ b/drivers/audio/sound.asm @@ -143,6 +143,7 @@ CTRL_ATI_RV710 = 0xaa40 CTRL_ATI_RV740 = 0xaa48 CTRL_AMD_HUDSON = 0x780d +CTRL_AMD_RAVEN_RIDGE = 0x15e3 CTRL_VIA_VT82XX = 0x3288 CTRL_VIA_VT61XX = 0x9140 @@ -393,6 +394,7 @@ devices dd (CTRL_ICH shl 16)+VID_INTEL, intelac97 dd (CTRL_ATI_RV770 shl 16)+VID_ATI, intelhda ; AMD dd (CTRL_AMD_HUDSON shl 16)+VID_AMD, intelhda + dd (CTRL_AMD_RAVEN_RIDGE shl 16)+VID_AMD, intelhda ; VIA dd (CTRL_VIA_VT82XX shl 16)+VID_VIA, intelhda dd (CTRL_VIA_VT61XX shl 16)+VID_VIA, intelhda