[coreboot-gerrit] New patch to review for coreboot: bbc4e66 azalia: Add convenience macros

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Thu Sep 4 22:04:43 CEST 2014


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6837

-gerrit

commit bbc4e66012a7b4efaf2e2767594bb840902031f1
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Thu Sep 4 21:34:13 2014 +0200

    azalia: Add convenience macros
    
    Change-Id: Ie605efdda3b486ae6ef780266e6c651e41bb5392
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/include/device/azalia_device.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/include/device/azalia_device.h b/src/include/device/azalia_device.h
index 2276047..9db5fe4 100644
--- a/src/include/device/azalia_device.h
+++ b/src/include/device/azalia_device.h
@@ -30,4 +30,16 @@ extern u32 cim_verb_data_size;
 extern const u32 *pc_beep_verbs;
 extern u32 pc_beep_verbs_size;
 
+#define AZALIA_PIN_CFG(codec, pin, val)		    \
+	((codec) << 28) | ((pin) << 20) | ( 0x71c << 8) | ((val) & 0xff),	\
+	((codec) << 28) | ((pin) << 20) | ( 0x71d << 8) | (((val) >> 8) & 0xff), \
+	((codec) << 28) | ((pin) << 20) | ( 0x71e << 8) | (((val) >> 16) & 0xff), \
+	((codec) << 28) | ((pin) << 20) | ( 0x71f << 8) | (((val) >> 24) & 0xff)
+
+#define AZALIA_SUBVENDOR(codec, pin, val)		    \
+	((codec) << 28) | (0x01720 << 8) | ((val) & 0xff),	\
+	((codec) << 28) | (0x01721 << 8) | (((val) >> 8) & 0xff), \
+	((codec) << 28) | (0x01722 << 8) | (((val) >> 16) & 0xff), \
+	((codec) << 28) | (0x01723 << 8) | (((val) >> 24) & 0xff)
+
 #endif /* DEVICE_AZALIA_H */



More information about the coreboot-gerrit mailing list