*be_id = sof_end->dai_info->dailink[stream]; if (*be_id < 0) {
dev_err(dev, "Invalid dailink id %d\n", *be_id); return -EINVAL;
}
switch (amd_ctx->acp_rev) { case ACP63_PCI_REV:
ret = get_acp63_cpu_pin_id(ffs(sof_end->link_mask - 1),
*be_id, &cpu_pin_id, dev); if (ret) return ret; break; case ACP70_PCI_REV: case ACP71_PCI_REV: case ACP72_PCI_REV:
ret = get_acp70_cpu_pin_id(ffs(sof_end->link_mask - 1),
*be_id, &cpu_pin_id, dev); if (ret) return ret; break; default: return -EINVAL;
} /* create stream name according to first link id */ if (ctx->append_dai_type) {
name = devm_kasprintf(dev, GFP_KERNEL,
sdw_stream_name[stream + 2],
ffs(sof_end->link_mask) - 1,
cpu_pin_id,
type_strings[sof_end->dai_info->dai_type]);
} else {
name = devm_kasprintf(dev, GFP_KERNEL,
sdw_stream_name[stream],
ffs(sof_end->link_mask) - 1,
cpu_pin_id);
} if (!name) return -ENOMEM;
cpus = devm_kcalloc(dev, num_cpus, sizeof(*cpus), GFP_KERNEL); if (!cpus) return -ENOMEM;
codecs = devm_kcalloc(dev, num_codecs, sizeof(*codecs), GFP_KERNEL); if (!codecs) return -ENOMEM;
codec_maps = devm_kcalloc(dev, num_codecs, sizeof(*codec_maps), GFP_KERNEL); if (!codec_maps) return -ENOMEM;
list_for_each_entry(sof_end, &sof_dai->endpoints, list) { if (!sof_end->dai_info->direction[stream]) continue;
/* * SoundWire DAILINKs use 'stream' functions and Bank Switch operations * based on wait_for_completion(), tag them as 'nonatomic'.
*/
(*dai_links)->nonatomic = true;
(*dai_links)->ch_maps = codec_maps;
ret = asoc_sdw_count_sdw_endpoints(card, &num_devs, &num_ends); if (ret < 0) {
dev_err(dev, "failed to count devices/endpoints: %d\n", ret); return ret;
}
/* One per DAI link, worst case is a DAI link for every endpoint */
sof_dais = kcalloc(num_ends, sizeof(*sof_dais), GFP_KERNEL); if (!sof_dais) return -ENOMEM;
/* One per endpoint, ie. each DAI on each codec/amp */
sof_ends = kcalloc(num_ends, sizeof(*sof_ends), GFP_KERNEL); if (!sof_ends) return -ENOMEM;
ret = asoc_sdw_parse_sdw_endpoints(card, sof_dais, sof_ends, &num_devs); if (ret < 0) return ret;
ctx->mc_quirk = sof_sdw_quirk; /* reset amp_num to ensure amp_num++ starts from 0 in each probe */ for (i = 0; i < ctx->codec_info_list_count; i++)
codec_info_list[i].amp_num = 0;
ret = sof_card_dai_links_create(card); if (ret < 0) return ret;
/* * the default amp_num is zero for each codec and * amp_num will only be increased for active amp * codecs on used platform
*/ for (i = 0; i < ctx->codec_info_list_count; i++)
amp_num += codec_info_list[i].amp_num;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.