|
Packit Service |
db8eaa |
/*
|
|
Packit Service |
db8eaa |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
db8eaa |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
db8eaa |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
db8eaa |
* version 2 of the License, or (at your option) any later version.
|
|
Packit Service |
db8eaa |
*
|
|
Packit Service |
db8eaa |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
db8eaa |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
db8eaa |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
db8eaa |
* Lesser General Public License for more details.
|
|
Packit Service |
db8eaa |
*/
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
#include <limits.h>
|
|
Packit Service |
db8eaa |
#include <stdint.h>
|
|
Packit Service |
db8eaa |
#include <stdbool.h>
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
#include "local.h"
|
|
Packit Service |
db8eaa |
#include "list.h"
|
|
Packit Service |
db8eaa |
#include "bswap.h"
|
|
Packit Service |
db8eaa |
#include "topology.h"
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
#include <sound/type_compat.h>
|
|
Packit Service |
db8eaa |
#include <sound/asound.h>
|
|
Packit Service |
db8eaa |
#include <sound/asoc.h>
|
|
Packit Service |
db8eaa |
#include <sound/tlv.h>
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
#ifdef TPLG_DEBUG
|
|
Packit Service |
db8eaa |
#define tplg_dbg SNDERR
|
|
Packit Service |
db8eaa |
#else
|
|
Packit Service |
db8eaa |
#define tplg_dbg(fmt, arg...) do { } while (0)
|
|
Packit Service |
db8eaa |
#endif
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
#define TPLG_MAX_PRIV_SIZE (1024 * 128)
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/** The name of the environment variable containing the tplg directory */
|
|
Packit Service |
db8eaa |
#define ALSA_CONFIG_TPLG_VAR "ALSA_CONFIG_TPLG"
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct tplg_ref;
|
|
Packit Service |
db8eaa |
struct tplg_elem;
|
|
Packit Service |
db8eaa |
struct tplg_table;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
typedef enum _snd_pcm_rates {
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_UNKNOWN = -1,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_5512 = 0,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_8000,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_11025,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_16000,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_22050,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_32000,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_44100,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_48000,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_64000,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_88200,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_96000,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_176400,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_192000,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_CONTINUOUS = 30,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_KNOT = 31,
|
|
Packit Service |
db8eaa |
SND_PCM_RATE_LAST = SND_PCM_RATE_KNOT,
|
|
Packit Service |
db8eaa |
} snd_pcm_rates_t;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct snd_tplg {
|
|
Packit Service |
db8eaa |
/* out file */
|
|
Packit Service |
db8eaa |
unsigned char *bin;
|
|
Packit Service |
db8eaa |
size_t bin_pos;
|
|
Packit Service |
db8eaa |
size_t bin_size;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int verbose;
|
|
Packit Service |
db8eaa |
unsigned int dapm_sort: 1;
|
|
Packit Service |
db8eaa |
unsigned int version;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* runtime state */
|
|
Packit Service |
db8eaa |
size_t next_hdr_pos;
|
|
Packit Service |
db8eaa |
int index;
|
|
Packit Service |
db8eaa |
int channel_idx;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* manifest */
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_manifest manifest;
|
|
Packit Service |
db8eaa |
void *manifest_pdata; /* copied by builder at file write */
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* list of each element type */
|
|
Packit Service |
db8eaa |
struct list_head tlv_list;
|
|
Packit Service |
db8eaa |
struct list_head widget_list;
|
|
Packit Service |
db8eaa |
struct list_head pcm_list;
|
|
Packit Service |
db8eaa |
struct list_head dai_list;
|
|
Packit Service |
db8eaa |
struct list_head be_list;
|
|
Packit Service |
db8eaa |
struct list_head cc_list;
|
|
Packit Service |
db8eaa |
struct list_head route_list;
|
|
Packit Service |
db8eaa |
struct list_head text_list;
|
|
Packit Service |
db8eaa |
struct list_head pdata_list;
|
|
Packit Service |
db8eaa |
struct list_head token_list;
|
|
Packit Service |
db8eaa |
struct list_head tuple_list;
|
|
Packit Service |
db8eaa |
struct list_head manifest_list;
|
|
Packit Service |
db8eaa |
struct list_head pcm_config_list;
|
|
Packit Service |
db8eaa |
struct list_head pcm_caps_list;
|
|
Packit Service |
db8eaa |
struct list_head hw_cfg_list;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* type-specific control lists */
|
|
Packit Service |
db8eaa |
struct list_head mixer_list;
|
|
Packit Service |
db8eaa |
struct list_head enum_list;
|
|
Packit Service |
db8eaa |
struct list_head bytes_ext_list;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* object text references */
|
|
Packit Service |
db8eaa |
struct tplg_ref {
|
|
Packit Service |
db8eaa |
unsigned int type;
|
|
Packit Service |
db8eaa |
struct tplg_elem *elem;
|
|
Packit Service |
db8eaa |
char id[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
|
|
Packit Service |
db8eaa |
struct list_head list;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct tplg_texts {
|
|
Packit Service |
db8eaa |
unsigned int num_items;
|
|
Packit Service |
db8eaa |
char items[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* element for vendor tokens */
|
|
Packit Service |
db8eaa |
struct tplg_token {
|
|
Packit Service |
db8eaa |
char id[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
|
|
Packit Service |
db8eaa |
unsigned int value;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct tplg_vendor_tokens {
|
|
Packit Service |
db8eaa |
unsigned int num_tokens;
|
|
Packit Service |
db8eaa |
struct tplg_token token[0];
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* element for vendor tuples */
|
|
Packit Service |
db8eaa |
struct tplg_tuple {
|
|
Packit Service |
db8eaa |
char token[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
|
|
Packit Service |
db8eaa |
union {
|
|
Packit Service |
db8eaa |
char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
|
|
Packit Service |
db8eaa |
unsigned char uuid[16];
|
|
Packit Service |
db8eaa |
unsigned int value;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct tplg_tuple_set {
|
|
Packit Service |
db8eaa |
unsigned int type; /* uuid, bool, byte, short, word, string*/
|
|
Packit Service |
db8eaa |
unsigned int num_tuples;
|
|
Packit Service |
db8eaa |
struct tplg_tuple tuple[0];
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct tplg_vendor_tuples {
|
|
Packit Service |
db8eaa |
unsigned int num_sets;
|
|
Packit Service |
db8eaa |
unsigned int alloc_sets;
|
|
Packit Service |
db8eaa |
struct tplg_tuple_set **set;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* topology element */
|
|
Packit Service |
db8eaa |
struct tplg_elem {
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct tplg_table *table;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
char id[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int index;
|
|
Packit Service |
db8eaa |
enum snd_tplg_type type;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int size; /* total size of this object inc pdata and ref objects */
|
|
Packit Service |
db8eaa |
int compound_elem; /* dont write this element as individual elem */
|
|
Packit Service |
db8eaa |
int vendor_type; /* vendor type for private data */
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* UAPI object for this elem */
|
|
Packit Service |
db8eaa |
union {
|
|
Packit Service |
db8eaa |
void *obj;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_mixer_control *mixer_ctrl;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_enum_control *enum_ctrl;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_bytes_control *bytes_ext;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_dapm_widget *widget;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_pcm *pcm;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_dai *dai;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_link_config *link;/* physical link */
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_dapm_graph_elem *route;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_stream *stream_cfg;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_stream_caps *stream_caps;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hw_config *hw_cfg;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* these do not map to UAPI structs but are internal only */
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_ctl_tlv *tlv;
|
|
Packit Service |
db8eaa |
struct tplg_texts *texts;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_private *data;
|
|
Packit Service |
db8eaa |
struct tplg_vendor_tokens *tokens;
|
|
Packit Service |
db8eaa |
struct tplg_vendor_tuples *tuples;
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_manifest *manifest;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* an element may refer to other elements:
|
|
Packit Service |
db8eaa |
* a mixer control may refer to a tlv,
|
|
Packit Service |
db8eaa |
* a widget may refer to a mixer control array,
|
|
Packit Service |
db8eaa |
* a graph may refer to some widgets.
|
|
Packit Service |
db8eaa |
*/
|
|
Packit Service |
db8eaa |
struct list_head ref_list;
|
|
Packit Service |
db8eaa |
struct list_head list; /* list of all elements with same type */
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
void (*free)(void *obj);
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct map_elem {
|
|
Packit Service |
db8eaa |
const char *name;
|
|
Packit Service |
db8eaa |
int id;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* output buffer */
|
|
Packit Service |
db8eaa |
struct tplg_buf {
|
|
Packit Service |
db8eaa |
char *dst;
|
|
Packit Service |
db8eaa |
size_t dst_len;
|
|
Packit Service |
db8eaa |
char *printf_buf;
|
|
Packit Service |
db8eaa |
size_t printf_buf_size;
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
/* mapping table */
|
|
Packit Service |
db8eaa |
struct tplg_table {
|
|
Packit Service |
db8eaa |
const char *name;
|
|
Packit Service |
db8eaa |
const char *id;
|
|
Packit Service |
db8eaa |
const char *id2;
|
|
Packit Service |
db8eaa |
off_t loff;
|
|
Packit Service |
db8eaa |
size_t size;
|
|
Packit Service |
db8eaa |
int type;
|
|
Packit Service |
db8eaa |
int tsoc;
|
|
Packit Service |
db8eaa |
unsigned build: 1;
|
|
Packit Service |
db8eaa |
unsigned enew: 1;
|
|
Packit Service |
db8eaa |
void (*free)(void *);
|
|
Packit Service |
db8eaa |
int (*parse)(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int (*save)(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *prefix);
|
|
Packit Service |
db8eaa |
int (*gsave)(snd_tplg_t *tplg, int index,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *prefix);
|
|
Packit Service |
db8eaa |
int (*decod)(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
};
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
extern struct tplg_table tplg_table[];
|
|
Packit Service |
db8eaa |
extern unsigned int tplg_table_items;
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
#if __SIZEOF_INT__ == 4
|
|
Packit Service |
db8eaa |
static inline unsigned int unaligned_get32(void *src)
|
|
Packit Service |
db8eaa |
{
|
|
Packit Service |
db8eaa |
unsigned int ret;
|
|
Packit Service |
db8eaa |
memcpy(&ret, src, sizeof(ret));
|
|
Packit Service |
db8eaa |
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
|
Packit Service |
db8eaa |
ret = bswap_32(ret);
|
|
Packit Service |
db8eaa |
#endif
|
|
Packit Service |
db8eaa |
return ret;
|
|
Packit Service |
db8eaa |
}
|
|
Packit Service |
db8eaa |
static inline void unaligned_put32(void *dst, unsigned int val)
|
|
Packit Service |
db8eaa |
{
|
|
Packit Service |
db8eaa |
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
|
Packit Service |
db8eaa |
val = bswap_32(val);
|
|
Packit Service |
db8eaa |
#endif
|
|
Packit Service |
db8eaa |
memcpy(dst, &val, sizeof(val));
|
|
Packit Service |
db8eaa |
}
|
|
Packit Service |
db8eaa |
#endif
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
#define tplg_log(tplg, type, pos, fmt, args...) do { \
|
|
Packit Service |
db8eaa |
if ((tplg)->verbose) \
|
|
Packit Service |
db8eaa |
tplg_log_((tplg), (type), (pos), (fmt), ##args); \
|
|
Packit Service |
db8eaa |
} while (0)
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
void tplg_log_(snd_tplg_t *tplg, char type, size_t pos, const char *fmt, ...);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
void *tplg_calloc(struct list_head *heap, size_t size);
|
|
Packit Service |
db8eaa |
void tplg_free(struct list_head *heap);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_get_type(int asoc_type);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_parse_compound(snd_tplg_t *tplg, snd_config_t *cfg,
|
|
Packit Service |
db8eaa |
int (*fcn)(snd_tplg_t *, snd_config_t *, void *),
|
|
Packit Service |
db8eaa |
void *private);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_write_data(snd_tplg_t *tplg);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_parse_tlv(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_text(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_data(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_tokens(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_tuples(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_manifest_data(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_control_bytes(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_control_enum(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_control_mixer(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_dapm_graph(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_dapm_widget(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_stream_caps(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_pcm(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_dai(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_link(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_cc(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
int tplg_parse_hw_config(snd_tplg_t *tplg, snd_config_t *cfg, void *priv);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
unsigned int tplg_get_tuple_size(int type);
|
|
Packit Service |
db8eaa |
void tplg_free_tuples(void *obj);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_build_data(snd_tplg_t *tplg);
|
|
Packit Service |
db8eaa |
int tplg_build_manifest_data(snd_tplg_t *tplg);
|
|
Packit Service |
db8eaa |
int tplg_build_controls(snd_tplg_t *tplg);
|
|
Packit Service |
db8eaa |
int tplg_build_widgets(snd_tplg_t *tplg);
|
|
Packit Service |
db8eaa |
int tplg_build_routes(snd_tplg_t *tplg);
|
|
Packit Service |
db8eaa |
int tplg_build_pcm_dai(snd_tplg_t *tplg, unsigned int type);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_copy_data(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_ref *ref);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_parse_refs(snd_config_t *cfg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
unsigned int type);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_ref_add(struct tplg_elem *elem, int type, const char* id);
|
|
Packit Service |
db8eaa |
int tplg_ref_add_elem(struct tplg_elem *elem, struct tplg_elem *elem_ref);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct tplg_elem *tplg_elem_new(void);
|
|
Packit Service |
db8eaa |
void tplg_elem_free(struct tplg_elem *elem);
|
|
Packit Service |
db8eaa |
void tplg_elem_free_list(struct list_head *base);
|
|
Packit Service |
db8eaa |
void tplg_elem_insert(struct tplg_elem *elem_p, struct list_head *list);
|
|
Packit Service |
db8eaa |
struct tplg_elem *tplg_elem_lookup(struct list_head *base,
|
|
Packit Service |
db8eaa |
const char* id,
|
|
Packit Service |
db8eaa |
unsigned int type,
|
|
Packit Service |
db8eaa |
int index);
|
|
Packit Service |
db8eaa |
struct tplg_elem *tplg_elem_type_lookup(snd_tplg_t *tplg,
|
|
Packit Service |
db8eaa |
enum snd_tplg_type type);
|
|
Packit Service |
db8eaa |
struct tplg_elem* tplg_elem_new_common(snd_tplg_t *tplg,
|
|
Packit Service |
db8eaa |
snd_config_t *cfg, const char *name, enum snd_tplg_type type);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_get_integer(snd_config_t *n, int *val, int base);
|
|
Packit Service |
db8eaa |
int tplg_get_unsigned(snd_config_t *n, unsigned *val, int base);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
const char *tplg_channel_name(int type);
|
|
Packit Service |
db8eaa |
int tplg_parse_channel(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
|
|
Packit Service |
db8eaa |
snd_config_t *cfg, void *private);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
const char *tplg_ops_name(int type);
|
|
Packit Service |
db8eaa |
int tplg_parse_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
|
|
Packit Service |
db8eaa |
snd_config_t *cfg, void *private);
|
|
Packit Service |
db8eaa |
int tplg_parse_ext_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
|
|
Packit Service |
db8eaa |
snd_config_t *cfg, void *private);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
struct tplg_elem *lookup_pcm_dai_stream(struct list_head *base,
|
|
Packit Service |
db8eaa |
const char* id);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_add_data(snd_tplg_t *tplg, struct tplg_elem *parent,
|
|
Packit Service |
db8eaa |
const void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_add_data_bytes(snd_tplg_t *tplg, struct tplg_elem *parent,
|
|
Packit Service |
db8eaa |
const char *suffix, const void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_add_mixer_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
|
|
Packit Service |
db8eaa |
int tplg_add_enum_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
|
|
Packit Service |
db8eaa |
int tplg_add_bytes_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
|
|
Packit Service |
db8eaa |
int tplg_add_widget_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
|
|
Packit Service |
db8eaa |
int tplg_add_graph_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_add_mixer(snd_tplg_t *tplg, struct snd_tplg_mixer_template *mixer,
|
|
Packit Service |
db8eaa |
struct tplg_elem **e);
|
|
Packit Service |
db8eaa |
int tplg_add_enum(snd_tplg_t *tplg, struct snd_tplg_enum_template *enum_ctl,
|
|
Packit Service |
db8eaa |
struct tplg_elem **e);
|
|
Packit Service |
db8eaa |
int tplg_add_bytes(snd_tplg_t *tplg, struct snd_tplg_bytes_template *bytes_ctl,
|
|
Packit Service |
db8eaa |
struct tplg_elem **e);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_build_pcms(snd_tplg_t *tplg, unsigned int type);
|
|
Packit Service |
db8eaa |
int tplg_build_dais(snd_tplg_t *tplg, unsigned int type);
|
|
Packit Service |
db8eaa |
int tplg_build_links(snd_tplg_t *tplg, unsigned int type);
|
|
Packit Service |
db8eaa |
int tplg_add_link_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
|
|
Packit Service |
db8eaa |
int tplg_add_pcm_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
|
|
Packit Service |
db8eaa |
int tplg_add_dai_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_nice_value_format(char *dst, size_t dst_size, unsigned int value);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_save_printf(struct tplg_buf *dst, const char *prefix, const char *fmt, ...);
|
|
Packit Service |
db8eaa |
int tplg_save_refs(snd_tplg_t *tplg, struct tplg_elem *elem, unsigned int type,
|
|
Packit Service |
db8eaa |
const char *id, struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_channels(snd_tplg_t *tplg, struct snd_soc_tplg_channel *channel,
|
|
Packit Service |
db8eaa |
unsigned int channel_count, struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_ops(snd_tplg_t *tplg, struct snd_soc_tplg_ctl_hdr *hdr,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_ext_ops(snd_tplg_t *tplg, struct snd_soc_tplg_bytes_control *be,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_manifest_data(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_control_mixer(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_control_enum(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_control_bytes(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_tlv(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_data(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_text(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_tokens(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_tuples(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_dapm_graph(snd_tplg_t *tplg, int index,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_dapm_widget(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_link(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_cc(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_pcm(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_hw_config(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_stream_caps(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
int tplg_save_dai(snd_tplg_t *tplg, struct tplg_elem *elem,
|
|
Packit Service |
db8eaa |
struct tplg_buf *dst, const char *pfx);
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
int tplg_decode_template(snd_tplg_t *tplg,
|
|
Packit Service |
db8eaa |
size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
snd_tplg_obj_template_t *t);
|
|
Packit Service |
db8eaa |
int tplg_decode_manifest_data(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_control_mixer1(snd_tplg_t *tplg,
|
|
Packit Service |
db8eaa |
struct list_head *heap,
|
|
Packit Service |
db8eaa |
struct snd_tplg_mixer_template *mt,
|
|
Packit Service |
db8eaa |
size_t pos,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_control_mixer(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_control_enum1(snd_tplg_t *tplg,
|
|
Packit Service |
db8eaa |
struct list_head *heap,
|
|
Packit Service |
db8eaa |
struct snd_tplg_enum_template *et,
|
|
Packit Service |
db8eaa |
size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_enum_control *ec);
|
|
Packit Service |
db8eaa |
int tplg_decode_control_enum(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_control_bytes1(snd_tplg_t *tplg,
|
|
Packit Service |
db8eaa |
struct snd_tplg_bytes_template *bt,
|
|
Packit Service |
db8eaa |
size_t pos,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_control_bytes(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_data(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_dapm_graph(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_dapm_widget(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_link(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_cc(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_pcm(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|
|
Packit Service |
db8eaa |
int tplg_decode_dai(snd_tplg_t *tplg, size_t pos,
|
|
Packit Service |
db8eaa |
struct snd_soc_tplg_hdr *hdr,
|
|
Packit Service |
db8eaa |
void *bin, size_t size);
|