- Backport upstream fix patches, including the deadlock fix for aplay/arecord (boo#1031525): 0001-ucm-Add-ATTRIBUTE_UNUSED-for-unused-parameters-of-ex.patch 0002-ucm-parser-needs-limits.h.patch 0003-pcm-direct-allow-users-to-configure-different-period.patch 0004-pcm-dshare-enable-silence.patch 0005-pcm-rate-fix-the-hw_ptr-update-until-the-boundary-av.patch 0006-plugin-dynamically-update-avail_min-on-slave.patch 0007-rate-dynamic-update-avail_min-on-slave.patch 0008-topology-fix-unused-const-variable-warning.patch 0009-seq-improve-documentation-about-new-get-pid-card-fun.patch 0010-pcm-direct-returning-semop-error-code-for-semaphore-.patch 0011-pcm-direct-Fix-for-sync-issue-on-xrun-recover.patch 0012-pcm-direct-check-state-before-enter-poll-on-timer.patch 0013-pcm-direct-don-t-return-bogus-buffer-levels-in-xrun-.patch 0014-conf-ucm-broxton-add-broxton-rt298-conf-files.patch 0015-pcm-direct-Fix-deadlock-in-poll_descriptors.patch 0016-ucm-Assure-the-user-input-card-name-not-to-exceed-ma.patch 0017-ucm-Load-device-specific-configuration-file-based-on.patch 0018-ucm-Add-command-get-_file-to-get-the-config-file-nam.patch 0019-topology-Fix-incorrect-license-in-source-comments.patch 0020-conf-cards-add-support-for-pistachio-card.patch 0021-pcm-multi-Drop-the-fixed-slave_map-in-snd_pcm_multi_.patch 0022-conf-Add-card-config-for-Intel-HDMI-DP-LPE-audio.patch 0023-pcm-Avoid-lock-for-snd_pcm_nonblock.patch 0024-pcm-Disable-locking-in-async-mode.patch 0025-pcm-dmix-Allow-disabling-x86-optimizations.patch 0026-pcm-dmix_rewind-corrupts-application-pointer-fix.patch 0027-pcm-direct-fix-race-on-clearing-timer-events.patch 0028-pcm-file-Enable-file-writing-for-capture-path.patch OBS-URL: https://build.opensuse.org/request/show/483406 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=210
84 lines
2.3 KiB
Diff
84 lines
2.3 KiB
Diff
From db0e1dcfc22fb2e408a12993cda2d604e0fb10f8 Mon Sep 17 00:00:00 2001
|
|
From: Jaroslav Kysela <perex@perex.cz>
|
|
Date: Mon, 27 Feb 2017 09:46:18 +0100
|
|
Subject: [PATCH 36/43] topology: coverity - remove dead code
|
|
|
|
---
|
|
src/topology/ctl.c | 5 ++---
|
|
src/topology/data.c | 2 +-
|
|
src/topology/pcm.c | 17 +++++++----------
|
|
3 files changed, 10 insertions(+), 14 deletions(-)
|
|
|
|
--- a/src/topology/ctl.c
|
|
+++ b/src/topology/ctl.c
|
|
@@ -173,7 +173,7 @@ static int tplg_build_enum_control(snd_t
|
|
{
|
|
struct tplg_ref *ref;
|
|
struct list_head *base, *pos;
|
|
- int err = 0;
|
|
+ int err;
|
|
|
|
base = &elem->ref_list;
|
|
|
|
@@ -198,8 +198,7 @@ static int tplg_build_enum_control(snd_t
|
|
SNDERR("error: cannot find '%s' referenced by"
|
|
" control '%s'\n", ref->id, elem->id);
|
|
return -EINVAL;
|
|
- } else if (err < 0)
|
|
- return err;
|
|
+ }
|
|
}
|
|
|
|
return 0;
|
|
--- a/src/topology/data.c
|
|
+++ b/src/topology/data.c
|
|
@@ -917,7 +917,7 @@ int tplg_build_manifest_data(snd_tplg_t
|
|
list_for_each(pos, base) {
|
|
|
|
ref = list_entry(pos, struct tplg_ref, list);
|
|
- if (ref->id == NULL || ref->elem)
|
|
+ if (ref->elem)
|
|
continue;
|
|
|
|
if (ref->type == SND_TPLG_TYPE_DATA) {
|
|
--- a/src/topology/pcm.c
|
|
+++ b/src/topology/pcm.c
|
|
@@ -79,8 +79,8 @@ static int build_pcm(snd_tplg_t *tplg, s
|
|
int err;
|
|
|
|
err = tplg_build_stream_caps(tplg, elem->id, elem->pcm->caps);
|
|
- if (err < 0)
|
|
- return err;
|
|
+ if (err < 0)
|
|
+ return err;
|
|
|
|
/* merge private data from the referenced data elements */
|
|
base = &elem->ref_list;
|
|
@@ -96,8 +96,7 @@ static int build_pcm(snd_tplg_t *tplg, s
|
|
SNDERR("error: cannot find '%s' referenced by"
|
|
" PCM '%s'\n", ref->id, elem->id);
|
|
return -EINVAL;
|
|
- } else if (err < 0)
|
|
- return err;
|
|
+ }
|
|
}
|
|
|
|
return 0;
|
|
@@ -1208,12 +1207,10 @@ int tplg_add_link_object(snd_tplg_t *tpl
|
|
|
|
/* ID and names */
|
|
link->id = link_tpl->id;
|
|
- if (link->name)
|
|
- elem_copy_text(link->name, link_tpl->name,
|
|
- SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
|
|
- if (link->stream_name)
|
|
- elem_copy_text(link->stream_name, link_tpl->stream_name,
|
|
- SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
|
|
+ elem_copy_text(link->name, link_tpl->name,
|
|
+ SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
|
|
+ elem_copy_text(link->stream_name, link_tpl->stream_name,
|
|
+ SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
|
|
|
|
/* stream configs */
|
|
if (link_tpl->num_streams > SND_SOC_TPLG_STREAM_CONFIG_MAX)
|