summaryrefslogtreecommitdiff
path: root/sound/soc/qcom/qdsp6/q6afe.c
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2020-06-12 15:37:10 +0300
committerMark Brown <broonie@kernel.org>2020-06-15 17:18:31 +0300
commit4a95737440d426e93441d49d11abf4c6526d4666 (patch)
tree75944b95729dfe9bd44ebf94ae2771ff324e67cb /sound/soc/qcom/qdsp6/q6afe.c
parent96bf62f018f40cb5d4e4bed95e50fd990a2354af (diff)
downloadlinux-4a95737440d426e93441d49d11abf4c6526d4666.tar.xz
ASoc: q6afe: add support to get port direction
This patch adds support to q6afe_is_rx_port() to get direction of DSP BE dai port, this is useful for setting dailink directions correctly. Fixes: c25e295cd77b (ASoC: qcom: Add support to parse common audio device nodes) Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20200612123711.29130-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom/qdsp6/q6afe.c')
-rw-r--r--sound/soc/qcom/qdsp6/q6afe.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index e0945f7a58c8..0ce4eb60f984 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -800,6 +800,14 @@ int q6afe_get_port_id(int index)
}
EXPORT_SYMBOL_GPL(q6afe_get_port_id);
+int q6afe_is_rx_port(int index)
+{
+ if (index < 0 || index >= AFE_PORT_MAX)
+ return -EINVAL;
+
+ return port_maps[index].is_rx;
+}
+EXPORT_SYMBOL_GPL(q6afe_is_rx_port);
static int afe_apr_send_pkt(struct q6afe *afe, struct apr_pkt *pkt,
struct q6afe_port *port)
{