Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: hda - add more ML register definitions

This patch refines the definition of AZX_MLCTL_SPA and AZX_MLCTL_CPA
and add more definitions of ML registers

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Libin Yang and committed by
Takashi Iwai
dde5bff5 7e1621de

+8 -6
+5 -3
include/sound/hda_register.h
··· 261 261 #define AZX_REG_ML_LOUTPAY 0x20 262 262 #define AZX_REG_ML_LINPAY 0x30 263 263 264 - #define AZX_MLCTL_SPA (1<<16) 265 - #define AZX_MLCTL_CPA 23 266 - 264 + #define ML_LCTL_SCF_MASK 0xF 265 + #define AZX_MLCTL_SPA (0x1 << 16) 266 + #define AZX_MLCTL_CPA (0x1 << 23) 267 + #define AZX_MLCTL_SPA_SHIFT 16 268 + #define AZX_MLCTL_CPA_SHIFT 23 267 269 268 270 /* registers for DMA Resume Capability Structure */ 269 271 #define AZX_DRSM_CAP_ID 0x5
+3 -3
sound/hda/ext/hdac_ext_controller.c
··· 171 171 { 172 172 int timeout; 173 173 u32 val; 174 - int mask = (1 << AZX_MLCTL_CPA); 174 + int mask = (1 << AZX_MLCTL_CPA_SHIFT); 175 175 176 176 udelay(3); 177 177 timeout = 150; ··· 179 179 do { 180 180 val = readl(link->ml_addr + AZX_REG_ML_LCTL); 181 181 if (enable) { 182 - if (((val & mask) >> AZX_MLCTL_CPA)) 182 + if (((val & mask) >> AZX_MLCTL_CPA_SHIFT)) 183 183 return 0; 184 184 } else { 185 - if (!((val & mask) >> AZX_MLCTL_CPA)) 185 + if (!((val & mask) >> AZX_MLCTL_CPA_SHIFT)) 186 186 return 0; 187 187 } 188 188 udelay(3);