mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-23 03:56:31 +01:00
topology: plugins: nhlt: add dmic dai index
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>
This commit is contained in:
parent
038ed518e9
commit
e13a7d3cf6
2 changed files with 3 additions and 4 deletions
|
@ -251,7 +251,7 @@ int nhlt_dmic_get_ep(struct intel_nhlt_params *nhlt, struct endpoint_descriptor
|
||||||
ep.subsystem_id = 0;
|
ep.subsystem_id = 0;
|
||||||
ep.device_type = 0;
|
ep.device_type = 0;
|
||||||
ep.direction = NHLT_ENDPOINT_DIRECTION_CAPTURE;
|
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,
|
ret = dmic_get_params(nhlt, index, &sample_rate, &channel_count, &bits_per_sample,
|
||||||
&array_type, &num_mics, &extension, &snr, &sensitivity);
|
&array_type, &num_mics, &extension, &snr, &sensitivity);
|
||||||
|
|
|
@ -327,9 +327,8 @@ static int nhlt_create(struct intel_nhlt_params *nhlt, snd_config_t *input, snd_
|
||||||
eps[i] = NULL;
|
eps[i] = NULL;
|
||||||
|
|
||||||
/* we always have only 0 or 1 dmic ep */
|
/* we always have only 0 or 1 dmic ep */
|
||||||
if (nhlt_dmic_get_ep_count(nhlt)) {
|
for (i = 0; i < nhlt_dmic_get_ep_count(nhlt); i++) {
|
||||||
/* the index is always 0 in dmic case */
|
ret = nhlt_dmic_get_ep(nhlt, &eps[eps_count], i);
|
||||||
ret = nhlt_dmic_get_ep(nhlt, &eps[eps_count], 0);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
eps_count++;
|
eps_count++;
|
||||||
|
|
Loading…
Reference in a new issue