@@ -721,13 +721,18 @@ static void graph_link_init(struct asoc_simple_priv *priv,
if (of_node_name_eq(ports, "ports"))
graph_parse_daifmt(ports, &daifmt, &bit_frame); /* (A) */
+ if (of_property_read_bool(ep, "symmetric-clock-roles") ||
+ of_property_read_bool(port, "symmetric-clock-roles") ||
+ of_property_read_bool(ports, "symmetric-clock-roles"))
+ dai_link->symmetric_clock_roles = 1;
+
/*
* convert bit_frame
* We need to flip clock_provider if it was CPU node,
* because it is Codec base.
*/
daiclk = snd_soc_daifmt_clock_provider_from_bitmap(bit_frame);
- if (is_cpu_node)
+ if (is_cpu_node && !dai_link->symmetric_clock_roles)
daiclk = snd_soc_daifmt_clock_provider_flipped(daiclk);
dai_link->dai_fmt = daifmt | daiclk;