alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Vinod Koul <vkoul@kernel.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	ranjani.sridharan@linux.intel.com, hui.wang@canonical.com,
	broonie@kernel.org, srinivas.kandagatla@linaro.org,
	jank@cadence.com, mengdong.lin@intel.com,
	sanyog.r.kale@intel.com, rander.wang@linux.intel.com,
	bard.liao@intel.com
Subject: Re: [PATCH v2] soundwire: SDCA: add helper macro to access controls
Date: Mon, 17 Aug 2020 10:14:25 -0500	[thread overview]
Message-ID: <2ab412c5-bf96-5ba3-c193-5a8ad9071bbb@linux.intel.com> (raw)
In-Reply-To: <20200817121411.GR2639@vkoul-mobl>


>> The upcoming SDCA (SoundWire Device Class Audio) specification defines
>> a hiearchical encoding to interface with Class-defined capabilities,
> 
> typo hiearchical

ok

>> based on which audio function, entity, control and channel being used.
> 
> Can you please elaborate on what do these terms refer to?
> 
> Also can we have some documentation for this and how Linux is going to
> use it..

These are concepts in the SDCA draft spec, and that should be the 
reference. We worked with MIPI so that this spec will be available with 
a click-through agreement when ratified, for now it's only available to 
contributors per MIPI bylaws.

If you do not have access to this specification, then that's a real 
problem. Maybe you need to let Bard take care of this part as a 
co-maintainer?

The goal with this macro is to enable a first set of codecs drivers 
using these concepts to be released upstream. All you need to know at 
this point is that controls are defined in a hierarchical way and 
accessed with a read/write transaction from/to the address created with 
the following macro.

>> +/* v1.2 device - SDCA address mapping */
>> +#define SDW_SDCA_CTL(fun, ent, ctl, ch)		(BIT(30) |			\
>> +						 (((fun) & 0x7) << 22) |	\
>> +						 (((ent) & 0x40) << 15) |	\
>> +						 (((ent) & 0x3f) << 7) |	\
>> +						 (((ctl) & 0x30) << 15) |	\
>> +						 (((ctl) & 0x0f) << 3) |	\
>> +						 (((ch) & 0x38) << 12) |	\
>> +						 ((ch) & 0x07))
>> +
> 
> how about adding an underscore to the arguments here:
> 
> #define SDW_SDCA_CTL(_fun, _ent, _ctl, _ch)
> and so on..

I checked the SoundWire defines and the vast majority of the macros 
don't use underscores, and when they do there's no consistency between 1 
or 2 underscores.


  reply	other threads:[~2020-08-17 15:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-16 20:10 [PATCH v2] soundwire: SDCA: add helper macro to access controls Bard Liao
2020-08-17 12:14 ` Vinod Koul
2020-08-17 15:14   ` Pierre-Louis Bossart [this message]
2020-08-21  5:12     ` 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=2ab412c5-bf96-5ba3-c193-5a8ad9071bbb@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hui.wang@canonical.com \
    --cc=jank@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mengdong.lin@intel.com \
    --cc=rander.wang@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    --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;
as well as URLs for NNTP newsgroup(s).