diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-07-03 13:51:26 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-07-03 13:51:31 +0300 |
commit | 51d7d35817aad6f4dd0f60b80063206f1761b69b (patch) | |
tree | 3401cc1ba9125e9796ea6075ea493b6031e50d74 /include/sound/hdaudio.h | |
parent | 1259d239799bf9c898091d92adc4317f2c3d74ad (diff) | |
parent | cb04ba33187ca571142b67c2fb60d0a8c24994c8 (diff) | |
download | linux-51d7d35817aad6f4dd0f60b80063206f1761b69b.tar.xz |
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.h | 29 |
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, |