topology: more coding fixes

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-12-13 22:07:46 +01:00
parent 2b50b594dc
commit 780f17126a
6 changed files with 30 additions and 23 deletions

View file

@ -74,8 +74,8 @@ static int lookup_channel(const char *c)
} }
/* Parse a channel mapping. */ /* Parse a channel mapping. */
int tplg_parse_channel(snd_tplg_t *tplg, int tplg_parse_channel(snd_tplg_t *tplg, snd_config_t *cfg,
snd_config_t *cfg, void *private) void *private)
{ {
snd_config_iterator_t i, next; snd_config_iterator_t i, next;
snd_config_t *n; snd_config_t *n;

View file

@ -364,7 +364,8 @@ int tplg_parse_tlv(snd_tplg_t *tplg, snd_config_t *cfg,
/* Parse Control Bytes */ /* Parse Control Bytes */
int tplg_parse_control_bytes(snd_tplg_t *tplg, int tplg_parse_control_bytes(snd_tplg_t *tplg,
snd_config_t *cfg, void *private ATTRIBUTE_UNUSED) snd_config_t *cfg,
void *private ATTRIBUTE_UNUSED)
{ {
struct snd_soc_tplg_bytes_control *be; struct snd_soc_tplg_bytes_control *be;
struct tplg_elem *elem; struct tplg_elem *elem;

View file

@ -148,7 +148,9 @@ void tplg_elem_insert(struct tplg_elem *elem_p, struct list_head *list)
/* create a new common element and object */ /* create a new common element and object */
struct tplg_elem* tplg_elem_new_common(snd_tplg_t *tplg, struct tplg_elem* tplg_elem_new_common(snd_tplg_t *tplg,
snd_config_t *cfg, const char *name, enum snd_tplg_type type) snd_config_t *cfg,
const char *name,
enum snd_tplg_type type)
{ {
struct tplg_elem *elem; struct tplg_elem *elem;
const char *id, *val = NULL; const char *id, *val = NULL;

View file

@ -48,8 +48,8 @@ static int lookup_ops(const char *c)
/* Parse Control operations. Ops can come from standard names above or /* Parse Control operations. Ops can come from standard names above or
* bespoke driver controls with numbers >= 256 * bespoke driver controls with numbers >= 256
*/ */
int tplg_parse_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED, int tplg_parse_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED, snd_config_t *cfg,
snd_config_t *cfg, void *private) void *private)
{ {
snd_config_iterator_t i, next; snd_config_iterator_t i, next;
snd_config_t *n; snd_config_t *n;

View file

@ -63,7 +63,8 @@ struct tplg_elem *lookup_pcm_dai_stream(struct list_head *base, const char* id)
/* copy referenced caps to the parent (pcm or be dai) */ /* copy referenced caps to the parent (pcm or be dai) */
static void copy_stream_caps(const char *id ATTRIBUTE_UNUSED, static void copy_stream_caps(const char *id ATTRIBUTE_UNUSED,
struct snd_soc_tplg_stream_caps *caps, struct tplg_elem *ref_elem) struct snd_soc_tplg_stream_caps *caps,
struct tplg_elem *ref_elem)
{ {
struct snd_soc_tplg_stream_caps *ref_caps = ref_elem->stream_caps; struct snd_soc_tplg_stream_caps *ref_caps = ref_elem->stream_caps;
@ -75,7 +76,8 @@ static void copy_stream_caps(const char *id ATTRIBUTE_UNUSED,
/* find and copy the referenced stream caps */ /* find and copy the referenced stream caps */
static int tplg_build_stream_caps(snd_tplg_t *tplg, static int tplg_build_stream_caps(snd_tplg_t *tplg,
const char *id, int index, struct snd_soc_tplg_stream_caps *caps) const char *id, int index,
struct snd_soc_tplg_stream_caps *caps)
{ {
struct tplg_elem *ref_elem = NULL; struct tplg_elem *ref_elem = NULL;
unsigned int i; unsigned int i;
@ -207,7 +209,8 @@ int tplg_build_dais(snd_tplg_t *tplg, unsigned int type)
} }
static int tplg_build_stream_cfg(snd_tplg_t *tplg, static int tplg_build_stream_cfg(snd_tplg_t *tplg,
struct snd_soc_tplg_stream *stream, int num_streams, int index) struct snd_soc_tplg_stream *stream,
int num_streams, int index)
{ {
struct snd_soc_tplg_stream *strm; struct snd_soc_tplg_stream *strm;
struct tplg_elem *ref_elem; struct tplg_elem *ref_elem;
@ -367,7 +370,8 @@ static int split_rate(struct snd_soc_tplg_stream_caps *caps, char *str)
/* Parse pcm stream capabilities */ /* Parse pcm stream capabilities */
int tplg_parse_stream_caps(snd_tplg_t *tplg, int tplg_parse_stream_caps(snd_tplg_t *tplg,
snd_config_t *cfg, void *private ATTRIBUTE_UNUSED) snd_config_t *cfg,
void *private ATTRIBUTE_UNUSED)
{ {
struct snd_soc_tplg_stream_caps *sc; struct snd_soc_tplg_stream_caps *sc;
struct tplg_elem *elem; struct tplg_elem *elem;
@ -637,8 +641,8 @@ static int parse_flag(snd_config_t *n, unsigned int mask_in,
} }
/* Parse PCM (for front end DAI & DAI link) in text conf file */ /* Parse PCM (for front end DAI & DAI link) in text conf file */
int tplg_parse_pcm(snd_tplg_t *tplg, int tplg_parse_pcm(snd_tplg_t *tplg, snd_config_t *cfg,
snd_config_t *cfg, void *private ATTRIBUTE_UNUSED) void *private ATTRIBUTE_UNUSED)
{ {
struct snd_soc_tplg_pcm *pcm; struct snd_soc_tplg_pcm *pcm;
struct tplg_elem *elem; struct tplg_elem *elem;
@ -746,8 +750,8 @@ int tplg_parse_pcm(snd_tplg_t *tplg,
} }
/* Parse physical DAI */ /* Parse physical DAI */
int tplg_parse_dai(snd_tplg_t *tplg, int tplg_parse_dai(snd_tplg_t *tplg, snd_config_t *cfg,
snd_config_t *cfg, void *private ATTRIBUTE_UNUSED) void *private ATTRIBUTE_UNUSED)
{ {
struct snd_soc_tplg_dai *dai; struct snd_soc_tplg_dai *dai;
struct tplg_elem *elem; struct tplg_elem *elem;