tools: ctl: Add ABI header for kcontrol read

This is necessary to pass the param ID for the data being requested.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2024-09-17 21:00:19 -07:00 committed by Liam Girdwood
parent 80d6e5eb2b
commit a698198d8e
1 changed files with 2 additions and 0 deletions

View File

@ -508,6 +508,8 @@ static int ctl_set_get(struct ctl_data *ctl_data)
fprintf(stdout, "Retrieving configuration for ");
fprintf(stdout, "device %s control %s.\n",
ctl_data->dev, ctl_data->cname);
/* set the ABI header to pass the param ID */
header_init(ctl_data);
ctl_data->buffer[BUFFER_SIZE_OFFSET] = ctl_data->ctrl_size;
ret = snd_ctl_elem_tlv_read(ctl_data->ctl, ctl_data->id,
ctl_data->buffer,