diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2015-05-16 13:32:34 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-05-21 21:12:39 +0100 |
commit | 6db1c6ba9544e99778e0fdebe2d62c917fe1811c (patch) | |
tree | 05958b19c51dffdc04e0b5be1b05d298a6160daf /sound/soc/qcom/lpass-ipq806x.c | |
parent | 0ae9fd3b2c99099d5a800057b4092fdaa0e973a7 (diff) | |
download | linux-stable-6db1c6ba9544e99778e0fdebe2d62c917fe1811c.tar.gz linux-stable-6db1c6ba9544e99778e0fdebe2d62c917fe1811c.tar.bz2 linux-stable-6db1c6ba9544e99778e0fdebe2d62c917fe1811c.zip |
ASoC: qcom: remove hardcoded dma channel
This patch removes hardcoded dma channel value in lpass driver, Now the
dma channel allocation happens in the SOC specific layer. This will
allow different LPASS integrations to use the lpass driver in more
generic way.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom/lpass-ipq806x.c')
-rw-r--r-- | sound/soc/qcom/lpass-ipq806x.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/qcom/lpass-ipq806x.c b/sound/soc/qcom/lpass-ipq806x.c index cc5f3b4857eb..2eab828644e8 100644 --- a/sound/soc/qcom/lpass-ipq806x.c +++ b/sound/soc/qcom/lpass-ipq806x.c @@ -63,6 +63,16 @@ static struct snd_soc_dai_driver ipq806x_lpass_cpu_dai_driver = { .ops = &asoc_qcom_lpass_cpu_dai_ops, }; +int ipq806x_lpass_alloc_dma_channel(struct lpass_data *drvdata) +{ + return IPQ806X_LPAIF_RDMA_CHAN_MI2S; +} + +int ipq806x_lpass_free_dma_channel(struct lpass_data *drvdata, int chan) +{ + return 0; +} + struct lpass_variant ipq806x_data = { .i2sctrl_reg_base = 0x0010, .i2sctrl_reg_stride = 0x04, @@ -75,6 +85,8 @@ struct lpass_variant ipq806x_data = { .rdma_channels = 4, .dai_driver = &ipq806x_lpass_cpu_dai_driver, .num_dai = 1, + .alloc_dma_channel = ipq806x_lpass_alloc_dma_channel, + .free_dma_channel = ipq806x_lpass_free_dma_channel, }; static const struct of_device_id ipq806x_lpass_cpu_device_id[] = { |