static int asoc_simple_card_parse_links(struct device_node *np,
struct asoc_simple_card_priv *priv,
+ unsigned int daifmt,
int idx, bool is_fe)
{
struct device *dev = simple_priv_to_dev(priv);
if (ret < 0)
return ret;
+ dai_link->dai_fmt = daifmt;
dai_link->dpcm_playback = 1;
dai_link->dpcm_capture = 1;
dai_link->ops = &asoc_simple_card_ops;
struct asoc_simple_card_priv *priv)
{
struct device *dev = simple_priv_to_dev(priv);
- struct snd_soc_dai_link *dai_link;
struct device_node *np;
unsigned int daifmt = 0;
int ret, i;
i = 0;
for_each_child_of_node(node, np) {
- dai_link = simple_priv_to_link(priv, i);
- dai_link->dai_fmt = daifmt;
-
is_fe = false;
if (strcmp(np->name, PREFIX "cpu") == 0)
is_fe = true;
- ret = asoc_simple_card_parse_links(np, priv, i, is_fe);
+ ret = asoc_simple_card_parse_links(np, priv, daifmt, i, is_fe);
if (ret < 0)
return ret;
i++;