From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.128 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796226598; b=JK2X3xePlet5pixFTWgE1UxK7E8xIYif54qJCsgVoqbcgQ/S/jDpag5/bYEetaYcCbN7 pmcGm+jRgZWU3r2cE3NwM7n6ziJ1jzsEUNBjExUMHKUqCBQmROz2OdWz6C1MDQ1GX1BZV xpRvcbiE4EPglATmgodcQyKOPABR8RuvfvEw0pOom/+EUORzau26GRSNg+bjAvJqkMvVK KQDFqolHK6fqWsYCXWFxTsgFKIHNarqAxC0tbgnmEi9WiAAwXWBWKMfcCnyBjW9ZJLUC8 Y4YOSFaTJqiOsAiVGjr92OMCBr168s+pzKd11EC2DFi5sQ9nh8eYplDG2ynQI7SZbgA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796226598; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=MMpPrkKzOAj0+U8HQGPGH8TFXl8Kn3H/I0ZCELlgegg=; b=NIpkx5zGnwsUzBbql4n0XLq0S3ZSktB1BXhle+qHERlAmN6f2Ro8EBbFs9Fd6qMg+joK 55Xk2+OcY0p/OaRLHBPo5xgHyvFqRgbuCfuSkLch9F5Pj6HCz3KOn/ZcwKrQrWW2Rw1aS IYz3WZa5FYo6EUpevDuS1WHFlp1OyH0Sy4JWoXXMSywwUytYjiXDksaFJeKtTG7efTCxF Ie+Hpy1ddHf3vuo/SpBgBOFehI0DHx2YJ0s+UylEO1oQmS6NbiIWxTbQ2F6Z87n/Dgc2S GnWwWn37yPP2iPWkGU6YIGA2NOZ0h4bttcu1ruxWJSoJl2I6AScCoWkor8SRvbXQW6Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Agyy9cjN; arc=none smtp.remote-ip=91.218.175.128 Received: from mta0.migadu.com (out-128.mta0.migadu.com [91.218.175.128]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD1CD606A329 for ; Wed, 2 Dec 2026 15:49:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CD1CD606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Agyy9cjN X-Envelope-To: linux-arm-msm@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=9cfcgdnS2M2Aj5w2hU4HZQEFja1JcKc4dj/H21HAh0E=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796226596; v=1; x=1796831396; b=Agyy9cjNS4pIcjjp1Bji6KqFOeWnXFhiEcAUw1FYc5kK/1N2VwuY2T0+dZp6sIjYTXTM4ziT s0U2rGm7O1zBTL8NNTPeQU/GRf5uzRZA+qgMGl6Rt/g9oQTmPLHZ4qyCfq2MNLCEdc+tdS5iIzq itfKg5YdxfqvD5lLZNihKsT8= X-Envelope-To: linux-arm-msm@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id a8385b3bed4cde6f; Wed, 02 Dec 2026 15:49:55 +0000 X-Mizu-Trace-ID: a8385b3bed4cde6f X-Migadu-Flow: FLOW_OUT Message-ID: Date: Wed, 2 Dec 2026 16:40:26 +0100 X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 0/2] soundwire: multi-direction stream API To: Srinivas Kandagatla , Vinod Koul , Bard Liao Cc: Sanyog Kale , Mark Brown , Jonathan Corbet , Bjorn Andersson , Konrad Dybcio , 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 References: <20261130224018.20359-1-srinivas.kandagatla@oss.qualcomm.com> <15407490-13c6-432a-80f6-ceb8acf5112f@linux.dev> <1dbe1208-dd21-42be-a005-f2cf4744e12f@oss.qualcomm.com> Content-Language: en-US From: Pierre-Louis Bossart In-Reply-To: <1dbe1208-dd21-42be-a005-f2cf4744e12f@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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.