From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Charles Keepax <ckeepax@opensource.cirrus.com>, 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
Subject: Re: [PATCH 2/2] ASoC: SDCA: Add port constraints into sdca_asoc_set_constraints()
Date: Thu, 5 Nov 2026 20:49:43 +0100 [thread overview]
Message-ID: <1cae1b17-4c49-4a10-922e-c552e90593c4@linux.dev> (raw)
In-Reply-To: <20261105134952.1728147-3-ckeepax@opensource.cirrus.com>
> +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...
prev parent reply other threads:[~2026-11-05 19:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 13:49 [PATCH 0/2] Add SoundWire port constraints into SDCA stream Charles Keepax
2026-11-05 13:49 ` [PATCH 1/2] ASoC: SDCA: Factor out helper for creating mask of Cluster channels Charles Keepax
2026-11-05 13:49 ` [PATCH 2/2] ASoC: SDCA: Add port constraints into sdca_asoc_set_constraints() Charles Keepax
2026-11-05 14:27 ` Charles Keepax
2026-11-05 19:49 ` 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=1cae1b17-4c49-4a10-922e-c552e90593c4@linux.dev \
--to=pierre-louis.bossart@linux.dev \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--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®