static const char * const type_strings[] = {"SimpleJack", "SmartAmp", "SmartMic"};
-static int create_sdw_dailink(struct snd_soc_card *card,
- struct device *dev, int *link_index,
+static int create_sdw_dailink(struct snd_soc_card *card, int *link_index,
struct snd_soc_dai_link *dai_links,
int sdw_be_num, int sdw_cpu_dai_num,
struct snd_soc_dai_link_component *cpus,
int adr_index,
int dai_index)
{
+ struct device *dev = card->dev;
const struct snd_soc_acpi_link_adr *adr_link_next;
struct snd_soc_dai_link_component *codecs;
struct sof_sdw_codec_info *codec_info;
return 0;
}
-static int sof_card_dai_links_create(struct device *dev,
- struct snd_soc_acpi_mach *mach,
- struct snd_soc_card *card)
+static int sof_card_dai_links_create(struct snd_soc_card *card)
{
+ struct device *dev = card->dev;
+ struct snd_soc_acpi_mach *mach = dev_get_platdata(card->dev);
int ssp_num, sdw_be_num = 0, hdmi_num = 0, dmic_num;
struct mc_private *ctx = snd_soc_card_get_drvdata(card);
struct snd_soc_dai_link_component *idisp_components;
return codec_index;
for (j = 0; j < codec_info_list[codec_index].dai_num ; j++) {
- ret = create_sdw_dailink(card, dev, &link_index, dai_links,
+ ret = create_sdw_dailink(card, &link_index, dai_links,
sdw_be_num, sdw_cpu_dai_num, cpus,
adr_link, &cpu_id, group_generated,
codec_conf, codec_conf_count,
log_quirks(card->dev);
- ret = sof_card_dai_links_create(card->dev, mach, card);
+ ret = sof_card_dai_links_create(card);
if (ret < 0)
return ret;