Dmic might have multiple configurations for the same hw, so add them to
nhlt blob. The configurations are separated by dai_index.
Fixes: https://github.com/alsa-project/alsa-utils/pull/164
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ep.subsystem_id = 0;
ep.device_type = 0;
ep.direction = NHLT_ENDPOINT_DIRECTION_CAPTURE;
- ep.virtualbus_id = 0;
+ ep.virtualbus_id = index;
ret = dmic_get_params(nhlt, index, &sample_rate, &channel_count, &bits_per_sample,
&array_type, &num_mics, &extension, &snr, &sensitivity);
eps[i] = NULL;
/* we always have only 0 or 1 dmic ep */
- if (nhlt_dmic_get_ep_count(nhlt)) {
- /* the index is always 0 in dmic case */
- ret = nhlt_dmic_get_ep(nhlt, &eps[eps_count], 0);
+ for (i = 0; i < nhlt_dmic_get_ep_count(nhlt); i++) {
+ ret = nhlt_dmic_get_ep(nhlt, &eps[eps_count], i);
if (ret < 0)
return -EINVAL;
eps_count++;