mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
topology: move the topology element table from builder to elem
- use offsetof() for the lists - add other info to describe the elements - use the table in the element constructor Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
d52eaba63d
commit
4f076f5b69
4 changed files with 199 additions and 153 deletions
|
|
@ -284,18 +284,13 @@ static int tplg_parse_tlv_dbscale(snd_config_t *cfg, struct tplg_elem *elem)
|
|||
{
|
||||
snd_config_iterator_t i, next;
|
||||
snd_config_t *n;
|
||||
struct snd_soc_tplg_ctl_tlv *tplg_tlv;
|
||||
struct snd_soc_tplg_ctl_tlv *tplg_tlv = elem->tlv;
|
||||
struct snd_soc_tplg_tlv_dbscale *scale;
|
||||
const char *id = NULL;
|
||||
int val;
|
||||
|
||||
tplg_dbg(" scale: %s\n", elem->id);
|
||||
|
||||
tplg_tlv = calloc(1, sizeof(*tplg_tlv));
|
||||
if (!tplg_tlv)
|
||||
return -ENOMEM;
|
||||
|
||||
elem->tlv = tplg_tlv;
|
||||
tplg_tlv->size = sizeof(struct snd_soc_tplg_ctl_tlv);
|
||||
tplg_tlv->type = SNDRV_CTL_TLVT_DB_SCALE;
|
||||
scale = &tplg_tlv->scale;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue