From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, vkoul@kernel.org
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] soundwire: bus: Add flag to mark DPN_BlockCtrl1 as readonly
Date: Tue, 10 Mar 2020 10:53:31 -0500 [thread overview]
Message-ID: <a2b24f84-0f9a-29ab-8748-dc5a26c05ffa@linux.intel.com> (raw)
In-Reply-To: <92d3ae1b-bace-1d20-ef99-82f7e1a0a644@linaro.org>
Hi Srinivas,
>> > My recommendation would be to add a DisCo property stating the
>> WordLength value can be used by the bus code but not written to the
>> Slave device registers.
>
> Does something like "mipi-sdw-read-only-wordlength" as slave property,
> make sense?
The properties can be handled at two levels.
First, you'd want to change include/linux/soundwire/sdw.h, and add a new
field in
struct sdw_dpn_prop {
u32 num;
u32 max_word;
u32 min_word;
u32 num_words;
u32 *words;
+ bool read_only_wordlength;
Once this is added, along with the code that bypasses the programming of
DPn_BlockCtrl1, the implementation has two choices:
a) hard-code the field value in the codec driver.
b) read the property from firmware with the DisCo helpers.
There is no requirement that all properties be read from firmware, and
if you look at existing code base sdw_slave_read_prop() is currently
unused, each codec implements its own .read_prop() callback.
We really wanted to be pragmatic, and give the possibility to either
override bad firmware or extend incomplete firmware to avoid coupling OS
and firmware too much. If you foresee cases where this implementation
might vary and firmware distribution is not a problem, then a property
read would make sense.
Just once procedural reminder that all 'mipi-sdw' properties are handled
by the MIPI software WG, so we'd need to have this property added in a
formal MIPI document update.
I suggest you talk with Lior first on this.
Hope this helps
-Pierre
next prev parent reply other threads:[~2020-03-10 16:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 17:37 [RFC PATCH] soundwire: bus: Add flag to mark DPN_BlockCtrl1 as readonly Srinivas Kandagatla
2020-03-09 18:05 ` Pierre-Louis Bossart
2020-03-10 14:01 ` Srinivas Kandagatla
2020-03-10 15:53 ` Pierre-Louis Bossart [this message]
2020-03-11 11:30 ` Srinivas Kandagatla
2020-03-11 6:42 ` Vinod Koul
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=a2b24f84-0f9a-29ab-8748-dc5a26c05ffa@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--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