mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>,
	Vinod Koul <vkoul@kernel.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Sanyog Kale <sanyog.r.kale@intel.com>,
	Mark Brown <broonie@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	alsa-devel@alsa-project.org, linux-sound@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/2] soundwire: multi-direction stream API
Date: Wed, 2 Dec 2026 16:40:26 +0100	[thread overview]
Message-ID: <c5fead8a-e3e2-439b-97c2-eac7e2a041f6@linux.dev> (raw)
In-Reply-To: <1dbe1208-dd21-42be-a005-f2cf4744e12f@oss.qualcomm.com>



On 12/2/26 12:36 AM, Srinivas Kandagatla wrote:
> On 12/1/26 4:44 PM, Pierre-Louis Bossart wrote:
>>
>>
>> On 11/30/26 11:40 PM, Srinivas Kandagatla wrote:
>>> During Speaker Protection patches for Qualcomm SoCs, Pierre suggested
>>> that we should add support to multi-direction in sdw_stream.
>>>
>>> This patchset is to start that discussion on how these apis should look
>>> like.
>>
>> Thanks for starting this!
>>
>>> Some SoundWire codec-codec links drive more than one direction on the
>>> same BE and the two directions are coupled on the bus: they share a
>>> bring-up sequence and want to fail or succeed together. The first
>>> in-tree case is WSA playback plus V/I-sense feedback on the same BE
>>> (DSP speaker protection and thermal/excursion feedback).
>>
>> Humm, maybe before we start looking further, can you clarify if the
>> feedback has the same format as the playback PCM? I vaguely recall that
>> some amplifiers use custom formats, e.g. 10bits, for IV sense. The
>> resolution doesn't need to be as precise as for PCM, does it?
> 
> For dai links with multi-direction flag there is a fixup callback where
> we set the format constriants for VI in our speaker protection dai-link.
> 
>>
>> I initially thought that we could combine all ports for all
>> 'constituents', but if they transport different data formats we do have
>> to stick with the rule 'one stream - one data format'.
> Not necessarly because the format for codec-to-codec like in this case
> is not necessarily same, VI module only supports fixed format.
> 
>>
>> The second question is whether the goal is to only deal with the
>> direction problem, or if we want a way to 'link' or 'bind' data streams
>> that need to be prepared together and later activated together. In that
>> case you could simplify the API to 'sdw_multi_stream' and forget about
>> the direction?
> 
> Its both. That is good idea.
> 
>>
>> The feedback in your example does flow in the opposite direction, but
>> for companion amps the data comes from the main amp. SDCA also has a
>> concept of a DSP-generated 'enhancement' stream that would flow in
>> parallel to the main playback stream.
>>
> That should not matter I guess, in that case codec-codec without any
> multi-direction flag should work.
> 
>> One important point is also that the concept of multiple streams is
>> 'hidden' below the ASoC dailink level, where I don't think we can work-
>> around the direction. This API would only be for low-level data that is
>> not exposed to userspace, ever.
> correct.
> 
> IOW the Linux drivers would provide
>> configuration capability but no PCM devices/DMA support for those
>> auxiliary streams.
> true.
There's yet another case that I just thought of, in the SDCA spec there 
are mentions of amplifiers providing speaker protection information to 
other amps, so that all amps adjust their volume. Amps could be on the 
same link or use low-latency loopback capabilities on the manager for 
the cross-link connections. Having this 'multi-stream' without any 
mention of direction could cover this case, what really matters is the 
prepare/activation done for all constituents.

      reply	other threads:[~2026-12-02 15:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 22:40 Srinivas Kandagatla
2026-11-30 22:40 ` [PATCH] soundwire: stream: add multi-direction stream lifecycle API Srinivas Kandagatla
2026-11-30 23:24   ` Randy Dunlap
2026-11-30 22:40 ` [RFC PATCH 2/2] ASoC: qcom: sdw: use multi-direction stream lifecycle for prepare/hw_free Srinivas Kandagatla
2026-12-01 16:44 ` [RFC PATCH 0/2] soundwire: multi-direction stream API Pierre-Louis Bossart
2026-12-01 23:36   ` Srinivas Kandagatla
2026-12-02 15:40     ` Pierre-Louis Bossart [this message]

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=c5fead8a-e3e2-439b-97c2-eac7e2a041f6@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=alsa-devel@alsa-project.org \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=sanyog.r.kale@intel.com \
    --cc=srinivas.kandagatla@oss.qualcomm.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

all inboxes | Powered by JetHome®