From: jeeja.kp@intel.com
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, patches.audio@intel.com, broonie@kernel.org,
liam.r.girdwood@intel.com, Jeeja KP <jeeja.kp@intel.com>
Subject: [PATCH v3 01/13] ASoC: Intel: Skylake: Update link_index and format in pipe params
Date: Thu, 8 Dec 2016 13:41:12 +0530 [thread overview]
Message-ID: <1481184684-9620-2-git-send-email-jeeja.kp@intel.com> (raw)
In-Reply-To: <1481184684-9620-1-git-send-email-jeeja.kp@intel.com>
From: Jeeja KP <jeeja.kp@intel.com>
To configure Host/Link DMA, additionally link index and format
are required based on the hw params. So added these parameters in
the pipe params and in hw_params the pipe params are updated.
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
---
sound/soc/intel/skylake/skl-pcm.c | 8 ++++++++
sound/soc/intel/skylake/skl-topology.c | 2 ++
sound/soc/intel/skylake/skl-topology.h | 2 ++
3 files changed, 12 insertions(+)
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 84b5101..105aab7 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -292,6 +292,7 @@ static int skl_pcm_hw_params(struct snd_pcm_substream *substream,
p_params.s_freq = params_rate(params);
p_params.host_dma_id = dma_id;
p_params.stream = substream->stream;
+ p_params.format = params_format(params);
m_cfg = skl_tplg_fe_get_cpr_module(dai, p_params.stream);
if (m_cfg)
@@ -506,6 +507,7 @@ static int skl_link_hw_params(struct snd_pcm_substream *substream,
struct hdac_ext_dma_params *dma_params;
struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct skl_pipe_params p_params = {0};
+ struct hdac_ext_link *link;
link_dev = snd_hdac_ext_stream_assign(ebus, substream,
HDAC_EXT_STREAM_TYPE_LINK);
@@ -514,6 +516,10 @@ static int skl_link_hw_params(struct snd_pcm_substream *substream,
snd_soc_dai_set_dma_data(dai, substream, (void *)link_dev);
+ link = snd_hdac_ext_bus_get_link(ebus, rtd->codec->component.name);
+ if (!link)
+ return -EINVAL;
+
/* set the stream tag in the codec dai dma params */
dma_params = snd_soc_dai_get_dma_data(codec_dai, substream);
if (dma_params)
@@ -524,6 +530,8 @@ static int skl_link_hw_params(struct snd_pcm_substream *substream,
p_params.s_freq = params_rate(params);
p_params.stream = substream->stream;
p_params.link_dma_id = hdac_stream(link_dev)->stream_tag - 1;
+ p_params.link_index = link->index;
+ p_params.format = params_format(params);
return skl_tplg_be_update_params(dai, &p_params);
}
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index bd313c9..484d451 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -1207,6 +1207,7 @@ static void skl_tplg_fill_dma_id(struct skl_module_cfg *mcfg,
switch (mcfg->dev_type) {
case SKL_DEVICE_HDALINK:
pipe->p_params->link_dma_id = params->link_dma_id;
+ pipe->p_params->link_index = params->link_index;
break;
case SKL_DEVICE_HDAHOST:
@@ -1220,6 +1221,7 @@ static void skl_tplg_fill_dma_id(struct skl_module_cfg *mcfg,
pipe->p_params->ch = params->ch;
pipe->p_params->s_freq = params->s_freq;
pipe->p_params->stream = params->stream;
+ pipe->p_params->format = params->format;
} else {
memcpy(pipe->p_params, params, sizeof(*params));
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 08d3928..405765f 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -254,6 +254,8 @@ struct skl_pipe_params {
u32 s_freq;
u32 s_fmt;
u8 linktype;
+ snd_pcm_format_t format;
+ int link_index;
int stream;
};
--
2.5.0
next prev parent reply other threads:[~2016-12-08 8:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 8:11 [PATCH v3 00/13] ASoC: Intel: Skylake: Driver updates jeeja.kp
2016-12-08 8:11 ` jeeja.kp [this message]
2016-12-08 8:11 ` [PATCH v3 02/13] ASoC: Intel: Skylake: Add helper function to setup host/link dma jeeja.kp
2016-12-08 8:11 ` [PATCH v3 03/13] ASoC: Intel: Skylake: Configure DMA in PRE_PMD handler of Mixer jeeja.kp
2016-12-08 8:11 ` [PATCH v3 04/13] ASoC: Intel: Skylake: Removed unused skl_get_format() jeeja.kp
2016-12-08 8:11 ` [PATCH v3 05/13] ALSA: hda: check stream decoupled register state jeeja.kp
2016-12-16 8:34 ` Jeeja KP
2016-12-16 13:02 ` Mark Brown
2016-12-28 15:03 ` Takashi Iwai
2017-01-06 18:16 ` Applied "ALSA: hda: check stream decoupled register state" to the asoc tree Mark Brown
2016-12-08 8:11 ` [PATCH v3 06/13] ASoC: Intel: Skylake: Add set_tristate DAI ops to enable SSP MCLK jeeja.kp
2016-12-08 8:11 ` [PATCH v3 07/13] ASoC: Intel: Skylake: Remove unused SSP BE prepare DAI ops jeeja.kp
2016-12-08 8:11 ` [PATCH v3 08/13] ASoC: Intel: Skylake: Add supply widget as non DSP widget jeeja.kp
2016-12-08 8:11 ` [PATCH v3 09/13] ASoC: Intel: Skylake: Add supply widget in skl_nau_max machine jeeja.kp
2016-12-08 8:11 ` [PATCH v3 10/13] ASoC: Intel: Skylake: Add supply widget in bxt_da_max machine jeeja.kp
2016-12-08 8:11 ` [PATCH v3 11/13] ASoC: Intel: Skylake: Don't reset pass-through pipe in BE prepare jeeja.kp
2016-12-08 8:11 ` [PATCH v3 12/13] ASoC: Intel: Skylake: set the resume point to LPIB jeeja.kp
2016-12-08 8:11 ` [PATCH v3 13/13] ASoC: hdac_hdmi: Enable pin and converter in prepare jeeja.kp
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=1481184684-9620-2-git-send-email-jeeja.kp@intel.com \
--to=jeeja.kp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@intel.com \
--cc=patches.audio@intel.com \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).