[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c6e3877-1bb6-403d-a67e-fdda0aef548e@linux.intel.com>
Date: Wed, 25 Oct 2023 10:08:50 -0500
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Vinod Koul <vkoul@...nel.org>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Sanyog Kale <sanyog.r.kale@...el.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Banajit Goswami <bgoswami@...cinc.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, linux-arm-msm@...r.kernel.org,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] soundwire: qcom: set owner device of runtime stream
On 10/25/23 09:46, Krzysztof Kozlowski wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@...aro.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@...aro.org>
> Co-developed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.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);
Powered by blists - more mailing lists