ALSA: hdac: Add macro for hda ext devices entry
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Mon, 19 Oct 2015 11:28:46 +0000 (16:58 +0530)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Oct 2015 08:19:16 +0000 (10:19 +0200)
With the new modalias infrastructure support added for hda, create a macro
for ext devices similar to legacy to add the device entry.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/hdaudio_ext.h

index 94210dcdb6eacf5329fa8250f42a470a84d600ff..a4cadd9c297a810e1bb548d2cb02e4ab92b5eea2 100644 (file)
@@ -40,6 +40,13 @@ void snd_hdac_ext_bus_device_remove(struct hdac_ext_bus *ebus);
 #define hbus_to_ebus(_bus) \
        container_of(_bus, struct hdac_ext_bus, bus)
 
+#define HDA_CODEC_REV_EXT_ENTRY(_vid, _rev, _name, drv_data) \
+       { .vendor_id = (_vid), .rev_id = (_rev), .name = (_name), \
+         .api_version = HDA_DEV_ASOC, \
+         .driver_data = (unsigned long)(drv_data) }
+#define HDA_CODEC_EXT_ENTRY(_vid, _revid, _name, _drv_data) \
+       HDA_CODEC_REV_EXT_ENTRY(_vid, _revid, _name, _drv_data)
+
 int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *sbus);
 void snd_hdac_ext_bus_ppcap_enable(struct hdac_ext_bus *chip, bool enable);
 void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_ext_bus *chip, bool enable);