diff options
Diffstat (limited to 'sound/soc/intel/sst-mfld-platform.h')
-rw-r--r-- | sound/soc/intel/sst-mfld-platform.h | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/sound/soc/intel/sst-mfld-platform.h b/sound/soc/intel/sst-mfld-platform.h index 6c6a42c08e24..19f83ec51613 100644 --- a/sound/soc/intel/sst-mfld-platform.h +++ b/sound/soc/intel/sst-mfld-platform.h | |||
@@ -54,20 +54,6 @@ enum sst_drv_status { | |||
54 | SST_PLATFORM_DROPPED, | 54 | SST_PLATFORM_DROPPED, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | enum sst_controls { | ||
58 | SST_SND_ALLOC = 0x00, | ||
59 | SST_SND_PAUSE = 0x01, | ||
60 | SST_SND_RESUME = 0x02, | ||
61 | SST_SND_DROP = 0x03, | ||
62 | SST_SND_FREE = 0x04, | ||
63 | SST_SND_BUFFER_POINTER = 0x05, | ||
64 | SST_SND_STREAM_INIT = 0x06, | ||
65 | SST_SND_START = 0x07, | ||
66 | SST_SET_BYTE_STREAM = 0x100A, | ||
67 | SST_GET_BYTE_STREAM = 0x100B, | ||
68 | SST_MAX_CONTROLS = SST_GET_BYTE_STREAM, | ||
69 | }; | ||
70 | |||
71 | enum sst_stream_ops { | 57 | enum sst_stream_ops { |
72 | STREAM_OPS_PLAYBACK = 0, | 58 | STREAM_OPS_PLAYBACK = 0, |
73 | STREAM_OPS_CAPTURE, | 59 | STREAM_OPS_CAPTURE, |
@@ -113,24 +99,37 @@ struct sst_compress_cb { | |||
113 | 99 | ||
114 | struct compress_sst_ops { | 100 | struct compress_sst_ops { |
115 | const char *name; | 101 | const char *name; |
116 | int (*open) (struct snd_sst_params *str_params, | 102 | int (*open)(struct device *dev, |
117 | struct sst_compress_cb *cb); | 103 | struct snd_sst_params *str_params, struct sst_compress_cb *cb); |
118 | int (*control) (unsigned int cmd, unsigned int str_id); | 104 | int (*stream_start)(struct device *dev, unsigned int str_id); |
119 | int (*tstamp) (unsigned int str_id, struct snd_compr_tstamp *tstamp); | 105 | int (*stream_drop)(struct device *dev, unsigned int str_id); |
120 | int (*ack) (unsigned int str_id, unsigned long bytes); | 106 | int (*stream_drain)(struct device *dev, unsigned int str_id); |
121 | int (*close) (unsigned int str_id); | 107 | int (*stream_partial_drain)(struct device *dev, unsigned int str_id); |
122 | int (*get_caps) (struct snd_compr_caps *caps); | 108 | int (*stream_pause)(struct device *dev, unsigned int str_id); |
123 | int (*get_codec_caps) (struct snd_compr_codec_caps *codec); | 109 | int (*stream_pause_release)(struct device *dev, unsigned int str_id); |
124 | int (*set_metadata) (unsigned int str_id, | 110 | |
111 | int (*tstamp)(struct device *dev, unsigned int str_id, | ||
112 | struct snd_compr_tstamp *tstamp); | ||
113 | int (*ack)(struct device *dev, unsigned int str_id, | ||
114 | unsigned long bytes); | ||
115 | int (*close)(struct device *dev, unsigned int str_id); | ||
116 | int (*get_caps)(struct snd_compr_caps *caps); | ||
117 | int (*get_codec_caps)(struct snd_compr_codec_caps *codec); | ||
118 | int (*set_metadata)(struct device *dev, unsigned int str_id, | ||
125 | struct snd_compr_metadata *mdata); | 119 | struct snd_compr_metadata *mdata); |
126 | |||
127 | }; | 120 | }; |
128 | 121 | ||
129 | struct sst_ops { | 122 | struct sst_ops { |
130 | int (*open) (struct snd_sst_params *str_param); | 123 | int (*open)(struct device *dev, struct snd_sst_params *str_param); |
131 | int (*device_control) (int cmd, void *arg); | 124 | int (*stream_init)(struct device *dev, struct pcm_stream_info *str_info); |
132 | int (*set_generic_params)(enum sst_controls cmd, void *arg); | 125 | int (*stream_start)(struct device *dev, int str_id); |
133 | int (*close) (unsigned int str_id); | 126 | int (*stream_drop)(struct device *dev, int str_id); |
127 | int (*stream_pause)(struct device *dev, int str_id); | ||
128 | int (*stream_pause_release)(struct device *dev, int str_id); | ||
129 | int (*stream_read_tstamp)(struct device *dev, struct pcm_stream_info *str_info); | ||
130 | int (*send_byte_stream)(struct device *dev, struct snd_sst_bytes_v2 *bytes); | ||
131 | int (*close)(struct device *dev, unsigned int str_id); | ||
132 | int (*power)(struct device *dev, bool state); | ||
134 | }; | 133 | }; |
135 | 134 | ||
136 | struct sst_runtime_stream { | 135 | struct sst_runtime_stream { |
@@ -152,6 +151,8 @@ struct sst_device { | |||
152 | }; | 151 | }; |
153 | 152 | ||
154 | struct sst_data; | 153 | struct sst_data; |
154 | |||
155 | int sst_dsp_init_v2_dpcm(struct snd_soc_platform *platform); | ||
155 | void sst_set_stream_status(struct sst_runtime_stream *stream, int state); | 156 | void sst_set_stream_status(struct sst_runtime_stream *stream, int state); |
156 | int sst_fill_stream_params(void *substream, const struct sst_data *ctx, | 157 | int sst_fill_stream_params(void *substream, const struct sst_data *ctx, |
157 | struct snd_sst_params *str_params, bool is_compress); | 158 | struct snd_sst_params *str_params, bool is_compress); |
@@ -166,6 +167,7 @@ struct sst_algo_int_control_v2 { | |||
166 | struct sst_data { | 167 | struct sst_data { |
167 | struct platform_device *pdev; | 168 | struct platform_device *pdev; |
168 | struct sst_platform_data *pdata; | 169 | struct sst_platform_data *pdata; |
170 | struct snd_sst_bytes_v2 *byte_stream; | ||
169 | struct mutex lock; | 171 | struct mutex lock; |
170 | }; | 172 | }; |
171 | int sst_register_dsp(struct sst_device *sst); | 173 | int sst_register_dsp(struct sst_device *sst); |