From: Vinod Koul <vinod.koul@intel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Kp Jeeja <jeeja.kp@intel.com>,
alsa-devel@alsa-project.org, broonie@kernel.org,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
lgirdwood@gmail.com
Subject: Re: [PATCH v2 1/2] ASoC: export dapm_kcontrol_set/get_value functions
Date: Fri, 30 May 2014 11:39:18 +0530 [thread overview]
Message-ID: <20140530060918.GN21128@intel.com> (raw)
In-Reply-To: <5387120B.6090100@metafoo.de>
On Thu, May 29, 2014 at 12:55:07PM +0200, Lars-Peter Clausen wrote:
> On 05/29/2014 12:03 PM, Vinod Koul wrote:
> >The DSPs like Intel ones use the DPCM to represent the DSP toplogy. So when DAPM
> >triggers the widget, the DSP needs to know the kcontrol values and pass on to DSP
> >firmware, so export these for driver use
> >
>
> As I said I feel a bit uneasy about exporting these and I'd rather
> much prefer to see this patch in context (i.e. in the same series as
> its user).
I am still working on that series. The core patches could have gone ahead so
posted.
Here is the code snippet that will come in subsequent series:
int sst_mix_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_dapm_widget_list *wlist =
dapm_kcontrol_get_wlist(kcontrol);
struct snd_soc_dapm_widget *widget = wlist->widgets[0];
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
struct sst_data *sst = snd_soc_platform_get_drvdata(widget->platform);
unsigned int mask = (1 << fls(mc->max)) - 1;
unsigned int val;
int connect;
struct snd_soc_dapm_update update;
val = sst_reg_write(sst, mc->reg, mc->shift, mc->max,
ucontrol->value.integer.value[0]);
connect = !!val;
dapm_kcontrol_set_value(kcontrol, val);
update.kcontrol = kcontrol;
update.reg = mc->reg;
update.mask = mask;
update.val = val;
snd_soc_dapm_mixer_update_power(widget->dapm, kcontrol, connect, &update);
return 0;
}
--
~Vinod
next prev parent reply other threads:[~2014-05-30 6:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-29 10:03 [PATCH v2 1/2] ASoC: export dapm_kcontrol_set/get_value functions Vinod Koul
2014-05-29 10:03 ` [PATCH v2 2/2] ASoC: dapm: Add a helper to get the platform for DAPM kcontrol Vinod Koul
2014-06-01 19:28 ` Mark Brown
2014-05-29 10:55 ` [PATCH v2 1/2] ASoC: export dapm_kcontrol_set/get_value functions Lars-Peter Clausen
2014-05-30 6:09 ` Vinod Koul [this message]
2014-05-30 7:22 ` Lars-Peter Clausen
2014-05-30 10:29 ` Vinod Koul
2014-05-30 12:50 ` Lars-Peter Clausen
2014-06-01 19:26 ` Mark Brown
2014-06-03 5:44 ` Vinod Koul
2014-06-03 10:11 ` Mark Brown
2014-06-06 5:54 ` Vinod Koul
2014-06-06 9:51 ` Mark Brown
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=20140530060918.GN21128@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jeeja.kp@intel.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=subhransu.s.prusty@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