From: "Péter Ujfalusi" <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lrg@ti.com>,
Misael Lopez Cruz <misael.lopez@ti.com>
Subject: Re: [PATCH 02/10] ASoC: twl6040: Combine the custom volsw get, and put functions
Date: Tue, 27 Sep 2011 09:16:16 +0300 [thread overview]
Message-ID: <2435781.WrNUf02Inv@barack> (raw)
In-Reply-To: <20110926212141.GB2872@opensource.wolfsonmicro.com>
On Monday 26 September 2011 22:21:42 Mark Brown wrote:
> On Mon, Sep 26, 2011 at 04:26:25PM +0300, Peter Ujfalusi wrote:
>
> Applied, thanks.
>
> > - ret = snd_soc_put_volsw(kcontrol, ucontrol);
> > + /* call the appropriate handler depending on the rreg */
> > + if (mc->rreg)
> > + ret = snd_soc_put_volsw_2r(kcontrol, ucontrol);
> > + else
> > + ret = snd_soc_put_volsw(kcontrol, ucontrol);
> > +
>
> Traditionally this would be done by comparing reg and rreg - if they're
> the same they're a mono control.
I'm not looking for the mono/stereo, but looking for the gain value(s) are in
the same register, but in different offset VS gain values are at the same
offset, but in two different registers.
The mono/stereo handling within snd_soc_put_volsw sufficient, and at the
moment the twl6040 has only stereo controls handled this way, but if we have
stereo, it is not a big job to implement.
The macros for SOC_DOUBLE, SOC_DOUBLE_TLV only assignes the .reg, leaving the
.rreg to be zero.
SOC_DOUBLE_R, SOC_DOUBLE_R_TLV on the other hand assigning the .reg, and the
.rreg.
--
Péter
next prev parent reply other threads:[~2011-09-27 6:16 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 13:26 [PATCH 00/10] ASoC: twl6040: Gain ramp code cleanups Peter Ujfalusi
2011-09-26 13:26 ` [PATCH 01/10] ASoC: twl6040: Rename pga_event to out_drv_event Peter Ujfalusi
2011-09-26 21:19 ` Mark Brown
2011-09-27 6:17 ` Péter Ujfalusi
2011-09-26 13:26 ` [PATCH 02/10] ASoC: twl6040: Combine the custom volsw get, and put functions Peter Ujfalusi
2011-09-26 21:21 ` Mark Brown
2011-09-27 6:16 ` Péter Ujfalusi [this message]
2011-09-27 10:56 ` Mark Brown
2011-09-27 11:21 ` Péter Ujfalusi
2011-09-27 11:42 ` Mark Brown
2011-09-27 12:55 ` Péter Ujfalusi
2011-09-26 13:26 ` [PATCH 03/10] ASoC: twl6040: Move delayed_work struct inside twl6040_output for HS/HF Peter Ujfalusi
2011-09-26 21:23 ` Mark Brown
2011-09-26 13:26 ` [PATCH 04/10] ASoC: twl6040: Move the delayed_work for HS detection under twl6040_jack_data Peter Ujfalusi
2011-09-26 21:24 ` Mark Brown
2011-09-26 13:26 ` [PATCH 05/10] ASoC: twl6040: One workqueue should be enough Peter Ujfalusi
2011-09-26 14:41 ` Mark Brown
2011-09-26 17:20 ` Ujfalusi, Peter
2011-09-26 21:29 ` Mark Brown
2011-09-27 6:33 ` Péter Ujfalusi
2011-09-26 13:26 ` [PATCH 06/10] ASoC: twl6040: correct loop counters for HS/HF ramp code Peter Ujfalusi
2011-09-26 21:33 ` Mark Brown
2011-09-27 6:21 ` Péter Ujfalusi
2011-09-27 11:12 ` Mark Brown
2011-09-26 13:26 ` [PATCH 07/10] ASoC: twl6040: No need to change delay during HS ramp Peter Ujfalusi
2011-09-26 21:33 ` Mark Brown
2011-09-26 13:26 ` [PATCH 08/10] ASoC: twl6040: No need to change delay during HF ramp Peter Ujfalusi
2011-09-26 21:33 ` Mark Brown
2011-09-26 13:26 ` [PATCH 09/10] ASoC: twl6040: Shift 2 identifies the HS output in out_drv_event Peter Ujfalusi
2011-09-26 13:26 ` [PATCH 10/10] ASoC: twl6040: Simplify code in out_drv_event for pending work check Peter Ujfalusi
2011-09-26 14:30 ` Mark Brown
2011-09-26 17:27 ` Ujfalusi, Peter
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=2435781.WrNUf02Inv@barack \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=misael.lopez@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.