diff options
Diffstat (limited to 'sound/soc/mid-x86/sst_platform.h')
-rw-r--r-- | sound/soc/mid-x86/sst_platform.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/sound/soc/mid-x86/sst_platform.h b/sound/soc/mid-x86/sst_platform.h index f04f4f72daa0..d61c5d514ffa 100644 --- a/sound/soc/mid-x86/sst_platform.h +++ b/sound/soc/mid-x86/sst_platform.h | |||
@@ -27,6 +27,8 @@ | |||
27 | #ifndef __SST_PLATFORMDRV_H__ | 27 | #ifndef __SST_PLATFORMDRV_H__ |
28 | #define __SST_PLATFORMDRV_H__ | 28 | #define __SST_PLATFORMDRV_H__ |
29 | 29 | ||
30 | #include "sst_dsp.h" | ||
31 | |||
30 | #define SST_MONO 1 | 32 | #define SST_MONO 1 |
31 | #define SST_STEREO 2 | 33 | #define SST_STEREO 2 |
32 | #define SST_MAX_CAP 5 | 34 | #define SST_MAX_CAP 5 |
@@ -42,7 +44,6 @@ | |||
42 | #define SST_MIN_PERIODS 2 | 44 | #define SST_MIN_PERIODS 2 |
43 | #define SST_MAX_PERIODS (1024*2) | 45 | #define SST_MAX_PERIODS (1024*2) |
44 | #define SST_FIFO_SIZE 0 | 46 | #define SST_FIFO_SIZE 0 |
45 | #define SST_CODEC_TYPE_PCM 1 | ||
46 | 47 | ||
47 | struct pcm_stream_info { | 48 | struct pcm_stream_info { |
48 | int str_id; | 49 | int str_id; |
@@ -83,6 +84,7 @@ enum sst_audio_device_type { | |||
83 | SND_SST_DEVICE_VIBRA, | 84 | SND_SST_DEVICE_VIBRA, |
84 | SND_SST_DEVICE_HAPTIC, | 85 | SND_SST_DEVICE_HAPTIC, |
85 | SND_SST_DEVICE_CAPTURE, | 86 | SND_SST_DEVICE_CAPTURE, |
87 | SND_SST_DEVICE_COMPRESS, | ||
86 | }; | 88 | }; |
87 | 89 | ||
88 | /* PCM Parameters */ | 90 | /* PCM Parameters */ |
@@ -107,6 +109,24 @@ struct sst_stream_params { | |||
107 | struct sst_pcm_params sparams; | 109 | struct sst_pcm_params sparams; |
108 | }; | 110 | }; |
109 | 111 | ||
112 | struct sst_compress_cb { | ||
113 | void *param; | ||
114 | void (*compr_cb)(void *param); | ||
115 | }; | ||
116 | |||
117 | struct compress_sst_ops { | ||
118 | const char *name; | ||
119 | int (*open) (struct snd_sst_params *str_params, | ||
120 | struct sst_compress_cb *cb); | ||
121 | int (*control) (unsigned int cmd, unsigned int str_id); | ||
122 | int (*tstamp) (unsigned int str_id, struct snd_compr_tstamp *tstamp); | ||
123 | int (*ack) (unsigned int str_id, unsigned long bytes); | ||
124 | int (*close) (unsigned int str_id); | ||
125 | int (*get_caps) (struct snd_compr_caps *caps); | ||
126 | int (*get_codec_caps) (struct snd_compr_codec_caps *codec); | ||
127 | |||
128 | }; | ||
129 | |||
110 | struct sst_ops { | 130 | struct sst_ops { |
111 | int (*open) (struct sst_stream_params *str_param); | 131 | int (*open) (struct sst_stream_params *str_param); |
112 | int (*device_control) (int cmd, void *arg); | 132 | int (*device_control) (int cmd, void *arg); |
@@ -115,8 +135,11 @@ struct sst_ops { | |||
115 | 135 | ||
116 | struct sst_runtime_stream { | 136 | struct sst_runtime_stream { |
117 | int stream_status; | 137 | int stream_status; |
138 | unsigned int id; | ||
139 | size_t bytes_written; | ||
118 | struct pcm_stream_info stream_info; | 140 | struct pcm_stream_info stream_info; |
119 | struct sst_ops *ops; | 141 | struct sst_ops *ops; |
142 | struct compress_sst_ops *compr_ops; | ||
120 | spinlock_t status_lock; | 143 | spinlock_t status_lock; |
121 | }; | 144 | }; |
122 | 145 | ||
@@ -124,6 +147,7 @@ struct sst_device { | |||
124 | char *name; | 147 | char *name; |
125 | struct device *dev; | 148 | struct device *dev; |
126 | struct sst_ops *ops; | 149 | struct sst_ops *ops; |
150 | struct compress_sst_ops *compr_ops; | ||
127 | }; | 151 | }; |
128 | 152 | ||
129 | int sst_register_dsp(struct sst_device *sst); | 153 | int sst_register_dsp(struct sst_device *sst); |