From: Kirill Marinushkin <k.marinushkin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/2] ASoC: topology: Add missing clock gating parameter when parsing hw_configs
Date: Tue, 20 Feb 2018 18:07:20 +0100 [thread overview]
Message-ID: <1266ac89-cedc-24d9-3899-0aca4e0e05fa@gmail.com> (raw)
In-Reply-To: <20180219060531.17276-2-k.marinushkin@gmail.com>
On 02/19/18 07:05, Kirill Marinushkin wrote:
> Clock gating parameter is a part of `dai_fmt`. It is supported by
> `alsa-lib` when creating a topology binary file, but ignored by kernel
> when loading this topology file.
>
> After applying this commit, the clock gating parameter is not ignored any
> more. The old behaviour is not broken, as by default the parameter value
> is 0.
>
> For example, the following config, based on
> alsa-lib/src/conf/topology/broadwell/broadwell.conf, is now supported:
>
> ~~~~
> SectionHWConfig."CodecHWConfig" {
> id "1"
> format "I2S" # physical audio format.
> bclk "master" # Platform is master of bit clock
> fsync "master" # platform is master of fsync
> pm_cont_clock "true" # clock is continuous, and can not be gated
> }
>
> SectionLink."Codec" {
>
> # used for binding to the physical link
> id "0"
>
> hw_configs [
> "CodecHWConfig"
> ]
>
> default_hw_conf_id "1"
> }
> ~~~~
>
> Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: alsa-devel@alsa-project.org
> Cc: linux-kernel@vger.kernel.org
> ---
> sound/soc/soc-topology.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
> index 01a50413c66f..21bd4f96348d 100644
> --- a/sound/soc/soc-topology.c
> +++ b/sound/soc/soc-topology.c
> @@ -1981,6 +1981,12 @@ static void set_link_hw_format(struct snd_soc_dai_link *link,
>
> link->dai_fmt = hw_config->fmt & SND_SOC_DAIFMT_FORMAT_MASK;
>
> + /* clock gating */
> + if (hw_config->clock_cont)
> + link->dai_fmt |= SND_SOC_DAIFMT_CONT;
> + else
> + link->dai_fmt |= SND_SOC_DAIFMT_GATED;
> +
> /* clock signal polarity */
> invert_bclk = hw_config->invert_bclk;
> invert_fsync = hw_config->invert_fsync;
This patch is outdated. Patch v2 is sent in a different thread to replace it.
Best Regards,
Kirill
next prev parent reply other threads:[~2018-02-20 17:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-19 6:05 [PATCH 1/2] ASoC: topology: Rename clock_gated to clock_cont in snd_soc_tplg_hw_config Kirill Marinushkin
2018-02-19 6:05 ` [PATCH 2/2] ASoC: topology: Add missing clock gating parameter when parsing hw_configs Kirill Marinushkin
2018-02-20 17:07 ` Kirill Marinushkin [this message]
2018-02-19 6:47 ` [PATCH 1/2] ASoC: topology: Rename clock_gated to clock_cont in snd_soc_tplg_hw_config Takashi Sakamoto
2018-02-19 19:00 ` Kirill Marinushkin
2018-02-19 20:36 ` [PATCH v2 1/2] ASoC: topology: Add defines for snd_soc_tplg_hw_config.clock_gated Kirill Marinushkin
2018-02-19 20:36 ` [PATCH v2 2/2] ASoC: topology: Add missing clock gating parameter when parsing hw_configs Kirill Marinushkin
2018-02-20 12:09 ` Applied "ASoC: topology: Add missing clock gating parameter when parsing hw_configs" to the asoc tree Mark Brown
2018-02-20 13:45 ` Mark Brown
2018-02-20 16:56 ` Kirill Marinushkin
2018-02-20 17:03 ` [PATCH v2 1/2] ASoC: topology: Add defines for snd_soc_tplg_hw_config.clock_gated Kirill Marinushkin
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=1266ac89-cedc-24d9-3899-0aca4e0e05fa@gmail.com \
--to=k.marinushkin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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