diff options
author | Mark Brown <broonie@kernel.org> | 2022-01-25 10:17:37 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-01-25 10:17:37 +0000 |
commit | e6ec5a3936ee0c01f46e1d09dc758bb762e06dd9 (patch) | |
tree | bc3fc6e48c2b660dea2a774cbb6461588be125ce /sound | |
parent | d2fe7fc51fc326368ab052247f3e1070858f3393 (diff) | |
parent | 6045ffd366283236f0de79c8a0e98ae766e9a8f9 (diff) |
ASoC: fsl-asoc-card: Add optional dt property for setting mclk-id
Merge series from Ariel D'Alessandro <ariel.dalessandro@collabora.com>:
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.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tlv320aic31xx.c | 2 | ||||
-rw-r--r-- | sound/soc/fsl/fsl-asoc-card.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index e77342aff46d..8331dc26bcd2 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c @@ -32,7 +32,7 @@ #include <sound/soc.h> #include <sound/initval.h> #include <sound/tlv.h> -#include <dt-bindings/sound/tlv320aic31xx-micbias.h> +#include <dt-bindings/sound/tlv320aic31xx.h> #include "tlv320aic31xx.h" diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 5ee945505281..370bc790c6ba 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -637,7 +637,6 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->dai_link[2].dpcm_capture = 0; priv->cpu_priv.sysclk_dir[TX] = SND_SOC_CLOCK_OUT; priv->cpu_priv.sysclk_dir[RX] = SND_SOC_CLOCK_OUT; - priv->codec_priv.mclk_id = AIC31XX_PLL_CLKIN_BCLK; priv->card.dapm_routes = audio_map_tx; priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_tx); } else if (of_device_is_compatible(np, "fsl,imx-audio-wm8962")) { @@ -693,6 +692,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) 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. */ snd_soc_daifmt_parse_clock_provider_as_phandle(np, NULL, &bitclkprovider, &frameprovider); if (bitclkprovider || frameprovider) { |