diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/device/Kconfig | 9 | ||||
-rw-r--r-- | src/device/azalia_device.c | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/device/Kconfig b/src/device/Kconfig index 63b7d6c9ee..5ae3466d32 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -527,6 +527,15 @@ config AZALIA_MAX_CODECS help The maximum number of codecs supported on a single HD Audio controller. +config AZALIA_LOCK_DOWN_R_WO_GCAP + def_bool n + depends on AZALIA_PLUGIN_SUPPORT + help + The GCAP register is implemented as R/WO (Read / Write Once) on some + HD Audio controllers, such as Intel 6-series PCHs. Select this option + to lock down the GCAP register after deasserting the controller reset + bit. Locking is done by reading GCAP and writing back the read value. + config PCIEXP_PLUGIN_SUPPORT bool default y diff --git a/src/device/azalia_device.c b/src/device/azalia_device.c index 013a49a2c0..9202f72a4e 100644 --- a/src/device/azalia_device.c +++ b/src/device/azalia_device.c @@ -56,6 +56,11 @@ static u16 codec_detect(u8 *base) if (azalia_exit_reset(base) < 0) goto no_codec; + if (CONFIG(AZALIA_LOCK_DOWN_R_WO_GCAP)) { + /* If GCAP is R/WO, lock it down after deasserting controller reset */ + write16(base + HDA_GCAP_REG, read16(base + HDA_GCAP_REG)); + } + /* clear STATESTS bits (BAR + 0xe)[2:0] */ reg16 = read16(base + HDA_STATESTS_REG); reg16 |= codec_mask; |