ALSA: hda - Make snd_hda_bus_type public
[firefly-linux-kernel-4.4.55.git] / include / sound / hdaudio.h
1 /*
2  * HD-audio core stuff
3  */
4
5 #ifndef __SOUND_HDAUDIO_H
6 #define __SOUND_HDAUDIO_H
7
8 #include <linux/device.h>
9
10 /*
11  * exported bus type
12  */
13 extern struct bus_type snd_hda_bus_type;
14
15 /*
16  * HD-audio codec base device
17  */
18 struct hdac_device {
19         struct device dev;
20         int type;
21 };
22
23 /* device/driver type used for matching */
24 enum {
25         HDA_DEV_CORE,
26         HDA_DEV_LEGACY,
27 };
28
29 #define dev_to_hdac_dev(_dev)   container_of(_dev, struct hdac_device, dev)
30
31 /*
32  * HD-audio codec base driver
33  */
34 struct hdac_driver {
35         struct device_driver driver;
36         int type;
37         int (*match)(struct hdac_device *dev, struct hdac_driver *drv);
38 };
39
40 #define drv_to_hdac_driver(_drv) container_of(_drv, struct hdac_driver, driver)
41
42 #endif /* __SOUND_HDAUDIO_H */