summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-11-13 12:10:02 +0530
committerMark Brown <broonie@kernel.org>2016-11-13 09:35:35 +0000
commit2e622ae41e653cd71a6d3bc5a4685b01eacbee8d (patch)
tree2356ab4bf6579ef8c8c4250f0554c1a006bcfe41 /include/sound
parent1001354ca34179f3db924eb66672442a173147dc (diff)
downloadlinux-2e622ae41e653cd71a6d3bc5a4685b01eacbee8d.tar.gz
linux-2e622ae41e653cd71a6d3bc5a4685b01eacbee8d.tar.xz
ASoC: compress: Add support for compress dai ops
ASoC Compress ops have only platform ops and no DAI ops unlike PCM device where we have both platform ops as well as DAI ops. So add compress dai ops and add this new structure to the ASoC core to make compressed devices a first class ASoC citizen Again like PCM ops, drivers are free to implement either or both of these ops based on device needs. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dai.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 964b7de1a1cc..756ee1b78ffc 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -207,6 +207,30 @@ struct snd_soc_dai_ops {
struct snd_soc_dai *);
};
+struct snd_soc_cdai_ops {
+ /*
+ * for compress ops
+ */
+ int (*startup)(struct snd_compr_stream *,
+ struct snd_soc_dai *);
+ int (*shutdown)(struct snd_compr_stream *,
+ struct snd_soc_dai *);
+ int (*set_params)(struct snd_compr_stream *,
+ struct snd_compr_params *, struct snd_soc_dai *);
+ int (*get_params)(struct snd_compr_stream *,
+ struct snd_codec *, struct snd_soc_dai *);
+ int (*set_metadata)(struct snd_compr_stream *,
+ struct snd_compr_metadata *, struct snd_soc_dai *);
+ int (*get_metadata)(struct snd_compr_stream *,
+ struct snd_compr_metadata *, struct snd_soc_dai *);
+ int (*trigger)(struct snd_compr_stream *, int,
+ struct snd_soc_dai *);
+ int (*pointer)(struct snd_compr_stream *,
+ struct snd_compr_tstamp *, struct snd_soc_dai *);
+ int (*ack)(struct snd_compr_stream *, size_t,
+ struct snd_soc_dai *);
+};
+
/*
* Digital Audio Interface Driver.
*
@@ -236,6 +260,7 @@ struct snd_soc_dai_driver {
/* ops */
const struct snd_soc_dai_ops *ops;
+ const struct snd_soc_cdai_ops *cops;
/* DAI capabilities */
struct snd_soc_pcm_stream capture;