Hello community,
here is the log from the commit of package alsa for openSUSE:Factory checked in at 2016-04-05 10:41:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alsa (Old)
and /work/SRC/openSUSE:Factory/.alsa.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "alsa"
Changes:
--------
--- /work/SRC/openSUSE:Factory/alsa/alsa.changes 2016-02-09 16:48:36.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.alsa.new/alsa.changes 2016-04-05 10:41:45.000000000 +0200
@@ -1,0 +2,26 @@
+Thu Mar 31 15:19:33 CEST 2016 - tiwai@suse.de
+
+- Update to alsa-lib 1.1.1:
+ * including previous fixes
+ * a few more fixes/cleanup of control API
+ * BSD compatibility changes
+ * sync with 4.6 kernel ABI
+ * provide API for sequencer sound card number / pid
+ * fix races at dmix/dsnoop plugin
+ * a few topology API updates
+- Drop the obsoleted patches:
+ 0001-topology-Add-missing-include-sys-stat.h.patch
+ 0002-pcm-simple-Fix-asserts.patch
+ 0003-topology-open-topology-files-with-O_TRUNC.patch
+ 0004-topology-Remove-unused-function-write_data_block.patch
+ 0005-topology-Remove-unused-variables.patch
+ 0006-topology-Fix-comparison-of-unsigned-expression-0.patch
+ 0007-topology-Not-compare-a-for-loop-iterator-with-ABI-__.patch
+ 0008-topology-Quit-and-show-error-message-on-big-endian-m.patch
+ 0009-config-files-do-not-include-ucm-topology-configurati.patch
+ 0010-control-add-missing-asserts-to-ctl_elem_set-function.patch
+ 0011-pcm_hw-fix-possible-memory-leak-coverity.patch
+ 0012-coverity-fixes.patch
+ 0013-topology-fix-debug-output-to-print-correct-max-value.patch
+
+-------------------------------------------------------------------
Old:
----
0001-topology-Add-missing-include-sys-stat.h.patch
0002-pcm-simple-Fix-asserts.patch
0003-topology-open-topology-files-with-O_TRUNC.patch
0004-topology-Remove-unused-function-write_data_block.patch
0005-topology-Remove-unused-variables.patch
0006-topology-Fix-comparison-of-unsigned-expression-0.patch
0007-topology-Not-compare-a-for-loop-iterator-with-ABI-__.patch
0008-topology-Quit-and-show-error-message-on-big-endian-m.patch
0009-config-files-do-not-include-ucm-topology-configurati.patch
0010-control-add-missing-asserts-to-ctl_elem_set-function.patch
0011-pcm_hw-fix-possible-memory-leak-coverity.patch
0012-coverity-fixes.patch
0013-topology-fix-debug-output-to-print-correct-max-value.patch
alsa-lib-1.1.0.tar.bz2
New:
----
alsa-lib-1.1.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ alsa.spec ++++++
--- /var/tmp/diff_new_pack.TWP9XZ/_old 2016-04-05 10:41:46.000000000 +0200
+++ /var/tmp/diff_new_pack.TWP9XZ/_new 2016-04-05 10:41:46.000000000 +0200
@@ -16,14 +16,14 @@
#
-%define package_version 1.1.0
+%define package_version 1.1.1
%if 0%{?suse_version} > 1200
%define _udevdir %(pkg-config --variable=udevdir udev)
%else
%define _udevdir /lib/udev
%endif
Name: alsa
-Version: 1.1.0
+Version: 1.1.1
Release: 0
#
Summary: Advanced Linux Sound Architecture
@@ -49,19 +49,6 @@
Source41: install-snd-module
# Patch: alsa-lib-git-fixes.diff
# upstream fixes
-Patch1: 0001-topology-Add-missing-include-sys-stat.h.patch
-Patch2: 0002-pcm-simple-Fix-asserts.patch
-Patch3: 0003-topology-open-topology-files-with-O_TRUNC.patch
-Patch4: 0004-topology-Remove-unused-function-write_data_block.patch
-Patch5: 0005-topology-Remove-unused-variables.patch
-Patch6: 0006-topology-Fix-comparison-of-unsigned-expression-0.patch
-Patch7: 0007-topology-Not-compare-a-for-loop-iterator-with-ABI-__.patch
-Patch8: 0008-topology-Quit-and-show-error-message-on-big-endian-m.patch
-Patch9: 0009-config-files-do-not-include-ucm-topology-configurati.patch
-Patch10: 0010-control-add-missing-asserts-to-ctl_elem_set-function.patch
-Patch11: 0011-pcm_hw-fix-possible-memory-leak-coverity.patch
-Patch12: 0012-coverity-fixes.patch
-Patch13: 0013-topology-fix-debug-output-to-print-correct-max-value.patch
# rest suse patches
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
# suppress timestamp in documents
@@ -132,19 +119,6 @@
%prep
%setup -q -n alsa-lib-%{package_version}
# %patch -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
%if 0%{?suse_version} == 1130
%patch99 -p1
%endif
++++++ alsa-lib-1.1.0.tar.bz2 -> alsa-lib-1.1.1.tar.bz2 ++++++
++++ 1706 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/aserver/aserver.c new/alsa-lib-1.1.1/aserver/aserver.c
--- old/alsa-lib-1.1.0/aserver/aserver.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/aserver/aserver.c 2016-03-31 15:10:39.000000000 +0200
@@ -93,6 +93,7 @@
return result;
}
+ memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(port);
addr.sin_addr.s_addr = INADDR_ANY;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/configure.ac new/alsa-lib-1.1.1/configure.ac
--- old/alsa-lib-1.1.0/configure.ac 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/configure.ac 2016-03-31 15:10:39.000000000 +0200
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT(alsa-lib, 1.1.0)
+AC_INIT(alsa-lib, 1.1.1)
AC_CONFIG_SRCDIR([src/control/control.c])
AC_CONFIG_MACRO_DIR([m4])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/include/Makefile.am new/alsa-lib-1.1.1/include/Makefile.am
--- old/alsa-lib-1.1.0/include/Makefile.am 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/include/Makefile.am 2016-03-31 15:10:39.000000000 +0200
@@ -59,7 +59,7 @@
endif
noinst_HEADERS = alsa sys.h search.h list.h aserver.h local.h alsa-symbols.h \
- asoundlib-head.h asoundlib-tail.h
+ asoundlib-head.h asoundlib-tail.h bswap.h type_compat.h
DISTCLEANFILES = stamp-vh version.h alsa asoundlib.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/include/bswap.h new/alsa-lib-1.1.1/include/bswap.h
--- old/alsa-lib-1.1.0/include/bswap.h 1970-01-01 01:00:00.000000000 +0100
+++ new/alsa-lib-1.1.1/include/bswap.h 2016-03-31 15:10:39.000000000 +0200
@@ -0,0 +1,39 @@
+/*
+ * ALSA lib - compatibility header for providing byte swapping macros
+ * Copyright (c) 2016 by Thomas Klausner
+ *
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef __BSWAP_H
+#define __BSWAP_H
+
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
+#include
+#define bswap_16 bswap16
+#define bswap_32 bswap32
+#define bswap_64 bswap64
+#elif defined (__sun)
+#include
+#define bswap_16 BSWAP_16
+#define bswap_32 BSWAP_32
+#define bswap_64 BSWAP_64
+#else
+#include
+#endif
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/include/local.h new/alsa-lib-1.1.1/include/local.h
--- old/alsa-lib-1.1.0/include/local.h 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/include/local.h 2016-03-31 15:10:39.000000000 +0200
@@ -50,8 +50,12 @@
#include
#include
#include
+#if defined(__linux__)
#include
#include
+#else
+#include "type_compat.h"
+#endif
#ifdef SUPPORT_RESMGR
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/include/seq.h new/alsa-lib-1.1.1/include/seq.h
--- old/alsa-lib-1.1.0/include/seq.h 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/include/seq.h 2016-03-31 15:10:39.000000000 +0200
@@ -143,6 +143,8 @@
const char *snd_seq_client_info_get_name(snd_seq_client_info_t *info);
int snd_seq_client_info_get_broadcast_filter(const snd_seq_client_info_t *info);
int snd_seq_client_info_get_error_bounce(const snd_seq_client_info_t *info);
+int snd_seq_client_info_get_card(const snd_seq_client_info_t *info);
+int snd_seq_client_info_get_pid(const snd_seq_client_info_t *info);
const unsigned char *snd_seq_client_info_get_event_filter(const snd_seq_client_info_t *info);
int snd_seq_client_info_get_num_ports(const snd_seq_client_info_t *info);
int snd_seq_client_info_get_event_lost(const snd_seq_client_info_t *info);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/include/sound/asequencer.h new/alsa-lib-1.1.1/include/sound/asequencer.h
--- old/alsa-lib-1.1.0/include/sound/asequencer.h 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/include/sound/asequencer.h 2016-03-31 15:10:39.000000000 +0200
@@ -22,9 +22,10 @@
#ifndef _UAPI__SOUND_ASEQUENCER_H
#define _UAPI__SOUND_ASEQUENCER_H
+#include
/** version of the sequencer */
-#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1)
+#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2)
/**
* definition of sequencer event types
@@ -356,7 +357,9 @@
unsigned char event_filter[32]; /* event filter bitmap */
int num_ports; /* RO: number of ports */
int event_lost; /* number of lost events */
- char reserved[64]; /* for future use */
+ int card; /* RO: card number[kernel] */
+ int pid; /* RO: pid[user] */
+ char reserved[56]; /* for future use */
};
@@ -593,14 +596,8 @@
#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo)
#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct snd_seq_queue_tempo)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER _IOWR('S', 0x43, struct snd_seq_queue_owner)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER _IOW ('S', 0x44, struct snd_seq_queue_owner)
#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer)
#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct snd_seq_queue_timer)
-/* XXX
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC _IOWR('S', 0x53, struct snd_seq_queue_sync)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC _IOW ('S', 0x54, struct snd_seq_queue_sync)
-*/
#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client)
#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client)
#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/include/sound/asound.h new/alsa-lib-1.1.1/include/sound/asound.h
--- old/alsa-lib-1.1.0/include/sound/asound.h 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/include/sound/asound.h 2016-03-31 15:10:39.000000000 +0200
@@ -23,7 +23,11 @@
#ifndef _UAPI__SOUND_ASOUND_H
#define _UAPI__SOUND_ASOUND_H
+#if defined(__KERNEL__) || defined(__linux__)
#include
+#else
+#include
+#endif
#ifndef __KERNEL__
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/include/topology.h new/alsa-lib-1.1.1/include/topology.h
--- old/alsa-lib-1.1.0/include/topology.h 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/include/topology.h 2016-03-31 15:10:39.000000000 +0200
@@ -93,6 +93,35 @@
* * range
* * strobe
*
+* <h5>Control Access</h5>
+ * Controls access can be specified using the "access" section. If no "access"
+ * section is defined then default RW access flags are set for normal and TLV
+ * controls.
+ *
+ * <pre>
+ * access [
+ * read
+ * write
+ * tlv_command
+ * ]
+ * </pre>
+ *
+ * The standard access flags are as follows :-
+ * * read
+ * * write
+ * * read_write
+ * * volatile
+ * * timestamp
+ * * tlv_read
+ * * tlv_write
+ * * tlv_read_write
+ * * tlv_command
+ * * inactive
+ * * lock
+ * * owner
+ * * tlv_callback
+ * * user
+ *
* <h5>Control TLV Data</h5>
* Controls can also use TLV data to represent dB information. This can be done
* by defining a TLV section and using the TLV section within the control.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/include/type_compat.h new/alsa-lib-1.1.1/include/type_compat.h
--- old/alsa-lib-1.1.0/include/type_compat.h 1970-01-01 01:00:00.000000000 +0100
+++ new/alsa-lib-1.1.1/include/type_compat.h 2016-03-31 15:10:39.000000000 +0200
@@ -0,0 +1,73 @@
+/*
+ * ALSA lib - compatibility header to be included by local.h
+ * Copyright (c) 2016 by Thomas Klausner
+ *
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef __TYPE_COMPAT_H
+#define __TYPE_COMPAT_H
+
+#ifndef EBADFD
+#define EBADFD EBADF
+#endif
+#ifndef ESTRPIPE
+#define ESTRPIPE EPIPE
+#endif
+
+#ifndef __u16
+#define __u16 uint16_t
+#endif
+#ifndef __u32
+#define __u32 uint32_t
+#endif
+#ifndef __u64
+#define __u64 uint64_t
+#endif
+#ifndef __le16
+#define __le16 uint16_t
+#endif
+#ifndef __le32
+#define __le32 uint32_t
+#endif
+#ifndef __le64
+#define __le64 uint64_t
+#endif
+#ifndef u_int8_t
+#define u_int8_t uint8_t
+#endif
+#ifndef u_int16_t
+#define u_int16_t uint16_t
+#endif
+#ifndef u_int32_t
+#define u_int32_t uint32_t
+#endif
+#ifndef u_int32_t
+#define u_int32_t uint64_t
+#endif
+#ifndef __kernel_pid_t
+#define __kernel_pid_t pid_t
+#endif
+#ifndef __kernel_off_t
+#define __kernel_off_t off_t
+#endif
+
+#ifndef __bitwise
+#define __bitwise
+#endif
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/include/version.h new/alsa-lib-1.1.1/include/version.h
--- old/alsa-lib-1.1.0/include/version.h 2015-11-09 08:40:19.000000000 +0100
+++ new/alsa-lib-1.1.1/include/version.h 2016-03-31 15:13:28.000000000 +0200
@@ -4,12 +4,12 @@
#define SND_LIB_MAJOR 1 /**< major number of library version */
#define SND_LIB_MINOR 1 /**< minor number of library version */
-#define SND_LIB_SUBMINOR 0 /**< subminor number of library version */
+#define SND_LIB_SUBMINOR 1 /**< subminor number of library version */
#define SND_LIB_EXTRAVER 1000000 /**< extra version number, used mainly for betas */
/** library version */
#define SND_LIB_VERSION ((SND_LIB_MAJOR<<16)|\
(SND_LIB_MINOR<<8)|\
SND_LIB_SUBMINOR)
/** library version (string) */
-#define SND_LIB_VERSION_STR "1.1.0"
+#define SND_LIB_VERSION_STR "1.1.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/libtool new/alsa-lib-1.1.1/libtool
--- old/alsa-lib-1.1.0/libtool 2015-11-09 08:40:19.000000000 +0100
+++ new/alsa-lib-1.1.1/libtool 2016-03-31 15:13:28.000000000 +0200
@@ -1,7 +1,7 @@
#! /bin/sh
# libtool - Provide generalized library-building support services.
-# Generated automatically by config.status (alsa-lib) 1.1.0
+# Generated automatically by config.status (alsa-lib) 1.1.1
# Libtool was configured on host alsa.alsa-project.org:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/conf/Makefile.am new/alsa-lib-1.1.1/src/conf/Makefile.am
--- old/alsa-lib-1.1.0/src/conf/Makefile.am 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/conf/Makefile.am 2016-03-31 15:10:39.000000000 +0200
@@ -1,4 +1,11 @@
-SUBDIRS=cards pcm alsa.conf.d ucm topology
+SUBDIRS=cards pcm alsa.conf.d
+
+if BUILD_UCM
+SUBDIRS += ucm
+endif
+if BUILD_TOPOLOGY
+SUBDIRS += topology
+endif
cfg_files = alsa.conf
if BUILD_ALISP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/conf.c new/alsa-lib-1.1.1/src/conf.c
--- old/alsa-lib-1.1.0/src/conf.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/conf.c 2016-03-31 15:10:39.000000000 +0200
@@ -3549,7 +3549,7 @@
int n;
#ifndef DOC_HIDDEN
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun)
#define SORTFUNC versionsort
#else
#define SORTFUNC alphasort
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/control/control.c new/alsa-lib-1.1.1/src/control/control.c
--- old/alsa-lib-1.1.0/src/control/control.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/control/control.c 2016-03-31 15:10:39.000000000 +0200
@@ -35,7 +35,7 @@
\section control_general_overview General overview
-The primitive controls can be integer, boolean, enumerators, bytes
+The primitive controls can be integer, inter64, boolean, enumerators, bytes
and IEC958 structure.
*/
@@ -292,7 +292,7 @@
if (err < 0)
return err;
snd_ctl_elem_value_alloca(&val);
- val->id = *id;
+ val->id = info->id;
for (i = 0; i < count; i++)
val->value.integer.value[i] = min;
err = ctl->ops->element_write(ctl, val);
@@ -330,7 +330,7 @@
if (err < 0)
return err;
snd_ctl_elem_value_alloca(&val);
- val->id = *id;
+ val->id = info->id;
for (i = 0; i < count; i++)
val->value.integer64.value[i] = min;
err = ctl->ops->element_write(ctl, val);
@@ -411,7 +411,7 @@
bytes = 0;
for (i = 0; i < items; ++i)
bytes += strlen(names[i]) + 1;
- buf = malloc(bytes);
+ buf = bytes ? malloc(bytes) : NULL;
if (!buf)
return -ENOMEM;
info->value.enumerated.names_ptr = (uintptr_t)buf;
@@ -2497,7 +2497,7 @@
int snd_ctl_elem_value_get_boolean(const snd_ctl_elem_value_t *obj, unsigned int idx)
{
assert(obj);
- assert(idx < sizeof(obj->value.integer.value) / sizeof(obj->value.integer.value[0]));
+ assert(idx < ARRAY_SIZE(obj->value.integer.value));
return obj->value.integer.value[idx];
}
@@ -2510,7 +2510,7 @@
long snd_ctl_elem_value_get_integer(const snd_ctl_elem_value_t *obj, unsigned int idx)
{
assert(obj);
- assert(idx < sizeof(obj->value.integer.value) / sizeof(obj->value.integer.value[0]));
+ assert(idx < ARRAY_SIZE(obj->value.integer.value));
return obj->value.integer.value[idx];
}
@@ -2523,7 +2523,7 @@
long long snd_ctl_elem_value_get_integer64(const snd_ctl_elem_value_t *obj, unsigned int idx)
{
assert(obj);
- assert(idx < sizeof(obj->value.integer64.value) / sizeof(obj->value.integer64.value[0]));
+ assert(idx < ARRAY_SIZE(obj->value.integer64.value));
return obj->value.integer64.value[idx];
}
@@ -2536,7 +2536,7 @@
unsigned int snd_ctl_elem_value_get_enumerated(const snd_ctl_elem_value_t *obj, unsigned int idx)
{
assert(obj);
- assert(idx < sizeof(obj->value.enumerated.item) / sizeof(obj->value.enumerated.item[0]));
+ assert(idx < ARRAY_SIZE(obj->value.enumerated.item));
return obj->value.enumerated.item[idx];
}
@@ -2549,7 +2549,7 @@
unsigned char snd_ctl_elem_value_get_byte(const snd_ctl_elem_value_t *obj, unsigned int idx)
{
assert(obj);
- assert(idx < sizeof(obj->value.bytes.data));
+ assert(idx < ARRAY_SIZE(obj->value.bytes.data));
return obj->value.bytes.data[idx];
}
@@ -2562,6 +2562,7 @@
void snd_ctl_elem_value_set_boolean(snd_ctl_elem_value_t *obj, unsigned int idx, long val)
{
assert(obj);
+ assert(idx < ARRAY_SIZE(obj->value.integer.value));
obj->value.integer.value[idx] = val;
}
@@ -2574,6 +2575,7 @@
void snd_ctl_elem_value_set_integer(snd_ctl_elem_value_t *obj, unsigned int idx, long val)
{
assert(obj);
+ assert(idx < ARRAY_SIZE(obj->value.integer.value));
obj->value.integer.value[idx] = val;
}
@@ -2586,6 +2588,7 @@
void snd_ctl_elem_value_set_integer64(snd_ctl_elem_value_t *obj, unsigned int idx, long long val)
{
assert(obj);
+ assert(idx < ARRAY_SIZE(obj->value.integer64.value));
obj->value.integer64.value[idx] = val;
}
@@ -2598,6 +2601,7 @@
void snd_ctl_elem_value_set_enumerated(snd_ctl_elem_value_t *obj, unsigned int idx, unsigned int val)
{
assert(obj);
+ assert(idx < ARRAY_SIZE(obj->value.enumerated.item));
obj->value.enumerated.item[idx] = val;
}
@@ -2610,6 +2614,7 @@
void snd_ctl_elem_value_set_byte(snd_ctl_elem_value_t *obj, unsigned int idx, unsigned char val)
{
assert(obj);
+ assert(idx < ARRAY_SIZE(obj->value.bytes.data));
obj->value.bytes.data[idx] = val;
}
@@ -2622,10 +2627,7 @@
void snd_ctl_elem_set_bytes(snd_ctl_elem_value_t *obj, void *data, size_t size)
{
assert(obj);
- if (size >= sizeof(obj->value.bytes.data)) {
- assert(0);
- return;
- }
+ assert(size < ARRAY_SIZE(obj->value.bytes.data));
memcpy(obj->value.bytes.data, data, size);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/control/ctlparse.c new/alsa-lib-1.1.1/src/control/ctlparse.c
--- old/alsa-lib-1.1.0/src/control/ctlparse.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/control/ctlparse.c 2016-03-31 15:10:39.000000000 +0200
@@ -62,7 +62,7 @@
val = strtol(s, &p, 0);
if (*p == '.') {
p++;
- strtol(p, &p, 10);
+ (void)strtol(p, &p, 10);
}
if (*p == '%') {
val = (long)convert_prange1(strtod(s, NULL), min, max);
@@ -90,7 +90,7 @@
val = strtol(s, &p, 0);
if (*p == '.') {
p++;
- strtol(p, &p, 10);
+ (void)strtol(p, &p, 10);
}
if (*p == '%') {
val = (long long)convert_prange1(strtod(s, NULL), min, max);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/control/namehint.c new/alsa-lib-1.1.1/src/control/namehint.c
--- old/alsa-lib-1.1.0/src/control/namehint.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/control/namehint.c 2016-03-31 15:10:39.000000000 +0200
@@ -559,6 +559,8 @@
if (err < 0)
return err;
err = snd_config_copy(&local_config_rw, local_config);
+ if (err < 0)
+ return err;
list.list = NULL;
list.count = list.allocated = 0;
list.siface = iface;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm.c new/alsa-lib-1.1.1/src/pcm/pcm.c
--- old/alsa-lib-1.1.0/src/pcm/pcm.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm.c 2016-03-31 15:10:39.000000000 +0200
@@ -7512,7 +7512,7 @@
*/
void snd_pcm_free_chmaps(snd_pcm_chmap_query_t **maps)
{
- snd_pcm_chmap_query_t **p = maps;
+ snd_pcm_chmap_query_t **p;
if (!maps)
return;
for (p = maps; *p; p++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_adpcm.c new/alsa-lib-1.1.1/src/pcm/pcm_adpcm.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_adpcm.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_adpcm.c 2016-03-31 15:10:39.000000000 +0200
@@ -56,7 +56,7 @@
come across a good description of XA yet.
*/
-#include
+#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_alaw.c new/alsa-lib-1.1.1/src/pcm/pcm_alaw.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_alaw.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_alaw.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_copy.c new/alsa-lib-1.1.1/src/pcm/pcm_copy.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_copy.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_copy.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_direct.c new/alsa-lib-1.1.1/src/pcm/pcm_direct.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_direct.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_direct.c 2016-03-31 15:10:39.000000000 +0200
@@ -91,13 +91,19 @@
int snd_pcm_direct_shm_create_or_connect(snd_pcm_direct_t *dmix)
{
struct shmid_ds buf;
- int tmpid, err;
+ int tmpid, err, first_instance = 0;
retryget:
dmix->shmid = shmget(dmix->ipc_key, sizeof(snd_pcm_direct_share_t),
- IPC_CREAT | dmix->ipc_perm);
+ dmix->ipc_perm);
+ if (dmix->shmid < 0) {
+ if (errno == ENOENT)
+ if ((dmix->shmid = shmget(dmix->ipc_key, sizeof(snd_pcm_direct_share_t),
+ IPC_CREAT | IPC_EXCL | dmix->ipc_perm)) != -1)
+ first_instance = 1;
+ }
err = -errno;
- if (dmix->shmid < 0){
+ if (dmix->shmid < 0) {
if (errno == EINVAL)
if ((tmpid = shmget(dmix->ipc_key, 0, dmix->ipc_perm)) != -1)
if (!shmctl(tmpid, IPC_STAT, &buf))
@@ -119,7 +125,7 @@
snd_pcm_direct_shm_discard(dmix);
return err;
}
- if (buf.shm_nattch == 1) { /* we're the first user, clear the segment */
+ if (first_instance) { /* we're the first user, clear the segment */
memset(dmix->shmptr, 0, sizeof(snd_pcm_direct_share_t));
if (dmix->ipc_gid >= 0) {
buf.shm_perm.gid = dmix->ipc_gid;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_dmix_generic.c new/alsa-lib-1.1.1/src/pcm/pcm_dmix_generic.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_dmix_generic.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_dmix_generic.c 2016-03-31 15:10:39.000000000 +0200
@@ -125,7 +125,7 @@
(1ULL << SND_PCM_FORMAT_S24_LE) | (1ULL << SND_PCM_FORMAT_S24_3LE) | \
(1ULL << SND_PCM_FORMAT_U8))
-#include
+#include "bswap.h"
static void generic_mix_areas_16_native(unsigned int size,
volatile signed short *dst,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_file.c new/alsa-lib-1.1.1/src/pcm/pcm_file.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_file.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_file.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include
#include
#include "pcm_local.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_hw.c new/alsa-lib-1.1.1/src/pcm/pcm_hw.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_hw.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_hw.c 2016-03-31 15:10:39.000000000 +0200
@@ -1693,12 +1693,14 @@
err = snd_config_get_string(n, &str);
if (err < 0) {
SNDERR("Invalid type for %s", id);
- return -EINVAL;
+ err = -EINVAL;
+ goto fail;
}
card = snd_card_get_index(str);
if (card < 0) {
SNDERR("Invalid value for %s", id);
- return card;
+ err = card;
+ goto fail;
}
}
continue;
@@ -1707,7 +1709,7 @@
err = snd_config_get_integer(n, &device);
if (err < 0) {
SNDERR("Invalid type for %s", id);
- return err;
+ goto fail;
}
continue;
}
@@ -1715,7 +1717,7 @@
err = snd_config_get_integer(n, &subdevice);
if (err < 0) {
SNDERR("Invalid type for %s", id);
- return err;
+ goto fail;
}
continue;
}
@@ -1738,7 +1740,7 @@
err = snd_config_get_integer(n, &val);
if (err < 0) {
SNDERR("Invalid type for %s", id);
- return err;
+ goto fail;
}
rate = val;
continue;
@@ -1747,7 +1749,7 @@
err = snd_config_get_string(n, &str);
if (err < 0) {
SNDERR("invalid type for %s", id);
- return err;
+ goto fail;
}
format = snd_pcm_format_value(str);
continue;
@@ -1757,7 +1759,7 @@
err = snd_config_get_integer(n, &val);
if (err < 0) {
SNDERR("Invalid type for %s", id);
- return err;
+ goto fail;
}
channels = val;
continue;
@@ -1767,26 +1769,24 @@
chmap = _snd_pcm_parse_config_chmaps(n);
if (!chmap) {
SNDERR("Invalid channel map for %s", id);
- return -EINVAL;
+ goto fail;
}
continue;
}
SNDERR("Unknown field %s", id);
- snd_pcm_free_chmaps(chmap);
- return -EINVAL;
+ err = -EINVAL;
+ goto fail;
}
if (card < 0) {
SNDERR("card is not defined");
- snd_pcm_free_chmaps(chmap);
- return -EINVAL;
+ err = -EINVAL;
+ goto fail;
}
err = snd_pcm_hw_open(pcmp, name, card, device, subdevice, stream,
mode | (nonblock ? SND_PCM_NONBLOCK : 0),
0, sync_ptr_ioctl);
- if (err < 0) {
- snd_pcm_free_chmaps(chmap);
- return err;
- }
+ if (err < 0)
+ goto fail;
if (nonblock && ! (mode & SND_PCM_NONBLOCK)) {
/* revert to blocking mode for read/write access */
snd_pcm_hw_nonblock(*pcmp, 0);
@@ -1810,6 +1810,10 @@
hw->chmap_override = chmap;
return 0;
+
+fail:
+ snd_pcm_free_chmaps(chmap);
+ return err;
}
#ifndef DOC_HIDDEN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_iec958.c new/alsa-lib-1.1.1/src/pcm/pcm_iec958.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_iec958.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_iec958.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_lfloat.c new/alsa-lib-1.1.1/src/pcm/pcm_lfloat.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_lfloat.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_lfloat.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_linear.c new/alsa-lib-1.1.1/src/pcm/pcm_linear.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_linear.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_linear.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_meter.c new/alsa-lib-1.1.1/src/pcm/pcm_meter.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_meter.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_meter.c 2016-03-31 15:10:39.000000000 +0200
@@ -27,7 +27,7 @@
*/
-#include
+#include "bswap.h"
#include
#include
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_misc.c new/alsa-lib-1.1.1/src/pcm/pcm_misc.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_misc.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_misc.c 2016-03-31 15:10:39.000000000 +0200
@@ -23,7 +23,7 @@
#include
#include
#include
-#include
+#include "bswap.h"
#include "pcm_local.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_mulaw.c new/alsa-lib-1.1.1/src/pcm/pcm_mulaw.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_mulaw.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_mulaw.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_multi.c new/alsa-lib-1.1.1/src/pcm/pcm_multi.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_multi.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_multi.c 2016-03-31 15:10:39.000000000 +0200
@@ -888,6 +888,8 @@
slave_maps[i] = calloc(multi->slaves[i].channels_count + 1,
sizeof(int));
if (!slave_maps[i]) {
+ for (i++; i < multi->slaves_count; i++)
+ slave_maps[i] = NULL;
err = -ENOMEM;
goto error;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_null.c new/alsa-lib-1.1.1/src/pcm/pcm_null.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_null.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_null.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_rate.c new/alsa-lib-1.1.1/src/pcm/pcm_rate.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_rate.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_rate.c 2016-03-31 15:10:39.000000000 +0200
@@ -28,7 +28,7 @@
*
*/
#include
-#include
+#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "pcm_rate.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_rate_linear.c new/alsa-lib-1.1.1/src/pcm/pcm_rate_linear.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_rate_linear.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_rate_linear.c 2016-03-31 15:10:39.000000000 +0200
@@ -21,7 +21,7 @@
*/
#include
-#include
+#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "pcm_rate.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_route.c new/alsa-lib-1.1.1/src/pcm/pcm_route.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_route.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_route.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_simple.c new/alsa-lib-1.1.1/src/pcm/pcm_simple.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_simple.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_simple.c 2016-03-31 15:10:39.000000000 +0200
@@ -173,8 +173,8 @@
snd_pcm_sw_params_alloca(&sw_params);
assert(pcm);
- assert(rate > 5000 && rate < 192000);
- assert(channels > 1 && channels < 512);
+ assert(rate >= 5000 && rate <= 192000);
+ assert(channels >= 1 && channels <= 512);
rrate = rate;
err = set_buffer_time(latency, &buffer_time);
@@ -233,8 +233,8 @@
assert(playback_pcm);
assert(capture_pcm);
- assert(rate > 5000 && rate < 192000);
- assert(channels > 1 && channels < 512);
+ assert(rate >= 5000 && rate <= 192000);
+ assert(channels >= 1 && channels <= 512);
pcms[0] = playback_pcm;
pcms[1] = capture_pcm;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/pcm/pcm_softvol.c new/alsa-lib-1.1.1/src/pcm/pcm_softvol.c
--- old/alsa-lib-1.1.0/src/pcm/pcm_softvol.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/pcm/pcm_softvol.c 2016-03-31 15:10:39.000000000 +0200
@@ -26,7 +26,7 @@
*
*/
-#include
+#include "bswap.h"
#include
#include "pcm_local.h"
#include "pcm_plugin.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/seq/seq.c new/alsa-lib-1.1.1/src/seq/seq.c
--- old/alsa-lib-1.1.0/src/seq/seq.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/seq/seq.c 2016-03-31 15:10:39.000000000 +0200
@@ -1522,6 +1522,32 @@
}
/**
+ * \brief Get the sound card number.
+ * \param info client_info container
+ * \return card number or -1 if value is not available.
+ *
+ * Only available for SND_SEQ_KERNEL_CLIENT clients.
+ */
+int snd_seq_client_info_get_card(const snd_seq_client_info_t *info)
+{
+ assert(info);
+ return info->card;
+}
+
+/**
+ * \brief Get the owning PID.
+ * \param info client_info container
+ * \return pid or -1 if value is not available.
+ *
+ * Only available for SND_SEQ_USER_CLIENT clients.
+ */
+int snd_seq_client_info_get_pid(const snd_seq_client_info_t *info)
+{
+ assert(info);
+ return info->pid;
+}
+
+/**
* \brief (DEPRECATED) Get the event filter bitmap of a client_info container
* \param info client_info container
* \return NULL if no event filter, or pointer to event filter bitmap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/seq/seq_hw.c new/alsa-lib-1.1.1/src/seq/seq_hw.c
--- old/alsa-lib-1.1.0/src/seq/seq_hw.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/seq/seq_hw.c 2016-03-31 15:10:39.000000000 +0200
@@ -32,10 +32,11 @@
#ifndef DOC_HIDDEN
#define SNDRV_FILE_SEQ ALSA_DEVICE_DIRECTORY "seq"
#define SNDRV_FILE_ALOADSEQ ALOAD_DEVICE_DIRECTORY "aloadSEQ"
-#define SNDRV_SEQ_VERSION_MAX SNDRV_PROTOCOL_VERSION(1, 0, 1)
+#define SNDRV_SEQ_VERSION_MAX SNDRV_PROTOCOL_VERSION(1, 0, 2)
typedef struct {
int fd;
+ int version;
} snd_seq_hw_t;
#endif /* DOC_HIDDEN */
@@ -100,6 +101,10 @@
/*SYSERR("SNDRV_SEQ_IOCTL_GET_CLIENT_INFO failed");*/
return -errno;
}
+ if (hw->version < SNDRV_PROTOCOL_VERSION(1, 0, 2)) {
+ info->card = -1;
+ info->pid = -1;
+ }
return 0;
}
@@ -368,6 +373,10 @@
/*SYSERR("SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT failed");*/
return -errno;
}
+ if (hw->version < SNDRV_PROTOCOL_VERSION(1, 0, 2)) {
+ info->card = -1;
+ info->pid = -1;
+ }
return 0;
}
@@ -480,6 +489,7 @@
return -ENOMEM;
}
hw->fd = fd;
+ hw->version = ver;
if (streams & SND_SEQ_OPEN_OUTPUT) {
seq->obuf = (char *) malloc(seq->obufsize = SND_SEQ_OBUF_SIZE);
if (!seq->obuf) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/timer/timer_hw.c new/alsa-lib-1.1.1/src/timer/timer_hw.c
--- old/alsa-lib-1.1.0/src/timer/timer_hw.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/timer/timer_hw.c 2016-03-31 15:10:39.000000000 +0200
@@ -85,10 +85,12 @@
}
if (sig < 0)
return 0;
+#ifdef F_SETSIG
if (fcntl(fd, F_SETSIG, (long)sig) < 0) {
SYSERR("F_SETSIG failed");
return -errno;
}
+#endif
if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
SYSERR("F_SETOWN failed");
return -errno;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/topology/builder.c new/alsa-lib-1.1.1/src/topology/builder.c
--- old/alsa-lib-1.1.0/src/topology/builder.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/topology/builder.c 2016-03-31 15:10:39.000000000 +0200
@@ -82,30 +82,6 @@
return bytes;
}
-static int write_data_block(snd_tplg_t *tplg, int size, int tplg_type,
- const char *obj_name, void *data)
-{
- int ret;
-
- /* write the header for this block */
- ret = write_block_header(tplg, tplg_type, 0,
- tplg->version, 0, size, 1);
- if (ret < 0) {
- SNDERR("error: failed to write %s block %d\n", obj_name, ret);
- return ret;
- }
-
- verbose(tplg, " %s : write %d bytes\n", obj_name, size);
-
- ret = write(tplg->out_fd, data, size);
- if (ret < 0) {
- SNDERR("error: failed to write %s %d\n", obj_name, ret);
- return ret;
- }
-
- return 0;
-}
-
static int write_elem_block(snd_tplg_t *tplg,
struct list_head *base, int size, int tplg_type, const char *obj_name)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/topology/channel.c new/alsa-lib-1.1.1/src/topology/channel.c
--- old/alsa-lib-1.1.0/src/topology/channel.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/topology/channel.c 2016-03-31 15:10:39.000000000 +0200
@@ -80,6 +80,7 @@
snd_config_t *n;
struct snd_soc_tplg_channel *channel = private;
const char *id, *value;
+ int channel_id;
if (tplg->channel_idx >= SND_SOC_TPLG_MAX_CHAN)
return -EINVAL;
@@ -88,12 +89,13 @@
snd_config_get_id(cfg, &id);
tplg_dbg("\tChannel %s at index %d\n", id, tplg->channel_idx);
- channel->id = lookup_channel(id);
- if (channel->id < 0) {
+ channel_id = lookup_channel(id);
+ if (channel_id < 0) {
SNDERR("error: invalid channel %s\n", id);
return -EINVAL;
}
+ channel->id = channel_id;
channel->size = sizeof(*channel);
tplg_dbg("\tChan %s = %d\n", id, channel->id);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/topology/ctl.c new/alsa-lib-1.1.1/src/topology/ctl.c
--- old/alsa-lib-1.1.0/src/topology/ctl.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/topology/ctl.c 2016-03-31 15:10:39.000000000 +0200
@@ -21,6 +21,88 @@
#define ENUM_VAL_SIZE (SNDRV_CTL_ELEM_ID_NAME_MAXLEN >> 2)
+struct ctl_access_elem {
+ const char *name;
+ unsigned int value;
+};
+
+/* CTL access strings and codes */
+static const struct ctl_access_elem ctl_access[] = {
+ {"read", SNDRV_CTL_ELEM_ACCESS_READ},
+ {"write", SNDRV_CTL_ELEM_ACCESS_WRITE},
+ {"read_write", SNDRV_CTL_ELEM_ACCESS_READWRITE},
+ {"volatile", SNDRV_CTL_ELEM_ACCESS_VOLATILE},
+ {"timestamp", SNDRV_CTL_ELEM_ACCESS_TIMESTAMP},
+ {"tlv_read", SNDRV_CTL_ELEM_ACCESS_TLV_READ},
+ {"tlv_write", SNDRV_CTL_ELEM_ACCESS_TLV_WRITE},
+ {"tlv_read_write", SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE},
+ {"tlv_command", SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND},
+ {"inactive", SNDRV_CTL_ELEM_ACCESS_INACTIVE},
+ {"lock", SNDRV_CTL_ELEM_ACCESS_LOCK},
+ {"owner", SNDRV_CTL_ELEM_ACCESS_OWNER},
+ {"tlv_callback", SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK},
+ {"user", SNDRV_CTL_ELEM_ACCESS_USER},
+};
+
+/* find CTL access strings and conver to values */
+static int parse_access_values(snd_config_t *cfg,
+ struct snd_soc_tplg_ctl_hdr *hdr)
+{
+ snd_config_iterator_t i, next;
+ snd_config_t *n;
+ const char *value = NULL;
+ unsigned int j;
+
+ tplg_dbg(" Access:\n");
+
+ snd_config_for_each(i, next, cfg) {
+ n = snd_config_iterator_entry(i);
+
+ /* get value */
+ if (snd_config_get_string(n, &value) < 0)
+ continue;
+
+ /* match access value and set flags */
+ for (j = 0; j < ARRAY_SIZE(ctl_access); j++) {
+ if (strcmp(value, ctl_access[j].name) == 0) {
+ hdr->access |= ctl_access[j].value;
+ tplg_dbg("\t%s\n", value);
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/* Parse Access */
+int parse_access(snd_config_t *cfg,
+ struct snd_soc_tplg_ctl_hdr *hdr)
+{
+ snd_config_iterator_t i, next;
+ snd_config_t *n;
+ const char *id;
+ int err = 0;
+
+ snd_config_for_each(i, next, cfg) {
+
+ n = snd_config_iterator_entry(i);
+ if (snd_config_get_id(n, &id) < 0)
+ continue;
+
+ if (strcmp(id, "access") == 0) {
+ err = parse_access_values(n, hdr);
+ if (err < 0) {
+ SNDERR("error: failed to parse access");
+ return err;
+ }
+ continue;
+ }
+ }
+
+ return err;
+}
+
/* copy referenced TLV to the mixer control */
static int copy_tlv(struct tplg_elem *elem, struct tplg_elem *ref)
{
@@ -295,6 +377,7 @@
snd_config_t *n;
const char *id, *val = NULL;
int err;
+ bool access_set = false, tlv_set = false;
elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_BYTES);
if (!elem)
@@ -350,7 +433,7 @@
return -EINVAL;
be->max = atoi(val);
- tplg_dbg("\t%s: %d\n", id, be->num_regs);
+ tplg_dbg("\t%s: %d\n", id, be->max);
continue;
}
@@ -380,11 +463,42 @@
if (err < 0)
return err;
- be->hdr.access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |
- SNDRV_CTL_ELEM_ACCESS_READWRITE;
+ tlv_set = true;
tplg_dbg("\t%s: %s\n", id, val);
continue;
}
+
+ if (strcmp(id, "ops") == 0) {
+ err = tplg_parse_compound(tplg, n, tplg_parse_ops,
+ &be->hdr);
+ if (err < 0)
+ return err;
+ continue;
+ }
+
+ if (strcmp(id, "extops") == 0) {
+ err = tplg_parse_compound(tplg, n, tplg_parse_ext_ops,
+ be);
+ if (err < 0)
+ return err;
+ continue;
+ }
+
+ if (strcmp(id, "access") == 0) {
+ err = parse_access(cfg, &be->hdr);
+ if (err < 0)
+ return err;
+ access_set = true;
+ continue;
+ }
+ }
+
+ /* set CTL access to default values if none are provided */
+ if (!access_set) {
+
+ be->hdr.access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
+ if (tlv_set)
+ be->hdr.access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ;
}
return 0;
@@ -400,6 +514,7 @@
snd_config_t *n;
const char *id, *val = NULL;
int err, j;
+ bool access_set = false;
elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_ENUM);
if (!elem)
@@ -479,6 +594,19 @@
tplg_dbg("\t%s: %s\n", id, val);
continue;
}
+
+ if (strcmp(id, "access") == 0) {
+ err = parse_access(cfg, &ec->hdr);
+ if (err < 0)
+ return err;
+ access_set = true;
+ continue;
+ }
+ }
+
+ /* set CTL access to default values if none are provided */
+ if (!access_set) {
+ ec->hdr.access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
}
return 0;
@@ -497,6 +625,7 @@
snd_config_t *n;
const char *id, *val = NULL;
int err, j;
+ bool access_set = false, tlv_set = false;
elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_MIXER);
if (!elem)
@@ -590,8 +719,7 @@
if (err < 0)
return err;
- mc->hdr.access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |
- SNDRV_CTL_ELEM_ACCESS_READWRITE;
+ tlv_set = true;
tplg_dbg("\t%s: %s\n", id, val);
continue;
}
@@ -604,6 +732,22 @@
tplg_dbg("\t%s: %s\n", id, val);
continue;
}
+
+ if (strcmp(id, "access") == 0) {
+ err = parse_access(cfg, &mc->hdr);
+ if (err < 0)
+ return err;
+ access_set = true;
+ continue;
+ }
+ }
+
+ /* set CTL access to default values if none are provided */
+ if (!access_set) {
+
+ mc->hdr.access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
+ if (tlv_set)
+ mc->hdr.access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ;
}
return 0;
@@ -676,7 +820,7 @@
struct snd_soc_tplg_private *priv = mixer->priv;
struct snd_soc_tplg_mixer_control *mc;
struct tplg_elem *elem;
- int ret, i;
+ int ret, i, num_channels;
tplg_dbg(" Control Mixer: %s\n", mixer->hdr.name);
@@ -708,9 +852,10 @@
for (i = 0; i < SND_SOC_TPLG_MAX_CHAN; i++)
mc->channel[i].reg = -1;
- if (mixer->map)
- mc->num_channels = mixer->map->num_channels;
- for (i = 0; i < mc->num_channels; i++) {
+ num_channels = mixer->map ? mixer->map->num_channels : 0;
+ mc->num_channels = num_channels;
+
+ for (i = 0; i < num_channels; i++) {
struct snd_tplg_channel_elem *channel = &mixer->map->channel[i];
mc->channel[i].size = channel->size;
@@ -743,7 +888,7 @@
{
struct snd_soc_tplg_enum_control *ec;
struct tplg_elem *elem;
- int ret, i;
+ int ret, i, num_items;
tplg_dbg(" Control Enum: %s\n", enum_ctl->hdr.name);
@@ -765,15 +910,14 @@
return ret;
}
- ec->items = enum_ctl->items;
- if (ec->items > SND_SOC_TPLG_NUM_TEXTS)
- ec->items = SND_SOC_TPLG_NUM_TEXTS;
-
+ num_items = enum_ctl->items < SND_SOC_TPLG_NUM_TEXTS ?
+ enum_ctl->items : SND_SOC_TPLG_NUM_TEXTS;
+ ec->items = num_items;
ec->mask = enum_ctl->mask;
ec->count = enum_ctl->items;
if (enum_ctl->texts != NULL) {
- for (i = 0; i < ec->items; i++) {
+ for (i = 0; i < num_items; i++) {
if (enum_ctl->texts[i] != NULL)
strncpy(ec->texts[i], enum_ctl->texts[i],
SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
@@ -781,7 +925,7 @@
}
if (enum_ctl->values != NULL) {
- for (i = 0; i < ec->items; i++) {
+ for (i = 0; i < num_items; i++) {
if (enum_ctl->values[i])
continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/topology/dapm.c new/alsa-lib-1.1.1/src/topology/dapm.c
--- old/alsa-lib-1.1.0/src/topology/dapm.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/topology/dapm.c 2016-03-31 15:10:39.000000000 +0200
@@ -103,6 +103,28 @@
return 0;
}
+static int tplg_parse_dapm_bytes(snd_config_t *cfg, struct tplg_elem *elem)
+{
+ snd_config_iterator_t i, next;
+ snd_config_t *n;
+ const char *value = NULL;
+
+ tplg_dbg(" DAPM Bytes Controls: %s\n", elem->id);
+
+ snd_config_for_each(i, next, cfg) {
+ n = snd_config_iterator_entry(i);
+
+ /* get value */
+ if (snd_config_get_string(n, &value) < 0)
+ continue;
+
+ tplg_ref_add(elem, SND_TPLG_TYPE_BYTES, value);
+ tplg_dbg("\t\t %s\n", value);
+ }
+
+ return 0;
+}
+
/* move referenced controls to the widget */
static int copy_dapm_control(struct tplg_elem *elem, struct tplg_elem *ref)
{
@@ -564,6 +586,14 @@
if (err < 0)
return err;
+ continue;
+ }
+
+ if (strcmp(id, "bytes") == 0) {
+ err = tplg_parse_dapm_bytes(n, elem);
+ if (err < 0)
+ return err;
+
continue;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/topology/ops.c new/alsa-lib-1.1.1/src/topology/ops.c
--- old/alsa-lib-1.1.0/src/topology/ops.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/topology/ops.c 2016-03-31 15:10:39.000000000 +0200
@@ -82,3 +82,41 @@
return 0;
}
+
+/* Parse External Control operations. Ops can come from standard names above or
+ * 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_iterator_t i, next;
+ snd_config_t *n;
+ struct snd_soc_tplg_bytes_control *be = private;
+ const char *id, *value;
+
+ tplg_dbg("\tExt Ops\n");
+
+ snd_config_for_each(i, next, cfg) {
+
+ n = snd_config_iterator_entry(i);
+
+ /* get id */
+ if (snd_config_get_id(n, &id) < 0)
+ continue;
+
+ /* get value - try strings then ints */
+ if (snd_config_get_string(n, &value) < 0)
+ continue;
+
+ if (strcmp(id, "info") == 0)
+ be->ext_ops.info = lookup_ops(value);
+ else if (strcmp(id, "put") == 0)
+ be->ext_ops.put = lookup_ops(value);
+ else if (strcmp(id, "get") == 0)
+ be->ext_ops.get = lookup_ops(value);
+
+ tplg_dbg("\t\t%s = %s\n", id, value);
+ }
+
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/topology/parser.c new/alsa-lib-1.1.1/src/topology/parser.c
--- old/alsa-lib-1.1.0/src/topology/parser.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/topology/parser.c 2016-03-31 15:10:39.000000000 +0200
@@ -16,6 +16,7 @@
Liam Girdwood
*/
+#include
#include "list.h"
#include "tplg_local.h"
@@ -259,7 +260,7 @@
int err = 0;
tplg->out_fd =
- open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+ open(outfile, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (tplg->out_fd < 0) {
SNDERR("error: failed to open %s err %d\n",
outfile, -errno);
@@ -327,7 +328,7 @@
int err;
tplg->out_fd =
- open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+ open(outfile, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (tplg->out_fd < 0) {
SNDERR("error: failed to open %s err %d\n",
outfile, -errno);
@@ -370,10 +371,25 @@
tplg->verbose = verbose;
}
+static bool is_little_endian(void)
+{
+#ifdef __BYTE_ORDER
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+ return true;
+ #endif
+#endif
+ return false;
+}
+
snd_tplg_t *snd_tplg_new(void)
{
snd_tplg_t *tplg;
+ if (!is_little_endian()) {
+ SNDERR("error: cannot support big-endian machines\n");
+ return NULL;
+ }
+
tplg = calloc(1, sizeof(snd_tplg_t));
if (!tplg)
return NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/topology/pcm.c new/alsa-lib-1.1.1/src/topology/pcm.c
--- old/alsa-lib-1.1.0/src/topology/pcm.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/topology/pcm.c 2016-03-31 15:10:39.000000000 +0200
@@ -58,7 +58,6 @@
struct tplg_elem *ref_elem = NULL;
struct snd_soc_tplg_pcm *pcm;
struct snd_soc_tplg_stream_caps *caps;
- struct snd_soc_tplg_stream *stream;
unsigned int i;
pcm = elem->pcm;
@@ -273,7 +272,7 @@
struct tplg_elem *elem = private;
struct snd_soc_tplg_pcm *pcm;
const char *id, *value;
- int err, stream;
+ int stream;
pcm = elem->pcm;
@@ -384,7 +383,6 @@
snd_config_iterator_t i, next;
snd_config_t *n;
const char *id, *val = NULL;
- int err;
elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_BE);
if (!elem)
@@ -438,7 +436,6 @@
snd_config_iterator_t i, next;
snd_config_t *n;
const char *id, *val = NULL;
- int err;
elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_CC);
if (!elem)
@@ -553,7 +550,7 @@
}
pcm->num_streams = pcm_tpl->num_streams;
- for (i = 0; i < pcm->num_streams; i++)
+ for (i = 0; i < pcm_tpl->num_streams; i++)
tplg_add_stream_object(&pcm->stream[i], &pcm_tpl->stream[i]);
return 0;
@@ -586,7 +583,7 @@
lk->id = link->id;
lk->num_streams = link->num_streams;
- for (i = 0; i < lk->num_streams; i++)
+ for (i = 0; i < link->num_streams; i++)
tplg_add_stream_object(&lk->stream[i], &link->stream[i]);
return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/topology/tplg_local.h new/alsa-lib-1.1.1/src/topology/tplg_local.h
--- old/alsa-lib-1.1.0/src/topology/tplg_local.h 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/topology/tplg_local.h 2016-03-31 15:10:39.000000000 +0200
@@ -12,7 +12,7 @@
#include
#include
-#include
+#include
#include "local.h"
#include "list.h"
@@ -206,6 +206,8 @@
int tplg_parse_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
snd_config_t *cfg, void *private);
+int tplg_parse_ext_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
+ snd_config_t *cfg, void *private);
struct tplg_elem *lookup_pcm_dai_stream(struct list_head *base,
const char* id);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/src/ucm/parser.c new/alsa-lib-1.1.1/src/ucm/parser.c
--- old/alsa-lib-1.1.0/src/ucm/parser.c 2015-11-09 08:39:18.000000000 +0100
+++ new/alsa-lib-1.1.1/src/ucm/parser.c 2016-03-31 15:10:39.000000000 +0200
@@ -1264,7 +1264,7 @@
"%s", env ? env : ALSA_USE_CASE_DIR);
filename[MAX_FILE-1] = '\0';
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun)
#define SORTFUNC versionsort
#else
#define SORTFUNC alphasort
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-lib-1.1.0/version new/alsa-lib-1.1.1/version
--- old/alsa-lib-1.1.0/version 2015-11-09 08:40:17.000000000 +0100
+++ new/alsa-lib-1.1.1/version 2016-03-31 15:13:25.000000000 +0200
@@ -1 +1 @@
-1.1.0
+1.1.1