Commit 91e4e40b authored by Ariel D'Alessandro's avatar Ariel D'Alessandro Committed by Mark Brown

ASoC: fsl-asoc-card: Add optional dt property for setting mclk-id

Sound cards may allow using different main clock inputs. In the generic
fsl-asoc-card driver, these values are hardcoded for each specific card
configuration.

Let's make it more flexible, allowing setting mclk-id from the
device-tree node. Otherwise, the default value for each card
configuration is used.
Signed-off-by: default avatarAriel D'Alessandro <ariel.dalessandro@collabora.com>
Link: https://lore.kernel.org/r/20220117132109.283365-5-ariel.dalessandro@collabora.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 55915f20
...@@ -693,6 +693,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) ...@@ -693,6 +693,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
goto asrc_fail; goto asrc_fail;
} }
/*
* Allow setting mclk-id from the device-tree node. Otherwise, the
* default value for each card configuration is used.
*/
of_property_read_u32(np, "mclk-id", &priv->codec_priv.mclk_id);
/* Format info from DT is optional. */ /* Format info from DT is optional. */
snd_soc_daifmt_parse_clock_provider_as_phandle(np, NULL, &bitclkprovider, &frameprovider); snd_soc_daifmt_parse_clock_provider_as_phandle(np, NULL, &bitclkprovider, &frameprovider);
if (bitclkprovider || frameprovider) { if (bitclkprovider || frameprovider) {
......
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