summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown2013-10-24 12:24:01 +0200
committerMark Brown2013-10-24 12:24:01 +0200
commitd1c59c87128722d159db1d83bd2b8f2d8a89915f (patch)
treeff329b308fd01a67296beab8f8de6205caacd5a3 /sound/soc/soc-core.c
parentMerge remote-tracking branch 'asoc/topic/atmel' into asoc-next (diff)
parentASoC: core: Add API for configuration of DAI BCLK ratio (diff)
downloadkernel-qcow2-linux-d1c59c87128722d159db1d83bd2b8f2d8a89915f.tar.gz
kernel-qcow2-linux-d1c59c87128722d159db1d83bd2b8f2d8a89915f.tar.xz
kernel-qcow2-linux-d1c59c87128722d159db1d83bd2b8f2d8a89915f.zip
Merge remote-tracking branch 'asoc/topic/bclk' into asoc-next
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1a38be0d0ca8..09e47c1434a7 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3576,6 +3576,22 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
EXPORT_SYMBOL_GPL(snd_soc_codec_set_pll);
/**
+ * snd_soc_dai_set_bclk_ratio - configure BCLK to sample rate ratio.
+ * @dai: DAI
+ * @ratio Ratio of BCLK to Sample rate.
+ *
+ * Configures the DAI for a preset BCLK to sample rate ratio.
+ */
+int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio)
+{
+ if (dai->driver && dai->driver->ops->set_bclk_ratio)
+ return dai->driver->ops->set_bclk_ratio(dai, ratio);
+ else
+ return -EINVAL;
+}
+EXPORT_SYMBOL_GPL(snd_soc_dai_set_bclk_ratio);
+
+/**
* snd_soc_dai_set_fmt - configure DAI hardware audio format.
* @dai: DAI
* @fmt: SND_SOC_DAIFMT_ format value.