blob: 4940cd238df0166c4bee3844c61baed3374b646d [file] [log] [blame]
Andrew Wub7bb70d2013-08-12 20:07:47 +08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2013 DMP Electronics Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef DEVICE_AZALIA_H
21#define DEVICE_AZALIA_H
22
23#include <device/device.h>
24
25void azalia_audio_init(struct device *dev);
26extern struct device_operations default_azalia_audio_ops;
27
Vladimir Serbinenko6a3a8ce2014-08-17 23:48:42 +020028extern const u32 *cim_verb_data;
29extern u32 cim_verb_data_size;
30extern const u32 *pc_beep_verbs;
31extern u32 pc_beep_verbs_size;
32
Vladimir Serbinenko8f0da582014-09-04 21:34:13 +020033#define AZALIA_PIN_CFG(codec, pin, val) \
34 ((codec) << 28) | ((pin) << 20) | ( 0x71c << 8) | ((val) & 0xff), \
35 ((codec) << 28) | ((pin) << 20) | ( 0x71d << 8) | (((val) >> 8) & 0xff), \
36 ((codec) << 28) | ((pin) << 20) | ( 0x71e << 8) | (((val) >> 16) & 0xff), \
37 ((codec) << 28) | ((pin) << 20) | ( 0x71f << 8) | (((val) >> 24) & 0xff)
38
39#define AZALIA_SUBVENDOR(codec, val) \
40 ((codec) << 28) | (0x01720 << 8) | ((val) & 0xff), \
41 ((codec) << 28) | (0x01721 << 8) | (((val) >> 8) & 0xff), \
42 ((codec) << 28) | (0x01722 << 8) | (((val) >> 16) & 0xff), \
43 ((codec) << 28) | (0x01723 << 8) | (((val) >> 24) & 0xff)
44
Andrew Wub7bb70d2013-08-12 20:07:47 +080045#endif /* DEVICE_AZALIA_H */