diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-09-05 13:52:16 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-09-05 13:52:16 -0400 |
commit | 85488037bb9b533b064be66412dbe1dbcd2734d9 (patch) | |
tree | 844445f441b716130aaa4ba08d02a8ec3ba04e72 /sound/soc/soc-core.c | |
parent | 367da1527aff2a4f789d03082f9fb191cdf332c4 (diff) |
ASoC: Add source argument to PLL configuration
More and more devices feature PLLs and FLLs with the ability to select
between multiple input clocks. In order to better support these devices
a new argument, source, has been added to the set_pll() configuration
API. Using set_clkdiv() is often difficult due to the need to stop the
PLL/FLL before any reconfiguration can be done.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 7ff04ad2a97e..05fdc8023da4 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -2197,16 +2197,18 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_clkdiv); | |||
2197 | * snd_soc_dai_set_pll - configure DAI PLL. | 2197 | * snd_soc_dai_set_pll - configure DAI PLL. |
2198 | * @dai: DAI | 2198 | * @dai: DAI |
2199 | * @pll_id: DAI specific PLL ID | 2199 | * @pll_id: DAI specific PLL ID |
2200 | * @source: DAI specific source for the PLL | ||
2200 | * @freq_in: PLL input clock frequency in Hz | 2201 | * @freq_in: PLL input clock frequency in Hz |
2201 | * @freq_out: requested PLL output clock frequency in Hz | 2202 | * @freq_out: requested PLL output clock frequency in Hz |
2202 | * | 2203 | * |
2203 | * Configures and enables PLL to generate output clock based on input clock. | 2204 | * Configures and enables PLL to generate output clock based on input clock. |
2204 | */ | 2205 | */ |
2205 | int snd_soc_dai_set_pll(struct snd_soc_dai *dai, | 2206 | int snd_soc_dai_set_pll(struct snd_soc_dai *dai, int pll_id, int source, |
2206 | int pll_id, unsigned int freq_in, unsigned int freq_out) | 2207 | unsigned int freq_in, unsigned int freq_out) |
2207 | { | 2208 | { |
2208 | if (dai->ops && dai->ops->set_pll) | 2209 | if (dai->ops && dai->ops->set_pll) |
2209 | return dai->ops->set_pll(dai, pll_id, freq_in, freq_out); | 2210 | return dai->ops->set_pll(dai, pll_id, source, |
2211 | freq_in, freq_out); | ||
2210 | else | 2212 | else |
2211 | return -EINVAL; | 2213 | return -EINVAL; |
2212 | } | 2214 | } |