[alsa-devel] [RFC 5/9] ASoC: hda: Add dsp loader ops

Vinod Koul vinod.koul at intel.com
Fri Apr 17 15:16:03 CEST 2015


From: "Subhransu S. Prusty" <subhransu.s.prusty at intel.com>

This will be assigned with the required bus io ops.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty at intel.com>
Signed-off-by: Vinod Koul <vinod.koul at intel.com>
---
 include/sound/soc-hda-sst-dsp.h |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/include/sound/soc-hda-sst-dsp.h b/include/sound/soc-hda-sst-dsp.h
index 4a89c3dda5ab..3d8b0c065002 100644
--- a/include/sound/soc-hda-sst-dsp.h
+++ b/include/sound/soc-hda-sst-dsp.h
@@ -138,12 +138,28 @@ struct ssth_window {
 	size_t w1_size;
 };
 
+struct ssth_dsp_loader_ops {
+	int (*init)(struct device *dev);
+	int (*prepare)(struct device *dev, unsigned int format,
+				unsigned int byte_size,
+				struct snd_dma_buffer *bufp);
+	void (*trigger)(struct device *dev, bool start);
+
+	void (*cleanup)(struct device *dev,
+				 struct snd_dma_buffer *dmab);
+	int (*alloc_dma_buf)(struct device *dev,
+		struct snd_dma_buffer *dmab, u32 size);
+	int (*free_dma_buf)(struct device *dev,
+		struct snd_dma_buffer *dmab);
+};
+
 struct ssth_lib {
 	struct device *dev;
 	struct ssth_ipc *ipc;
 	void __iomem *mmio_base;
 	struct ssth_window window;
 	int irq;
+	struct ssth_dsp_loader_ops  dsp_ops;
 	struct snd_dma_buffer dsp_fw_buf;
 	int sst_state;
 	struct mutex sst_lock;
-- 
1.7.9.5



More information about the Alsa-devel mailing list