mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
topology: add support to parse private data for pcm
We have private data section in struct snd_soc_tplg_pcm, but alsatplg doesn't support handling it yet, here add handling in tplg_parse_pcm() to enable it. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
845243bcc2
commit
66a2d53f42
2 changed files with 11 additions and 0 deletions
|
|
@ -53,6 +53,9 @@ struct snd_soc_tplg_private *get_priv_data(struct tplg_elem *elem)
|
||||||
case SND_TPLG_TYPE_BE:
|
case SND_TPLG_TYPE_BE:
|
||||||
priv = &elem->link->priv;
|
priv = &elem->link->priv;
|
||||||
break;
|
break;
|
||||||
|
case SND_TPLG_TYPE_PCM:
|
||||||
|
priv = &elem->pcm->priv;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
SNDERR("error: '%s': no support for private data for type %d\n",
|
SNDERR("error: '%s': no support for private data for type %d\n",
|
||||||
elem->id, elem->type);
|
elem->id, elem->type);
|
||||||
|
|
|
||||||
|
|
@ -732,6 +732,14 @@ int tplg_parse_pcm(snd_tplg_t *tplg,
|
||||||
return err;
|
return err;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* private data */
|
||||||
|
if (strcmp(id, "data") == 0) {
|
||||||
|
err = tplg_parse_data_refs(n, elem);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue