Jeeja KP | dfe66a1 | 2015-06-11 14:11:47 +0530 | [diff] [blame^] | 1 | #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 | */ |
| 17 | struct 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 | |
| 30 | int 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 | |
| 34 | void snd_hdac_ext_bus_exit(struct hdac_ext_bus *sbus); |
| 35 | int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *sbus, int addr); |
| 36 | void 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 | |
| 42 | int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *sbus); |
| 43 | void snd_hdac_ext_bus_ppcap_enable(struct hdac_ext_bus *chip, bool enable); |
| 44 | void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_ext_bus *chip, bool enable); |
| 45 | |
| 46 | #endif /* __SOUND_HDAUDIO_EXT_H */ |