diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 65ff61211a8..db3075dd11f 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -505,6 +505,16 @@ static int soc_pcm_apply_symmetry(struct snd_pcm_substream *substream) !rtd->dai_link->symmetric_rates) return 0; + /* This can happen if multiple streams are starting simultaneously - + * the second can need to get its constraints before the first has + * picked a rate. Complain and allow the application to carry on. + */ + if (!rtd->rate) { + dev_warn(&rtd->dev, + "Not enforcing symmetric_rates due to race\n"); + return 0; + } + dev_dbg(&rtd->dev, "Symmetry forces %dHz rate\n", rtd->rate); ret = snd_pcm_hw_constraint_minmax(substream->runtime, |