Commit dd82410f authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: simple-card: tidyup convert_rate/channel method

Current simple-card is handling "convert_rate/channel"
by many ways. But, it is not useful and readable.
We want to do is that allow having it everywere.
This patch support it.
It will be overwrote if lower node has it.

sound {
	simple-audio-card,convert_channels = <xxx>; // initial

	simple-audio-card,dai-link {
		convert_channels = <xxx>; // overwrite
		cpu {
			convert_channels = <xxx>; // overwrite
		};
		codec {
			convert_channels = <xxx>; // overwrite
		};
	};
};
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 79e83491
......@@ -30,7 +30,6 @@ struct simple_card_data {
struct asoc_simple_jack mic_jack;
struct snd_soc_dai_link *dai_link;
struct asoc_simple_dai *dais;
struct asoc_simple_card_data adata;
struct snd_soc_codec_conf *codec_conf;
};
......@@ -163,9 +162,6 @@ static int asoc_simple_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
asoc_simple_card_convert_fixup(&dai_props->adata, params);
/* overwrite by top level adata if exist */
asoc_simple_card_convert_fixup(&priv->adata, params);
return 0;
}
......@@ -267,7 +263,9 @@ static int asoc_simple_card_dai_link_of_dpcm(struct device_node *top,
"prefix");
}
asoc_simple_card_parse_convert(dev, top, PREFIX, &dai_props->adata);
asoc_simple_card_parse_convert(dev, node, prefix, &dai_props->adata);
asoc_simple_card_parse_convert(dev, np, NULL, &dai_props->adata);
ret = asoc_simple_card_of_parse_tdm(np, dai);
if (ret)
......@@ -460,8 +458,6 @@ static int asoc_simple_card_parse_of(struct simple_card_data *priv)
if (ret < 0)
return ret;
asoc_simple_card_parse_convert(dev, top, PREFIX, &priv->adata);
/* Single/Muti DAI link(s) & New style of DT node */
loop = 1;
link_idx = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment