mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
ASoC: SOF: topology: Get HDA rate and channels from topology
FW interface for HDA DAI parameters was extended with information on sampling rate and channel count in version 3.16. Align kernel header with the FW change. This change is backwards compatible. Old firmware will ignore the values. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200415202816.934-23-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -753,6 +753,12 @@ static const struct sof_topology_token dmic_pdm_tokens[] = {
|
||||
|
||||
/* HDA */
|
||||
static const struct sof_topology_token hda_tokens[] = {
|
||||
{SOF_TKN_INTEL_HDA_RATE,
|
||||
SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
|
||||
offsetof(struct sof_ipc_dai_hda_params, rate), 0},
|
||||
{SOF_TKN_INTEL_HDA_CH,
|
||||
SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
|
||||
offsetof(struct sof_ipc_dai_hda_params, channels), 0},
|
||||
};
|
||||
|
||||
/* Leds */
|
||||
@@ -3083,6 +3089,9 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index,
|
||||
return ret;
|
||||
}
|
||||
|
||||
dev_dbg(scomp->dev, "HDA config rate %d channels %d\n",
|
||||
config->hda.rate, config->hda.channels);
|
||||
|
||||
dai = snd_soc_find_dai(link->cpus);
|
||||
if (!dai) {
|
||||
dev_err(scomp->dev, "error: failed to find dai %s in %s",
|
||||
|
||||
Reference in New Issue
Block a user