aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/sound/hdaudio.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-03 12:51:26 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-03 12:51:31 +0200
commit51d7d35817aad6f4dd0f60b80063206f1761b69b (patch)
tree3401cc1ba9125e9796ea6075ea493b6031e50d74 /include/sound/hdaudio.h
parentALSA: usb-midi: use irqsave() in USB's complete callback (diff)
parentALSA: hdac: add extended ops in the hdac_bus (diff)
downloadwireguard-linux-51d7d35817aad6f4dd0f60b80063206f1761b69b.tar.xz
wireguard-linux-51d7d35817aad6f4dd0f60b80063206f1761b69b.zip
Merge branch 'topic/hda-core-intel' into for-next
Merge the development branch for HD-audio ext bus refactoring. Signed-off-by: Takashi Iwai <tiwai@suse.de>
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 294a5a21937b..21abc4da2549 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -215,6 +215,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)
@@ -236,6 +241,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 {
@@ -277,11 +290,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;
@@ -344,6 +363,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,