|
|
@@ -835,6 +835,10 @@ static int snd_compr_next_track(struct snd_compr_stream *stream)
|
|
|
if (stream->runtime->state != SNDRV_PCM_STATE_RUNNING)
|
|
|
return -EPERM;
|
|
|
|
|
|
+ /* next track doesn't have any meaning for capture streams */
|
|
|
+ if (stream->direction == SND_COMPRESS_CAPTURE)
|
|
|
+ return -EPERM;
|
|
|
+
|
|
|
/* you can signal next track if this is intended to be a gapless stream
|
|
|
* and current track metadata is set
|
|
|
*/
|
|
|
@@ -862,6 +866,10 @@ static int snd_compr_partial_drain(struct snd_compr_stream *stream)
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+ /* partial drain doesn't have any meaning for capture streams */
|
|
|
+ if (stream->direction == SND_COMPRESS_CAPTURE)
|
|
|
+ return -EPERM;
|
|
|
+
|
|
|
/* stream can be drained only when next track has been signalled */
|
|
|
if (stream->next_track == false)
|
|
|
return -EPERM;
|