]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: qcom: use correct device pointer in dma allocation
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 11 Jan 2016 15:17:23 +0000 (15:17 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 11 Jan 2016 15:29:25 +0000 (15:29 +0000)
commite6141faec50b33e35ad8ac8ba5fd5cb94acde9fa
tree6b6008c8d6bc0948ec2a9522ca59e5c2cf1b2fdd
parent837e0eb1c9d194f0eb3cf87d97b2235de146c9fe
ASoC: qcom: use correct device pointer in dma allocation

dev pointer in struct snd_soc_pcm_runtime does not have dma_ops set. In
v4.4 kernel dma_ops would end up pointing to dummy_dma_ops in such cases.
So attempting to use such device in allocating coherent memory on aarch64
would fail.

According to commit d087ab11f5b453514d9c532defcda13ba9aa7592 ("arm64:
simplify dma_get_ops") The current behavior of dma_get_ops is to fall
back to the global dma_ops when a device has not set its own dma_ops,
but only for DT based systems.

So, this patch fixes the driver to use correct device pointer while
allocating coherent memory, and also deletes un-necessary dma_mask setup
on soc_runtime->dev.

Without this patch lpass driver would fail with below log:
...
[    6.541542]  ADV7533: lpass_platform_alloc_buffer: Could not allocate DMA buffer
[    6.541914] apq8016-lpass-cpu 7708000.lpass-cpu: ASoC: pcm constructor failed: -12
[    6.548216] qcom-apq8016-sbc 7702000.sound: ASoC: can't create pcm ADV7533 :-12
[    6.555581] qcom-apq8016-sbc 7702000.sound: ASoC: failed to instantiate card -12
[    6.566072] qcom-apq8016-sbc: probe of 7702000.sound failed with error -12
...

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/lpass-platform.c