Merge branch 'asoc-5.3' into asoc-5.4
[linux-2.6-microblaze.git] / sound / soc / rockchip / rockchip_max98090.c
index 7b0c21f..0097df1 100644 (file)
@@ -137,8 +137,19 @@ static int rk_aif1_hw_params(struct snd_pcm_substream *substream,
        return ret;
 }
 
+static int rk_aif1_startup(struct snd_pcm_substream *substream)
+{
+       /*
+        * Set period size to 240 because pl330 has issue
+        * dealing with larger period in stress testing.
+        */
+       return snd_pcm_hw_constraint_minmax(substream->runtime,
+                       SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 240, 240);
+}
+
 static const struct snd_soc_ops rk_aif1_ops = {
        .hw_params = rk_aif1_hw_params,
+       .startup = rk_aif1_startup,
 };
 
 SND_SOC_DAILINK_DEFS(hifi,