All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Omair M Abdullah <omair.m.abdullah@intel.com>,
	Vinod Koul <vinod.koul@intel.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Subject: Applied "ASoC: Intel: Skylake: read params from DSP if module is on" to the asoc tree
Date: Tue, 08 Dec 2015 19:11:24 +0000	[thread overview]
Message-ID: <E1a6NfY-00042b-0m@debutante> (raw)
In-Reply-To: <1449165601-11226-8-git-send-email-vinod.koul@intel.com>

The patch

   ASoC: Intel: Skylake: read params from DSP if module is on

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 7d9f29119d3e4db6ae817881d8e305650424032c Mon Sep 17 00:00:00 2001
From: Omair M Abdullah <omair.m.abdullah@intel.com>
Date: Thu, 3 Dec 2015 23:29:56 +0530
Subject: [PATCH] ASoC: Intel: Skylake: read params from DSP if module is on

If a module is ON then we should read the module parameters from
DSP rather than driver cached values

Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/skylake/skl-messages.c | 13 +++++++++++++
 sound/soc/intel/skylake/skl-topology.c |  7 +++++++
 sound/soc/intel/skylake/skl-topology.h |  2 ++
 3 files changed, 22 insertions(+)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index a91161be7f5d..46310d9ac008 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -927,3 +927,16 @@ int skl_set_module_params(struct skl_sst *ctx, u32 *params, int size,
 
 	return skl_ipc_set_large_config(&ctx->ipc, &msg, params);
 }
+
+int skl_get_module_params(struct skl_sst *ctx, u32 *params, int size,
+			  u32 param_id, struct skl_module_cfg *mcfg)
+{
+	struct skl_ipc_large_config_msg msg;
+
+	msg.module_id = mcfg->id.module_id;
+	msg.instance_id = mcfg->id.instance_id;
+	msg.param_data_size = size;
+	msg.large_param_id = param_id;
+
+	return skl_ipc_get_large_config(&ctx->ipc, &msg, params);
+}
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index eb31235f7040..b824450edcb4 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -908,6 +908,13 @@ static int skl_tplg_tlv_control_get(struct snd_kcontrol *kcontrol,
 	struct soc_bytes_ext *sb =
 			(struct soc_bytes_ext *)kcontrol->private_value;
 	struct skl_algo_data *bc = (struct skl_algo_data *)sb->dobj.private;
+	struct snd_soc_dapm_widget *w = snd_soc_dapm_kcontrol_widget(kcontrol);
+	struct skl_module_cfg *mconfig = w->priv;
+	struct skl *skl = get_skl_ctx(w->dapm->dev);
+
+	if (w->power)
+		skl_get_module_params(skl->skl_sst, (u32 *)bc->params,
+				      bc->max, bc->param_id, mconfig);
 
 	if (bc->params) {
 		if (copy_to_user(data, &bc->param_id, sizeof(u32)))
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 6ba0bdc7753c..9aa2a2b6598a 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -342,6 +342,8 @@ int skl_unbind_modules(struct skl_sst *ctx, struct skl_module_cfg
 
 int skl_set_module_params(struct skl_sst *ctx, u32 *params, int size,
 			u32 param_id, struct skl_module_cfg *mcfg);
+int skl_get_module_params(struct skl_sst *ctx, u32 *params, int size,
+			  u32 param_id, struct skl_module_cfg *mcfg);
 
 enum skl_bitdepth skl_get_bit_depth(int params);
 #endif
-- 
2.6.2

  reply	other threads:[~2015-12-08 19:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 17:59 [PATCH v2 00/12] ASoC: Intel: Skylake: Add support for loadable modules Vinod Koul
2015-12-03 17:59 ` [PATCH v2 01/12] ASoC: Intel: Skylake: Add support for Loadable modules Vinod Koul
2015-12-08 19:11   ` Applied "ASoC: Intel: Skylake: Add support for Loadable modules" to the asoc tree Mark Brown
2015-12-03 17:59 ` [PATCH v2 02/12] ASoC: Intel: Skylake: Add memory pages to widget data Vinod Koul
2015-12-03 17:59 ` [PATCH v2 03/12] ASoC: Intel: Skylake: Add support for Mic Select module Vinod Koul
2015-12-03 17:59 ` [PATCH v2 04/12] ASoC: Intel: Skylake: Fix module init data correctly Vinod Koul
2015-12-03 17:59 ` [PATCH v2 05/12] ASoC: Intel: Skylake: update mailbox uplink window offset and size Vinod Koul
2015-12-03 17:59 ` [PATCH v2 06/12] ASoC: Intel: Skylake: add LARGE_CONFIG_GET IPC support Vinod Koul
2015-12-03 17:59 ` [PATCH v2 07/12] ASoC: Intel: Skylake: read params from DSP if module is on Vinod Koul
2015-12-08 19:11   ` Mark Brown [this message]
2015-12-03 17:59 ` [PATCH v2 08/12] ASoC: Intel: Skylake: Add dai link for DMIC capture Vinod Koul
2015-12-03 17:59 ` [PATCH v2 09/12] ASoC: Intel: Skylake: add wov as int sink Vinod Koul
2015-12-03 17:59 ` [PATCH v2 10/12] ASoc: Intel: Skylake: Fix the dapm machine map Vinod Koul
2015-12-03 18:00 ` [PATCH v2 11/12] ASoC: Intel: Skylake: Add support for active suspend Vinod Koul
2015-12-08 19:11   ` Applied "ASoC: Intel: Skylake: Add support for active suspend" to the asoc tree Mark Brown
2015-12-03 18:00 ` [PATCH v2 12/12] ASoC: Intel: Skylake: Update ignore suspend for rt286 machine Vinod Koul
2015-12-08 19:11   ` Applied "ASoC: Intel: Skylake: Update ignore suspend for rt286 machine" to the asoc tree 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=E1a6NfY-00042b-0m@debutante \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=omair.m.abdullah@intel.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.