Skip to content

Commit 1993ba2

Browse files
singalsubroonie
authored andcommitted
ASoC: SOF: Intel: Rename deprecated DMIC IPC struct field
This patch restores the field name to fifo_bits_b since the legacy firmware compatibility code (for firmware ABI 3.0.0 or earlier) sets it in sof_link_dmic_load() function in topology.c. Setting of reserved_2 didn't look appropriate. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200415202816.934-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 31be533 commit 1993ba2

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎include/sound/sof/dai-intel.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ struct sof_ipc_dai_dmic_params {
173173
uint32_t fifo_fs; /**< FIFO sample rate in Hz (8000..96000) */
174174
uint32_t reserved_1; /**< Reserved */
175175
uint16_t fifo_bits; /**< FIFO word length (16 or 32) */
176-
uint16_t reserved_2; /**< Reserved */
176+
uint16_t fifo_bits_b; /**< Deprecated since firmware ABI 3.0.1 */
177177

178178
uint16_t duty_min; /**< Min. mic clock duty cycle in % (20..80) */
179179
uint16_t duty_max; /**< Max. mic clock duty cycle in % (min..80) */

‎sound/soc/sof/topology.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2957,10 +2957,12 @@ static int sof_link_dmic_load(struct snd_soc_component *scomp, int index,
29572957
config->dmic.pdm[j].skew);
29582958
}
29592959

2960-
if (SOF_ABI_VER(v->major, v->minor, v->micro) < SOF_ABI_VER(3, 0, 1)) {
2961-
/* this takes care of backwards compatible handling of fifo_bits_b */
2962-
config->dmic.reserved_2 = config->dmic.fifo_bits;
2963-
}
2960+
/*
2961+
* this takes care of backwards compatible handling of fifo_bits_b.
2962+
* It is deprecated since firmware ABI version 3.0.1.
2963+
*/
2964+
if (SOF_ABI_VER(v->major, v->minor, v->micro) < SOF_ABI_VER(3, 0, 1))
2965+
config->dmic.fifo_bits_b = config->dmic.fifo_bits;
29642966

29652967
/* send message to DSP */
29662968
ret = sof_ipc_tx_message(sdev->ipc, config->hdr.cmd, config, size,

0 commit comments

Comments
 (0)