blob: 083f68a980d28d985b6f81c3b3357512d50d5e77 [file] [log] [blame]
Jeeja KPdfe66a12015-06-11 14:11:47 +05301#ifndef __SOUND_HDAUDIO_EXT_H
2#define __SOUND_HDAUDIO_EXT_H
3
4#include <sound/hdaudio.h>
5
6/**
7 * hdac_ext_bus: HDAC extended bus for extended HDA caps
8 *
9 * @bus: hdac bus
10 * @num_streams: streams supported
11 * @ppcap: pp capabilities pointer
12 * @spbcap: SPIB capabilities pointer
13 * @mlcap: MultiLink capabilities pointer
14 * @gtscap: gts capabilities pointer
15 * @hlink_list: link list of HDA links
16 */
17struct hdac_ext_bus {
18 struct hdac_bus bus;
19 int num_streams;
20 int idx;
21
22 void __iomem *ppcap;
23 void __iomem *spbcap;
24 void __iomem *mlcap;
25 void __iomem *gtscap;
26
27 struct list_head hlink_list;
28};
29
30int snd_hdac_ext_bus_init(struct hdac_ext_bus *sbus, struct device *dev,
31 const struct hdac_bus_ops *ops,
32 const struct hdac_io_ops *io_ops);
33
34void snd_hdac_ext_bus_exit(struct hdac_ext_bus *sbus);
35int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *sbus, int addr);
36void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev);
37
38#define ebus_to_hbus(ebus) (&(ebus)->bus)
39#define hbus_to_ebus(_bus) \
40 container_of(_bus, struct hdac_ext_bus, bus)
41
42int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *sbus);
43void snd_hdac_ext_bus_ppcap_enable(struct hdac_ext_bus *chip, bool enable);
44void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_ext_bus *chip, bool enable);
45
46#endif /* __SOUND_HDAUDIO_EXT_H */