]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ASoC: qcom: pass direction to dma allocation
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thu, 28 Jan 2016 13:46:24 +0000 (13:46 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Aug 2017 10:51:38 +0000 (12:51 +0200)
This patch updates the internal dma allocation callbacks to take the
stream direction so that it can allocate channels suitable for that
stream direction. Before the capture support this was not necessary.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
sound/soc/qcom/lpass-apq8016.c
sound/soc/qcom/lpass-ipq806x.c
sound/soc/qcom/lpass.h

index 94efc01020c442087a453489ce7f7e7261cd1716..2d438424b3afd6d92fab7d043df3418dda2c5922 100644 (file)
@@ -133,7 +133,8 @@ static struct snd_soc_dai_driver apq8016_lpass_cpu_dai_driver[] = {
        },
 };
 
-static int apq8016_lpass_alloc_dma_channel(struct lpass_data *drvdata)
+static int apq8016_lpass_alloc_dma_channel(struct lpass_data *drvdata,
+                                          int direction)
 {
        struct lpass_variant *v = drvdata->variant;
        int chan = find_first_zero_bit(&drvdata->rdma_ch_bit_map,
index 7a416795271130113a875cbf5b4fbea70e813cd9..119048c016eca5642039822c5abfea3df79ab78f 100644 (file)
@@ -63,7 +63,7 @@ static struct snd_soc_dai_driver ipq806x_lpass_cpu_dai_driver = {
        .ops    = &asoc_qcom_lpass_cpu_dai_ops,
 };
 
-static int ipq806x_lpass_alloc_dma_channel(struct lpass_data *drvdata)
+static int ipq806x_lpass_alloc_dma_channel(struct lpass_data *drvdata, int dir)
 {
        return IPQ806X_LPAIF_RDMA_CHAN_MI2S;
 }
index 7c3367f98f878663e7f5e48ba03b04d117021e64..30449f3d1fe8dee80e1f288c23abd299b871cbe6 100644 (file)
@@ -83,7 +83,7 @@ struct lpass_variant {
        /* SOC specific intialization like clocks */
        int (*init)(struct platform_device *pdev);
        int (*exit)(struct platform_device *pdev);
-       int (*alloc_dma_channel)(struct lpass_data *data);
+       int (*alloc_dma_channel)(struct lpass_data *data, int direction);
        int (*free_dma_channel)(struct lpass_data *data, int ch);
 
        /* SOC specific dais */