diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-09-04 21:34:13 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-09-05 00:11:33 +0200 |
commit | 8f0da582abc8f522b7eacd4e35295091abb19be2 (patch) | |
tree | a4424f03d6a56283fafada7a3aa7eeaa14690761 /src | |
parent | 79f47cf8c0c54848ee13b727482ff8936a68e1f5 (diff) |
azalia: Add convenience macros
Change-Id: Ie605efdda3b486ae6ef780266e6c651e41bb5392
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/6837
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/device/azalia_device.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/device/azalia_device.h b/src/include/device/azalia_device.h index 2276047038..4940cd238d 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, 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 */ |