[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 4 Apr 2014 00:34:28 -0700
From: Arun Shamanna Lakshmi <aruns@...dia.com>
To: Lars-Peter Clausen <lars@...afoo.de>
CC: "lgirdwood@...il.com" <lgirdwood@...il.com>,
"broonie@...nel.org" <broonie@...nel.org>,
"swarren@...dotorg.org" <swarren@...dotorg.org>,
"perex@...ex.cz" <perex@...ex.cz>, "tiwai@...e.de" <tiwai@...e.de>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Songhee Baek <sbaek@...dia.com>
Subject: RE: [PATCH] ASoC: dapm: Add support for multi register mux
> -----Original Message-----
> From: Lars-Peter Clausen [mailto:lars@...afoo.de]
> Sent: Friday, April 04, 2014 12:32 AM
> To: Arun Shamanna Lakshmi
> Cc: lgirdwood@...il.com; broonie@...nel.org;
> swarren@...dotorg.org; perex@...ex.cz; tiwai@...e.de; alsa-
> devel@...a-project.org; linux-kernel@...r.kernel.org; Songhee Baek
> Subject: Re: [PATCH] ASoC: dapm: Add support for multi register mux
>
> On 04/03/2014 10:11 PM, Arun Shamanna Lakshmi wrote:
> [...]
> >> Here as well, default for bit_pos should be 0.
> >
> > This means when 'None' of the options are selected, by default, it
> > enumerates to 0. Since we are using __ffs, BIT(0) of Register-0 also
> > enumerates to 0. That's the reason why I used just ffs in the first place.
> > Let me know your opinion. My value table looks like below.
> >
> > #define MUX_VALUE(npart, nbit) (nbit + 32 * npart)
> > static const int mux_values[] = {
> > 0,
> > MUX_VALUE(0, 0),
> > .
> > .
> > .
> > MUX_VALUE(0, 31),
> > /* above inputs are for part0 mux */
> > MUX_VALUE(1, 0),
> > .
> > .
> > .
> > MUX_VALUE(1, 31),
> > /* above inputs are for part1 mux */
> > MUX_VALUE(2, 0),
> > .
> > .
> > .
> > MUX_VALUE(2, 31),
> > /* above inputs are for part2 mux */
> > };
>
> Ok, so having none of the input selected should be a valid user selectable
> option?
Yes. If 'None' is selected, it goes and clears the register. So, can we have ffs( )
instead of __ffs( ) ? It would fix this case.
- Arun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists