]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ASoC: qcom: use correct device pointer in dma allocation
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 11 Jan 2016 14:36:00 +0000 (14:36 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 13 Apr 2018 14:00:33 +0000 (16:00 +0200)
commit9b3318697040df906759e8c399bb8368235c1b18
tree4988954cd01e35b256ba3701912da21b5c45be09
parentf3645b324c3d9ea785268e212c19960a4d15aa8a
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 1dccb598df549d892b6450c261da54cdd7af44b4 ("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>
sound/soc/qcom/lpass-platform.c