From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.104 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793908187; b=35Gu1fTHgk//Fp0PFZvnOW0/Wnnyms28nSAV5rAXr9VT3xEzEfSsIqYrejiznLAjmP9h suQ4ww0B+hZMSv4PLsMJgm+/2c5EIzSmGlwWVuCzMn/i0D2PTPteaAg1pyzLxM77e1vin HLYpHEJYab743k2AU1gO6ydj8GwogHcSz7sVx5AkXRTezthdZXlk+4SkVS4MsTcX95+5r 8qC9djB9VlWxwlJZ9ic8L8OCEEU7lj8ZqMnoQb6rN7uglBOfjB8LAzbM91N67rEcoruzU qVP1+yZmd/6xqn9rpoDksmSjj86Lm8Hwxw3EfzfkU/RtAIdLCbE1EyQWas7IiIC4CUQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793908187; 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=qScYQxrMhDNOEAGF/9rBfbZWicHpQDMbkGzOg5+rxBU=; b=BFZ2Qq8PXbQtozHEN8LIjF/h07dy7W8fhWS5uUeeYuLeXt3mIvy/Q5Ds6+Ke//JfzVeC DLLfi4gev1FNbfTfSCqOpdW9ul2NFxR0YdXopz+S3OC9ka4O7Npwj4cU+zIOHGZzCfdml bTbIUeuo7fwfAWzsxCZlvMVcH50vLmDCw/9Bo/93dIYedAnBYDbpur3KuJ0Sa2E4lnGE9 6Vroo1D27dwUF4cpQ68dBv06DuiDyjkYibo+zOHQnlC4Z0uy1T06F/wXHza8vskLUGYEe 8rSuucpfgVnN/Juc/46f83XbanRjHBfdSZfwjchikUKRXg3C4diosXOL8jzwSjw81lg== 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=qemT7U8e; arc=none smtp.remote-ip=95.215.58.104 Received: from mta1.migadu.com (out-104.mta1.migadu.com [95.215.58.104]) (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 362EF60772B6 for ; Thu, 5 Nov 2026 19:49:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 362EF60772B6 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=qemT7U8e X-Envelope-To: linux-sound@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=hllPb5qZ3MwACXrit8oyaRfVECBhdjxwmlbhGw/GJz4=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1793908184; v=1; x=1794512984; b=qemT7U8e/A/UCeZLneIPHTKmmFbWKXrkGzDdmXqSOk3qEsEYf2aCA/apehPcDL7L1fdnstnm 9+eiKUGZ4gpRIfKWrmZejTVV+xMZaEXLID7MsPZgxfoHI/SoOV3wYCWKa2AXJTC1lQWfXdRmz8Q hgrjvsO63w2NTGz8YtoiJ4dM= X-Envelope-To: linux-sound@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id d639df3448ef7c08; Thu, 05 Nov 2026 19:49:43 +0000 X-Mizu-Trace-ID: d639df3448ef7c08 X-Migadu-Flow: FLOW_OUT Message-ID: <1cae1b17-4c49-4a10-922e-c552e90593c4@linux.dev> Date: Thu, 5 Nov 2026 20:49:43 +0100 X-Mailing-List: linux-sound@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: [PATCH 2/2] ASoC: SDCA: Add port constraints into sdca_asoc_set_constraints() To: Charles Keepax , broonie@kernel.org Cc: lgirdwood@gmail.com, yung-chuan.liao@linux.intel.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com References: <20261105134952.1728147-1-ckeepax@opensource.cirrus.com> <20261105134952.1728147-3-ckeepax@opensource.cirrus.com> Content-Language: en-US From: Pierre-Louis Bossart In-Reply-To: <20261105134952.1728147-3-ckeepax@opensource.cirrus.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit > +static int get_port_masks(struct sdw_slave *sdw, unsigned int port, > + struct snd_pcm_substream *substream, > + unsigned int *word_mask, unsigned int *ch_mask) > +{ > + struct sdw_dpn_prop *prop; > + unsigned int nprop; > + int i, j; > + > + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { > + prop = sdw->prop.sink_dpn_prop; > + nprop = hweight32(sdw->prop.sink_ports); > + } else { > + prop = sdw->prop.src_dpn_prop; > + nprop = hweight32(sdw->prop.source_ports); > + } The definition of those DisCo properties was done with separate masks for source and sinks, but it's allowed to have the same bit set for source and sink if the port supports bi-directional transfers. I don't think it impacts the way the constraints are added, since you use substream->stream direction to disambiguate, but I thought I'd ask the question. > - if (entity->type != SDCA_ENTITY_TYPE_IT) > - return 0; > + /* FIXME: Currently only a single unshared port is supported */ I must admit I have no idea how we'd handle ports that can be connected to multiple terminals. It's allowed in the spec, even between Functions which are then no longer independent, and I was told it was due to hardware restrictions, but still I hope we never have to deal with this...