From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, perex@perex.cz,
linux-kernel@vger.kernel.org, vkoul@kernel.org
Subject: Re: [PATCH 1/2] ASoC: qcom: sdm845: handle soundwire stream
Date: Wed, 18 Mar 2020 10:26:47 -0500 [thread overview]
Message-ID: <cbc6cc9b-24f5-8c2a-b60d-b5dab08c128e@linux.intel.com> (raw)
In-Reply-To: <69c72f5a-e72e-b7b3-90cb-a7354dcb175d@linaro.org>
>>> for_each_rtd_codec_dais(rtd, i, codec_dai) {
>>> + sruntime = snd_soc_dai_get_sdw_stream(codec_dai,
>>> + substream->stream);
>>> + if (sruntime != ERR_PTR(-ENOTSUPP))
>>> + pdata->sruntime[cpu_dai->id] = sruntime;
>>> + else
>>> + pdata->sruntime[cpu_dai->id] = NULL;
>>> +
>>
>> Can you explain this part?
>> The get_sdw_stream() is supposed to return what was set by
>> set_sdw_stream(), so if it's not supported isn't this an error?
>
> In this case its not an error because we have
> totally 3 codecs in this path.
> One wcd934x Slimbus codec and two wsa881x Soundwire Codec.
>
> wcd934x codec side will return ENOTSUPP which is not an error.
I must admit I am quite confused here.
After reading your response, I thought this was a case of codec-to-codec
dailink, but then you also have a notion of cpu_dai?
>>
>>> ret = snd_soc_dai_get_channel_map(codec_dai,
>>> &tx_ch_cnt, tx_ch, &rx_ch_cnt, rx_ch);
>>> @@ -425,8 +437,65 @@ static void sdm845_snd_shutdown(struct
>>> snd_pcm_substream *substream)
>>> }
>>> }
>>> +static int sdm845_snd_prepare(struct snd_pcm_substream *substream)
>>> +{
>>> + struct snd_soc_pcm_runtime *rtd = substream->private_data;
>>> + struct sdm845_snd_data *data = snd_soc_card_get_drvdata(rtd->card);
>>> + struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
>>> + struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id];
>>> + int ret;
>>> +
>>> + if (!sruntime)
>>> + return 0;
>>
>> same here, isn't this an error?
>
> These callbacks are used for other dais aswell in this case
> HDMI, Slimbus and Soundwire, so sruntime being null is not treated as
> error.
Same comment, how does the notion of cpu_dai come in the picture for a
SoundWire dailink?
Would you mind listing what the components of the dailinks are?
next prev parent reply other threads:[~2020-03-18 15:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 9:53 [PATCH 0/2] ASoC: sdm845: fix soundwire stream handling Srinivas Kandagatla
2020-03-17 9:53 ` [PATCH 1/2] ASoC: qcom: sdm845: handle soundwire stream Srinivas Kandagatla
2020-03-17 13:07 ` Pierre-Louis Bossart
2020-03-18 11:59 ` Srinivas Kandagatla
2020-03-18 15:26 ` Pierre-Louis Bossart [this message]
2020-03-18 15:57 ` Srinivas Kandagatla
2020-03-18 16:53 ` Pierre-Louis Bossart
2020-03-17 9:53 ` [PATCH 2/2] ASoC: codecs: wsa881x: remove soundwire stream handling Srinivas Kandagatla
2020-03-17 11:05 ` [PATCH 0/2] ASoC: sdm845: fix " 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=cbc6cc9b-24f5-8c2a-b60d-b5dab08c128e@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=srinivas.kandagatla@linaro.org \
--cc=vkoul@kernel.org \
/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
Powered by JetHome