Merge branch 'android-4.14-p' into android-exynos-4.14-ww-9610-minor_up-dev
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / include / sound / compress_driver.h
index 9924bc9cbc7c26ea3cdb82478f66bad6ab45be18..f957dc5ce82cad767934c64473017a9b83025115 100644 (file)
@@ -132,6 +132,8 @@ struct snd_compr_ops {
                        struct snd_compr_caps *caps);
        int (*get_codec_caps) (struct snd_compr_stream *stream,
                        struct snd_compr_codec_caps *codec);
+       int (*get_hw_params)(struct snd_compr_stream *stream,
+                        struct snd_pcm_hw_params *params);
 };
 
 /**
@@ -186,7 +188,11 @@ static inline void snd_compr_drain_notify(struct snd_compr_stream *stream)
        if (snd_BUG_ON(!stream))
                return;
 
-       stream->runtime->state = SNDRV_PCM_STATE_SETUP;
+       if (stream->direction == SND_COMPRESS_PLAYBACK)
+               stream->runtime->state = SNDRV_PCM_STATE_SETUP;
+       else
+               stream->runtime->state = SNDRV_PCM_STATE_PREPARED;
+
        wake_up(&stream->runtime->sleep);
 }