@@ -718,6 +718,9 @@ struct snd_soc_dai_link {
/* Keep DAI active over suspend */
unsigned int ignore_suspend:1;
+ /* Assume CPU/Codec have the same clock consumer/provider role */
+ unsigned int symmetric_clock_roles:1;
+
/* Symmetry requirements */
unsigned int symmetric_rate:1;
unsigned int symmetric_channels:1;
@@ -1216,6 +1216,7 @@ static void snd_soc_runtime_get_dai_fmt(struct snd_soc_pcm_runtime *rtd)
int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
unsigned int dai_fmt)
{
+ struct snd_soc_dai_link *dai_link = rtd->dai_link;
struct snd_soc_dai *cpu_dai;
struct snd_soc_dai *codec_dai;
unsigned int i;
@@ -1231,7 +1232,8 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
}
/* Flip the polarity for the "CPU" end of link */
- dai_fmt = snd_soc_daifmt_clock_provider_flipped(dai_fmt);
+ if (!dai_link->symmetric_clock_roles)
+ dai_fmt = snd_soc_daifmt_clock_provider_flipped(dai_fmt);
for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
ret = snd_soc_dai_set_fmt(cpu_dai, dai_fmt);