From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
Songhee Baek <sbaek@nvidia.com>,
Arun Shamanna Lakshmi <aruns@nvidia.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"tiwai@suse.de" <tiwai@suse.de>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [alsa-devel] [PATCH] ASoC: Add support for multi register mux
Date: Thu, 20 Mar 2014 20:05:39 +0100 [thread overview]
Message-ID: <532B3C03.7030208@metafoo.de> (raw)
In-Reply-To: <20140320183638.GI11706@sirena.org.uk>
On 03/20/2014 07:36 PM, Mark Brown wrote:
> On Thu, Mar 20, 2014 at 12:20:17PM -0600, Stephen Warren wrote:
>> On 03/20/2014 05:48 AM, Mark Brown wrote:
>>> On Wed, Mar 19, 2014 at 04:44:00PM -0700, Arun Shamanna Lakshmi wrote:
>
>>>> If each bit of a 32 bit register maps to an input of a mux, then with
>>>> the current 'soc_enum' structure we cannot have more than 64 inputs
>>>> for the mux (because of reg and reg2 only).
>
>>> What makes you say that? We currently have devices in mainline which
>>> have well over 32 inputs to muxes.
>
>> I think their register layout is different.
>
>> I found a number of large muxes where the register stores a 'integer'
>> indicating which mux input to select, e.g. Arizona, WM2200, etc. In this
>> case, an N-bit register could support up to 2^N inputs.
>
>> However, the registers in the Tegra AHUB use 1 bit position per input,
>> and require you to set one single bit at a time. Hence, an N bit
>> register (or string of registers) can support up to N inputs. In more
>> recent Tegra chips, we have at least >32 inputs and I think Arun was
>> saying even >64 inputs. That requires 2 or 3 or more .reg fields in
>> struct soc_enum.
>
> Right, that was my guess too (the mail wasn't terribly clear with the
> formatting, references to unpublished documents and so on) but that's
> not a straight mux, it's a value mux, and the limit with the current
> code is much lower on 32 bit systems (like at least some of the K1s)
> since muxes only use one of the current register fields.
It might make sense to add special code for supported muxes with a one-hot
encoding instead of using a value mux. Having an large array where each
entry is just 1<<n is a bit ugly in my opinion, especially if the value
needs to be able to be larger than 2**64. But anyway the patch that modifies
the soc_enum struct should also add the code that makes use of the new
struct layout.
- Lars
next prev parent reply other threads:[~2014-03-20 19:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 23:51 [PATCH] ASoC: Add support for multi register mux Arun Shamanna Lakshmi
2014-03-18 23:59 ` Mark Brown
2014-03-19 23:44 ` Arun Shamanna Lakshmi
2014-03-20 11:48 ` Mark Brown
2014-03-20 18:20 ` Stephen Warren
2014-03-20 18:36 ` Mark Brown
2014-03-20 19:05 ` Lars-Peter Clausen [this message]
2014-03-20 19:40 ` Lars-Peter Clausen
2014-03-21 11:37 ` [alsa-devel] " Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2014-03-26 0:02 Arun Shamanna Lakshmi
2014-03-26 19:38 ` [alsa-devel] " Lars-Peter Clausen
2014-03-26 22:41 ` Songhee Baek
2014-03-27 9:19 ` Lars-Peter Clausen
2014-03-27 18:24 ` [alsa-devel] " Songhee Baek
[not found] ` <5571431004A69147BCABABE4E097D66BA3EFF70CFC@HQMAIL02.nvidia.com>
2014-03-29 2:30 ` Songhee Baek
2014-03-29 10:53 ` Lars-Peter Clausen
2014-03-30 6:12 ` Arun Shamanna Lakshmi
2014-03-31 11:21 ` Mark Brown
2014-03-31 11:55 ` Lars-Peter Clausen
2014-03-31 12:07 ` Mark Brown
2014-04-01 6:08 ` [alsa-devel] " Arun Shamanna Lakshmi
2014-03-27 1:08 ` Mark Brown
2014-03-27 4:33 ` Songhee Baek
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=532B3C03.7030208@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=aruns@nvidia.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sbaek@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=tiwai@suse.de \
/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