summaryrefslogtreecommitdiffstats
path: root/include/sound/hdaudio.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-12 13:58:07 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-12 13:58:07 +0200
commit9a9b13dd275dfe49ee0cf3ae5dc931069eb41475 (patch)
tree668eb21a6a1f9669fa251505ec5ebf41abfaa900 /include/sound/hdaudio.h
parentALSA: hda/ca0132: Update a pci quirk device name (diff)
parentALSA: hdac: add extended ops in the hdac_bus (diff)
downloadlinux-9a9b13dd275dfe49ee0cf3ae5dc931069eb41475.tar.xz
linux-9a9b13dd275dfe49ee0cf3ae5dc931069eb41475.zip
Merge branch 'topic/hda-core-intel' into topic/hda-acomp
Diffstat (limited to 'include/sound/hdaudio.h')
-rw-r--r--include/sound/hdaudio.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index c052afc27547..f1baaa88e766 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -188,6 +188,11 @@ struct hdac_driver {
const struct hda_device_id *id_table;
int (*match)(struct hdac_device *dev, struct hdac_driver *drv);
void (*unsol_event)(struct hdac_device *dev, unsigned int event);
+
+ /* fields used by ext bus APIs */
+ int (*probe)(struct hdac_device *dev);
+ int (*remove)(struct hdac_device *dev);
+ void (*shutdown)(struct hdac_device *dev);
};
#define drv_to_hdac_driver(_drv) container_of(_drv, struct hdac_driver, driver)
@@ -209,6 +214,14 @@ struct hdac_bus_ops {
};
/*
+ * ops used for ASoC HDA codec drivers
+ */
+struct hdac_ext_bus_ops {
+ int (*hdev_attach)(struct hdac_device *hdev);
+ int (*hdev_detach)(struct hdac_device *hdev);
+};
+
+/*
* Lowlevel I/O operators
*/
struct hdac_io_ops {
@@ -250,11 +263,17 @@ struct hdac_rb {
* @mlcap: MultiLink capabilities pointer
* @gtscap: gts capabilities pointer
* @drsmcap: dma resume capabilities pointer
+ * @num_streams: streams supported
+ * @idx: HDA link index
+ * @hlink_list: link list of HDA links
+ * @lock: lock for link mgmt
+ * @cmd_dma_state: state of cmd DMAs: CORB and RIRB
*/
struct hdac_bus {
struct device *dev;
const struct hdac_bus_ops *ops;
const struct hdac_io_ops *io_ops;
+ const struct hdac_ext_bus_ops *ext_ops;
/* h/w resources */
unsigned long addr;
@@ -317,6 +336,16 @@ struct hdac_bus {
/* i915 component interface */
struct i915_audio_component *audio_component;
int i915_power_refcount;
+
+ /* parameters required for enhanced capabilities */
+ int num_streams;
+ int idx;
+
+ struct list_head hlink_list;
+
+ struct mutex lock;
+ bool cmd_dma_state;
+
};
int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev,