diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2020-03-17 09:26:45 +0000 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-03-20 19:35:40 +0530 |
commit | 39ec6f992131f0e88910700286d83f5f48f4ee8f (patch) | |
tree | e7e771f3a3a764a917791504b773cccc204d3102 /drivers/soundwire | |
parent | 1ce7139436603dda9e155df0c3e275c87a725761 (diff) | |
download | linux-stable-39ec6f992131f0e88910700286d83f5f48f4ee8f.tar.gz linux-stable-39ec6f992131f0e88910700286d83f5f48f4ee8f.tar.bz2 linux-stable-39ec6f992131f0e88910700286d83f5f48f4ee8f.zip |
soundwire: qcom: add support for get_sdw_stream()
Adding support to new get_sdw_stream() that can help machine
driver to deal with soundwire stream.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200317092645.5705-1-srinivas.kandagatla@linaro.org
[fix checkpatch error for "void * qcom_swrm_get_sdw_stream"]
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r-- | drivers/soundwire/qcom.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 1c6c6a2e0def..1ab3ec799c23 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -588,6 +588,13 @@ static int qcom_swrm_set_sdw_stream(struct snd_soc_dai *dai, return 0; } +static void *qcom_swrm_get_sdw_stream(struct snd_soc_dai *dai, int direction) +{ + struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dai->dev); + + return ctrl->sruntime[dai->id]; +} + static int qcom_swrm_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { @@ -631,6 +638,7 @@ static const struct snd_soc_dai_ops qcom_swrm_pdm_dai_ops = { .startup = qcom_swrm_startup, .shutdown = qcom_swrm_shutdown, .set_sdw_stream = qcom_swrm_set_sdw_stream, + .get_sdw_stream = qcom_swrm_get_sdw_stream, }; static const struct snd_soc_component_driver qcom_swrm_dai_component = { |