- Upstream fixes, including the alsa-tools build breakage: 0001-ucm-Use-strncmp-to-avoid-access-out-of-boundary.patch 0002-ucm-return-always-at-least-NULL-if-no-list-is-availa.patch 0003-ucm-add-_identifiers-list.patch 0004-namehint-correct-the-args-check.patch 0005-namehint-improve-the-previous-patch-check-the-return.patch 0006-ucm-docs-allow-spaces-in-device-names-for-JackHWMute.patch 0007-use-case-docs-add-PlaybackMixerCopy-and-CaptureMixer.patch 0008-ucm-docs-add-JackCTL-rearrange-JackControl-and-JackD.patch 0009-ucm-Do-not-fail-to-parse-configs-on-cards-with-an-em.patch 0010-src-ucm-main.c-fix-build-without-mixer.patch 0011-alsa.m4-another-try-to-fix-the-libatopology-detectio.patch 0012-ucm-docs-add-Mic-DigitalMic-and-multiple-devices-com.patch 0013-ucm-docs-remove-DigitalMic-it-does-not-have-sense.patch 0014-ucm-docs-change-the-Mic-description-to-simple-Microp.patch 0015-ucm-docs-add-note-about-the-sequences-and-device-spl.patch 0016-ucm-docs-remove-MixerCopy-values-add-Priority-for-ve.patch 0017-ucm-setup-conf_format-after-getting-ALSA_CONFIG_UCM_.patch 0018-alsa-lib-fix-the-array-parser-unique-compound-keys.patch 0019-topology-remove-vendor_fd-name-from-snd_tplg-structu.patch 0020-topology-file-position-and-size-cleanups.patch 0021-topology-use-an-array-describing-blocks-for-the-main.patch 0022-topology-use-size_t-for-calc_block_size.patch 0023-topology-merge-write_block-to-tplg_write_data.patch 0024-topology-make-vebose-output-more-nice.patch 0025-topology-use-list_insert-macro-in-tplg_elem_insert.patch 0026-topology-dapm-coding-fixes.patch 0027-topology-dapm-merge-identical-index-blocks-like-for-.patch 0028-topology-more-coding-fixes.patch 0029-Fix-alsa-sound-.h-for-external-programs.patch OBS-URL: https://build.opensuse.org/request/show/758564 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=263
229 lines
7.7 KiB
Diff
229 lines
7.7 KiB
Diff
From 780f17126aa8d54fc09694cbf652d4135eb731c0 Mon Sep 17 00:00:00 2001
|
|
From: Jaroslav Kysela <perex@perex.cz>
|
|
Date: Fri, 13 Dec 2019 22:07:46 +0100
|
|
Subject: [PATCH 28/30] topology: more coding fixes
|
|
|
|
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
---
|
|
src/topology/channel.c | 4 ++--
|
|
src/topology/ctl.c | 15 ++++++++-------
|
|
src/topology/elem.c | 6 ++++--
|
|
src/topology/ops.c | 6 +++---
|
|
src/topology/pcm.c | 20 ++++++++++++--------
|
|
src/topology/text.c | 2 +-
|
|
6 files changed, 30 insertions(+), 23 deletions(-)
|
|
|
|
diff --git a/src/topology/channel.c b/src/topology/channel.c
|
|
index 8516b23f302d..60f7e219a674 100644
|
|
--- a/src/topology/channel.c
|
|
+++ b/src/topology/channel.c
|
|
@@ -74,8 +74,8 @@ static int lookup_channel(const char *c)
|
|
}
|
|
|
|
/* Parse a channel mapping. */
|
|
-int tplg_parse_channel(snd_tplg_t *tplg,
|
|
- snd_config_t *cfg, void *private)
|
|
+int tplg_parse_channel(snd_tplg_t *tplg, snd_config_t *cfg,
|
|
+ void *private)
|
|
{
|
|
snd_config_iterator_t i, next;
|
|
snd_config_t *n;
|
|
diff --git a/src/topology/ctl.c b/src/topology/ctl.c
|
|
index a096252263a5..1db0b16eac95 100644
|
|
--- a/src/topology/ctl.c
|
|
+++ b/src/topology/ctl.c
|
|
@@ -46,7 +46,7 @@ static const struct ctl_access_elem ctl_access[] = {
|
|
|
|
/* find CTL access strings and conver to values */
|
|
static int parse_access_values(snd_config_t *cfg,
|
|
- struct snd_soc_tplg_ctl_hdr *hdr)
|
|
+ struct snd_soc_tplg_ctl_hdr *hdr)
|
|
{
|
|
snd_config_iterator_t i, next;
|
|
snd_config_t *n;
|
|
@@ -77,7 +77,7 @@ static int parse_access_values(snd_config_t *cfg,
|
|
|
|
/* Parse Access */
|
|
int parse_access(snd_config_t *cfg,
|
|
- struct snd_soc_tplg_ctl_hdr *hdr)
|
|
+ struct snd_soc_tplg_ctl_hdr *hdr)
|
|
{
|
|
snd_config_iterator_t i, next;
|
|
snd_config_t *n;
|
|
@@ -118,7 +118,7 @@ static int copy_tlv(struct tplg_elem *elem, struct tplg_elem *ref)
|
|
|
|
/* check referenced TLV for a mixer control */
|
|
static int tplg_build_mixer_control(snd_tplg_t *tplg,
|
|
- struct tplg_elem *elem)
|
|
+ struct tplg_elem *elem)
|
|
{
|
|
struct tplg_ref *ref;
|
|
struct list_head *base, *pos;
|
|
@@ -157,7 +157,7 @@ static int tplg_build_mixer_control(snd_tplg_t *tplg,
|
|
}
|
|
|
|
static void copy_enum_texts(struct tplg_elem *enum_elem,
|
|
- struct tplg_elem *ref_elem)
|
|
+ struct tplg_elem *ref_elem)
|
|
{
|
|
struct snd_soc_tplg_enum_control *ec = enum_elem->enum_ctrl;
|
|
struct tplg_texts *texts = ref_elem->texts;
|
|
@@ -169,7 +169,7 @@ static void copy_enum_texts(struct tplg_elem *enum_elem,
|
|
|
|
/* check referenced text for a enum control */
|
|
static int tplg_build_enum_control(snd_tplg_t *tplg,
|
|
- struct tplg_elem *elem)
|
|
+ struct tplg_elem *elem)
|
|
{
|
|
struct tplg_ref *ref;
|
|
struct list_head *base, *pos;
|
|
@@ -331,7 +331,7 @@ static int tplg_parse_tlv_dbscale(snd_config_t *cfg, struct tplg_elem *elem)
|
|
|
|
/* Parse TLV */
|
|
int tplg_parse_tlv(snd_tplg_t *tplg, snd_config_t *cfg,
|
|
- void *private ATTRIBUTE_UNUSED)
|
|
+ void *private ATTRIBUTE_UNUSED)
|
|
{
|
|
snd_config_iterator_t i, next;
|
|
snd_config_t *n;
|
|
@@ -364,7 +364,8 @@ int tplg_parse_tlv(snd_tplg_t *tplg, snd_config_t *cfg,
|
|
|
|
/* Parse Control Bytes */
|
|
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 tplg_elem *elem;
|
|
diff --git a/src/topology/elem.c b/src/topology/elem.c
|
|
index 140cdd327994..d8618cc9d983 100644
|
|
--- a/src/topology/elem.c
|
|
+++ b/src/topology/elem.c
|
|
@@ -107,7 +107,7 @@ void tplg_elem_free_list(struct list_head *base)
|
|
}
|
|
|
|
struct tplg_elem *tplg_elem_lookup(struct list_head *base, const char* id,
|
|
- unsigned int type, int index)
|
|
+ unsigned int type, int index)
|
|
{
|
|
struct list_head *pos;
|
|
struct tplg_elem *elem;
|
|
@@ -148,7 +148,9 @@ void tplg_elem_insert(struct tplg_elem *elem_p, struct list_head *list)
|
|
|
|
/* create a new common element and object */
|
|
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;
|
|
const char *id, *val = NULL;
|
|
diff --git a/src/topology/ops.c b/src/topology/ops.c
|
|
index 6f8dc1ff310f..0f4295a2e50c 100644
|
|
--- a/src/topology/ops.c
|
|
+++ b/src/topology/ops.c
|
|
@@ -48,8 +48,8 @@ static int lookup_ops(const char *c)
|
|
/* Parse Control operations. Ops can come from standard names above or
|
|
* bespoke driver controls with numbers >= 256
|
|
*/
|
|
-int tplg_parse_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
|
|
- snd_config_t *cfg, void *private)
|
|
+int tplg_parse_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED, snd_config_t *cfg,
|
|
+ void *private)
|
|
{
|
|
snd_config_iterator_t i, next;
|
|
snd_config_t *n;
|
|
@@ -88,7 +88,7 @@ int tplg_parse_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
|
|
* bespoke driver controls with numbers >= 256
|
|
*/
|
|
int tplg_parse_ext_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
|
|
- snd_config_t *cfg, void *private)
|
|
+ snd_config_t *cfg, void *private)
|
|
{
|
|
snd_config_iterator_t i, next;
|
|
snd_config_t *n;
|
|
diff --git a/src/topology/pcm.c b/src/topology/pcm.c
|
|
index 553fd822031b..98a8df979e24 100644
|
|
--- a/src/topology/pcm.c
|
|
+++ b/src/topology/pcm.c
|
|
@@ -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) */
|
|
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;
|
|
|
|
@@ -75,7 +76,8 @@ static void copy_stream_caps(const char *id ATTRIBUTE_UNUSED,
|
|
|
|
/* find and copy the referenced stream caps */
|
|
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;
|
|
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,
|
|
- 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 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 */
|
|
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 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 */
|
|
-int tplg_parse_pcm(snd_tplg_t *tplg,
|
|
- snd_config_t *cfg, void *private ATTRIBUTE_UNUSED)
|
|
+int tplg_parse_pcm(snd_tplg_t *tplg, snd_config_t *cfg,
|
|
+ void *private ATTRIBUTE_UNUSED)
|
|
{
|
|
struct snd_soc_tplg_pcm *pcm;
|
|
struct tplg_elem *elem;
|
|
@@ -746,8 +750,8 @@ int tplg_parse_pcm(snd_tplg_t *tplg,
|
|
}
|
|
|
|
/* Parse physical DAI */
|
|
-int tplg_parse_dai(snd_tplg_t *tplg,
|
|
- snd_config_t *cfg, void *private ATTRIBUTE_UNUSED)
|
|
+int tplg_parse_dai(snd_tplg_t *tplg, snd_config_t *cfg,
|
|
+ void *private ATTRIBUTE_UNUSED)
|
|
{
|
|
struct snd_soc_tplg_dai *dai;
|
|
struct tplg_elem *elem;
|
|
diff --git a/src/topology/text.c b/src/topology/text.c
|
|
index 72647fe04955..f301a4ded727 100644
|
|
--- a/src/topology/text.c
|
|
+++ b/src/topology/text.c
|
|
@@ -59,7 +59,7 @@ static int parse_text_values(snd_config_t *cfg, struct tplg_elem *elem)
|
|
|
|
/* Parse Text data */
|
|
int tplg_parse_text(snd_tplg_t *tplg, snd_config_t *cfg,
|
|
- void *private ATTRIBUTE_UNUSED)
|
|
+ void *private ATTRIBUTE_UNUSED)
|
|
{
|
|
snd_config_iterator_t i, next;
|
|
snd_config_t *n;
|
|
--
|
|
2.16.4
|
|
|