From: Mark Brown <broonie@kernel.org>
To: Dharageswari R <dharageswari.r@intel.com>,
Vinod Koul <vinod.koul@intel.com>,
Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Subject: Applied "ASoC: Intel: Skylake: Add skl_tplg_be_get_cpr_module() helper" to the asoc tree
Date: Mon, 08 Feb 2016 18:01:35 +0000 [thread overview]
Message-ID: <E1aSq7z-0002lR-0g@debutante> (raw)
In-Reply-To: <1454654950-23091-4-git-send-email-vinod.koul@intel.com>
The patch
ASoC: Intel: Skylake: Add skl_tplg_be_get_cpr_module() helper
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 718a42b5eaddb3180e2589590732d61e047858fb Mon Sep 17 00:00:00 2001
From: "Dharageswari.R" <dharageswari.r@intel.com>
Date: Fri, 5 Feb 2016 12:19:06 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Add skl_tplg_be_get_cpr_module() helper
An I2S port can be connected to multiple BE pipes, get module config
only for the active BE pipe.
This helpers helps to do that and is used in subsequent patches
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/skylake/skl-topology.c | 60 ++++++++++++++++++++++++++++++++++
sound/soc/intel/skylake/skl-topology.h | 2 ++
2 files changed, 62 insertions(+)
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index a294fee431f0..5c8661450349 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -1091,6 +1091,66 @@ skl_tplg_fe_get_cpr_module(struct snd_soc_dai *dai, int stream)
return NULL;
}
+static struct skl_module_cfg *skl_get_mconfig_pb_cpr(
+ struct snd_soc_dai *dai, struct snd_soc_dapm_widget *w)
+{
+ struct snd_soc_dapm_path *p;
+ struct skl_module_cfg *mconfig = NULL;
+
+ snd_soc_dapm_widget_for_each_source_path(w, p) {
+ if (w->endpoints[SND_SOC_DAPM_DIR_OUT] > 0) {
+ if (p->connect &&
+ (p->sink->id == snd_soc_dapm_aif_out) &&
+ p->source->priv) {
+ mconfig = p->source->priv;
+ return mconfig;
+ }
+ mconfig = skl_get_mconfig_pb_cpr(dai, p->source);
+ if (mconfig)
+ return mconfig;
+ }
+ }
+ return mconfig;
+}
+
+static struct skl_module_cfg *skl_get_mconfig_cap_cpr(
+ struct snd_soc_dai *dai, struct snd_soc_dapm_widget *w)
+{
+ struct snd_soc_dapm_path *p;
+ struct skl_module_cfg *mconfig = NULL;
+
+ snd_soc_dapm_widget_for_each_sink_path(w, p) {
+ if (w->endpoints[SND_SOC_DAPM_DIR_IN] > 0) {
+ if (p->connect &&
+ (p->source->id == snd_soc_dapm_aif_in) &&
+ p->sink->priv) {
+ mconfig = p->sink->priv;
+ return mconfig;
+ }
+ mconfig = skl_get_mconfig_cap_cpr(dai, p->sink);
+ if (mconfig)
+ return mconfig;
+ }
+ }
+ return mconfig;
+}
+
+struct skl_module_cfg *
+skl_tplg_be_get_cpr_module(struct snd_soc_dai *dai, int stream)
+{
+ struct snd_soc_dapm_widget *w;
+ struct skl_module_cfg *mconfig;
+
+ if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ w = dai->playback_widget;
+ mconfig = skl_get_mconfig_pb_cpr(dai, w);
+ } else {
+ w = dai->capture_widget;
+ mconfig = skl_get_mconfig_cap_cpr(dai, w);
+ }
+ return mconfig;
+}
+
static u8 skl_tplg_be_link_type(int dev_type)
{
int ret;
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 9aa2a2b6598a..5f0707cf1f54 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -345,5 +345,7 @@ int skl_set_module_params(struct skl_sst *ctx, u32 *params, int size,
int skl_get_module_params(struct skl_sst *ctx, u32 *params, int size,
u32 param_id, struct skl_module_cfg *mcfg);
+struct skl_module_cfg *skl_tplg_be_get_cpr_module(struct snd_soc_dai *dai,
+ int stream);
enum skl_bitdepth skl_get_bit_depth(int params);
#endif
--
2.7.0.rc3
next prev parent reply other threads:[~2016-02-08 18:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 6:49 [PATCH 0/7] ASoC: Intel: Skylake: Topology sequence changes Vinod Koul
2016-02-05 6:49 ` [PATCH 1/7] ASoC: Intel: Skylake: Update the delay check Vinod Koul
2016-02-08 18:01 ` Applied "ASoC: Intel: Skylake: Update the delay check" to the asoc tree Mark Brown
2016-02-05 6:49 ` [PATCH 2/7] ASoC: Intel: Skylake: Get node id using helper Vinod Koul
2016-02-08 18:01 ` Applied "ASoC: Intel: Skylake: Get node id using helper" to the asoc tree Mark Brown
2016-02-05 6:49 ` [PATCH 3/7] ASoC: Intel: Skylake: Add skl_tplg_be_get_cpr_module() helper Vinod Koul
2016-02-08 18:01 ` Mark Brown [this message]
2016-02-05 6:49 ` [PATCH 4/7] ASoC: Intel: Skylake: Add MCLK configuration Vinod Koul
2016-02-08 16:43 ` Mark Brown
2016-02-09 2:45 ` Vinod Koul
2016-02-08 18:01 ` Applied "ASoC: Intel: Skylake: Add MCLK configuration" to the asoc tree Mark Brown
2016-02-05 6:49 ` [PATCH 5/7] ASoC: Intel: Skylake: Allow module parameter set after bind Vinod Koul
2016-02-08 18:01 ` Applied "ASoC: Intel: Skylake: Allow module parameter set after bind" to the asoc tree Mark Brown
2016-02-05 6:49 ` [PATCH 6/7] ASoC: Intel: Skylake: Add shutdown callback Vinod Koul
2016-02-08 18:01 ` Applied "ASoC: Intel: Skylake: Add shutdown callback" to the asoc tree Mark Brown
2016-02-05 6:49 ` [PATCH 7/7] ASoC: Intel: Skylake: Fill BE blob with default params Vinod Koul
2016-02-08 18:01 ` Applied "ASoC: Intel: Skylake: Fill BE blob with default params" 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=E1aSq7z-0002lR-0g@debutante \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=dharageswari.r@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox