All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: vinod.koul@intel.com, alsa-devel@alsa-project.org,
	Lars-Peter Clausen <lars@metafoo.de>,
	lgirdwood@gmail.com
Subject: Re: [alsa-devel] [v4 10/12] ASoC: Intel: mrfld: add the DSP DAPM widgets
Date: Tue, 19 Aug 2014 09:57:11 +0530	[thread overview]
Message-ID: <20140819042706.GA20885@vinod.koul@linux.intel.com> (raw)
In-Reply-To: <20140818135633.GU14537@sirena.org.uk>

On Mon, Aug 18, 2014 at 08:56:33AM -0500, Mark Brown wrote:
> On Mon, Aug 18, 2014 at 09:58:11AM +0530, Subhransu S. Prusty wrote:
> > On Thu, Aug 14, 2014 at 02:07:08PM +0100, Mark Brown wrote:
> 
> > > > for (i = 0; i < w->num_kcontrols; i++) {
> > > > 	if (dapm_kcontrol_get_value(w->kcontrols[i])) {
> > > > 		val |= 1 << i;
> > > > }
> 
> > > > Is this ok?
> 
> > > No, that doesn't seem safe.  Why not read the data from the control - if
> > > we were calling a function which returned the value that'd be much
> > > clearer.
> 
> > So lets step back and see what is required here.
> 
> > I get a mixer update for one of the inputs of the mixer. This needs to be
> > communicated to the DSP via the IPC. But the IPC expects that we send all
> > the values of all the inputs of a mixer to the DSP.
> 
> > That is why here we are reading the all mixer inputs to find the values and
> > send the bitmap of all inputs.
> 
> > So from the driver if I have to find out what is the value of the inputs in
> > mixer, how do I do that, is there a simpler way? Or should we push
> > this/<something else> into framework to query
> 
> The problem is that it looks like you are reading the value from the
> control, treating it as a boolean and discarding it.
Well the mixer input is on/off, so it should be treated as boolean. How will
it have any other value.

Btw I am thinking to create an API dapm_kcontrol_get_mixer_values() which can
give me bit map of all the mixer inputs, so I can use it and send IPCs to
the DSP.




-- 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2014-08-19  4:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04  9:45 [v4 00/12] Add mrfld DSP topology and widgets Subhransu S. Prusty
2014-08-04  9:45 ` [v4 01/12] ASoC: Intel: mfld-pcm: add FE and BE ops Subhransu S. Prusty
2014-08-13 19:35   ` Mark Brown
2014-08-04  9:45 ` [v4 02/12] ASoC: Intel: mrfld: set private data for cpu-dai Subhransu S. Prusty
2014-08-13 19:45   ` Mark Brown
2014-08-18  5:39     ` Subhransu S. Prusty
2014-08-18  5:39     ` [alsa-devel] " Subhransu S. Prusty
2014-08-13 19:50   ` Lars-Peter Clausen
2014-08-14  5:36     ` Subhransu S. Prusty
2014-08-14  5:36     ` [alsa-devel] " Subhransu S. Prusty
2014-08-14  6:16       ` Lars-Peter Clausen
2014-08-04  9:45 ` [v4 03/12] ASoC: intel: mfld-pcm: don't call trigger ops to DSP for internal streams Subhransu S. Prusty
2014-08-04  9:45 ` [v4 04/12] ASoC: Intel: add mrfld DSP defines Subhransu S. Prusty
2014-08-13 19:47   ` Mark Brown
2014-08-04  9:45 ` [v4 05/12] ASoC: Intel: mrfld: add bytes control for modules Subhransu S. Prusty
2014-08-13 20:00   ` Mark Brown
2014-08-18  5:36     ` [alsa-devel] " Subhransu S. Prusty
2014-08-18 10:15       ` Subhransu S. Prusty
2014-08-18 14:25         ` Mark Brown
2014-08-18 10:15       ` Subhransu S. Prusty
2014-08-18 14:19       ` Mark Brown
2014-08-18  5:36     ` Subhransu S. Prusty
2014-08-04  9:45 ` [v4 06/12] ASoC: Intel: mrfld: add the gain controls Subhransu S. Prusty
2014-08-13 20:03   ` Mark Brown
2014-08-18  5:05     ` [alsa-devel] " Subhransu S. Prusty
2014-08-18  5:05     ` Subhransu S. Prusty
2014-08-04  9:45 ` [v4 07/12] ASoC: Intel: mfld-pcm: add control for powering up/down dsp Subhransu S. Prusty
2014-08-13 20:04   ` Mark Brown
2014-08-04  9:45 ` [v4 08/12] ASoC: Intel: mrfld: add DSP core controls Subhransu S. Prusty
2014-08-04  9:46 ` [v4 09/12] ASoC: Export dapm_kcontrol_get_value Subhransu S. Prusty
2014-08-04  9:46 ` [v4 10/12] ASoC: Intel: mrfld: add the DSP DAPM widgets Subhransu S. Prusty
2014-08-13 20:14   ` Mark Brown
2014-08-14 10:21     ` Subhransu S. Prusty
2014-08-14 10:21     ` [alsa-devel] " Subhransu S. Prusty
2014-08-14 13:07       ` Mark Brown
2014-08-18  4:28         ` [alsa-devel] " Subhransu S. Prusty
2014-08-18 13:56           ` Mark Brown
2014-08-19  4:27             ` Subhransu S. Prusty
2014-08-19  4:27             ` Subhransu S. Prusty [this message]
2014-08-19 16:03               ` Mark Brown
2014-08-18  4:28         ` Subhransu S. Prusty
2014-08-04  9:46 ` [v4 11/12] ASoC: Intel: mfld-pcm: add the fe & be dai ops Subhransu S. Prusty
2014-08-13 20:16   ` Mark Brown
2014-08-18  4:51     ` Subhransu S. Prusty
2014-08-18  4:51     ` [alsa-devel] " Subhransu S. Prusty
2014-08-04  9:46 ` [v4 12/12] ASoC: Intel: mrfld: add the DSP mixers Subhransu S. Prusty

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=20140819042706.GA20885@vinod.koul@linux.intel.com \
    --to=subhransu.s.prusty@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=vinod.koul@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 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.