From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
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, linux-sound@vger.kernel.org
Subject: Re: [PATCH 1/2] ASoC: qcom: Add helper for allocating Soundwire stream runtime
Date: Wed, 29 Nov 2023 17:35:28 +0100 [thread overview]
Message-ID: <5ffed1e6-ac60-42e1-8322-4f5e419ef86d@linaro.org> (raw)
In-Reply-To: <ce46c729-48de-4b71-ace3-9b88f95e8e28@linux.intel.com>
On 28/11/2023 18:39, Pierre-Louis Bossart wrote:
>
>> +int qcom_snd_sdw_startup(struct snd_pcm_substream *substream)
>> +{
>> + struct snd_soc_pcm_runtime *rtd = substream->private_data;
>> + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
>> + struct sdw_stream_runtime *sruntime;
>> + struct snd_soc_dai *codec_dai;
>> + int ret, i;
>> +
>> + sruntime = sdw_alloc_stream(cpu_dai->name);
>> + if (!sruntime)
>> + return -ENOMEM;
>> +
>> + for_each_rtd_codec_dais(rtd, i, codec_dai) {
>> + ret = snd_soc_dai_set_stream(codec_dai, sruntime,
>> + substream->stream);
>> + if (ret < 0 && ret != -ENOTSUPP) {
>
> I know this is existing code moved into a helper, but out of curiosity
> why is -ENOTSUPP ignored? Isn't this problematic?
This is for all DAI links, so if some don't have set_stream callback, we
assume it is not needed. For example few codecs do not need it because
they are not on Soundwire bus at all and they don't care about the stream.
>
>> + dev_err(rtd->dev, "Failed to set sdw stream on %s\n",
>> + codec_dai->name);
>> + goto err_set_stream;
>> + }
>> + }
>
> Also should the CPU DAIs also be used to set the stream information?
> it's not clear to me why only the CODEC DAIs are used.
I don't know, we never did. As you pointed out, I am just moving things
around, so I don't really know the original intention.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-11-29 16:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 16:56 [PATCH 1/2] ASoC: qcom: Add helper for allocating Soundwire stream runtime Krzysztof Kozlowski
2023-11-28 16:56 ` [PATCH 2/2] ASoC: qcom: Move Soundwire runtime stream alloc to soundcards Krzysztof Kozlowski
2023-11-28 16:59 ` Krzysztof Kozlowski
2023-11-28 17:49 ` Pierre-Louis Bossart
2023-11-28 17:47 ` Pierre-Louis Bossart
2023-11-28 17:39 ` [PATCH 1/2] ASoC: qcom: Add helper for allocating Soundwire stream runtime Pierre-Louis Bossart
2023-11-29 16:35 ` Krzysztof Kozlowski [this message]
2023-11-29 16:46 ` Pierre-Louis Bossart
2023-11-30 11:23 ` Mark Brown
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=5ffed1e6-ac60-42e1-8322-4f5e419ef86d@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--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=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--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