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