Skip to content

Commit 4a94940

Browse files
keyonjiebroonie
authored andcommitted
ASoC: SOF: token: add tokens for PCM compatible with D0i3 substate
Add stream token SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3 and SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 to denote if the stream can be opened at low power d0i3 status or not. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191025224122.7718-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent e5c97e8 commit 4a94940

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎include/uapi/sound/sof/tokens.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@
113113
/* ESAI */
114114
#define SOF_TKN_IMX_ESAI_MCLK_ID 1100
115115

116+
/* Stream */
117+
#define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3 1200
118+
#define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 1201
119+
116120
/* Led control for mute switches */
117121
#define SOF_TKN_MUTE_LED_USE 1300
118122
#define SOF_TKN_MUTE_LED_DIRECTION 1301

‎sound/soc/sof/topology.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,16 @@ static const struct sof_topology_token pcm_tokens[] = {
567567
offsetof(struct sof_ipc_comp_host, dmac_config), 0},
568568
};
569569

570+
/* PCM */
571+
static const struct sof_topology_token stream_tokens[] = {
572+
{SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3,
573+
SND_SOC_TPLG_TUPLE_TYPE_BOOL, get_token_u16,
574+
offsetof(struct snd_sof_pcm, stream[0].d0i3_compatible), 0},
575+
{SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3,
576+
SND_SOC_TPLG_TUPLE_TYPE_BOOL, get_token_u16,
577+
offsetof(struct snd_sof_pcm, stream[1].d0i3_compatible), 0},
578+
};
579+
570580
/* Generic components */
571581
static const struct sof_topology_token comp_tokens[] = {
572582
{SOF_TKN_COMP_PERIOD_SINK_COUNT,

0 commit comments

Comments
 (0)