ASoC: SOF: topology: add cpu_dai_name for DAIs

Add the cpu_dai_name member to snd_sof_dai and save the
cpu_dai_name while setting the DAI config.

The internal SOF representation will have to change at a later point
as well when we have multiple CPU dais.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Ranjani Sridharan 2019-06-12 12:23:35 -05:00 коммит произвёл Mark Brown
Родитель f5dbba9fee
Коммит 1b7e195686
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 24D68B725D5487D0
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -337,6 +337,7 @@ struct snd_sof_route {
struct snd_sof_dai { struct snd_sof_dai {
struct snd_sof_dev *sdev; struct snd_sof_dev *sdev;
const char *name; const char *name;
const char *cpu_dai_name;
struct sof_ipc_comp_dai comp_dai; struct sof_ipc_comp_dai comp_dai;
struct sof_ipc_dai_config *dai_config; struct sof_ipc_dai_config *dai_config;

Просмотреть файл

@ -2360,6 +2360,9 @@ static int sof_set_dai_config(struct snd_sof_dev *sdev, u32 size,
if (!dai->dai_config) if (!dai->dai_config)
return -ENOMEM; return -ENOMEM;
/* set cpu_dai_name */
dai->cpu_dai_name = link->cpus->dai_name;
found = 1; found = 1;
} }
} }
@ -2624,6 +2627,8 @@ static int sof_link_hda_process(struct snd_sof_dev *sdev,
if (!sof_dai->dai_config) if (!sof_dai->dai_config)
return -ENOMEM; return -ENOMEM;
sof_dai->cpu_dai_name = link->cpus->dai_name;
/* send message to DSP */ /* send message to DSP */
ret = sof_ipc_tx_message(sdev->ipc, ret = sof_ipc_tx_message(sdev->ipc,
config->hdr.cmd, config, size, config->hdr.cmd, config, size,