summaryrefslogtreecommitdiffstats
path: root/include/sound/hdaudio_ext.h
diff options
context:
space:
mode:
authorJeeja KP <jeeja.kp@intel.com>2015-06-11 14:11:49 +0530
committerTakashi Iwai <tiwai@suse.de>2015-06-11 11:59:22 +0200
commitdf203a4e46f4cd8cd9f58e926bea462006f9b3a6 (patch)
tree8b11f918530e8419c0c4948bc496db2608799306 /include/sound/hdaudio_ext.h
parent0b00a5615dc40c3231e4386f08db1d171872c40a (diff)
downloadop-kernel-dev-df203a4e46f4cd8cd9f58e926bea462006f9b3a6.zip
op-kernel-dev-df203a4e46f4cd8cd9f58e926bea462006f9b3a6.tar.gz
ALSA: hdac_ext: add extended stream capabilities
Now we have the bus and controller code added to find and initialize the extended capabilities. Now we need to use them in stream code to decouple stream, manage links etc So this patch adds the stream handling code for extended capabilities introduced in preceding patches Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/hdaudio_ext.h')
-rw-r--r--include/sound/hdaudio_ext.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h
index 89683a8..0044caa 100644
--- a/include/sound/hdaudio_ext.h
+++ b/include/sound/hdaudio_ext.h
@@ -57,6 +57,50 @@ enum hdac_ext_stream_type {
HDAC_EXT_STREAM_TYPE_LINK
};
+/**
+ * hdac_ext_stream: HDAC extended stream for extended HDA caps
+ *
+ * @hstream: hdac_stream
+ * @pphc_addr: processing pipe host stream pointer
+ * @pplc_addr: processing pipe link stream pointer
+ * @decoupled: stream host and link is decoupled
+ * @link_locked: link is locked
+ * @link_prepared: link is prepared
+ * link_substream: link substream
+ */
+struct hdac_ext_stream {
+ struct hdac_stream hstream;
+
+ void __iomem *pphc_addr;
+ void __iomem *pplc_addr;
+
+ bool decoupled:1;
+ bool link_locked:1;
+ bool link_prepared;
+
+ struct snd_pcm_substream *link_substream;
+};
+
+#define hdac_stream(s) (&(s)->hstream)
+#define stream_to_hdac_ext_stream(s) \
+ container_of(s, struct hdac_ext_stream, hstream)
+
+void snd_hdac_ext_stream_init(struct hdac_ext_bus *bus,
+ struct hdac_ext_stream *stream, int idx,
+ int direction, int tag);
+struct hdac_ext_stream *snd_hdac_ext_stream_assign(struct hdac_ext_bus *bus,
+ struct snd_pcm_substream *substream,
+ int type);
+void snd_hdac_ext_stream_release(struct hdac_ext_stream *azx_dev, int type);
+void snd_hdac_ext_stream_decouple(struct hdac_ext_bus *bus,
+ struct hdac_ext_stream *azx_dev, bool decouple);
+void snd_hdac_ext_stop_streams(struct hdac_ext_bus *sbus);
+
+void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream);
+void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream);
+void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hstream);
+int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream *stream, int fmt);
+
struct hdac_ext_link {
struct hdac_bus *bus;
int index;
@@ -78,4 +122,8 @@ void snd_hdac_ext_link_clear_stream_id(struct hdac_ext_link *link,
writel(((readl(addr + reg) & ~(mask)) | (val)), \
addr + reg)
+#define snd_hdac_updatew(addr, reg, mask, val) \
+ writew(((readw(addr + reg) & ~(mask)) | (val)), \
+ addr + reg)
+
#endif /* __SOUND_HDAUDIO_EXT_H */
OpenPOWER on IntegriCloud