struct snd_soc_acpi_adr_device *adr_dev;
const char *name_prefix = "";
int index = link->num_adr;
- bool is_amp = true; /* Set it to false if the codec wiah any NON-AMP DAI type */
int ep_index = 0;
int i, j;
endpoints[ep_index].aggregated = 0;
endpoints[ep_index].group_id = 0;
endpoints[ep_index].group_position = 0;
- is_amp = false;
}
ep_index++;
}
return NULL;
}
- /*
- * codec_info_list[].is_amp is a codec-level override: for multi-function
- * codecs we must treat the whole codec as an AMP when it is described as
- * such in the codec info table, even if some endpoints were detected as
- * non-AMP above. Callers/UCM rely on this to keep name_prefix and AMP
- * indexing stable and backwards compatible.
- */
- if (codec_info_list[i].is_amp)
- is_amp = true;
-
adr_dev[index].adr = ((u64)sdw_device->id.class_id & 0xFF) |
((u64)sdw_device->id.part_id & 0xFFFF) << 8 |
((u64)sdw_device->id.mfg_id & 0xFFFF) << 24 |
((u64)(sdw_device->id.sdw_version & 0xF) << 44) |
((u64)(sdw_device->bus->link_id & 0xF) << 48);
- if (!is_amp) {
+ if (!codec_info_list[i].is_amp) {
/* For non-amp codecs, get name_prefix from codec_info_list[] */
adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s", name_prefix);
goto done_name_prefix;