diff options
Diffstat (limited to 'drivers/media/platform/vimc')
-rw-r--r-- | drivers/media/platform/vimc/vimc-streamer.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/platform/vimc/vimc-streamer.c b/drivers/media/platform/vimc/vimc-streamer.c index 236ade38f1da..3b3f36357a0e 100644 --- a/drivers/media/platform/vimc/vimc-streamer.c +++ b/drivers/media/platform/vimc/vimc-streamer.c | |||
@@ -122,6 +122,14 @@ static int vimc_streamer_pipeline_init(struct vimc_stream *stream, | |||
122 | return -EINVAL; | 122 | return -EINVAL; |
123 | } | 123 | } |
124 | 124 | ||
125 | /* | ||
126 | * vimc_streamer_thread - process frames through the pipeline | ||
127 | * | ||
128 | * @data: vimc_stream struct of the current stream | ||
129 | * | ||
130 | * From the source to the sink, gets a frame from each subdevice and send to | ||
131 | * the next one of the pipeline at a fixed framerate. | ||
132 | */ | ||
125 | static int vimc_streamer_thread(void *data) | 133 | static int vimc_streamer_thread(void *data) |
126 | { | 134 | { |
127 | struct vimc_stream *stream = data; | 135 | struct vimc_stream *stream = data; |
@@ -149,6 +157,20 @@ static int vimc_streamer_thread(void *data) | |||
149 | return 0; | 157 | return 0; |
150 | } | 158 | } |
151 | 159 | ||
160 | /* | ||
161 | * vimc_streamer_s_stream - start/stop the streaming on the media pipeline | ||
162 | * | ||
163 | * @stream: the pointer to the stream structure of the current stream | ||
164 | * @ved: pointer to the vimc entity of the entity of the stream | ||
165 | * @enable: flag to determine if stream should start/stop | ||
166 | * | ||
167 | * When starting, check if there is no stream->kthread allocated. This should | ||
168 | * indicate that a stream is already running. Then, it initializes | ||
169 | * the pipeline, creates and runs a kthread to consume buffers through the | ||
170 | * pipeline. | ||
171 | * When stopping, analogously check if there is a stream running, stop | ||
172 | * the thread and terminates the pipeline. | ||
173 | */ | ||
152 | int vimc_streamer_s_stream(struct vimc_stream *stream, | 174 | int vimc_streamer_s_stream(struct vimc_stream *stream, |
153 | struct vimc_ent_device *ved, | 175 | struct vimc_ent_device *ved, |
154 | int enable) | 176 | int enable) |