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 2/3] soundwire: qcom: set owner device of runtime stream
Date: Wed, 25 Oct 2023 10:08:50 -0500 [thread overview]
Message-ID: <3c6e3877-1bb6-403d-a67e-fdda0aef548e@linux.intel.com> (raw)
In-Reply-To: <20231025144601.268645-2-krzysztof.kozlowski@linaro.org>
On 10/25/23 09:46, Krzysztof Kozlowski wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>
> Store the pointer to struct device of Soundwire controller owning this
> runtime stream. This can be later used by Soundwire devices, to check
> if their DAI prepare callback is called for the same bus, in cases where
> multiple Soundwire buses are used in same soundcard codec list.
>
> 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>
> ---
> drivers/soundwire/qcom.c | 1 +
> include/linux/soundwire/sdw.h | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index fe65c26c5281..a95f39563b47 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -1298,6 +1298,7 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
> goto err_alloc;
> }
>
> + sruntime->dev = ctrl->bus.dev;
> ctrl->sruntime[dai->id] = sruntime;
>
> for_each_rtd_codec_dais(rtd, i, codec_dai) {
> diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h
> index 4f3d14bb1538..650334adc261 100644
> --- a/include/linux/soundwire/sdw.h
> +++ b/include/linux/soundwire/sdw.h
> @@ -1023,6 +1023,7 @@ struct sdw_stream_params {
> * master_list can contain only one m_rt per Master instance
> * for a stream
> * @m_rt_count: Count of Master runtime(s) in this stream
> + * @dev: SoundWire controller owning this runtime stream
A stream connects multiple managers and multiple peripherals. The
definition above does not make a lot of sense and doesn't work in
general since there's no 'owner' really.
And nothing prevents the use of multiple controllers, there are not
restrictions in the MIPI DisCo spec that prevent a stream from relying
on different controllers.
> */
> struct sdw_stream_runtime {
> const char *name;
> @@ -1031,6 +1032,7 @@ struct sdw_stream_runtime {
> enum sdw_stream_type type;
> struct list_head master_list;
> int m_rt_count;
> + struct device *dev;
> };
>
> struct sdw_stream_runtime *sdw_alloc_stream(const char *stream_name);
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 [this message]
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
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=3c6e3877-1bb6-403d-a67e-fdda0aef548e@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).