From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Vinod Koul <vkoul@kernel.org>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Sanyog Kale <sanyog.r.kale@intel.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Banajit Goswami <bgoswami@quicinc.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] ASoC: codecs: wsa884x: check if set_stream is called for proper bus
Date: Wed, 25 Oct 2023 10:03:09 -0500 [thread overview]
Message-ID: <8b9db87b-0f61-4824-acf1-6b5ebdf45e63@linux.intel.com> (raw)
In-Reply-To: <20231025144601.268645-3-krzysztof.kozlowski@linaro.org>
On 10/25/23 09:46, Krzysztof Kozlowski wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>
> If multiple WSA8840 speakers, from two separate Soundwire buses, are
> used in one codec DAI link, the set_stream() should ignore calls for
> setting stream from other Soundwire controller.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Co-developed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> sound/soc/codecs/wsa884x.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/sound/soc/codecs/wsa884x.c b/sound/soc/codecs/wsa884x.c
> index bee6e763c700..91205e8c96f1 100644
> --- a/sound/soc/codecs/wsa884x.c
> +++ b/sound/soc/codecs/wsa884x.c
> @@ -1775,6 +1775,12 @@ static int wsa884x_set_stream(struct snd_soc_dai *dai,
> void *stream, int direction)
> {
> struct wsa884x_priv *wsa884x = dev_get_drvdata(dai->dev);
> + struct sdw_stream_runtime *sruntime = stream;
> + struct sdw_slave *sdw = dev_to_sdw_dev(dai->dev);
> +
> + /* Check if this belongs to same bus */
> + if (sdw->bus->dev != sruntime->dev)
> + return 0;
Sorry, maybe I am really thick or need coffee, but I can't figure out
why this is necessary. Each amplifier has its own "wsa884x_priv" context
and should have its own DAI, not following why the set_stream would
mix-up the two dais?
We've been using two buses for two amplifiers since CometLake (2019?)
and I don't see what's different?
>
> wsa884x->sruntime = stream;
>
next prev parent reply other threads:[~2023-10-25 15:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 14:45 [PATCH 1/3] soundwire: qcom: drop unneeded DAI .set_stream callback Krzysztof Kozlowski
2023-10-25 14:46 ` [PATCH 2/3] soundwire: qcom: set owner device of runtime stream Krzysztof Kozlowski
2023-10-25 15:08 ` Pierre-Louis Bossart
2023-10-25 14:46 ` [PATCH 3/3] ASoC: codecs: wsa884x: check if set_stream is called for proper bus Krzysztof Kozlowski
2023-10-25 14:53 ` Krzysztof Kozlowski
2023-10-25 15:03 ` Pierre-Louis Bossart [this message]
2023-11-03 14:16 ` Krzysztof Kozlowski
2023-11-03 15:39 ` Pierre-Louis Bossart
2023-10-25 15:12 ` [PATCH 1/3] soundwire: qcom: drop unneeded DAI .set_stream callback Pierre-Louis Bossart
2023-11-03 13:43 ` Krzysztof Kozlowski
2023-11-03 15:29 ` Pierre-Louis Bossart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8b9db87b-0f61-4824-acf1-6b5ebdf45e63@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=agross@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=andersson@kernel.org \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sanyog.r.kale@intel.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).