Commit 4a957374 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Mark Brown

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: c25e295c (ASoC: qcom: Add support to parse common audio device nodes)
Reported-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: default avatarVinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200612123711.29130-1-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 96bf62f0
...@@ -800,6 +800,14 @@ int q6afe_get_port_id(int index) ...@@ -800,6 +800,14 @@ int q6afe_get_port_id(int index)
} }
EXPORT_SYMBOL_GPL(q6afe_get_port_id); 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, static int afe_apr_send_pkt(struct q6afe *afe, struct apr_pkt *pkt,
struct q6afe_port *port) struct q6afe_port *port)
{ {
......
...@@ -198,6 +198,7 @@ int q6afe_port_start(struct q6afe_port *port); ...@@ -198,6 +198,7 @@ int q6afe_port_start(struct q6afe_port *port);
int q6afe_port_stop(struct q6afe_port *port); int q6afe_port_stop(struct q6afe_port *port);
void q6afe_port_put(struct q6afe_port *port); void q6afe_port_put(struct q6afe_port *port);
int q6afe_get_port_id(int index); int q6afe_get_port_id(int index);
int q6afe_is_rx_port(int index);
void q6afe_hdmi_port_prepare(struct q6afe_port *port, void q6afe_hdmi_port_prepare(struct q6afe_port *port,
struct q6afe_hdmi_cfg *cfg); struct q6afe_hdmi_cfg *cfg);
void q6afe_slim_port_prepare(struct q6afe_port *port, void q6afe_slim_port_prepare(struct q6afe_port *port,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment