ALSA: compress: allow setting codec params after next track
[sfrench/cifs-2.6.git] / sound / core / compress_offload.c
index 243acad89fd3bc01d6171c56779ee7699560891f..30f73097447ba89a6a550357003605eaaf8dab4d 100644 (file)
@@ -589,7 +589,7 @@ snd_compr_set_params(struct snd_compr_stream *stream, unsigned long arg)
        struct snd_compr_params *params;
        int retval;
 
-       if (stream->runtime->state == SNDRV_PCM_STATE_OPEN) {
+       if (stream->runtime->state == SNDRV_PCM_STATE_OPEN || stream->next_track) {
                /*
                 * we should allow parameter change only when stream has been
                 * opened not in other cases
@@ -612,6 +612,9 @@ snd_compr_set_params(struct snd_compr_stream *stream, unsigned long arg)
                if (retval)
                        goto out;
 
+               if (stream->next_track)
+                       goto out;
+
                stream->metadata_set = false;
                stream->next_track = false;