alsa-lib/include/sound
Kirill Marinushkin bdb709ab2a ASoC: topology: Add missing clock gating parameter when parsing hw_configs
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. This solution is backwards compatible. The existing behaviour is
not broken, because by default the parameter value is 0 and is ignored.

snd_soc_tplg_hw_config.clock_gated = 0 => no effect
snd_soc_tplg_hw_config.clock_gated = 1 => SND_SOC_DAIFMT_GATED
snd_soc_tplg_hw_config.clock_gated = 2 => SND_SOC_DAIFMT_CONT

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.
        pm_gate_clocks "true"   # clock can 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>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Pan Xiuli <xiuli.pan@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-20 09:27:20 +02:00
..
asequencer.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
asoc.h ASoC: topology: Add missing clock gating parameter when parsing hw_configs 2018-04-20 09:27:20 +02:00
asound.h asound.h: add SNDRV_PCM_FORMAT_{S, U}20 2017-12-18 15:40:14 +01:00
asound_fm.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
asoundef.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
emu10k1.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
hdsp.h Add RME RPM to HDSP_IO_Type. 2011-07-29 07:38:19 +02:00
hdspm.h hdspm.h: Update LTC ioctl to use struct hdspm_ltc 2013-08-19 20:13:55 +02:00
Makefile.am topology: uapi: Add UAPI headers for topology ABI 2015-07-30 16:21:47 +02:00
sb16_csp.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
sscape_ioctl.h Added missing files for alsa-tools 2004-03-12 13:37:10 +00:00
tlv.h Update include/sound/tlv.h from 4.9-pre kernel uapi 2016-09-30 17:12:30 +02:00
type_compat.h Add u8 in type_compat.h 2016-04-28 16:14:49 +02:00