From: Vinod Koul <vinod.koul@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
lgirdwood@gmail.com
Subject: Re: [PATCH v6 05/10] ASoC: Intel: mrfld: add DSP core controls
Date: Fri, 19 Sep 2014 13:51:53 +0530 [thread overview]
Message-ID: <20140919082152.GC24663@intel.com> (raw)
In-Reply-To: <20140919081047.GB24663@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2986 bytes --]
On Fri, Sep 19, 2014 at 01:40:47PM +0530, Vinod Koul wrote:
> On Thu, Sep 18, 2014 at 10:28:52AM -0700, Mark Brown wrote:
> > On Thu, Sep 18, 2014 at 11:42:37AM +0530, Vinod Koul wrote:
> > > On Wed, Sep 17, 2014 at 12:37:06PM -0700, Mark Brown wrote:
> >
> > > > This doesn't really answer my concern - what happens if we're already
> > > > active and making a change?
> >
> > > Since this is specfic to BE (SSP) port, the DSP FW doesnt allow us to reconfigure
> > > the slots when it is active. These will take effect next time the BE
> > > restarts.
> >
> > > Yes not ideal but thats something we have to live with!
> >
> > That's fine but in that case I would expect to see an error returned to
> > userspace rather than just silently ignoring what it's doing until the
> > next time we start a stream, or at the very least some sort of warning
> > generated. Silently ignoring things isn't great especially with no
> > comments in the code, it ends up looking like a bug.
> Error to usermode wont be apt as we accept the value and due to constraint
> the value is applied at next BE start.
>
> Yes definately makes sense to put a comment about this. Will update that
And turns out that limitation is gone so I was wrong here, thanks to Shubransu for pointing this out.
This function does indeed send the updated slot values to DSP
see this bit:
static int sst_slot_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_component *cmpnt =snd_soc_kcontrol_component(kcontrol);
struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt);
struct sst_enum *e = (void *)kcontrol->private_value;
int i, ret = 0;
unsigned int ctl_no = e->reg;
unsigned int is_tx = e->tx;
unsigned int slot_channel_no;
unsigned int val, mux;
u8 *map;
map = is_tx ? sst_ssp_channel_map : sst_ssp_slot_map;
val = 1 << ctl_no;
mux = ucontrol->value.enumerated.item[0];
if (mux > e->max - 1) {
return -EINVAL;
}
mutex_lock(&drv->lock);
/* first clear all registers of this bit */
for (i = 0; i < e->max; i++)
map[i] &= ~val;
if (mux == 0) {/* kctl set to 'none' */
mutex_unlock(&drv->lock);
return 0;
}
/* offset by one to take "None" into account */
slot_channel_no = mux - 1;
map[slot_channel_no] |= val;
dev_dbg(cmpnt->dev, "%s %s map = %#x\n",
is_tx ? "tx channel" : "rx slot",
e->texts[mux], map[slot_channel_no]);
if (e->w && e->w->power)
ret = sst_send_slot_map(drv);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here is the widget is powered up then we send the updated slot map to DSP.
So it will be updated real time now :)
--
~Vinod
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2014-09-19 8:48 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 9:41 [PATCH v6 00/10] Add mrfld DSP topology and widgets Subhransu S. Prusty
2014-09-09 9:41 ` [PATCH v6 01/10] ASoC: Intel: mfld-pcm: don't call trigger ops to DSP for internal streams Subhransu S. Prusty
2014-09-16 18:54 ` Mark Brown
2014-09-09 9:41 ` [PATCH v6 02/10] ASoC: Intel: mrfld: add bytes control for modules Subhransu S. Prusty
2014-09-16 18:50 ` Mark Brown
2014-09-16 18:55 ` Mark Brown
2014-09-09 9:41 ` [PATCH v6 03/10] ASoC: Intel: mrfld: add the gain controls Subhransu S. Prusty
2014-09-16 19:00 ` Mark Brown
2014-09-09 9:41 ` [PATCH v6 04/10] ASoC: Intel: mfld-pcm: add control for powering up/down dsp Subhransu S. Prusty
2014-09-16 19:03 ` Mark Brown
2014-09-17 10:56 ` [alsa-devel] " Subhransu S. Prusty
2014-09-17 10:56 ` Subhransu S. Prusty
2014-09-09 9:41 ` [PATCH v6 05/10] ASoC: Intel: mrfld: add DSP core controls Subhransu S. Prusty
2014-09-16 19:30 ` Mark Brown
2014-09-17 10:55 ` Subhransu S. Prusty
2014-09-17 10:55 ` [alsa-devel] " Subhransu S. Prusty
2014-09-17 19:37 ` Mark Brown
2014-09-18 6:12 ` Vinod Koul
2014-09-18 17:28 ` Mark Brown
2014-09-19 8:10 ` Vinod Koul
2014-09-19 8:21 ` Vinod Koul [this message]
2014-09-23 1:57 ` Mark Brown
2014-09-23 3:52 ` Vinod Koul
2014-09-09 9:41 ` [PATCH v6 06/10] ASoC: Export dapm_kcontrol_get_value Subhransu S. Prusty
2014-09-09 9:41 ` [PATCH v6 07/10] ASoC: Intel: mrfld: add the DSP DAPM widgets Subhransu S. Prusty
2014-09-09 9:41 ` [PATCH v6 08/10] ASoC: Intel: mfld-pcm: add FE and BE ops Subhransu S. Prusty
2014-09-09 9:41 ` [PATCH v6 09/10] ASoC: Intel: mrfld: Use snd_soc_dai_get_drvdata to derive drv data Subhransu S. Prusty
2014-09-16 23:40 ` Mark Brown
2014-09-09 9:41 ` [PATCH v6 10/10] 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=20140919082152.GC24663@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--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 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.