diff --git a/0001-local.h-use-__kernel_off_t-from-linux-types.h.patch b/0001-local.h-use-__kernel_off_t-from-linux-types.h.patch
deleted file mode 100644
index f6923a6..0000000
--- a/0001-local.h-use-__kernel_off_t-from-linux-types.h.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b3b53a1bec47aaa2baef724cc9e79adadd603caf Mon Sep 17 00:00:00 2001
-From: Jaroslav Kysela
-Date: Tue, 23 Jul 2013 14:50:41 +0200
-Subject: [PATCH 1/6] local.h: use __kernel_off_t from
-
-Also, make the empty definitions __user and __force conditional.
-
-Signed-off-by: Jaroslav Kysela
----
- include/local.h | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/include/local.h b/include/local.h
-index 53cb647..f0db188 100644
---- a/include/local.h
-+++ b/include/local.h
-@@ -32,6 +32,7 @@
- #include
- #include
- #include
-+#include
- #include
-
- #include "config.h"
-@@ -114,9 +115,12 @@
- #define snd_ctl_tlv sndrv_ctl_tlv
-
- /* kill and replace kernel-specific types */
-+#ifndef __user
- #define __user
-+#endif
-+#ifndef __force
- #define __force
--#define __kernel_off_t off_t
-+#endif
-
- #include
-
---
-1.8.4
-
diff --git a/0002-conf-cards-add-Audio-Advantage-Micro-II.patch b/0002-conf-cards-add-Audio-Advantage-Micro-II.patch
deleted file mode 100644
index aa53f8e..0000000
--- a/0002-conf-cards-add-Audio-Advantage-Micro-II.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 994ab14b401b2873c5f927215bbb86fe6f6335fc Mon Sep 17 00:00:00 2001
-From: Przemek Rudy
-Date: Tue, 30 Jul 2013 22:31:44 +0200
-Subject: [PATCH 2/6] conf/cards: add Audio Advantage Micro II
-
-With related kernel chnages add extended suport for:
-- AES bits controls (via device suffix AESn= or tools like iecset)
-- SPDIF switch control, turning on/off the optical transmitter (via alsamixer tool)
-
-Signed-off-by: Przemek Rudy
-Signed-off-by: Takashi Iwai
----
- src/conf/cards/USB-Audio.conf | 35 +++++++++++++++++++++++++++++++++++
- 1 file changed, 35 insertions(+)
-
-diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
-index 0d93175..8a6d9ca 100644
---- a/src/conf/cards/USB-Audio.conf
-+++ b/src/conf/cards/USB-Audio.conf
-@@ -101,6 +101,41 @@ USB-Audio."Audiophile USB (tm)".pcm.iec958 {
- }
- }
-
-+# For this card we can (and must to get IEC61937) set AES bits
-+USB-Audio."MicroII".pcm.iec958 "cards.USB-Audio.Audio Advantage MicroII.pcm.iec958"
-+USB-Audio."Audio Advantage MicroII".pcm.iec958 {
-+ @args [ CARD AES0 AES1 AES2 AES3 ]
-+ @args.CARD { type string }
-+ @args.AES0 { type integer }
-+ @args.AES1 { type integer }
-+ @args.AES2 { type integer }
-+ @args.AES3 { type integer }
-+
-+ type hooks
-+ slave.pcm {
-+ type hw
-+ card $CARD
-+ }
-+
-+ hooks.0 {
-+ type ctl_elems
-+ hook_args [
-+ {
-+ interface PCM
-+ name "IEC958 Playback Default"
-+ preserve true
-+ optional true
-+ value [ $AES0 $AES1 $AES2 $AES3 ]
-+ }
-+ {
-+ name "IEC958 Playback Switch"
-+ lock true
-+ preserve true
-+ value 1
-+ }
-+ ]
-+ }
-+}
-
- ################################################################################
-
---
-1.8.4
-
diff --git a/0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch b/0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch
deleted file mode 100644
index a6516c1..0000000
--- a/0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From d469ebe2efe514ce10511dfdff852063030d658d Mon Sep 17 00:00:00 2001
-From: Laurentiu Nicola
-Date: Thu, 8 Aug 2013 12:29:09 +0200
-Subject: [PATCH 3/6] pcm: Fix a wrong value shown in the error message in rate
- plugin
-
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
-index ca4d416..c54fa06 100644
---- a/src/pcm/pcm.c
-+++ b/src/pcm/pcm.c
-@@ -7932,7 +7932,7 @@ int snd_pcm_set_params(snd_pcm_t *pcm,
- return err;
- }
- if (rrate != rate) {
-- SNDERR("Rate doesn't match (requested %iHz, get %iHz)", rate, err);
-+ SNDERR("Rate doesn't match (requested %iHz, get %iHz)", rate, rrate);
- return -EINVAL;
- }
- /* set the buffer time */
---
-1.8.4
-
diff --git a/0004-UCM-Document-some-standard-values.patch b/0004-UCM-Document-some-standard-values.patch
deleted file mode 100644
index 4eb46c9..0000000
--- a/0004-UCM-Document-some-standard-values.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 36bc5770409901b0e3a1b1cb5a027cdb71ff47f5 Mon Sep 17 00:00:00 2001
-From: Arun Raghavan
-Date: Wed, 7 Aug 2013 23:26:31 +0530
-Subject: [PATCH 4/6] UCM: Document some standard values
-
-Playback/CaptureChannels has been around for a bit. Playback/CaptureRate
-is new and is intended to be used to specify the sample rate at which
-the Playback/CapturePCM should be opened.
-
-Signed-off-by: Takashi Iwai
----
- include/use-case.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/include/use-case.h b/include/use-case.h
-index 93b3456..4e13249 100644
---- a/include/use-case.h
-+++ b/include/use-case.h
-@@ -259,9 +259,13 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
- * TQ - Tone Quality
- * PlaybackPCM - full PCM playback device name
- * CapturePCM - full PCM capture device name
-+ * PlaybackRate - playback device sample rate
-+ * PlaybackChannels - playback device channel count
- * PlaybackCTL - playback control device name
- * PlaybackVolume - playback control volume ID string
- * PlaybackSwitch - playback control switch ID string
-+ * CaptureRate - capture device sample rate
-+ * CaptureChannels - capture device channel count
- * CaptureCTL - capture control device name
- * CaptureVolume - capture control volume ID string
- * CaptureSwitch - capture control switch ID string
---
-1.8.4
-
diff --git a/0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch b/0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch
deleted file mode 100644
index f3f2a2f..0000000
--- a/0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 4b169b05b48f4ea0196879b62b8c3fa5b050e806 Mon Sep 17 00:00:00 2001
-From: Adrian Knoth
-Date: Mon, 19 Aug 2013 17:31:37 +0200
-Subject: [PATCH 5/6] hdspm.h: Update LTC ioctl to use struct hdspm_ltc
-
-Use struct hdspm_ltc to query the LTC, using a mixer struct was just
-plain wrong.
-
-Due to the wrong struct, this ioctl was never working, so we're free to
-fix it without breaking userspace compatibility.
-
-Signed-off-by: Adrian Knoth
-Signed-off-by: Takashi Iwai
----
- include/sound/hdspm.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h
-index 1774ff5..fe9c5f6 100644
---- a/include/sound/hdspm.h
-+++ b/include/sound/hdspm.h
-@@ -111,7 +111,7 @@ struct hdspm_ltc {
- enum hdspm_ltc_input_format input_format;
- };
-
--#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_mixer_ioctl)
-+#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
-
- /**
- * The status data reflects the device's current state
---
-1.8.4
-
diff --git a/0006-Update-iatomic.h-functions-definitions-for-mips.patch b/0006-Update-iatomic.h-functions-definitions-for-mips.patch
deleted file mode 100644
index 19fc8b9..0000000
--- a/0006-Update-iatomic.h-functions-definitions-for-mips.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001
-From: Kai Kang
-Date: Thu, 15 Aug 2013 17:17:19 +0800
-Subject: [PATCH 6/6] Update iatomic.h functions definitions for mips
-
-Functions atomic_add(s) and atomic_sub(s) are defined with 'extern
-__inline__' that may cause compile fails when cross compile for mips.
-The error message looks like:
-
-| pcm/.libs/libpcm.a(pcm_meter.o): In function `snd_pcm_meter_update_scope':
-| .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to `atomic_sub'
-
-Replace the 'extern __inline__' with 'static __inline__' to fix this
-issue.
-
-Signed-off-by: Kai Kang
-Signed-off-by: Takashi Iwai
----
- include/iatomic.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/include/iatomic.h b/include/iatomic.h
-index 5711fe8..2393297 100644
---- a/include/iatomic.h
-+++ b/include/iatomic.h
-@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t;
- * Atomically adds @i to @v. Note that the guaranteed useful range
- * of an atomic_t is only 24 bits.
- */
--extern __inline__ void atomic_add(int i, atomic_t * v)
-+static __inline__ void atomic_add(int i, atomic_t * v)
- {
- unsigned long temp;
-
-@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v)
- * Atomically subtracts @i from @v. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
--extern __inline__ void atomic_sub(int i, atomic_t * v)
-+static __inline__ void atomic_sub(int i, atomic_t * v)
- {
- unsigned long temp;
-
-@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v)
- /*
- * Same as above, but return the result value
- */
--extern __inline__ int atomic_add_return(int i, atomic_t * v)
-+static __inline__ int atomic_add_return(int i, atomic_t * v)
- {
- unsigned long temp, result;
-
-@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v)
- return result;
- }
-
--extern __inline__ int atomic_sub_return(int i, atomic_t * v)
-+static __inline__ int atomic_sub_return(int i, atomic_t * v)
- {
- unsigned long temp, result;
-
---
-1.8.4
-
diff --git a/0007-Fix-access-of-freed-memory-in-namehints.patch b/0007-Fix-access-of-freed-memory-in-namehints.patch
deleted file mode 100644
index 4f10e60..0000000
--- a/0007-Fix-access-of-freed-memory-in-namehints.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 23bf1dce9438c0cf74357928289aa8f06957c283 Mon Sep 17 00:00:00 2001
-From: David Henningsson
-Date: Fri, 13 Sep 2013 13:21:44 -0400
-Subject: [PATCH] Fix access of freed memory in namehints
-
-Sometimes a hook manipulates the config tree, which makes currently
-running iterators point to freed memory. As a workaround, make two
-copies, one for the iterators and another for the hooks.
-
-BugLink: https://bugs.launchpad.net/bugs/1008600
-Signed-off-by: David Henningsson
-Signed-off-by: Takashi Iwai
----
- src/control/namehint.c | 22 +++++++++++++---------
- 1 file changed, 13 insertions(+), 9 deletions(-)
-
-diff --git a/src/control/namehint.c b/src/control/namehint.c
-index 8d5e925..28975a4 100644
---- a/src/control/namehint.c
-+++ b/src/control/namehint.c
-@@ -406,7 +406,7 @@ static const next_devices_t next_devices[] = {
- };
- #endif
-
--static int add_card(snd_config_t *config, struct hint_list *list, int card)
-+static int add_card(snd_config_t *config, snd_config_t *rw_config, struct hint_list *list, int card)
- {
- int err, ok;
- snd_config_t *conf, *n;
-@@ -449,7 +449,7 @@ static int add_card(snd_config_t *config, struct hint_list *list, int card)
- ok = 0;
- for (device = 0; err >= 0 && device <= max_device; device++) {
- list->device = device;
-- err = try_config(config, list, list->siface, str);
-+ err = try_config(rw_config, list, list->siface, str);
- if (err < 0)
- break;
- ok++;
-@@ -464,7 +464,7 @@ static int add_card(snd_config_t *config, struct hint_list *list, int card)
- if (err < 0) {
- list->card = card;
- list->device = -1;
-- err = try_config(config, list, list->siface, str);
-+ err = try_config(rw_config, list, list->siface, str);
- }
- if (err == -ENOMEM)
- goto __error;
-@@ -493,7 +493,8 @@ static int get_card_name(struct hint_list *list, int card)
- return 0;
- }
-
--static int add_software_devices(snd_config_t *config, struct hint_list *list)
-+static int add_software_devices(snd_config_t *config, snd_config_t *rw_config,
-+ struct hint_list *list)
- {
- int err;
- snd_config_t *conf, *n;
-@@ -509,7 +510,7 @@ static int add_software_devices(snd_config_t *config, struct hint_list *list)
- continue;
- list->card = -1;
- list->device = -1;
-- err = try_config(config, list, list->siface, str);
-+ err = try_config(rw_config, list, list->siface, str);
- if (err == -ENOMEM)
- return -ENOMEM;
- }
-@@ -547,7 +548,7 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
- struct hint_list list;
- char ehints[24];
- const char *str;
-- snd_config_t *conf, *local_config = NULL;
-+ snd_config_t *conf, *local_config = NULL, *local_config_rw = NULL;
- snd_config_update_t *local_config_update = NULL;
- snd_config_iterator_t i, next;
- int err;
-@@ -557,6 +558,7 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
- err = snd_config_update_r(&local_config, &local_config_update, NULL);
- if (err < 0)
- return err;
-+ err = snd_config_copy(&local_config_rw, local_config);
- list.list = NULL;
- list.count = list.allocated = 0;
- list.siface = iface;
-@@ -586,9 +588,9 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
- if (card >= 0) {
- err = get_card_name(&list, card);
- if (err >= 0)
-- err = add_card(local_config, &list, card);
-+ err = add_card(local_config, local_config_rw, &list, card);
- } else {
-- add_software_devices(local_config, &list);
-+ add_software_devices(local_config, local_config_rw, &list);
- err = snd_card_next(&card);
- if (err < 0)
- goto __error;
-@@ -596,7 +598,7 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
- err = get_card_name(&list, card);
- if (err < 0)
- goto __error;
-- err = add_card(local_config, &list, card);
-+ err = add_card(local_config, local_config_rw, &list, card);
- if (err < 0)
- goto __error;
- err = snd_card_next(&card);
-@@ -630,6 +632,8 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
- if (list.cardname)
- free(list.cardname);
- }
-+ if (local_config_rw)
-+ snd_config_delete(local_config_rw);
- if (local_config)
- snd_config_delete(local_config);
- if (local_config_update)
---
-1.8.4
-
diff --git a/0008-HDA-Intel-present-up-to-8-HDMI-DP-outputs-via-hdmi-d.patch b/0008-HDA-Intel-present-up-to-8-HDMI-DP-outputs-via-hdmi-d.patch
deleted file mode 100644
index a37083a..0000000
--- a/0008-HDA-Intel-present-up-to-8-HDMI-DP-outputs-via-hdmi-d.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 383912ef83cb2d5835239a23f6afc6198697a587 Mon Sep 17 00:00:00 2001
-From: Anssi Hannula
-Date: Mon, 23 Sep 2013 00:41:50 +0300
-Subject: [PATCH] HDA-Intel: present up to 8 HDMI/DP outputs via "hdmi" device
-
-Some new AMD cards have HDA codecs presenting 6 connected HDMI/DP pin
-nodes (plus 1 unconnected pin node) according to the ALSA card database.
-
-Example:
-http://www.alsa-project.org/db/?f=de3ced7af41de0ed54d218650e5e2f16c511787b
-
-Bump the maximum number of presented HDMI outputs per card via the
-"hdmi" PCM from 4 to 8 (so that the last possible device is DEV=7).
-
-Note that HDMI PCM devices DEV=4..7 use shared PCM device numbers, so
-HDA cards that have over 4 audio PCM devices or multiple S/PDIF or modem
-devices will have their remaining PCM devices misrepresented as HDMI
-devices.
-
-Signed-off-by: Anssi Hannula
-Signed-off-by: Takashi Iwai
----
- src/conf/cards/HDA-Intel.conf | 92 +++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 92 insertions(+)
-
-diff --git a/src/conf/cards/HDA-Intel.conf b/src/conf/cards/HDA-Intel.conf
-index 3957c12..7976b6c 100644
---- a/src/conf/cards/HDA-Intel.conf
-+++ b/src/conf/cards/HDA-Intel.conf
-@@ -305,6 +305,98 @@ HDA-Intel.pcm.hdmi.3 {
- }
- }
-
-+HDA-Intel.pcm.hdmi.4 {
-+ @args [ CARD AES0 AES1 AES2 AES3 ]
-+ @args.CARD { type string }
-+ @args.AES0 { type integer }
-+ @args.AES1 { type integer }
-+ @args.AES2 { type integer }
-+ @args.AES3 { type integer }
-+ @func refer
-+ name {
-+ @func concat
-+ strings [
-+ "cards.HDA-Intel.pcm.hdmi.common:"
-+ "CARD=" $CARD ","
-+ "DEVICE=10,"
-+ "CTLINDEX=4,"
-+ "AES0=" $AES0 ","
-+ "AES1=" $AES1 ","
-+ "AES2=" $AES2 ","
-+ "AES3=" $AES3
-+ ]
-+ }
-+}
-+
-+HDA-Intel.pcm.hdmi.5 {
-+ @args [ CARD AES0 AES1 AES2 AES3 ]
-+ @args.CARD { type string }
-+ @args.AES0 { type integer }
-+ @args.AES1 { type integer }
-+ @args.AES2 { type integer }
-+ @args.AES3 { type integer }
-+ @func refer
-+ name {
-+ @func concat
-+ strings [
-+ "cards.HDA-Intel.pcm.hdmi.common:"
-+ "CARD=" $CARD ","
-+ "DEVICE=11,"
-+ "CTLINDEX=5,"
-+ "AES0=" $AES0 ","
-+ "AES1=" $AES1 ","
-+ "AES2=" $AES2 ","
-+ "AES3=" $AES3
-+ ]
-+ }
-+}
-+
-+HDA-Intel.pcm.hdmi.6 {
-+ @args [ CARD AES0 AES1 AES2 AES3 ]
-+ @args.CARD { type string }
-+ @args.AES0 { type integer }
-+ @args.AES1 { type integer }
-+ @args.AES2 { type integer }
-+ @args.AES3 { type integer }
-+ @func refer
-+ name {
-+ @func concat
-+ strings [
-+ "cards.HDA-Intel.pcm.hdmi.common:"
-+ "CARD=" $CARD ","
-+ "DEVICE=12,"
-+ "CTLINDEX=6,"
-+ "AES0=" $AES0 ","
-+ "AES1=" $AES1 ","
-+ "AES2=" $AES2 ","
-+ "AES3=" $AES3
-+ ]
-+ }
-+}
-+
-+HDA-Intel.pcm.hdmi.7 {
-+ @args [ CARD AES0 AES1 AES2 AES3 ]
-+ @args.CARD { type string }
-+ @args.AES0 { type integer }
-+ @args.AES1 { type integer }
-+ @args.AES2 { type integer }
-+ @args.AES3 { type integer }
-+ @func refer
-+ name {
-+ @func concat
-+ strings [
-+ "cards.HDA-Intel.pcm.hdmi.common:"
-+ "CARD=" $CARD ","
-+ "DEVICE=13,"
-+ "CTLINDEX=7,"
-+ "AES0=" $AES0 ","
-+ "AES1=" $AES1 ","
-+ "AES2=" $AES2 ","
-+ "AES3=" $AES3
-+ ]
-+ }
-+}
-+
-
-
- HDA-Intel.pcm.modem.0 {
---
-1.8.4
-
diff --git a/0009-snd_tlv_convert_from_dB-fix-decreasing-gain-across-e.patch b/0009-snd_tlv_convert_from_dB-fix-decreasing-gain-across-e.patch
deleted file mode 100644
index 0f26c53..0000000
--- a/0009-snd_tlv_convert_from_dB-fix-decreasing-gain-across-e.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 529706fc323813cfad7c48d3738ea0bfa5b8305e Mon Sep 17 00:00:00 2001
-From: Stephen Warren
-Date: Mon, 30 Sep 2013 15:25:49 -0600
-Subject: [PATCH] snd_tlv_convert_from_dB: fix decreasing gain across entries
-
-Currently, for a TLV consisting of TLV_DB_SCALE_ITEMs, if e.g. alsamixer
-calls snd_mixer_selem_set_playback_dB() with a value that is in-between
-two TLV_DB_SCALE_ITEMs, and xdir is negative, the selected raw hardware
-value is the minimum in the first range above that value, rather than the
-maximum in the last range below that value.
-
-The user-visible symptom is that in alsamixer, pressing the down key to
-reduce the value sticks at certain points, and cannot be incrementally
-reduced any further, although directly selecting a much lower value (e.g.
-by pressing 0..9) works as expected. This is triggered e.g. by
-sound/soc/codec/max98090.c's max98090_hp_tlv[].
-
-Fix this by checking whether xdir is positive or not, rather than
-checking whether it has a non-zero value. The code to select the previous
-range's max value is already present. This matches how xdir is used in
-other parts of the code.
-
-Signed-off-by: Stephen Warren
-Signed-off-by: Takashi Iwai
----
- src/control/tlv.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/control/tlv.c b/src/control/tlv.c
-index 6b0b9f4..b08d887 100644
---- a/src/control/tlv.c
-+++ b/src/control/tlv.c
-@@ -312,7 +312,7 @@ int snd_tlv_convert_from_dB(unsigned int *tlv, long rangemin, long rangemax,
- submin, submax,
- db_gain, value, xdir);
- else if (db_gain < dbmin) {
-- *value = xdir || pos == 2 ? submin : prev_submax;
-+ *value = xdir > 0 || pos == 2 ? submin : prev_submax;
- return 0;
- }
- prev_submax = submax;
---
-1.8.4
-
diff --git a/0010-remove-unnecessary-obsolete-compat-hsearch_r.c.patch b/0010-remove-unnecessary-obsolete-compat-hsearch_r.c.patch
deleted file mode 100644
index 97fd685..0000000
--- a/0010-remove-unnecessary-obsolete-compat-hsearch_r.c.patch
+++ /dev/null
@@ -1,334 +0,0 @@
-From c1fbd57c38dd565d3f87219031658f676654484f Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb
-Date: Wed, 2 Oct 2013 21:00:51 +0200
-Subject: [PATCH] remove unnecessary/obsolete compat/hsearch_r.c
-
-The usage of hsearch functions where removed long time
-ago in commit 273d115de05574251bdd661747ecb68449a5cf1d.
-This patch highly increases portability for non-glibc systems.
-
-Remove the complete compat directory as requested by
-Takashi Iwai.
-
-Signed-off-by: Waldemar Brodkorb
-Signed-off-by: Takashi Iwai
----
- configure.in | 4 +-
- src/Makefile.am | 7 +-
- src/compat/Makefile.am | 8 --
- src/compat/empty.c | 0
- src/compat/hsearch_r.c | 236 -------------------------------------------------
- 5 files changed, 3 insertions(+), 252 deletions(-)
- delete mode 100644 src/compat/Makefile.am
- delete mode 100644 src/compat/empty.c
- delete mode 100644 src/compat/hsearch_r.c
-
-diff --git a/configure.in b/configure.in
-index 00fff2b8da97..35fd89fc298a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -64,8 +64,6 @@ AC_HEADER_TIME
-
- dnl Checks for library functions.
- AC_PROG_GCC_TRADITIONAL
--AC_CHECK_FUNC([hsearch_r], [HAVE_HSEARCH_R=yes])
--AM_CONDITIONAL([ALSA_HSEARCH_R], [test "x$HAVE_HSEARCH_R" != xyes])
- AC_CHECK_FUNCS([uselocale])
-
- SAVE_LIBRARY_VERSION
-@@ -659,7 +657,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
- src/pcm/Makefile src/pcm/scopes/Makefile \
- src/rawmidi/Makefile src/timer/Makefile \
- src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
-- src/compat/Makefile src/alisp/Makefile \
-+ src/alisp/Makefile \
- src/conf/Makefile src/conf/alsa.conf.d/Makefile \
- src/conf/cards/Makefile \
- src/conf/pcm/Makefile \
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 08f482adc0d3..8f789fecc125 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -46,8 +46,8 @@ if BUILD_ALISP
- SUBDIRS += alisp
- libasound_la_LIBADD += alisp/libalisp.la
- endif
--SUBDIRS += compat conf
--libasound_la_LIBADD += compat/libcompat.la @ALSA_DEPLIBS@
-+SUBDIRS += conf
-+libasound_la_LIBADD += @ALSA_DEPLIBS@
-
- libasound_la_LDFLAGS = -version-info $(COMPATNUM) $(VSYMS) $(SYMFUNCS) $(LDFLAGS_NOUNDEFINED)
-
-@@ -84,9 +84,6 @@ ucm/libucm.la:
- instr/libinstr.la:
- $(MAKE) -C instr libinstr.la
-
--compat/libcompat.la:
-- $(MAKE) -C compat libcompat.la
--
- alisp/libalisp.la:
- $(MAKE) -C alisp libalisp.la
-
-diff --git a/src/compat/Makefile.am b/src/compat/Makefile.am
-deleted file mode 100644
-index 01f54fc14b86..000000000000
---- a/src/compat/Makefile.am
-+++ /dev/null
-@@ -1,8 +0,0 @@
--noinst_LTLIBRARIES = libcompat.la
--EXTRA_libcompat_la_SOURCES = hsearch_r.c
--
--if ALSA_HSEARCH_R
--libcompat_la_SOURCES = empty.c hsearch_r.c
--else
--libcompat_la_SOURCES = empty.c
--endif
-diff --git a/src/compat/empty.c b/src/compat/empty.c
-deleted file mode 100644
-index e69de29bb2d1..000000000000
-diff --git a/src/compat/hsearch_r.c b/src/compat/hsearch_r.c
-deleted file mode 100644
-index 96ceac10c011..000000000000
---- a/src/compat/hsearch_r.c
-+++ /dev/null
-@@ -1,236 +0,0 @@
--/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
-- Contributed by Ulrich Drepper , 1993.
--
-- The GNU C 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.
--
-- The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If not,
-- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- Boston, MA 02111-1307, USA. */
--
--#include
--#include
--#include
--
--#define __USE_GNU
--#ifndef __set_errno
--#define __set_errno(e) errno = (e)
--#endif
--#include
--
--/* [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
-- [Knuth] The Art of Computer Programming, part 3 (6.4) */
--
--
--/* The reentrant version has no static variables to maintain the state.
-- Instead the interface of all functions is extended to take an argument
-- which describes the current status. */
--typedef struct _ENTRY
--{
-- unsigned int used;
-- ENTRY entry;
--}
--_ENTRY;
--
--
--/* For the used double hash method the table size has to be a prime. To
-- correct the user given table size we need a prime test. This trivial
-- algorithm is adequate because
-- a) the code is (most probably) called a few times per program run and
-- b) the number is small because the table must fit in the core */
--static int
--isprime (unsigned int number)
--{
-- /* no even number will be passed */
-- unsigned int div = 3;
--
-- while (div * div < number && number % div != 0)
-- div += 2;
--
-- return number % div != 0;
--}
--
--
--/* Before using the hash table we must allocate memory for it.
-- Test for an existing table are done. We allocate one element
-- more as the found prime number says. This is done for more effective
-- indexing as explained in the comment for the hsearch function.
-- The contents of the table is zeroed, especially the field used
-- becomes zero. */
--int
--hcreate_r (nel, htab)
-- size_t nel;
-- struct hsearch_data *htab;
--{
-- /* Test for correct arguments. */
-- if (htab == NULL)
-- {
-- __set_errno (EINVAL);
-- return 0;
-- }
--
-- /* There is still another table active. Return with error. */
-- if (htab->table != NULL)
-- return 0;
--
-- /* Change nel to the first prime number not smaller as nel. */
-- nel |= 1; /* make odd */
-- while (!isprime (nel))
-- nel += 2;
--
-- htab->size = nel;
-- htab->filled = 0;
--
-- /* allocate memory and zero out */
-- htab->table = (_ENTRY *) calloc (htab->size + 1, sizeof (_ENTRY));
-- if (htab->table == NULL)
-- return 0;
--
-- /* everything went alright */
-- return 1;
--}
--
--
--/* After using the hash table it has to be destroyed. The used memory can
-- be freed and the local static variable can be marked as not used. */
--void
--hdestroy_r (htab)
-- struct hsearch_data *htab;
--{
-- /* Test for correct arguments. */
-- if (htab == NULL)
-- {
-- __set_errno (EINVAL);
-- return;
-- }
--
-- if (htab->table != NULL)
-- /* free used memory */
-- free (htab->table);
--
-- /* the sign for an existing table is an value != NULL in htable */
-- htab->table = NULL;
--}
--
--
--/* This is the search function. It uses double hashing with open addressing.
-- The argument item.key has to be a pointer to an zero terminated, most
-- probably strings of chars. The function for generating a number of the
-- strings is simple but fast. It can be replaced by a more complex function
-- like ajw (see [Aho,Sethi,Ullman]) if the needs are shown.
--
-- We use an trick to speed up the lookup. The table is created by hcreate
-- with one more element available. This enables us to use the index zero
-- special. This index will never be used because we store the first hash
-- index in the field used where zero means not used. Every other value
-- means used. The used field can be used as a first fast comparison for
-- equality of the stored and the parameter value. This helps to prevent
-- unnecessary expensive calls of strcmp. */
--int
--hsearch_r (item, action, retval, htab)
-- ENTRY item;
-- ACTION action;
-- ENTRY **retval;
-- struct hsearch_data *htab;
--{
-- unsigned int hval;
-- unsigned int count;
-- unsigned int len = strlen (item.key);
-- unsigned int idx;
--
-- /* Compute an value for the given string. Perhaps use a better method. */
-- hval = len;
-- count = len;
-- while (count-- > 0)
-- {
-- hval <<= 4;
-- hval += item.key[count];
-- }
--
-- /* First hash function: simply take the modulo but prevent zero. */
-- hval %= htab->size;
-- if (hval == 0)
-- ++hval;
--
-- /* The first index tried. */
-- idx = hval;
--
-- if (htab->table[idx].used)
-- {
-- /* Further action might be required according to the action value. */
-- unsigned hval2;
--
-- if (htab->table[idx].used == hval
-- && strcmp (item.key, htab->table[idx].entry.key) == 0)
-- {
-- if (action == ENTER)
-- htab->table[idx].entry.data = item.data;
--
-- *retval = &htab->table[idx].entry;
-- return 1;
-- }
--
-- /* Second hash function, as suggested in [Knuth] */
-- hval2 = 1 + hval % (htab->size - 2);
--
-- do
-- {
-- /* Because SIZE is prime this guarantees to step through all
-- available indexes. */
-- if (idx <= hval2)
-- idx = htab->size + idx - hval2;
-- else
-- idx -= hval2;
--
-- /* If we visited all entries leave the loop unsuccessfully. */
-- if (idx == hval)
-- break;
--
-- /* If entry is found use it. */
-- if (htab->table[idx].used == hval
-- && strcmp (item.key, htab->table[idx].entry.key) == 0)
-- {
-- if (action == ENTER)
-- htab->table[idx].entry.data = item.data;
--
-- *retval = &htab->table[idx].entry;
-- return 1;
-- }
-- }
-- while (htab->table[idx].used);
-- }
--
-- /* An empty bucket has been found. */
-- if (action == ENTER)
-- {
-- /* If table is full and another entry should be entered return
-- with error. */
-- if (action == ENTER && htab->filled == htab->size)
-- {
-- __set_errno (ENOMEM);
-- *retval = NULL;
-- return 0;
-- }
--
-- htab->table[idx].used = hval;
-- htab->table[idx].entry = item;
--
-- ++htab->filled;
--
-- *retval = &htab->table[idx].entry;
-- return 1;
-- }
--
-- __set_errno (ESRCH);
-- *retval = NULL;
-- return 0;
--}
---
-1.8.4.3
-
diff --git a/0011-local.h-include-sys-types.h-to-fix-issues-with-pcm.h.patch b/0011-local.h-include-sys-types.h-to-fix-issues-with-pcm.h.patch
deleted file mode 100644
index e759bb8..0000000
--- a/0011-local.h-include-sys-types.h-to-fix-issues-with-pcm.h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 10ecf963ca9ee7c491affadd4838ef8e35823d2c Mon Sep 17 00:00:00 2001
-From: John Spencer
-Date: Thu, 10 Oct 2013 18:56:22 +0200
-Subject: [PATCH] local.h: include sys/types.h to fix issues with pcm.h
-
-sys/types.h is required for the u_int_XX types used by pcm.h.
-since a change in pcm.h is not desired, we add the inclusion
-to the header that includes pcm.h during build.
-
-Signed-off-by: John Spencer
-Signed-off-by: Takashi Iwai
----
- include/local.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/include/local.h b/include/local.h
-index f0db188ee580..9464efa49642 100644
---- a/include/local.h
-+++ b/include/local.h
-@@ -31,6 +31,7 @@
- #include
- #include
- #include
-+#include
- #include
- #include
- #include
---
-1.8.4.3
-
diff --git a/0012-test-chmap-Add-missing-usage-text-for-s-option.patch b/0012-test-chmap-Add-missing-usage-text-for-s-option.patch
deleted file mode 100644
index a082eeb..0000000
--- a/0012-test-chmap-Add-missing-usage-text-for-s-option.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 2d6eb4e9ba1503e094d8cdc30a5a081fd22c1c84 Mon Sep 17 00:00:00 2001
-From: Takashi Iwai
-Date: Mon, 4 Nov 2013 14:19:03 +0100
-Subject: [PATCH] test/chmap: Add missing usage text for -s option
-
-Signed-off-by: Takashi Iwai
----
- test/chmap.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/test/chmap.c b/test/chmap.c
-index d73ae7361498..ad3b305b501c 100644
---- a/test/chmap.c
-+++ b/test/chmap.c
-@@ -16,6 +16,7 @@ static void usage(void)
- " chmap [options] set CH0 CH1 CH2...\n"
- "options:\n"
- " -D device Specify PCM device to handle\n"
-+ " -s stream Specify PCM stream direction (playback/capture)\n"
- " -f format PCM format\n"
- " -c channels Channels\n"
- " -r rate Sample rate\n");
---
-1.8.4.3
-
diff --git a/0013-include-global.h-don-t-define-timeval-and-timespec-s.patch b/0013-include-global.h-don-t-define-timeval-and-timespec-s.patch
deleted file mode 100644
index 5d969a1..0000000
--- a/0013-include-global.h-don-t-define-timeval-and-timespec-s.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 7d06b3ed9fda0220c2863ee20acd10c32cf313fd Mon Sep 17 00:00:00 2001
-From: Jaroslav Kysela
-Date: Fri, 8 Nov 2013 12:30:04 +0100
-Subject: [PATCH] include/global.h - don't define timeval and timespec
- structures for !glibc
-
-On request from John Spencer .
-
-Signed-off-by: Jaroslav Kysela
----
- include/global.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/include/global.h b/include/global.h
-index 3e3680fb698c..16a26dc83518 100644
---- a/include/global.h
-+++ b/include/global.h
-@@ -133,6 +133,7 @@ int snd_shm_area_destroy(struct snd_shm_area *area);
-
- int snd_user_file(const char *file, char **result);
-
-+#ifdef __GLIBC__
- #if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
- struct timeval {
- time_t tv_sec; /* seconds */
-@@ -144,6 +145,7 @@ struct timespec {
- long tv_nsec; /* nanoseconds */
- };
- #endif
-+#endif
-
- /** Timestamp */
- typedef struct timeval snd_timestamp_t;
---
-1.8.4.3
-
diff --git a/0014-conf.c-use-portable-way-to-initialize-recursive-mute.patch b/0014-conf.c-use-portable-way-to-initialize-recursive-mute.patch
deleted file mode 100644
index fa5b41b..0000000
--- a/0014-conf.c-use-portable-way-to-initialize-recursive-mute.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From ae035b7fe5620fcaf4f5ea33ecabcf93b8e056cd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?=
-Date: Fri, 8 Nov 2013 13:17:58 +0100
-Subject: [PATCH] conf.c: use portable way to initialize recursive mutex
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not in POSIX, as _NP
-(non-portable) suggests.
-
-exposing such a symbol in musl libc would lock in the ABI for all
-times and makes it impossible to do future changes to the under-
-lying struct without hideous symbol versioning hacks.
-
-use the portable way instead: pthread_once was designed for such
-cases.
-
-Signed-off-by: Timo Teräs
-Tested-by: John Spencer
-Signed-off-by: Jaroslav Kysela
----
- src/conf.c | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/src/conf.c b/src/conf.c
-index bfed1c434cab..5ccc8e1a53e5 100644
---- a/src/conf.c
-+++ b/src/conf.c
-@@ -427,8 +427,8 @@ beginning:
- #ifndef DOC_HIDDEN
-
- #ifdef HAVE_LIBPTHREAD
--static pthread_mutex_t snd_config_update_mutex =
-- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-+static pthread_mutex_t snd_config_update_mutex;
-+static pthread_once_t snd_config_update_mutex_once = PTHREAD_ONCE_INIT;
- #endif
-
- struct _snd_config {
-@@ -472,8 +472,19 @@ typedef struct {
-
- #ifdef HAVE_LIBPTHREAD
-
-+static void snd_config_init_mutex(void)
-+{
-+ pthread_mutexattr_t attr;
-+
-+ pthread_mutexattr_init(&attr);
-+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-+ pthread_mutex_init(&snd_config_update_mutex, &attr);
-+ pthread_mutexattr_destroy(&attr);
-+}
-+
- static inline void snd_config_lock(void)
- {
-+ pthread_once(&snd_config_update_mutex_once, snd_config_init_mutex);
- pthread_mutex_lock(&snd_config_update_mutex);
- }
-
---
-1.8.4.3
-
diff --git a/0015-pcm_file-fix-SEGFAULT-if-file-option-is-missing-whil.patch b/0015-pcm_file-fix-SEGFAULT-if-file-option-is-missing-whil.patch
deleted file mode 100644
index f08da91..0000000
--- a/0015-pcm_file-fix-SEGFAULT-if-file-option-is-missing-whil.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 1919ee473d9bc6983f11327aef3ae76e923f41be Mon Sep 17 00:00:00 2001
-From: Andrey Mazo
-Date: Sun, 17 Nov 2013 01:11:54 +0400
-Subject: [PATCH] pcm_file: fix SEGFAULT if file option is missing while infile
- is not.
-
-Commit 5c5f1358123af69155267463a0b6254ad9cbecc4 requires both file and
-infile options to be missing to report a failure.
-In fact, only file option is mandatory and should be checked there.
-Otherwise, NULL file triggers segfault in
-snd_pcm_file_replace_fname() called from
-snd_pcm_file_open_output_file().
-infile option is optional, so don't report fatal error if it's missing.
-
-Signed-off-by: Andrey Mazo
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm_file.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
-index 59504019d557..3d14090fd2ea 100644
---- a/src/pcm/pcm_file.c
-+++ b/src/pcm/pcm_file.c
-@@ -948,7 +948,7 @@ int _snd_pcm_file_open(snd_pcm_t **pcmp, const char *name,
- err = snd_pcm_slave_conf(root, slave, &sconf, 0);
- if (err < 0)
- return err;
-- if ((!fname || strlen(fname) == 0) && fd < 0 && !ifname) {
-+ if ((!fname || strlen(fname) == 0) && fd < 0) {
- snd_config_delete(sconf);
- SNDERR("file is not defined");
- return -EINVAL;
---
-1.8.4.3
-
diff --git a/0016-pcm_file-fixed-memory-leak.patch b/0016-pcm_file-fixed-memory-leak.patch
deleted file mode 100644
index 7a74ebc..0000000
--- a/0016-pcm_file-fixed-memory-leak.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e017c5f2df386c7c1f221a2f01c80edeec04b253 Mon Sep 17 00:00:00 2001
-From: Andrey Mazo
-Date: Sun, 17 Nov 2013 01:11:55 +0400
-Subject: [PATCH] pcm_file: fixed memory leak.
-
-Valgrind report for this leak was:
-
-Command: aplay -Dfile:'/tmp/qqq',raw qqq.wav
-
-14 bytes in 1 blocks are definitely lost in loss record 1 of 2
- at 0x402BF5C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
- by 0x40D7557: snd_pcm_file_hw_params (in /usr/lib/libasound.so.2.0.0)
- by 0x40BA093: _snd_pcm_hw_params_internal (in /usr/lib/libasound.so.2.0.0)
- by 0x40AB831: snd_pcm_hw_params (in /usr/lib/libasound.so.2.0.0)
- by 0x804C523: ??? (in /usr/bin/aplay)
- by 0x804E5B7: ??? (in /usr/bin/aplay)
- by 0x804FC8C: ??? (in /usr/bin/aplay)
- by 0x80520FB: ??? (in /usr/bin/aplay)
- by 0x4184942: (below main) (libc-start.c:226)
-
-Signed-off-by: Andrey Mazo
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm_file.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
-index 3d14090fd2ea..c3e67b2b2638 100644
---- a/src/pcm/pcm_file.c
-+++ b/src/pcm/pcm_file.c
-@@ -592,8 +592,10 @@ static int snd_pcm_file_hw_free(snd_pcm_t *pcm)
- snd_pcm_file_t *file = pcm->private_data;
- free(file->wbuf);
- free(file->wbuf_areas);
-+ free(file->final_fname);
- file->wbuf = NULL;
- file->wbuf_areas = NULL;
-+ file->final_fname = NULL;
- return snd_pcm_hw_free(file->gen.slave);
- }
-
---
-1.8.4.3
-
diff --git a/0017-pcm_file-don-t-touch-infile-on-playback-and-output-f.patch b/0017-pcm_file-don-t-touch-infile-on-playback-and-output-f.patch
deleted file mode 100644
index a7a82d7..0000000
--- a/0017-pcm_file-don-t-touch-infile-on-playback-and-output-f.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From 4081be0b87ab9fa53a8906e66bc240f18a7a9a54 Mon Sep 17 00:00:00 2001
-From: Andrey Mazo
-Date: Sun, 17 Nov 2013 01:11:56 +0400
-Subject: [PATCH] pcm_file: don't touch infile on playback and output file on
- capture.
-
-Commit 1d80c5b901baf7e1b7998dfa518532fbd64e4283 message describes
-behaviour in case of specified infile option as
-'No file writes will take place in this case'.
-But this is clearly not the case as output file gets truncated while
-running `arecord -Dtestin >/dev/null`, where "testin" is defined as
-pcm.testin {
- type file
- slave.pcm null
- file "/tmp/qqqq.out"
- infile "/tmp/qqqq.in"
- format "raw"
-}
-
-Besides that, the existing behaviour is rather counterintuitive,
-requiring both output and input files to exist and making access to them
-regardless of playback or capture intention.
-Also, it's very confusing to get output file truncated while trying to
-just capture from the device.
-
-Current changeset introduces the following behaviour:
- - output file ("file" option) is only (p)open()'ed for writing
- only on playback to the device
- - any data is written to the output file descriptor
- (provided with "file" option) only on playback to the device
- - input file ("infile" option) is only open()'ed for reading only on
- capture from the device
- - any data is read from the input file descriptor
- (provided with the "infile" option) only on capture from the device
-
-Signed-off-by: Andrey Mazo
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm_file.c | 22 +++++++++-------------
- 1 file changed, 9 insertions(+), 13 deletions(-)
-
-diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
-index c3e67b2b2638..25055d0d24cf 100644
---- a/src/pcm/pcm_file.c
-+++ b/src/pcm/pcm_file.c
-@@ -406,7 +406,9 @@ static int snd_pcm_file_close(snd_pcm_t *pcm)
- if (file->wav_header.fmt)
- fixup_wav_header(pcm);
- free((void *)file->fname);
-- close(file->fd);
-+ if (file->fd >= 0) {
-+ close(file->fd);
-+ }
- }
- if (file->ifname) {
- free((void *)file->ifname);
-@@ -533,7 +535,6 @@ static snd_pcm_sframes_t snd_pcm_file_writen(snd_pcm_t *pcm, void **bufs, snd_pc
- static snd_pcm_sframes_t snd_pcm_file_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size)
- {
- snd_pcm_file_t *file = pcm->private_data;
-- snd_pcm_channel_area_t areas[pcm->channels];
- snd_pcm_sframes_t n;
-
- n = snd_pcm_readi(file->gen.slave, buffer, size);
-@@ -545,15 +546,12 @@ static snd_pcm_sframes_t snd_pcm_file_readi(snd_pcm_t *pcm, void *buffer, snd_pc
- return n;
- return n * 8 / pcm->frame_bits;
- }
-- snd_pcm_areas_from_buf(pcm, areas, buffer);
-- snd_pcm_file_add_frames(pcm, areas, 0, n);
- return n;
- }
-
- static snd_pcm_sframes_t snd_pcm_file_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size)
- {
- snd_pcm_file_t *file = pcm->private_data;
-- snd_pcm_channel_area_t areas[pcm->channels];
- snd_pcm_sframes_t n;
-
- if (file->ifd >= 0) {
-@@ -562,10 +560,6 @@ static snd_pcm_sframes_t snd_pcm_file_readn(snd_pcm_t *pcm, void **bufs, snd_pcm
- }
-
- n = snd_pcm_readn(file->gen.slave, bufs, size);
-- if (n > 0) {
-- snd_pcm_areas_from_bufs(pcm, areas, bufs);
-- snd_pcm_file_add_frames(pcm, areas, 0, n);
-- }
- return n;
- }
-
-@@ -629,7 +623,7 @@ static int snd_pcm_file_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
- a->first = slave->sample_bits * channel;
- a->step = slave->frame_bits;
- }
-- if (file->fd < 0) {
-+ if ((file->fd < 0) && (pcm->stream == SND_PCM_STREAM_PLAYBACK)) {
- err = snd_pcm_file_open_output_file(file);
- if (err < 0) {
- SYSERR("failed opening output file %s", file->fname);
-@@ -728,7 +722,8 @@ static const snd_pcm_fast_ops_t snd_pcm_file_fast_ops = {
- int snd_pcm_file_open(snd_pcm_t **pcmp, const char *name,
- const char *fname, int fd, const char *ifname, int ifd,
- int trunc,
-- const char *fmt, int perm, snd_pcm_t *slave, int close_slave)
-+ const char *fmt, int perm, snd_pcm_t *slave, int close_slave,
-+ snd_pcm_stream_t stream)
- {
- snd_pcm_t *pcm;
- snd_pcm_file_t *file;
-@@ -758,7 +753,7 @@ int snd_pcm_file_open(snd_pcm_t **pcmp, const char *name,
- file->trunc = trunc;
- file->perm = perm;
-
-- if (ifname) {
-+ if (ifname && (stream == SND_PCM_STREAM_CAPTURE)) {
- ifd = open(ifname, O_RDONLY); /* TODO: mind blocking mode */
- if (ifd < 0) {
- SYSERR("open %s for reading failed", ifname);
-@@ -790,6 +785,7 @@ int snd_pcm_file_open(snd_pcm_t **pcmp, const char *name,
- #else
- pcm->monotonic = 0;
- #endif
-+ pcm->stream = stream;
- snd_pcm_link_hw_ptr(pcm, slave);
- snd_pcm_link_appl_ptr(pcm, slave);
- *pcmp = pcm;
-@@ -960,7 +956,7 @@ int _snd_pcm_file_open(snd_pcm_t **pcmp, const char *name,
- if (err < 0)
- return err;
- err = snd_pcm_file_open(pcmp, name, fname, fd, ifname, ifd,
-- trunc, format, perm, spcm, 1);
-+ trunc, format, perm, spcm, 1, stream);
- if (err < 0)
- snd_pcm_close(spcm);
- return err;
---
-1.8.4.3
-
diff --git a/0018-pcm_file-document-new-argument-to-snd_pcm_file_open.patch b/0018-pcm_file-document-new-argument-to-snd_pcm_file_open.patch
deleted file mode 100644
index ed2ae91..0000000
--- a/0018-pcm_file-document-new-argument-to-snd_pcm_file_open.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 29d89ba0452e29830ca6cd34636aecf160a94a9d Mon Sep 17 00:00:00 2001
-From: Andrey Mazo
-Date: Sun, 17 Nov 2013 19:45:19 +0400
-Subject: [PATCH] pcm_file: document new argument to snd_pcm_file_open().
-
-Document function argument, added in commit
-4081be0b87ab9fa53a8906e66bc240f18a7a9a54.
-
-Signed-off-by: Andrey Mazo
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm_file.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
-index 25055d0d24cf..712302598a9f 100644
---- a/src/pcm/pcm_file.c
-+++ b/src/pcm/pcm_file.c
-@@ -714,6 +714,7 @@ static const snd_pcm_fast_ops_t snd_pcm_file_fast_ops = {
- * \param perm File permission
- * \param slave Slave PCM handle
- * \param close_slave When set, the slave PCM handle is closed with copy PCM
-+ * \param stream the direction of PCM stream
- * \retval zero on success otherwise a negative error code
- * \warning Using of this function might be dangerous in the sense
- * of compatibility reasons. The prototype might be freely
---
-1.8.4.3
-
diff --git a/0019-dmix-Don-t-use-assert-and-abort.patch b/0019-dmix-Don-t-use-assert-and-abort.patch
deleted file mode 100644
index 0b99650..0000000
--- a/0019-dmix-Don-t-use-assert-and-abort.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 49ad6699e68862ef9888bdf10b5bdaa19933f1ea Mon Sep 17 00:00:00 2001
-From: Takashi Iwai
-Date: Wed, 27 Nov 2013 09:37:54 +0100
-Subject: [PATCH] dmix: Don't use assert() and abort()
-
-We seem to still have some races at closing a dmix stream, but
-aborting is the worst option. Let's make not melt down.
-
-Reference: https://bugzilla.novell.com/show_bug.cgi?id=852446
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm_direct.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/pcm/pcm_direct.h b/src/pcm/pcm_direct.h
-index 70c2c6a0229f..5ae39c0e4237 100644
---- a/src/pcm/pcm_direct.h
-+++ b/src/pcm/pcm_direct.h
-@@ -274,8 +274,8 @@ static inline int snd_pcm_direct_semaphore_up(snd_pcm_direct_t *dmix, int sem_nu
- static inline int snd_pcm_direct_semaphore_final(snd_pcm_direct_t *dmix, int sem_num)
- {
- if (dmix->locked[sem_num] != 1) {
-- assert(dmix->locked[sem_num] != 1);
-- abort();
-+ SNDMSG("invalid semaphore count to finalize %d: %d", sem_num, dmix->locked[sem_num]);
-+ return -EBUSY;
- }
- return snd_pcm_direct_semaphore_up(dmix, sem_num);
- }
---
-1.8.4.3
-
diff --git a/0020-minor-malloc-changes.patch b/0020-minor-malloc-changes.patch
deleted file mode 100644
index f390694..0000000
--- a/0020-minor-malloc-changes.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 670e228c693cbff9714856e5be93a88d137c5c30 Mon Sep 17 00:00:00 2001
-From: Olivier Langlois
-Date: Thu, 12 Dec 2013 23:47:20 -0500
-Subject: [PATCH] minor malloc changes
-
-replace malloc + memset with calloc since calloc may skip the memset if
-returned memory comes directly from sbrk()
-
-use malloc instead of malloc if first thing done with allocated memory is
-to flip all bits to 1.
-
-Signed-off-by: Olivier Langlois
-Signed-off-by: Takashi Iwai
----
- src/alisp/alisp.c | 3 +--
- src/pcm/pcm_ladspa.c | 2 +-
- 2 files changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/src/alisp/alisp.c b/src/alisp/alisp.c
-index 1796c33c3faf..3c61bb1754c3 100644
---- a/src/alisp/alisp.c
-+++ b/src/alisp/alisp.c
-@@ -3202,12 +3202,11 @@ int alsa_lisp(struct alisp_cfg *cfg, struct alisp_instance **_instance)
- struct alisp_object *p, *p1;
- int i, j, retval = 0;
-
-- instance = (struct alisp_instance *)malloc(sizeof(struct alisp_instance));
-+ instance = (struct alisp_instance *)calloc(1, sizeof(struct alisp_instance));
- if (instance == NULL) {
- nomem();
- return -ENOMEM;
- }
-- memset(instance, 0, sizeof(struct alisp_instance));
- instance->verbose = cfg->verbose && cfg->vout;
- instance->warning = cfg->warning && cfg->wout;
- instance->debug = cfg->debug && cfg->dout;
-diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c
-index 0a9c52e975e6..9ce5242e2359 100644
---- a/src/pcm/pcm_ladspa.c
-+++ b/src/pcm/pcm_ladspa.c
-@@ -1326,7 +1326,7 @@ static int snd_pcm_ladspa_parse_bindings(snd_pcm_ladspa_plugin_t *lplug,
- count = (unsigned int)(channel + 1);
- }
- if (count > 0) {
-- array = (unsigned int *)calloc(count, sizeof(unsigned int));
-+ array = (unsigned int *)malloc(count * sizeof(unsigned int));
- if (! array)
- return -ENOMEM;
- memset(array, 0xff, count * sizeof(unsigned int));
---
-1.9.0
-
diff --git a/0021-alsa-lib-minor-typo-in-pcm-doc.patch b/0021-alsa-lib-minor-typo-in-pcm-doc.patch
deleted file mode 100644
index e62302a..0000000
--- a/0021-alsa-lib-minor-typo-in-pcm-doc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3baf1bee843d8f0559f1481f26e9b8235b5e85ee Mon Sep 17 00:00:00 2001
-From: Olivier Langlois
-Date: Sun, 5 Jan 2014 23:12:44 -0500
-Subject: [PATCH] alsa-lib: minor typo in pcm doc
-
-Added a missing 'f' in the word 'diferent'
-
-Signed-off-by: Olivier Langlois
-Signed-off-by: Jaroslav Kysela
----
- src/pcm/pcm.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
-index c54fa06974fc..7e46014627c2 100644
---- a/src/pcm/pcm.c
-+++ b/src/pcm/pcm.c
-@@ -105,7 +105,7 @@ The poll or select functions (see 'man 2 poll' or 'man 2 select' for further
- details) allows to receive requests/events from the device while
- an application is waiting on events from other sources (like keyboard, screen,
- network etc.), too. \ref snd_pcm_poll_descriptors can be used to get file
--descriptors to poll or select on (note that wait direction might be diferent
-+descriptors to poll or select on (note that wait direction might be different
- than expected - do not use only returned file descriptors, but handle
- events member as well - see \ref snd_pcm_poll_descriptors function
- description for more details and \ref snd_pcm_poll_descriptors_revents for
---
-1.9.0
-
diff --git a/0022-control_hw-fix-potential-memory-leak.patch b/0022-control_hw-fix-potential-memory-leak.patch
deleted file mode 100644
index 626229b..0000000
--- a/0022-control_hw-fix-potential-memory-leak.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 336dc58beba0ca7cf5650dc12ed3eb72d61ac6d3 Mon Sep 17 00:00:00 2001
-From: Ivan Sorokin
-Date: Wed, 22 Jan 2014 00:12:50 +0400
-Subject: [PATCH] control_hw: fix potential memory leak
-
-Signed-off-by: Ivan Sorokin
-Signed-off-by: Takashi Iwai
----
- src/control/control_hw.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/control/control_hw.c b/src/control/control_hw.c
-index 148097facd90..dfc9dcd51e20 100644
---- a/src/control/control_hw.c
-+++ b/src/control/control_hw.c
-@@ -240,8 +240,10 @@ static int snd_ctl_hw_elem_tlv(snd_ctl_t *handle, int op_flag,
- return -errno;
- }
- if (op_flag == 0) {
-- if (xtlv->tlv[1] + 2 * sizeof(unsigned int) > tlv_size)
-+ if (xtlv->tlv[1] + 2 * sizeof(unsigned int) > tlv_size) {
-+ free(xtlv);
- return -EFAULT;
-+ }
- memcpy(tlv, xtlv->tlv, xtlv->tlv[1] + 2 * sizeof(unsigned int));
- }
- free(xtlv);
---
-1.9.0
-
diff --git a/0023-pcm-initialize-pcm_dmix-monotonic-field.patch b/0023-pcm-initialize-pcm_dmix-monotonic-field.patch
deleted file mode 100644
index ab5fea3..0000000
--- a/0023-pcm-initialize-pcm_dmix-monotonic-field.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From e51cd448971c472d75dd700b0000988f6197b4da Mon Sep 17 00:00:00 2001
-From: Olivier Langlois
-Date: Wed, 22 Jan 2014 19:04:45 -0500
-Subject: [PATCH] pcm: initialize pcm_dmix monotonic field
-
-not doing so, leaves the pcm object in an inconsistent state since
-'info' field is copied from the slave which is then used when
-snd_pcm_hw_params_is_monotonic() is called.
-
-For instance, when using dmix with aplay and an underrun is occuring, the following
-info is returned:
-
-underrun!!! (at least 1248687948.256 ms long)
-Status:
- state : XRUN
- trigger_time: 1390347762.628483000
- tstamp : 1390347766.184350000
- delay : -635
- avail : 15687
- avail_max : 15675
-
-now is computed from CLOCK_MONOTONIC while pcm status tstamps are from gettimeofday().
-
-After the fix, underruns are still occuring on my setup but at least the displayed info
-is correct:
-
-underrun!!! (at least 7630.409 ms long)
-Status:
- state : XRUN
- trigger_time: 7652.739201431
- tstamp : 7660.369600636
- delay : -624
- avail : 15676
- avail_max : 15664
-
-Signed-off-by: Olivier Langlois
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm_direct.c | 2 ++
- src/pcm/pcm_dmix.c | 2 +-
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
-index 899c250401df..5416cf71674c 100644
---- a/src/pcm/pcm_direct.c
-+++ b/src/pcm/pcm_direct.c
-@@ -857,6 +857,7 @@ static void save_slave_setting(snd_pcm_direct_t *dmix, snd_pcm_t *spcm)
- COPY_SLAVE(buffer_time);
- COPY_SLAVE(sample_bits);
- COPY_SLAVE(frame_bits);
-+ COPY_SLAVE(monotonic);
- }
-
- #undef COPY_SLAVE
-@@ -1220,6 +1221,7 @@ static void copy_slave_setting(snd_pcm_direct_t *dmix, snd_pcm_t *spcm)
- COPY_SLAVE(buffer_time);
- COPY_SLAVE(sample_bits);
- COPY_SLAVE(frame_bits);
-+ COPY_SLAVE(monotonic);
-
- spcm->info &= ~SND_PCM_INFO_PAUSE;
- spcm->boundary = recalc_boundary_size(dmix->shmptr->s.boundary, spcm->buffer_size);
-diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c
-index 2bd5d398d280..4aa6d4eab4a2 100644
---- a/src/pcm/pcm_dmix.c
-+++ b/src/pcm/pcm_dmix.c
-@@ -1104,7 +1104,7 @@ int snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
-
- pcm->poll_fd = dmix->poll_fd;
- pcm->poll_events = POLLIN; /* it's different than other plugins */
--
-+ pcm->monotonic = spcm->monotonic;
- pcm->mmap_rw = 1;
- snd_pcm_set_hw_ptr(pcm, &dmix->hw_ptr, -1, 0);
- snd_pcm_set_appl_ptr(pcm, &dmix->appl_ptr, -1, 0);
---
-1.9.0
-
diff --git a/0024-pcm-initialize-monotonic-field-for-dshare-and-dsnoop.patch b/0024-pcm-initialize-monotonic-field-for-dshare-and-dsnoop.patch
deleted file mode 100644
index ce189a8..0000000
--- a/0024-pcm-initialize-monotonic-field-for-dshare-and-dsnoop.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 507cdc13187f5eeb222eeb43550cf6a67c3b29c9 Mon Sep 17 00:00:00 2001
-From: Takashi Iwai
-Date: Thu, 23 Jan 2014 09:46:37 +0100
-Subject: [PATCH] pcm: initialize monotonic field for dshare and dsnoop, too
-
-Just like the previous fix for dmix, we need update for dshare and
-dsnoop plugins.
-
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm_dshare.c | 2 +-
- src/pcm/pcm_dsnoop.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
-index 5b329510481e..f2d1103a6bfb 100644
---- a/src/pcm/pcm_dshare.c
-+++ b/src/pcm/pcm_dshare.c
-@@ -792,7 +792,7 @@ int snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name,
-
- pcm->poll_fd = dshare->poll_fd;
- pcm->poll_events = POLLIN; /* it's different than other plugins */
--
-+ pcm->monotonic = spcm->monotonic;
- pcm->mmap_rw = 1;
- snd_pcm_set_hw_ptr(pcm, &dshare->hw_ptr, -1, 0);
- snd_pcm_set_appl_ptr(pcm, &dshare->appl_ptr, -1, 0);
-diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
-index 055e4f498343..76379140c133 100644
---- a/src/pcm/pcm_dsnoop.c
-+++ b/src/pcm/pcm_dsnoop.c
-@@ -690,7 +690,7 @@ int snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
-
- pcm->poll_fd = dsnoop->poll_fd;
- pcm->poll_events = POLLIN; /* it's different than other plugins */
--
-+ pcm->monotonic = spcm->monotonic;
- pcm->mmap_rw = 1;
- snd_pcm_set_hw_ptr(pcm, &dsnoop->hw_ptr, -1, 0);
- snd_pcm_set_appl_ptr(pcm, &dsnoop->appl_ptr, -1, 0);
---
-1.9.0
-
diff --git a/0025-pcm-use-CLOCK_REALTIME-for-non-monotonic-ts.patch b/0025-pcm-use-CLOCK_REALTIME-for-non-monotonic-ts.patch
deleted file mode 100644
index 881ff81..0000000
--- a/0025-pcm-use-CLOCK_REALTIME-for-non-monotonic-ts.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 66f07aa3b77e4013110f7b12640e204d0c15ac8d Mon Sep 17 00:00:00 2001
-From: Olivier Langlois
-Date: Thu, 23 Jan 2014 19:03:00 -0500
-Subject: [PATCH] pcm: use CLOCK_REALTIME for non-monotonic ts
-
-gettimeofday() is the same than clock_gettime(CLOCK_REALTIME)
-except for the loss of precision and the double unnecessary
-conversion timespec <-> timeval.
-
-Signed-off-by: Olivier Langlois
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm_local.h | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
-index e1c0baa871f6..8a6c7431cc40 100644
---- a/src/pcm/pcm_local.h
-+++ b/src/pcm/pcm_local.h
-@@ -961,17 +961,21 @@ typedef union snd_tmp_double {
- /* get the current timestamp */
- static inline void gettimestamp(snd_htimestamp_t *tstamp, int monotonic)
- {
--#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
-+#if defined(HAVE_CLOCK_GETTIME)
-+#if defined(CLOCK_MONOTONIC)
- if (monotonic) {
- clock_gettime(CLOCK_MONOTONIC, tstamp);
- } else {
- #endif
-+ clock_gettime(CLOCK_REALTIME, tstamp);
-+#else
- struct timeval tv;
-
- gettimeofday(&tv, 0);
- tstamp->tv_sec = tv.tv_sec;
- tstamp->tv_nsec = tv.tv_usec * 1000L;
--#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
-+#endif
-+#if defined(HAVE_CLOCK_GETTIME)
- }
- #endif
- }
---
-1.9.0
-
diff --git a/0026-alsa-lib-heavy-pcm-atomics-cleanup.patch b/0026-alsa-lib-heavy-pcm-atomics-cleanup.patch
deleted file mode 100644
index 49b1866..0000000
--- a/0026-alsa-lib-heavy-pcm-atomics-cleanup.patch
+++ /dev/null
@@ -1,1257 +0,0 @@
-From 326c6802e49e5499e16cf141e1cdb0360fce14aa Mon Sep 17 00:00:00 2001
-From: Riku Voipio
-Date: Fri, 7 Feb 2014 15:38:58 +0200
-Subject: [PATCH] alsa-lib: heavy pcm atomics cleanup
-
-The following patch comes from the realization that at least ARM code
-for atomics is quite broken and nobody has cared for a decade.
-
-A quick dive shows that only snd_atomic_{read,write}_{begin,end}
-appear to be used widely. These are implemented using wmb/rmb.
-
-Only other use of atomic functions is in pcm_meter.c.
-The #SND_PCM_TYPE_METER plugin type appears rarely, if ever, used.
-I presume these days anyone who wants a meter/scope will do in pulseaudio
-layer instead of alsa.
-
-It would seem better fit to have pcm_meter in alsa-plugins instead
-of alsa-lib, but I guess that would be an ABI break...
-
-So instead, I'm proposing here
-
-1. Removal of all hand-crafted atomics from iatomic.h apart from barriers,
- which are used in snd_atomic_{read,write}_{begin,end}.
-
-2. Using __sync_synchronize as the default fallback for barriers. This
- has been available since gcc 4.1, so it shouldn't be a problem.
-
-3. Defining the few atomics used by pcm_meter.c withing pcm_meter.c
- itself, using gcc atomic builtins[1].
-
-4. Since gcc atomic builtins are available only since gcc 4.7, add a check for
- that in gcc configure.in, and don't build pcm meter plugin if using
- older gcc.
-
-The last point has the impact, that if there actually is someone who 1)
-uses the meter plugin 2) wants to upgrade to 2014 alsa-lib 3) but
-does not want to use a 2012+ gcc - that someone will be inconvenienced.
-
-Finally remove the unneeded configure check for cpu type. We can
-trust the gcc to set right flags for us.
-
-[1] http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
-
-Signed-off-by: Riku Voipio
-Signed-off-by: Takashi Iwai
----
- configure.in | 53 +--
- include/iatomic.h | 1044 +--------------------------------------------------
- src/pcm/pcm_meter.c | 9 +-
- 3 files changed, 33 insertions(+), 1073 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 35fd89fc298a..bb56eb653ccc 100644
---- a/configure.in
-+++ b/configure.in
-@@ -309,40 +309,6 @@ fi
-
- AC_SUBST(ALSA_DEPLIBS)
-
--dnl Check for architecture
--AC_MSG_CHECKING(for architecture)
--case "$host" in
--i?86*)
-- AC_MSG_RESULT(x86)
-- ;;
--x86_64*)
-- AC_MSG_RESULT(x86)
-- ;;
--alpha*)
-- AC_MSG_RESULT(alpha)
-- ;;
--powerpc*|ppc*)
-- AC_MSG_RESULT(ppc)
-- CPPFLAGS="$CPPFLAGS -D__ppc__"
-- ;;
--ia64*)
-- AC_MSG_RESULT(ia64)
-- CPPFLAGS="$CPPFLAGS -D__ia64__"
-- ;;
--mips*)
-- AC_MSG_RESULT(mips)
-- CPPFLAGS="$CPPFLAGS -D__mips__"
-- ;;
--arm*)
-- AC_MSG_RESULT(arm)
-- CPPFLAGS="$CPPFLAGS -D__arm__"
-- ;;
--*)
-- AC_MSG_RESULT($host_cpu)
-- echo "No atomic operations supported.."
-- ;;
--esac
--
- dnl Check for wordexp.h
- AC_CHECK_HEADERS([wordexp.h])
-
-@@ -488,6 +454,21 @@ else
- pcm_plugins=""
- fi
-
-+dnl check atomics for pcm_meter
-+
-+AC_MSG_CHECKING([whether GCC supports builtin atomic intrinsics])
-+if test -z "$gcc_have_atomics"; then
-+ gcc_have_atomics=no
-+ AC_TRY_LINK([],
-+ [int i;
-+ __atomic_load_n(&i, __ATOMIC_SEQ_CST);
-+ __atomic_add_fetch(&i, 0, __ATOMIC_SEQ_CST);
-+ ],
-+ [gcc_have_atomics=yes],
-+ [gcc_have_atomics=no])
-+fi
-+AC_MSG_RESULT($gcc_have_atomics)
-+
- PCM_PLUGIN_LIST="copy linear route mulaw alaw adpcm rate plug multi shm file null empty share meter hooks lfloat ladspa dmix dshare dsnoop asym iec958 softvol extplug ioplug mmap_emul"
-
- build_pcm_plugin="no"
-@@ -531,6 +512,10 @@ if test "$softfloat" = "yes"; then
- build_pcm_ladspa="no"
- fi
-
-+if test "$gcc_have_atomics" != "yes"; then
-+ build_pcm_meter="no"
-+fi
-+
- AM_CONDITIONAL([BUILD_PCM_PLUGIN], [test x$build_pcm_plugin = xyes])
- AM_CONDITIONAL([BUILD_PCM_PLUGIN_COPY], [test x$build_pcm_copy = xyes])
- AM_CONDITIONAL([BUILD_PCM_PLUGIN_LINEAR], [test x$build_pcm_linear = xyes])
-diff --git a/include/iatomic.h b/include/iatomic.h
-index 2393297557cc..acdd3e29c13a 100644
---- a/include/iatomic.h
-+++ b/include/iatomic.h
-@@ -1,349 +1,21 @@
- #ifndef __ALSA_IATOMIC_H
- #define __ALSA_IATOMIC_H
-
--#if defined(__i386__) || defined(__x86_64__)
--
--/*
-- * Atomic operations that C can't guarantee us. Useful for
-- * resource counting etc..
-- */
--
--#define ATOMIC_SMP_LOCK "lock ; "
--
--/*
-- * Make sure gcc doesn't try to be clever and move things around
-- * on us. We need to use _exactly_ the address the user gave us,
-- * not some alias that contains the same information.
-- */
--typedef struct { volatile int counter; } atomic_t;
--
--#define ATOMIC_INIT(i) { (i) }
--
--/**
-- * atomic_read - read atomic variable
-- * @v: pointer of type atomic_t
-- *
-- * Atomically reads the value of @v. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--#define atomic_read(v) ((v)->counter)
--
--/**
-- * atomic_set - set atomic variable
-- * @v: pointer of type atomic_t
-- * @i: required value
-- *
-- * Atomically sets the value of @v to @i. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--#define atomic_set(v,i) (((v)->counter) = (i))
--
--/**
-- * atomic_add - add integer to atomic variable
-- * @i: integer value to add
-- * @v: pointer of type atomic_t
-- *
-- * Atomically adds @i to @v. Note that the guaranteed useful range
-- * of an atomic_t is only 24 bits.
-- */
--static __inline__ void atomic_add(int i, atomic_t *v)
--{
-- __asm__ __volatile__(
-- ATOMIC_SMP_LOCK "addl %1,%0"
-- :"=m" (v->counter)
-- :"ir" (i), "m" (v->counter));
--}
--
--/**
-- * atomic_sub - subtract the atomic variable
-- * @i: integer value to subtract
-- * @v: pointer of type atomic_t
-- *
-- * Atomically subtracts @i from @v. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--static __inline__ void atomic_sub(int i, atomic_t *v)
--{
-- __asm__ __volatile__(
-- ATOMIC_SMP_LOCK "subl %1,%0"
-- :"=m" (v->counter)
-- :"ir" (i), "m" (v->counter));
--}
--
--/**
-- * atomic_sub_and_test - subtract value from variable and test result
-- * @i: integer value to subtract
-- * @v: pointer of type atomic_t
-- *
-- * Atomically subtracts @i from @v and returns
-- * true if the result is zero, or false for all
-- * other cases. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--static __inline__ int atomic_sub_and_test(int i, atomic_t *v)
--{
-- unsigned char c;
--
-- __asm__ __volatile__(
-- ATOMIC_SMP_LOCK "subl %2,%0; sete %1"
-- :"=m" (v->counter), "=qm" (c)
-- :"ir" (i), "m" (v->counter) : "memory");
-- return c;
--}
--
--/**
-- * atomic_inc - increment atomic variable
-- * @v: pointer of type atomic_t
-- *
-- * Atomically increments @v by 1. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--static __inline__ void atomic_inc(atomic_t *v)
--{
-- __asm__ __volatile__(
-- ATOMIC_SMP_LOCK "incl %0"
-- :"=m" (v->counter)
-- :"m" (v->counter));
--}
--
--/**
-- * atomic_dec - decrement atomic variable
-- * @v: pointer of type atomic_t
-- *
-- * Atomically decrements @v by 1. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--static __inline__ void atomic_dec(atomic_t *v)
--{
-- __asm__ __volatile__(
-- ATOMIC_SMP_LOCK "decl %0"
-- :"=m" (v->counter)
-- :"m" (v->counter));
--}
--
--/**
-- * atomic_dec_and_test - decrement and test
-- * @v: pointer of type atomic_t
-- *
-- * Atomically decrements @v by 1 and
-- * returns true if the result is 0, or false for all other
-- * cases. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--static __inline__ int atomic_dec_and_test(atomic_t *v)
--{
-- unsigned char c;
--
-- __asm__ __volatile__(
-- ATOMIC_SMP_LOCK "decl %0; sete %1"
-- :"=m" (v->counter), "=qm" (c)
-- :"m" (v->counter) : "memory");
-- return c != 0;
--}
--
--/**
-- * atomic_inc_and_test - increment and test
-- * @v: pointer of type atomic_t
-- *
-- * Atomically increments @v by 1
-- * and returns true if the result is zero, or false for all
-- * other cases. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--static __inline__ int atomic_inc_and_test(atomic_t *v)
--{
-- unsigned char c;
--
-- __asm__ __volatile__(
-- ATOMIC_SMP_LOCK "incl %0; sete %1"
-- :"=m" (v->counter), "=qm" (c)
-- :"m" (v->counter) : "memory");
-- return c != 0;
--}
--
--/**
-- * atomic_add_negative - add and test if negative
-- * @v: pointer of type atomic_t
-- * @i: integer value to add
-- *
-- * Atomically adds @i to @v and returns true
-- * if the result is negative, or false when
-- * result is greater than or equal to zero. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--static __inline__ int atomic_add_negative(int i, atomic_t *v)
--{
-- unsigned char c;
--
-- __asm__ __volatile__(
-- ATOMIC_SMP_LOCK "addl %2,%0; sets %1"
-- :"=m" (v->counter), "=qm" (c)
-- :"ir" (i), "m" (v->counter) : "memory");
-- return c;
--}
--
--/* These are x86-specific, used by some header files */
--#define atomic_clear_mask(mask, addr) \
--__asm__ __volatile__(ATOMIC_SMP_LOCK "andl %0,%1" \
--: : "r" (~(mask)),"m" (*addr) : "memory")
--
--#define atomic_set_mask(mask, addr) \
--__asm__ __volatile__(ATOMIC_SMP_LOCK "orl %0,%1" \
--: : "r" (mask),"m" (*addr) : "memory")
--
--/*
-- * Force strict CPU ordering.
-- * And yes, this is required on UP too when we're talking
-- * to devices.
-- *
-- * For now, "wmb()" doesn't actually do anything, as all
-- * Intel CPU's follow what Intel calls a *Processor Order*,
-- * in which all writes are seen in the program order even
-- * outside the CPU.
-- *
-- * I expect future Intel CPU's to have a weaker ordering,
-- * but I'd also expect them to finally get their act together
-- * and add some real memory barriers if so.
-- */
--
- #ifdef __i386__
- #define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
- #define rmb() mb()
- #define wmb() __asm__ __volatile__ ("": : :"memory")
--#else
-+#define IATOMIC_DEFINED 1
-+#endif
-+
-+#ifdef __x86_64__
- #define mb() asm volatile("mfence":::"memory")
- #define rmb() asm volatile("lfence":::"memory")
- #define wmb() asm volatile("sfence":::"memory")
--#endif
--
--#undef ATOMIC_SMP_LOCK
--
- #define IATOMIC_DEFINED 1
--
--#endif /* __i386__ */
-+#endif
-
- #ifdef __ia64__
--
--/*
-- * On IA-64, counter must always be volatile to ensure that that the
-- * memory accesses are ordered.
-- */
--typedef struct { volatile int counter; } atomic_t;
--
--#define ATOMIC_INIT(i) ((atomic_t) { (i) })
--
--#define atomic_read(v) ((v)->counter)
--#define atomic_set(v,i) (((v)->counter) = (i))
--
--/* stripped version - we need only 4byte version */
--#define ia64_cmpxchg(sem,ptr,old,new,size) \
--({ \
-- __typeof__(ptr) _p_ = (ptr); \
-- __typeof__(new) _n_ = (new); \
-- unsigned long _o_, _r_; \
-- _o_ = (unsigned int) (long) (old); \
-- __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO"(_o_)); \
-- __asm__ __volatile__ ("cmpxchg4."sem" %0=[%1],%2,ar.ccv" \
-- : "=r"(_r_) : "r"(_p_), "r"(_n_) : "memory"); \
-- (__typeof__(old)) _r_; \
--})
--
--static __inline__ int
--ia64_atomic_add (int i, atomic_t *v)
--{
-- int old, new;
-- // CMPXCHG_BUGCHECK_DECL
--
-- do {
-- // CMPXCHG_BUGCHECK(v);
-- old = atomic_read(v);
-- new = old + i;
-- } while (ia64_cmpxchg("acq", v, old, old + i, sizeof(atomic_t)) != old);
-- return new;
--}
--
--static __inline__ int
--ia64_atomic_sub (int i, atomic_t *v)
--{
-- int old, new;
-- // CMPXCHG_BUGCHECK_DECL
--
-- do {
-- // CMPXCHG_BUGCHECK(v);
-- old = atomic_read(v);
-- new = old - i;
-- } while (ia64_cmpxchg("acq", v, old, new, sizeof(atomic_t)) != old);
-- return new;
--}
--
--#define IA64_FETCHADD(tmp,v,n,sz) \
--({ \
-- switch (sz) { \
-- case 4: \
-- __asm__ __volatile__ ("fetchadd4.rel %0=[%1],%2" \
-- : "=r"(tmp) : "r"(v), "i"(n) : "memory"); \
-- break; \
-- \
-- case 8: \
-- __asm__ __volatile__ ("fetchadd8.rel %0=[%1],%2" \
-- : "=r"(tmp) : "r"(v), "i"(n) : "memory"); \
-- break; \
-- } \
--})
--
--#define ia64_fetch_and_add(i,v) \
--({ \
-- unsigned long _tmp; \
-- volatile __typeof__(*(v)) *_v = (v); \
-- switch (i) { \
-- case -16: IA64_FETCHADD(_tmp, _v, -16, sizeof(*(v))); break; \
-- case -8: IA64_FETCHADD(_tmp, _v, -8, sizeof(*(v))); break; \
-- case -4: IA64_FETCHADD(_tmp, _v, -4, sizeof(*(v))); break; \
-- case -1: IA64_FETCHADD(_tmp, _v, -1, sizeof(*(v))); break; \
-- case 1: IA64_FETCHADD(_tmp, _v, 1, sizeof(*(v))); break; \
-- case 4: IA64_FETCHADD(_tmp, _v, 4, sizeof(*(v))); break; \
-- case 8: IA64_FETCHADD(_tmp, _v, 8, sizeof(*(v))); break; \
-- case 16: IA64_FETCHADD(_tmp, _v, 16, sizeof(*(v))); break; \
-- } \
-- (__typeof__(*v)) (_tmp + (i)); /* return new value */ \
--})
--
--/*
-- * Atomically add I to V and return TRUE if the resulting value is
-- * negative.
-- */
--static __inline__ int
--atomic_add_negative (int i, atomic_t *v)
--{
-- return ia64_atomic_add(i, v) < 0;
--}
--
--#define atomic_add_return(i,v) \
-- ((__builtin_constant_p(i) && \
-- ( (i == 1) || (i == 4) || (i == 8) || (i == 16) \
-- || (i == -1) || (i == -4) || (i == -8) || (i == -16))) \
-- ? ia64_fetch_and_add(i, &(v)->counter) \
-- : ia64_atomic_add(i, v))
--
--#define atomic_sub_return(i,v) \
-- ((__builtin_constant_p(i) && \
-- ( (i == 1) || (i == 4) || (i == 8) || (i == 16) \
-- || (i == -1) || (i == -4) || (i == -8) || (i == -16))) \
-- ? ia64_fetch_and_add(-(i), &(v)->counter) \
-- : ia64_atomic_sub(i, v))
--
--#define atomic_dec_return(v) atomic_sub_return(1, (v))
--#define atomic_inc_return(v) atomic_add_return(1, (v))
--
--#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
--#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
--#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) != 0)
--
--#define atomic_add(i,v) atomic_add_return((i), (v))
--#define atomic_sub(i,v) atomic_sub_return((i), (v))
--#define atomic_inc(v) atomic_add(1, (v))
--#define atomic_dec(v) atomic_sub(1, (v))
--
- /*
- * Macros to force memory ordering. In these descriptions, "previous"
- * and "subsequent" refer to program order; "visible" means that all
-@@ -376,111 +48,6 @@ atomic_add_negative (int i, atomic_t *v)
-
- #ifdef __alpha__
-
--/*
-- * Atomic operations that C can't guarantee us. Useful for
-- * resource counting etc...
-- *
-- * But use these as seldom as possible since they are much slower
-- * than regular operations.
-- */
--
--
--/*
-- * Counter is volatile to make sure gcc doesn't try to be clever
-- * and move things around on us. We need to use _exactly_ the address
-- * the user gave us, not some alias that contains the same information.
-- */
--typedef struct { volatile int counter; } atomic_t;
--
--#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
--
--#define atomic_read(v) ((v)->counter)
--#define atomic_set(v,i) ((v)->counter = (i))
--
--/*
-- * To get proper branch prediction for the main line, we must branch
-- * forward to code at the end of this object's .text section, then
-- * branch back to restart the operation.
-- */
--
--static __inline__ void atomic_add(int i, atomic_t * v)
--{
-- unsigned long temp;
-- __asm__ __volatile__(
-- "1: ldl_l %0,%1\n"
-- " addl %0,%2,%0\n"
-- " stl_c %0,%1\n"
-- " beq %0,2f\n"
-- ".subsection 2\n"
-- "2: br 1b\n"
-- ".previous"
-- :"=&r" (temp), "=m" (v->counter)
-- :"Ir" (i), "m" (v->counter));
--}
--
--static __inline__ void atomic_sub(int i, atomic_t * v)
--{
-- unsigned long temp;
-- __asm__ __volatile__(
-- "1: ldl_l %0,%1\n"
-- " subl %0,%2,%0\n"
-- " stl_c %0,%1\n"
-- " beq %0,2f\n"
-- ".subsection 2\n"
-- "2: br 1b\n"
-- ".previous"
-- :"=&r" (temp), "=m" (v->counter)
-- :"Ir" (i), "m" (v->counter));
--}
--
--/*
-- * Same as above, but return the result value
-- */
--static __inline__ long atomic_add_return(int i, atomic_t * v)
--{
-- long temp, result;
-- __asm__ __volatile__(
-- "1: ldl_l %0,%1\n"
-- " addl %0,%3,%2\n"
-- " addl %0,%3,%0\n"
-- " stl_c %0,%1\n"
-- " beq %0,2f\n"
-- " mb\n"
-- ".subsection 2\n"
-- "2: br 1b\n"
-- ".previous"
-- :"=&r" (temp), "=m" (v->counter), "=&r" (result)
-- :"Ir" (i), "m" (v->counter) : "memory");
-- return result;
--}
--
--static __inline__ long atomic_sub_return(int i, atomic_t * v)
--{
-- long temp, result;
-- __asm__ __volatile__(
-- "1: ldl_l %0,%1\n"
-- " subl %0,%3,%2\n"
-- " subl %0,%3,%0\n"
-- " stl_c %0,%1\n"
-- " beq %0,2f\n"
-- " mb\n"
-- ".subsection 2\n"
-- "2: br 1b\n"
-- ".previous"
-- :"=&r" (temp), "=m" (v->counter), "=&r" (result)
-- :"Ir" (i), "m" (v->counter) : "memory");
-- return result;
--}
--
--#define atomic_dec_return(v) atomic_sub_return(1,(v))
--#define atomic_inc_return(v) atomic_add_return(1,(v))
--
--#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
--#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
--
--#define atomic_inc(v) atomic_add(1,(v))
--#define atomic_dec(v) atomic_sub(1,(v))
--
- #define mb() \
- __asm__ __volatile__("mb": : :"memory")
-
-@@ -496,168 +63,6 @@ __asm__ __volatile__("wmb": : :"memory")
-
- #ifdef __powerpc__
-
--typedef struct { volatile int counter; } atomic_t;
--
--#define ATOMIC_INIT(i) { (i) }
--
--#define atomic_read(v) ((v)->counter)
--#define atomic_set(v,i) (((v)->counter) = (i))
--
--extern void atomic_clear_mask(unsigned long mask, unsigned long *addr);
--extern void atomic_set_mask(unsigned long mask, unsigned long *addr);
--
--#define SMP_ISYNC "\n\tisync"
--
--static __inline__ void atomic_add(int a, atomic_t *v)
--{
-- int t;
--
-- __asm__ __volatile__(
--"1: lwarx %0,0,%3 # atomic_add\n\
-- add %0,%2,%0\n\
-- stwcx. %0,0,%3\n\
-- bne- 1b"
-- : "=&r" (t), "=m" (v->counter)
-- : "r" (a), "r" (&v->counter), "m" (v->counter)
-- : "cc");
--}
--
--static __inline__ int atomic_add_return(int a, atomic_t *v)
--{
-- int t;
--
-- __asm__ __volatile__(
--"1: lwarx %0,0,%2 # atomic_add_return\n\
-- add %0,%1,%0\n\
-- stwcx. %0,0,%2\n\
-- bne- 1b"
-- SMP_ISYNC
-- : "=&r" (t)
-- : "r" (a), "r" (&v->counter)
-- : "cc", "memory");
--
-- return t;
--}
--
--static __inline__ void atomic_sub(int a, atomic_t *v)
--{
-- int t;
--
-- __asm__ __volatile__(
--"1: lwarx %0,0,%3 # atomic_sub\n\
-- subf %0,%2,%0\n\
-- stwcx. %0,0,%3\n\
-- bne- 1b"
-- : "=&r" (t), "=m" (v->counter)
-- : "r" (a), "r" (&v->counter), "m" (v->counter)
-- : "cc");
--}
--
--static __inline__ int atomic_sub_return(int a, atomic_t *v)
--{
-- int t;
--
-- __asm__ __volatile__(
--"1: lwarx %0,0,%2 # atomic_sub_return\n\
-- subf %0,%1,%0\n\
-- stwcx. %0,0,%2\n\
-- bne- 1b"
-- SMP_ISYNC
-- : "=&r" (t)
-- : "r" (a), "r" (&v->counter)
-- : "cc", "memory");
--
-- return t;
--}
--
--static __inline__ void atomic_inc(atomic_t *v)
--{
-- int t;
--
-- __asm__ __volatile__(
--"1: lwarx %0,0,%2 # atomic_inc\n\
-- addic %0,%0,1\n\
-- stwcx. %0,0,%2\n\
-- bne- 1b"
-- : "=&r" (t), "=m" (v->counter)
-- : "r" (&v->counter), "m" (v->counter)
-- : "cc");
--}
--
--static __inline__ int atomic_inc_return(atomic_t *v)
--{
-- int t;
--
-- __asm__ __volatile__(
--"1: lwarx %0,0,%1 # atomic_inc_return\n\
-- addic %0,%0,1\n\
-- stwcx. %0,0,%1\n\
-- bne- 1b"
-- SMP_ISYNC
-- : "=&r" (t)
-- : "r" (&v->counter)
-- : "cc", "memory");
--
-- return t;
--}
--
--static __inline__ void atomic_dec(atomic_t *v)
--{
-- int t;
--
-- __asm__ __volatile__(
--"1: lwarx %0,0,%2 # atomic_dec\n\
-- addic %0,%0,-1\n\
-- stwcx. %0,0,%2\n\
-- bne- 1b"
-- : "=&r" (t), "=m" (v->counter)
-- : "r" (&v->counter), "m" (v->counter)
-- : "cc");
--}
--
--static __inline__ int atomic_dec_return(atomic_t *v)
--{
-- int t;
--
-- __asm__ __volatile__(
--"1: lwarx %0,0,%1 # atomic_dec_return\n\
-- addic %0,%0,-1\n\
-- stwcx. %0,0,%1\n\
-- bne- 1b"
-- SMP_ISYNC
-- : "=&r" (t)
-- : "r" (&v->counter)
-- : "cc", "memory");
--
-- return t;
--}
--
--#define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0)
--#define atomic_dec_and_test(v) (atomic_dec_return((v)) == 0)
--
--/*
-- * Atomically test *v and decrement if it is greater than 0.
-- * The function returns the old value of *v minus 1.
-- */
--static __inline__ int atomic_dec_if_positive(atomic_t *v)
--{
-- int t;
--
-- __asm__ __volatile__(
--"1: lwarx %0,0,%1 # atomic_dec_if_positive\n\
-- addic. %0,%0,-1\n\
-- blt- 2f\n\
-- stwcx. %0,0,%1\n\
-- bne- 1b"
-- SMP_ISYNC
-- "\n\
--2:" : "=&r" (t)
-- : "r" (&v->counter)
-- : "cc", "memory");
--
-- return t;
--}
--
- /*
- * Memory barrier.
- * The sync instruction guarantees that all memory accesses initiated
-@@ -682,447 +87,14 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
-
- #endif /* __powerpc__ */
-
--#ifdef __mips__
--
--typedef struct { volatile int counter; } atomic_t;
--
--#define ATOMIC_INIT(i) { (i) }
--
--/*
-- * atomic_read - read atomic variable
-- * @v: pointer of type atomic_t
-- *
-- * Atomically reads the value of @v. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--#define atomic_read(v) ((v)->counter)
--
--/*
-- * atomic_set - set atomic variable
-- * @v: pointer of type atomic_t
-- * @i: required value
-- *
-- * Atomically sets the value of @v to @i. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--#define atomic_set(v,i) ((v)->counter = (i))
--
--/*
-- * for MIPS II and better we can use ll/sc instruction, and kernel 2.4.3+
-- * will emulate it on MIPS I.
-- */
--
--/*
-- * atomic_add - add integer to atomic variable
-- * @i: integer value to add
-- * @v: pointer of type atomic_t
-- *
-- * Atomically adds @i to @v. Note that the guaranteed useful range
-- * of an atomic_t is only 24 bits.
-- */
--static __inline__ void atomic_add(int i, atomic_t * v)
--{
-- unsigned long temp;
--
-- __asm__ __volatile__(
-- ".set push \n"
-- ".set mips2 \n"
-- "1: ll %0, %1 # atomic_add\n"
-- " addu %0, %2 \n"
-- " sc %0, %1 \n"
-- " beqz %0, 1b \n"
-- ".set pop \n"
-- : "=&r" (temp), "=m" (v->counter)
-- : "Ir" (i), "m" (v->counter));
--}
--
--/*
-- * atomic_sub - subtract the atomic variable
-- * @i: integer value to subtract
-- * @v: pointer of type atomic_t
-- *
-- * Atomically subtracts @i from @v. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--static __inline__ void atomic_sub(int i, atomic_t * v)
--{
-- unsigned long temp;
--
-- __asm__ __volatile__(
-- ".set push \n"
-- ".set mips2 \n"
-- "1: ll %0, %1 # atomic_sub\n"
-- " subu %0, %2 \n"
-- " sc %0, %1 \n"
-- " beqz %0, 1b \n"
-- ".set pop \n"
-- : "=&r" (temp), "=m" (v->counter)
-- : "Ir" (i), "m" (v->counter));
--}
--
--/*
-- * Same as above, but return the result value
-- */
--static __inline__ int atomic_add_return(int i, atomic_t * v)
--{
-- unsigned long temp, result;
--
-- __asm__ __volatile__(
-- ".set push # atomic_add_return\n"
-- ".set noreorder \n"
-- ".set mips2 \n"
-- "1: ll %1, %2 \n"
-- " addu %0, %1, %3 \n"
-- " sc %0, %2 \n"
-- " beqz %0, 1b \n"
-- " addu %0, %1, %3 \n"
-- ".set pop \n"
-- : "=&r" (result), "=&r" (temp), "=m" (v->counter)
-- : "Ir" (i), "m" (v->counter)
-- : "memory");
--
-- return result;
--}
--
--static __inline__ int atomic_sub_return(int i, atomic_t * v)
--{
-- unsigned long temp, result;
--
-- __asm__ __volatile__(
-- ".set push \n"
-- ".set mips2 \n"
-- ".set noreorder # atomic_sub_return\n"
-- "1: ll %1, %2 \n"
-- " subu %0, %1, %3 \n"
-- " sc %0, %2 \n"
-- " beqz %0, 1b \n"
-- " subu %0, %1, %3 \n"
-- ".set pop \n"
-- : "=&r" (result), "=&r" (temp), "=m" (v->counter)
-- : "Ir" (i), "m" (v->counter)
-- : "memory");
--
-- return result;
--}
--
--#define atomic_dec_return(v) atomic_sub_return(1,(v))
--#define atomic_inc_return(v) atomic_add_return(1,(v))
--
--/*
-- * atomic_sub_and_test - subtract value from variable and test result
-- * @i: integer value to subtract
-- * @v: pointer of type atomic_t
-- *
-- * Atomically subtracts @i from @v and returns
-- * true if the result is zero, or false for all
-- * other cases. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
--
--/*
-- * atomic_inc_and_test - increment and test
-- * @v: pointer of type atomic_t
-- *
-- * Atomically increments @v by 1
-- * and returns true if the result is zero, or false for all
-- * other cases. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--#define atomic_inc_and_test(v) (atomic_inc_return(1, (v)) == 0)
--
--/*
-- * atomic_dec_and_test - decrement by 1 and test
-- * @v: pointer of type atomic_t
-- *
-- * Atomically decrements @v by 1 and
-- * returns true if the result is 0, or false for all other
-- * cases. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
--
--/*
-- * atomic_inc - increment atomic variable
-- * @v: pointer of type atomic_t
-- *
-- * Atomically increments @v by 1. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--#define atomic_inc(v) atomic_add(1,(v))
--
--/*
-- * atomic_dec - decrement and test
-- * @v: pointer of type atomic_t
-- *
-- * Atomically decrements @v by 1. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- */
--#define atomic_dec(v) atomic_sub(1,(v))
--
--/*
-- * atomic_add_negative - add and test if negative
-- * @v: pointer of type atomic_t
-- * @i: integer value to add
-- *
-- * Atomically adds @i to @v and returns true
-- * if the result is negative, or false when
-- * result is greater than or equal to zero. Note that the guaranteed
-- * useful range of an atomic_t is only 24 bits.
-- *
-- * Currently not implemented for MIPS.
-- */
--
--#define mb() \
--__asm__ __volatile__( \
-- "# prevent instructions being moved around\n\t" \
-- ".set\tnoreorder\n\t" \
-- "# 8 nops to fool the R4400 pipeline\n\t" \
-- "nop;nop;nop;nop;nop;nop;nop;nop\n\t" \
-- ".set\treorder" \
-- : /* no output */ \
-- : /* no input */ \
-- : "memory")
--#define rmb() mb()
--#define wmb() mb()
--
--#define IATOMIC_DEFINED 1
--
--#endif /* __mips__ */
--
--#ifdef __arm__
--
--/*
-- * FIXME: bellow code is valid only for SA11xx
-- */
--
--/*
-- * Save the current interrupt enable state & disable IRQs
-- */
--#define local_irq_save(x) \
-- ({ \
-- unsigned long temp; \
-- __asm__ __volatile__( \
-- "mrs %0, cpsr @ local_irq_save\n" \
--" orr %1, %0, #128\n" \
--" msr cpsr_c, %1" \
-- : "=r" (x), "=r" (temp) \
-- : \
-- : "memory"); \
-- })
--
--/*
-- * restore saved IRQ & FIQ state
-- */
--#define local_irq_restore(x) \
-- __asm__ __volatile__( \
-- "msr cpsr_c, %0 @ local_irq_restore\n" \
-- : \
-- : "r" (x) \
-- : "memory")
--
--#define __save_flags_cli(x) local_irq_save(x)
--#define __restore_flags(x) local_irq_restore(x)
--
--typedef struct { volatile int counter; } atomic_t;
--
--#define ATOMIC_INIT(i) { (i) }
--
--#define atomic_read(v) ((v)->counter)
--#define atomic_set(v,i) (((v)->counter) = (i))
--
--static __inline__ void atomic_add(int i, volatile atomic_t *v)
--{
-- unsigned long flags;
--
-- __save_flags_cli(flags);
-- v->counter += i;
-- __restore_flags(flags);
--}
--
--static __inline__ void atomic_sub(int i, volatile atomic_t *v)
--{
-- unsigned long flags;
--
-- __save_flags_cli(flags);
-- v->counter -= i;
-- __restore_flags(flags);
--}
--
--static __inline__ void atomic_inc(volatile atomic_t *v)
--{
-- unsigned long flags;
--
-- __save_flags_cli(flags);
-- v->counter += 1;
-- __restore_flags(flags);
--}
--
--static __inline__ void atomic_dec(volatile atomic_t *v)
--{
-- unsigned long flags;
--
-- __save_flags_cli(flags);
-- v->counter -= 1;
-- __restore_flags(flags);
--}
--
--static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
--{
-- unsigned long flags;
-- int result;
--
-- __save_flags_cli(flags);
-- v->counter -= 1;
-- result = (v->counter == 0);
-- __restore_flags(flags);
--
-- return result;
--}
--
--static __inline__ int atomic_add_negative(int i, volatile atomic_t *v)
--{
-- unsigned long flags;
-- int result;
--
-- __save_flags_cli(flags);
-- v->counter += i;
-- result = (v->counter < 0);
-- __restore_flags(flags);
--
-- return result;
--}
--
--static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *addr)
--{
-- unsigned long flags;
--
-- __save_flags_cli(flags);
-- *addr &= ~mask;
-- __restore_flags(flags);
--}
--
--#define mb() __asm__ __volatile__ ("" : : : "memory")
--#define rmb() mb()
--#define wmb() mb()
--
--#define IATOMIC_DEFINED 1
--
--#endif /* __arm__ */
--
--#ifdef __sh__
--
--typedef struct { volatile int counter; } atomic_t;
--
--#define ATOMIC_INIT(i) { (i) }
--
--#define atomic_read(v) ((v)->counter)
--#define atomic_set(v,i) (((v)->counter) = (i))
--
--#define atomic_dec_return(v) atomic_sub_return(1,(v))
--#define atomic_inc_return(v) atomic_add_return(1,(v))
--
--#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
--#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
--#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) != 0)
--
--#define atomic_add(i,v) atomic_add_return((i),(v))
--#define atomic_sub(i,v) atomic_sub_return((i),(v))
--#define atomic_inc(v) atomic_add(1,(v))
--#define atomic_dec(v) atomic_sub(1,(v))
--
--static __inline__ int atomic_add_return(int i, volatile atomic_t *v)
--{
-- int result;
--
-- asm volatile (
-- " .align 2\n"
-- " mova 99f, r0\n"
-- " mov r15, r1\n"
-- " mov #-6, r15\n"
-- " mov.l @%2, %0\n"
-- " add %1, %0\n"
-- " mov.l %0, @%2\n"
-- "99: mov r1, r15"
-- : "=&r"(result)
-- : "r"(i), "r"(v)
-- : "r0", "r1");
--
-- return result;
--}
--
--static __inline__ int atomic_sub_return(int i, volatile atomic_t *v)
--{
-- int result;
--
-- asm volatile (
-- " .align 2\n"
-- " mova 99f, r0\n"
-- " mov r15, r1\n"
-- " mov #-6, r15\n"
-- " mov.l @%2, %0\n"
-- " sub %1, %0\n"
-- " mov.l %0, @%2\n"
-- "99: mov r1, r15"
-- : "=&r"(result)
-- : "r"(i), "r"(v)
-- : "r0", "r1");
--
-- return result;
--}
--
--#define mb() __asm__ __volatile__ ("" : : : "memory")
--#define rmb() mb()
--#define wmb() mb()
--
--#define IATOMIC_DEFINED 1
--
--#endif /* __sh__ */
--
--#ifdef __bfin__
--
--#include
--
--typedef struct { volatile int counter; } atomic_t;
--
--#define ATOMIC_INIT(i) { (i) }
-+#ifndef IATOMIC_DEFINED
-
--#define atomic_read(v) ((v)->counter)
--#define atomic_set(v,i) (((v)->counter) = (i))
--#define atomic_add(i,v) bfin_atomic_add32(&(v)->counter, i)
--#define atomic_sub(i,v) bfin_atomic_sub32(&(v)->counter, i)
--#define atomic_inc(v) bfin_atomic_inc32(&(v)->counter);
--#define atomic_dec(v) bfin_atomic_dec32(&(v)->counter);
-+/* Generic __sync_synchronize is available from gcc 4.1 */
-
--#define mb() __asm__ __volatile__ ("" : : : "memory")
-+#define mb() __sync_synchronize()
- #define rmb() mb()
- #define wmb() mb()
-
--#define IATOMIC_DEFINED 1
--
--#endif /* __bfin__ */
--
--#ifndef IATOMIC_DEFINED
--/*
-- * non supported architecture.
-- */
--#warning "Atomic operations are not supported on this architecture."
--
--typedef struct { volatile int counter; } atomic_t;
--
--#define ATOMIC_INIT(i) { (i) }
--
--#define atomic_read(v) ((v)->counter)
--#define atomic_set(v,i) (((v)->counter) = (i))
--#define atomic_add(i,v) (((v)->counter) += (i))
--#define atomic_sub(i,v) (((v)->counter) -= (i))
--#define atomic_inc(v) (((v)->counter)++)
--#define atomic_dec(v) (((v)->counter)--)
--
--#define mb()
--#define rmb()
--#define wmb()
--
- #define IATOMIC_DEFINED 1
-
- #endif /* IATOMIC_DEFINED */
-diff --git a/src/pcm/pcm_meter.c b/src/pcm/pcm_meter.c
-index 573b6fe59d1d..676fbef89c30 100644
---- a/src/pcm/pcm_meter.c
-+++ b/src/pcm/pcm_meter.c
-@@ -33,7 +33,10 @@
- #include
- #include "pcm_local.h"
- #include "pcm_plugin.h"
--#include "iatomic.h"
-+
-+#define atomic_read(ptr) __atomic_load_n(ptr, __ATOMIC_SEQ_CST )
-+#define atomic_add(ptr, n) __atomic_add_fetch(ptr, n, __ATOMIC_SEQ_CST)
-+#define atomic_dec(ptr) __atomic_sub_fetch(ptr, 1, __ATOMIC_SEQ_CST)
-
- #ifndef PIC
- /* entry for static linking */
-@@ -61,7 +64,7 @@ typedef struct _snd_pcm_meter {
- struct list_head scopes;
- int closed;
- int running;
-- atomic_t reset;
-+ int reset;
- pthread_t thread;
- pthread_mutex_t update_mutex;
- pthread_mutex_t running_mutex;
-@@ -288,7 +291,7 @@ static int snd_pcm_meter_prepare(snd_pcm_t *pcm)
- {
- snd_pcm_meter_t *meter = pcm->private_data;
- int err;
-- atomic_inc(&meter->reset);
-+ atomic_add(&meter->reset, 1);
- err = snd_pcm_prepare(meter->gen.slave);
- if (err >= 0) {
- if (pcm->stream == SND_PCM_STREAM_PLAYBACK)
---
-1.9.0
-
diff --git a/0027-conf-Add-basic-infrastructure-for-2.1-surround-sound.patch b/0027-conf-Add-basic-infrastructure-for-2.1-surround-sound.patch
deleted file mode 100644
index 6fcf613..0000000
--- a/0027-conf-Add-basic-infrastructure-for-2.1-surround-sound.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 57b5076c30b3453ee843912c0aeb3df8dbee3f68 Mon Sep 17 00:00:00 2001
-From: David Henningsson
-Date: Tue, 18 Feb 2014 16:41:48 +0100
-Subject: [PATCH] conf: Add basic infrastructure for 2.1 surround sound
-
-For now, we do 2.1 over 5.1, because that's what ALSA allows per default.
-
-Signed-off-by: David Henningsson
-Signed-off-by: Takashi Iwai
----
- src/conf/alsa.conf | 3 +++
- src/conf/pcm/Makefile.am | 2 +-
- src/conf/pcm/surround21.conf | 62 ++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 66 insertions(+), 1 deletion(-)
- create mode 100644 src/conf/pcm/surround21.conf
-
-diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
-index bc91df3b93a5..5c928e8afbcd 100644
---- a/src/conf/alsa.conf
-+++ b/src/conf/alsa.conf
-@@ -90,6 +90,8 @@ defaults.pcm.center_lfe.card defaults.pcm.card
- defaults.pcm.center_lfe.device defaults.pcm.device
- defaults.pcm.side.card defaults.pcm.card
- defaults.pcm.side.device defaults.pcm.device
-+defaults.pcm.surround21.card defaults.pcm.card
-+defaults.pcm.surround21.device defaults.pcm.device
- defaults.pcm.surround40.card defaults.pcm.card
- defaults.pcm.surround40.device defaults.pcm.device
- defaults.pcm.surround41.card defaults.pcm.card
-@@ -131,6 +133,7 @@ pcm.front cards.pcm.front
- pcm.rear cards.pcm.rear
- pcm.center_lfe cards.pcm.center_lfe
- pcm.side cards.pcm.side
-+pcm.surround21 cards.pcm.surround21
- pcm.surround40 cards.pcm.surround40
- pcm.surround41 cards.pcm.surround41
- pcm.surround50 cards.pcm.surround50
-diff --git a/src/conf/pcm/Makefile.am b/src/conf/pcm/Makefile.am
-index cc3286e6ddf0..c548660d1696 100644
---- a/src/conf/pcm/Makefile.am
-+++ b/src/conf/pcm/Makefile.am
-@@ -1,5 +1,5 @@
- cfg_files = default.conf front.conf rear.conf center_lfe.conf side.conf\
-- surround40.conf surround41.conf \
-+ surround21.conf surround40.conf surround41.conf \
- surround50.conf surround51.conf \
- surround71.conf iec958.conf hdmi.conf modem.conf \
- dmix.conf dsnoop.conf \
-diff --git a/src/conf/pcm/surround21.conf b/src/conf/pcm/surround21.conf
-new file mode 100644
-index 000000000000..be29020f24c7
---- /dev/null
-+++ b/src/conf/pcm/surround21.conf
-@@ -0,0 +1,62 @@
-+#
-+# Hardware output from 2.1 speakers.
-+# Samples must be positioned:
-+# chn0 - front left
-+# chn1 - front right
-+# chn2 - LFE
-+#
-+
-+pcm.!surround21 {
-+ @args [ CARD DEV ]
-+ @args.CARD {
-+ type string
-+ default {
-+ @func getenv
-+ vars [
-+ ALSA_SURROUND21_CARD
-+ ALSA_PCM_CARD
-+ ALSA_CARD
-+ ]
-+ default {
-+ @func refer
-+ name defaults.pcm.surround21.card
-+ }
-+ }
-+ }
-+ @args.DEV {
-+ type integer
-+ default {
-+ @func igetenv
-+ vars [
-+ ALSA_SURROUND21_DEVICE
-+ ]
-+ default {
-+ @func refer
-+ name defaults.pcm.surround21.device
-+ }
-+ }
-+ }
-+ type route
-+ slave.pcm {
-+ @func refer
-+ name {
-+ @func concat
-+ strings [
-+ "cards."
-+ {
-+ @func card_driver
-+ card $CARD
-+ }
-+ ".pcm.surround51." $DEV ":CARD=" $CARD
-+ ]
-+ }
-+ }
-+ slave.channels 6
-+ ttable.0.0 1
-+ ttable.1.1 1
-+ ttable.2.5 1
-+ hint {
-+ description "2.1 Surround output to Front and Subwoofer speakers"
-+ device $DEV
-+ }
-+}
---
-1.9.0
-
diff --git a/0028-conf-Add-surround-2.1-support-to-all-cards.patch b/0028-conf-Add-surround-2.1-support-to-all-cards.patch
deleted file mode 100644
index 2ed93a1..0000000
--- a/0028-conf-Add-surround-2.1-support-to-all-cards.patch
+++ /dev/null
@@ -1,381 +0,0 @@
-From 1af088e39b75a0a0897c7036487b143e983cd423 Mon Sep 17 00:00:00 2001
-From: David Henningsson
-Date: Tue, 18 Feb 2014 16:41:49 +0100
-Subject: [PATCH] conf: Add surround 2.1 support to all cards
-
-All cards that support 4.1 surround now also support 2.1 surround,
-because they both have surround 5.1 as slave.
-
-Signed-off-by: David Henningsson
-Signed-off-by: Takashi Iwai
----
- src/conf/cards/ATIIXP-SPDMA.conf | 1 +
- src/conf/cards/ATIIXP.conf | 1 +
- src/conf/cards/Audigy.conf | 1 +
- src/conf/cards/Audigy2.conf | 1 +
- src/conf/cards/Aureon51.conf | 1 +
- src/conf/cards/Aureon71.conf | 1 +
- src/conf/cards/CA0106.conf | 1 +
- src/conf/cards/CMI8738-MC6.conf | 1 +
- src/conf/cards/CMI8738-MC8.conf | 1 +
- src/conf/cards/CMI8788.conf | 2 +-
- src/conf/cards/CS46xx.conf | 1 +
- src/conf/cards/EMU10K1.conf | 1 +
- src/conf/cards/EMU10K1X.conf | 1 +
- src/conf/cards/FM801.conf | 1 +
- src/conf/cards/FireWave.conf | 1 +
- src/conf/cards/HDA-Intel.conf | 1 +
- src/conf/cards/ICE1712.conf | 1 +
- src/conf/cards/ICE1724.conf | 1 +
- src/conf/cards/ICH.conf | 1 +
- src/conf/cards/ICH4.conf | 1 +
- src/conf/cards/Loopback.conf | 1 +
- src/conf/cards/NFORCE.conf | 1 +
- src/conf/cards/SB-XFi.conf | 1 +
- src/conf/cards/SI7018.conf | 1 +
- src/conf/cards/USB-Audio.conf | 1 +
- src/conf/cards/VIA8233.conf | 1 +
- src/conf/cards/VIA8233A.conf | 1 +
- src/conf/cards/VIA8237.conf | 1 +
- 28 files changed, 28 insertions(+), 1 deletion(-)
-
-diff --git a/src/conf/cards/ATIIXP-SPDMA.conf b/src/conf/cards/ATIIXP-SPDMA.conf
-index 5c80815ddaf6..42540d6817c0 100644
---- a/src/conf/cards/ATIIXP-SPDMA.conf
-+++ b/src/conf/cards/ATIIXP-SPDMA.conf
-@@ -77,6 +77,7 @@ ATIIXP-SPDMA.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/ATIIXP.conf b/src/conf/cards/ATIIXP.conf
-index 38d802345bfb..c4d33ef34a68 100644
---- a/src/conf/cards/ATIIXP.conf
-+++ b/src/conf/cards/ATIIXP.conf
-@@ -77,6 +77,7 @@ ATIIXP.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/Audigy.conf b/src/conf/cards/Audigy.conf
-index 4fe387327633..1c92496653e0 100644
---- a/src/conf/cards/Audigy.conf
-+++ b/src/conf/cards/Audigy.conf
-@@ -143,6 +143,7 @@ Audigy.pcm.center_lfe.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/Audigy2.conf b/src/conf/cards/Audigy2.conf
-index db45776e54c4..cbec78358882 100644
---- a/src/conf/cards/Audigy2.conf
-+++ b/src/conf/cards/Audigy2.conf
-@@ -195,6 +195,7 @@ Audigy2.pcm.side.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/Aureon51.conf b/src/conf/cards/Aureon51.conf
-index 24b4d949174b..07be4a77aa12 100644
---- a/src/conf/cards/Aureon51.conf
-+++ b/src/conf/cards/Aureon51.conf
-@@ -86,6 +86,7 @@ Aureon51.pcm.surround40.0 {
- channels 4
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/Aureon71.conf b/src/conf/cards/Aureon71.conf
-index 1479c25cce21..a43ce2cee5fa 100644
---- a/src/conf/cards/Aureon71.conf
-+++ b/src/conf/cards/Aureon71.conf
-@@ -86,6 +86,7 @@ Aureon71.pcm.surround40.0 {
- channels 4
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/CA0106.conf b/src/conf/cards/CA0106.conf
-index 9d21770f84ad..2f0eaf0afdc8 100644
---- a/src/conf/cards/CA0106.conf
-+++ b/src/conf/cards/CA0106.conf
-@@ -108,6 +108,7 @@ CA0106.pcm.surround40.0 {
- ]
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/CMI8738-MC6.conf b/src/conf/cards/CMI8738-MC6.conf
-index 171c772809ab..edc67d44d96a 100644
---- a/src/conf/cards/CMI8738-MC6.conf
-+++ b/src/conf/cards/CMI8738-MC6.conf
-@@ -77,6 +77,7 @@ CMI8738-MC6.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/CMI8738-MC8.conf b/src/conf/cards/CMI8738-MC8.conf
-index a5bf6cb4889a..ddff75304bc3 100644
---- a/src/conf/cards/CMI8738-MC8.conf
-+++ b/src/conf/cards/CMI8738-MC8.conf
-@@ -105,6 +105,7 @@ CMI8738-MC8.pcm.surround40.0 {
- }
-
-
-+
-
-
-
-diff --git a/src/conf/cards/CMI8788.conf b/src/conf/cards/CMI8788.conf
-index 0ca71e9d28de..edcb0c9ccc36 100644
---- a/src/conf/cards/CMI8788.conf
-+++ b/src/conf/cards/CMI8788.conf
-@@ -48,7 +48,7 @@ CMI8788.pcm.surround40.0 {
- channels 4
- }
-
--
-+
-
-
-
-diff --git a/src/conf/cards/CS46xx.conf b/src/conf/cards/CS46xx.conf
-index 1983142548fd..b71c30aad514 100644
---- a/src/conf/cards/CS46xx.conf
-+++ b/src/conf/cards/CS46xx.conf
-@@ -112,6 +112,7 @@ CS46xx.pcm.surround40.0 {
- ]
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/EMU10K1.conf b/src/conf/cards/EMU10K1.conf
-index d51f6dc02fac..ef193fe0c460 100644
---- a/src/conf/cards/EMU10K1.conf
-+++ b/src/conf/cards/EMU10K1.conf
-@@ -217,6 +217,7 @@ EMU10K1.pcm.surround40.0 {
- ]
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/EMU10K1X.conf b/src/conf/cards/EMU10K1X.conf
-index b5fc708c4cb2..f742863679cb 100644
---- a/src/conf/cards/EMU10K1X.conf
-+++ b/src/conf/cards/EMU10K1X.conf
-@@ -96,6 +96,7 @@ EMU10K1X.pcm.surround40.0 {
- ]
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/FM801.conf b/src/conf/cards/FM801.conf
-index 997b2184f38c..0ddf799cd029 100644
---- a/src/conf/cards/FM801.conf
-+++ b/src/conf/cards/FM801.conf
-@@ -40,6 +40,7 @@ FM801.pcm.default {
-
- FM801.pcm.surround40.0 "cards.FM801.pcm.front.0"
-
-+
-
-
-
-diff --git a/src/conf/cards/FireWave.conf b/src/conf/cards/FireWave.conf
-index 63fb23d96bc0..fcfc83ccfb19 100644
---- a/src/conf/cards/FireWave.conf
-+++ b/src/conf/cards/FireWave.conf
-@@ -25,6 +25,7 @@ FireWave.pcm.front.0 {
- card $CARD
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/HDA-Intel.conf b/src/conf/cards/HDA-Intel.conf
-index 7976b6c52ee9..fa9f6946376f 100644
---- a/src/conf/cards/HDA-Intel.conf
-+++ b/src/conf/cards/HDA-Intel.conf
-@@ -71,6 +71,7 @@ HDA-Intel.pcm.default {
- hint.device 0
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/ICE1712.conf b/src/conf/cards/ICE1712.conf
-index f5b8add6322c..398fa7ad5307 100644
---- a/src/conf/cards/ICE1712.conf
-+++ b/src/conf/cards/ICE1712.conf
-@@ -74,6 +74,7 @@ ICE1712.pcm.surround40.0 {
- slave.channels 10
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/ICE1724.conf b/src/conf/cards/ICE1724.conf
-index e806b36d92a1..61cac0132f07 100644
---- a/src/conf/cards/ICE1724.conf
-+++ b/src/conf/cards/ICE1724.conf
-@@ -95,6 +95,7 @@ ICE1724.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/ICH.conf b/src/conf/cards/ICH.conf
-index 47ffef96531c..6fc9a5a236c1 100644
---- a/src/conf/cards/ICH.conf
-+++ b/src/conf/cards/ICH.conf
-@@ -98,6 +98,7 @@ ICH.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/ICH4.conf b/src/conf/cards/ICH4.conf
-index 1bf5605bfd7f..64ec883d9c73 100644
---- a/src/conf/cards/ICH4.conf
-+++ b/src/conf/cards/ICH4.conf
-@@ -98,6 +98,7 @@ ICH4.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/Loopback.conf b/src/conf/cards/Loopback.conf
-index 5365fa1bec52..974aa7535340 100644
---- a/src/conf/cards/Loopback.conf
-+++ b/src/conf/cards/Loopback.conf
-@@ -63,6 +63,7 @@ Loopback.pcm.default {
- hint.device 0
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/NFORCE.conf b/src/conf/cards/NFORCE.conf
-index 6ebefe3da29e..64d15479291b 100644
---- a/src/conf/cards/NFORCE.conf
-+++ b/src/conf/cards/NFORCE.conf
-@@ -98,6 +98,7 @@ NFORCE.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/SB-XFi.conf b/src/conf/cards/SB-XFi.conf
-index 38d0027fb4f2..eb2218bfdcc7 100644
---- a/src/conf/cards/SB-XFi.conf
-+++ b/src/conf/cards/SB-XFi.conf
-@@ -53,6 +53,7 @@ SB-XFi.pcm.side.0 {
- hint.device 3
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/SI7018.conf b/src/conf/cards/SI7018.conf
-index 7417bd5bf2e4..02b8fc877ff3 100644
---- a/src/conf/cards/SI7018.conf
-+++ b/src/conf/cards/SI7018.conf
-@@ -78,6 +78,7 @@ SI7018.pcm.surround40.0 {
- ]
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
-index 8a6d9cac6ead..ce3ae019f7f6 100644
---- a/src/conf/cards/USB-Audio.conf
-+++ b/src/conf/cards/USB-Audio.conf
-@@ -314,6 +314,7 @@ USB-Audio.pcm.surround40_two_stereo_devices {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/VIA8233.conf b/src/conf/cards/VIA8233.conf
-index 668bfd9e421b..9ad321f713a9 100644
---- a/src/conf/cards/VIA8233.conf
-+++ b/src/conf/cards/VIA8233.conf
-@@ -86,6 +86,7 @@ VIA8233.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/VIA8233A.conf b/src/conf/cards/VIA8233A.conf
-index 97d2a7daf335..679fccf3d06f 100644
---- a/src/conf/cards/VIA8233A.conf
-+++ b/src/conf/cards/VIA8233A.conf
-@@ -84,6 +84,7 @@ VIA8233A.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
-diff --git a/src/conf/cards/VIA8237.conf b/src/conf/cards/VIA8237.conf
-index 404e19075cbd..29d8e00f6601 100644
---- a/src/conf/cards/VIA8237.conf
-+++ b/src/conf/cards/VIA8237.conf
-@@ -79,6 +79,7 @@ VIA8237.pcm.surround40.0 {
- }
- }
-
-+
-
-
-
---
-1.9.0
-
diff --git a/0029-Portability-fix-look-for-sys-endian.h-as-well-as-end.patch b/0029-Portability-fix-look-for-sys-endian.h-as-well-as-end.patch
deleted file mode 100644
index 71a8845..0000000
--- a/0029-Portability-fix-look-for-sys-endian.h-as-well-as-end.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 7a6e8ca348c4c2640cbc337914d1376333fdbc17 Mon Sep 17 00:00:00 2001
-From: Patrick Welche
-Date: Sun, 23 Feb 2014 11:12:48 +0000
-Subject: [PATCH] Portability fix: look for sys/endian.h as well as endian.h
-
-- define __BYTE_ORDER and friends.
-- adjust asoundlib.h accordingly.
-
-Signed-off-by: Patrick Welche
-Signed-off-by: Takashi Iwai
----
- configure.in | 33 +++++++++++++++++++++++++++++++--
- include/asoundlib-head.h | 13 -------------
- include/local.h | 18 +++++++++++++++++-
- src/pcm/pcm_file.c | 1 -
- 4 files changed, 48 insertions(+), 17 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index bb56eb653ccc..9463b5ad4766 100644
---- a/configure.in
-+++ b/configure.in
-@@ -309,8 +309,8 @@ fi
-
- AC_SUBST(ALSA_DEPLIBS)
-
--dnl Check for wordexp.h
--AC_CHECK_HEADERS([wordexp.h])
-+dnl Check for headers
-+AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h])
-
- dnl Check for resmgr support...
- AC_MSG_CHECKING(for resmgr support)
-@@ -660,6 +660,35 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
- dnl Create asoundlib.h dynamically according to configure options
- echo "Creating asoundlib.h..."
- cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
-+test "$ac_cv_header_endian_h" = "yes" && echo "#include " >> include/asoundlib.h
-+if test "$ac_cv_header_sys_endian_h" = "yes"; then
-+cat >> include/asoundlib.h <
-+#ifndef __BYTE_ORDER
-+#define __BYTE_ORDER BYTE_ORDER
-+#endif
-+#ifndef __LITTLE_ENDIAN
-+#define __LITTLE_ENDIAN LITTLE_ENDIAN
-+#endif
-+#ifndef __BIG_ENDIAN
-+#define __BIG_ENDIAN BIG_ENDIAN
-+#endif
-+EOF
-+fi
-+cat >> include/asoundlib.h <
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+EOF
- test "$build_pcm" = "yes" && echo "#include " >> include/asoundlib.h
- test "$build_rawmidi" = "yes" && echo "#include " >> include/asoundlib.h
- test "$build_pcm" = "yes" && echo "#include " >> include/asoundlib.h
-diff --git a/include/asoundlib-head.h b/include/asoundlib-head.h
-index 71b5c29f61c4..1ec611e56b8e 100644
---- a/include/asoundlib-head.h
-+++ b/include/asoundlib-head.h
-@@ -35,19 +35,6 @@
- #include
- #include
- #include
--#include
- #include
- #include
- #include
--
--#ifndef __GNUC__
--#define __inline__ inline
--#endif
--
--#include
--#include
--#include
--#include
--#include
--#include
--#include
-diff --git a/include/local.h b/include/local.h
-index 9464efa49642..2fe9a273f0b0 100644
---- a/include/local.h
-+++ b/include/local.h
-@@ -22,13 +22,30 @@
- #ifndef __LOCAL_H
- #define __LOCAL_H
-
-+#include "config.h"
-+
- #include
- #include
- #include
- #include
- #include
- #include
-+#ifdef HAVE_ENDIAN_H
- #include
-+#elif defined(HAVE_SYS_ENDIAN_H)
-+#include
-+#ifndef __BYTE_ORDER
-+#define __BYTE_ORDER BYTE_ORDER
-+#endif
-+#ifndef __LITTLE_ENDIAN
-+#define __LITTLE_ENDIAN LITTLE_ENDIAN
-+#endif
-+#ifndef __BIG_ENDIAN
-+#define __BIG_ENDIAN BIG_ENDIAN
-+#endif
-+#else
-+#error Header defining endianness not defined
-+#endif
- #include
- #include
- #include
-@@ -36,7 +53,6 @@
- #include
- #include
-
--#include "config.h"
- #ifdef SUPPORT_RESMGR
- #include
- #endif
-diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
-index 712302598a9f..b1f23304633f 100644
---- a/src/pcm/pcm_file.c
-+++ b/src/pcm/pcm_file.c
-@@ -26,7 +26,6 @@
- *
- */
-
--#include
- #include
- #include
- #include
---
-1.9.0
-
diff --git a/0030-autotools-update-style.patch b/0030-autotools-update-style.patch
deleted file mode 100644
index bb6b42a..0000000
--- a/0030-autotools-update-style.patch
+++ /dev/null
@@ -1,1665 +0,0 @@
-From b669b50de2c0d0f18db924a4a5b556ffcc094421 Mon Sep 17 00:00:00 2001
-From: Patrick Welche
-Date: Tue, 25 Feb 2014 12:40:21 +0000
-Subject: [PATCH] autotools: update style
-
-- rename configure.in to configure.ac
-- replace INCLUDES with AM_CPPFLAGS
-- modernize AM_INIT_AUTOMAKE invocation
-
-Signed-off-by: Patrick Welche
-Signed-off-by: Takashi Iwai
----
- Makefile.am | 2 +-
- alsalisp/Makefile.am | 2 +-
- aserver/Makefile.am | 2 +-
- configure.ac | 704 +++++++++++++++++++++++++++++++++++++++
- configure.in | 703 --------------------------------------
- doc/Makefile.am | 2 +-
- include/Makefile.am | 4 +-
- modules/mixer/simple/Makefile.am | 2 +-
- src/Makefile.am | 2 +-
- src/alisp/Makefile.am | 2 +-
- src/control/Makefile.am | 2 +-
- src/hwdep/Makefile.am | 2 +-
- src/mixer/Makefile.am | 2 +-
- src/pcm/Makefile.am | 2 +-
- src/rawmidi/Makefile.am | 2 +-
- src/seq/Makefile.am | 2 +-
- src/timer/Makefile.am | 2 +-
- src/ucm/Makefile.am | 2 +-
- test/Makefile.am | 2 +-
- utils/Makefile.am | 2 +-
- 20 files changed, 723 insertions(+), 722 deletions(-)
- create mode 100644 configure.ac
- delete mode 100644 configure.in
-
-diff --git a/Makefile.am b/Makefile.am
-index f0c39c1de48e..52f7654ac0a7 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -17,7 +17,7 @@ EXTRA_DIST=ChangeLog INSTALL TODO NOTES configure gitcompile libtool \
- depcomp version MEMORY-LEAK m4/attributes.m4
- AUTOMAKE_OPTIONS=foreign
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-
- rpm: dist
- $(MAKE) -C utils rpm
-diff --git a/alsalisp/Makefile.am b/alsalisp/Makefile.am
-index 6df915a1e6be..8e3e0159c0ee 100644
---- a/alsalisp/Makefile.am
-+++ b/alsalisp/Makefile.am
-@@ -5,4 +5,4 @@ alsalisp_LDADD = ../src/libasound.la
-
- all: alsalisp
-
--INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/src/alisp
-+AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/src/alisp
-diff --git a/aserver/Makefile.am b/aserver/Makefile.am
-index 116f578b56d1..fbdb94cf9402 100644
---- a/aserver/Makefile.am
-+++ b/aserver/Makefile.am
-@@ -5,7 +5,7 @@ aserver_LDADD = ../src/libasound.la
-
- all: aserver
-
--INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/src/pcm
-+AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/src/pcm
-
- ../src/libasound.la:
- $(MAKE) -C ../src libasound.la
-diff --git a/configure.ac b/configure.ac
-new file mode 100644
-index 000000000000..d744867a3acb
---- /dev/null
-+++ b/configure.ac
-@@ -0,0 +1,704 @@
-+dnl Process this file with autoconf to produce a configure script.
-+AC_PREREQ(2.59)
-+AC_INIT(alsa-lib, 1.0.27.2)
-+
-+AC_CONFIG_SRCDIR([src/control/control.c])
-+AC_CONFIG_MACRO_DIR([m4])
-+
-+dnl *************************************************
-+dnl current:revision:age
-+dnl change (without API) = c:r+1:a
-+dnl change API = c+1:0:a
-+dnl add API = c+1:0:a+1
-+dnl remove API = c+1:0:0
-+dnl *************************************************
-+AC_CANONICAL_HOST
-+AM_INIT_AUTOMAKE
-+eval LIBTOOL_VERSION_INFO="2:0:0"
-+dnl *************************************************
-+AM_CONDITIONAL([INSTALL_M4], [test -n "${ACLOCAL}"])
-+
-+AM_MAINTAINER_MODE([enable])
-+
-+# Test for new silent rules and enable only if they are available
-+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-+
-+AC_PREFIX_DEFAULT(/usr)
-+
-+dnl Checks for programs.
-+
-+dnl try to gues cross-compiler if not set
-+if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`";
-+then
-+ AC_MSG_CHECKING(for cross-compiler)
-+
-+ which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
-+ which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \
-+ && CC=${host_cpu}-${host_os}-gcc
-+ which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \
-+ && CC=${host_cpu}-${host_vendor}-${host_os}-gcc
-+
-+ AC_MSG_RESULT($CC)
-+fi
-+
-+CFLAGS="$CFLAGS -D_GNU_SOURCE"
-+
-+
-+AC_PROG_CC
-+AC_PROG_CPP
-+AC_PROG_INSTALL
-+AC_PROG_LN_S
-+AC_DISABLE_STATIC
-+AC_LIBTOOL_DLOPEN
-+AM_PROG_LIBTOOL
-+
-+CC_NOUNDEFINED
-+
-+dnl Checks for header files.
-+AC_HEADER_STDC
-+AC_CONFIG_HEADERS(include/config.h)
-+
-+dnl Checks for typedefs, structures, and compiler characteristics.
-+AC_C_CONST
-+AC_C_INLINE
-+AC_HEADER_TIME
-+
-+dnl Checks for library functions.
-+AC_PROG_GCC_TRADITIONAL
-+AC_CHECK_FUNCS([uselocale])
-+
-+SAVE_LIBRARY_VERSION
-+AC_SUBST(LIBTOOL_VERSION_INFO)
-+
-+test "x$prefix" = xNONE && prefix=$ac_default_prefix
-+
-+dnl Do not build static and shared libraries together
-+if test "$enable_static" = "$enable_shared" -a "$enable_static" = "yes"; then
-+cat <&1 \
-+ | ${EGREP-grep} "^PREFIX=" \
-+ | ${SED-sed} "s:^PREFIX=::"`
-+AC_DEFINE_UNQUOTED([__SYMBOL_PREFIX], "$SYMBOL_PREFIX", [Toolchain Symbol Prefix])
-+AC_SUBST(SYMBOL_PREFIX)
-+AC_MSG_RESULT($SYMBOL_PREFIX)
-+
-+dnl Check for debug...
-+AC_MSG_CHECKING(for debug)
-+AC_ARG_WITH(debug,
-+ AS_HELP_STRING([--with-debug],
-+ [library will be compiled with asserts (default = yes)]),
-+ debug="$withval", debug="yes")
-+if test "$debug" = "yes"; then
-+ AC_MSG_RESULT(yes)
-+else
-+ AC_DEFINE(NDEBUG,,[No assert debug])
-+ AC_MSG_RESULT(no)
-+fi
-+
-+if test "$debug" = "yes"; then
-+ AC_MSG_CHECKING(for debug assert)
-+ AC_ARG_ENABLE(debug-assert,
-+ AS_HELP_STRING([--enable-debug],
-+ [enable assert call at the default error message handler]),
-+ debug_assert="$enableval", debug_assert="no")
-+ if test "$debug_assert" = "yes"; then
-+ AC_MSG_RESULT(yes)
-+ AC_DEFINE(ALSA_DEBUG_ASSERT,,[Enable assert at error message handler])
-+ else
-+ AC_MSG_RESULT(no)
-+ fi
-+fi
-+
-+dnl Temporary directory
-+AC_MSG_CHECKING(for tmpdir)
-+AC_ARG_WITH(tmpdir,
-+ AS_HELP_STRING([--with-tmpdir=directory],
-+ [directory to put tmp socket files (/tmp)]),
-+ tmpdir="$withval", tmpdir="/tmp")
-+AC_MSG_RESULT($tmpdir)
-+AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [directory to put tmp socket files])
-+
-+dnl Check for softfloat...
-+AC_MSG_CHECKING(for softfloat)
-+AC_ARG_WITH(softfloat,
-+ AS_HELP_STRING([--with-softfloat],
-+ [do you have floating point unit on this machine? (optional)]),
-+ [case "$withval" in
-+ y|yes) softfloat=yes ;;
-+ *) softfloat=no ;;
-+ esac],)
-+if test "$softfloat" = "yes" ; then
-+ AC_DEFINE(HAVE_SOFT_FLOAT, "1", [Avoid calculation in float])
-+ AC_MSG_RESULT(yes)
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+
-+ALSA_DEPLIBS=""
-+if test "$softfloat" != "yes"; then
-+ ALSA_DEPLIBS="-lm"
-+fi
-+
-+dnl Check for libdl
-+AC_MSG_CHECKING(for libdl)
-+AC_ARG_WITH(libdl,
-+ AS_HELP_STRING([--with-libdl], [Use libdl for plugins (default = yes)]),
-+ [ have_libdl="$withval" ], [ have_libdl="yes" ])
-+HAVE_LIBDL=
-+if test "$have_libdl" = "yes"; then
-+ AC_CHECK_LIB([dl], [dlsym], [HAVE_LIBDL="yes"])
-+ if test "$HAVE_LIBDL" = "yes" ; then
-+ ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl"
-+ AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
-+ fi
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+AM_CONDITIONAL([BUILD_MODULES], [test "$HAVE_LIBDL" = "yes"])
-+
-+dnl Check for pthread
-+AC_MSG_CHECKING(for pthread)
-+AC_ARG_WITH(pthread,
-+ AS_HELP_STRING([--with-pthread], [Use pthread (default = yes)]),
-+ [ have_pthread="$withval" ], [ have_pthread="yes" ])
-+if test "$have_pthread" = "yes"; then
-+ AC_CHECK_LIB([pthread], [pthread_join], [HAVE_LIBPTHREAD="yes"])
-+ if test "$HAVE_LIBPTHREAD" = "yes"; then
-+ ALSA_DEPLIBS="$ALSA_DEPLIBS -lpthread"
-+ AC_DEFINE([HAVE_LIBPTHREAD], 1, [Have libpthread])
-+ fi
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+
-+dnl Check for __thread
-+AC_MSG_CHECKING([for __thread])
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) || (__GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ < 2))
-+#error gcc has this bug: http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html
-+#endif], [static __thread int p = 0])],
-+[AC_DEFINE(HAVE___THREAD, 1,
-+Define to 1 if compiler supports __thread)
-+AC_MSG_RESULT([yes])],
-+[AC_MSG_RESULT([no])])
-+
-+dnl Check for librt
-+AC_MSG_CHECKING(for librt)
-+AC_ARG_WITH(librt,
-+ AS_HELP_STRING([--with-librt], [Use librt for monotonic clock (default = yes)]),
-+ [ have_librt="$withval" ], [ have_librt="yes" ])
-+if test "$have_librt" = "yes"; then
-+ AC_CHECK_LIB([rt], [clock_gettime], [HAVE_LIBRT="yes"])
-+ if test "$HAVE_LIBRT" = "yes" ; then
-+ ALSA_DEPLIBS="$ALSA_DEPLIBS -lrt"
-+ AC_DEFINE([HAVE_LIBRT], 1, [Have librt])
-+ AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Have clock gettime])
-+ fi
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+
-+AC_SUBST(ALSA_DEPLIBS)
-+
-+dnl Check for headers
-+AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h])
-+
-+dnl Check for resmgr support...
-+AC_MSG_CHECKING(for resmgr support)
-+AC_ARG_ENABLE(resmgr,
-+ AS_HELP_STRING([--enable-resmgr], [support resmgr (optional)]),
-+ resmgr="$enableval", resmgr="no")
-+AC_MSG_RESULT($resmgr)
-+if test "$resmgr" = "yes"; then
-+ AC_CHECK_LIB(resmgr, rsm_open_device,,
-+ AC_ERROR([Cannot find libresmgr]))
-+ AC_DEFINE(SUPPORT_RESMGR, "1", [Support resmgr with alsa-lib])
-+fi
-+
-+dnl Check for aload* support...
-+AC_MSG_CHECKING(for aload* support)
-+AC_ARG_ENABLE(aload,
-+ AS_HELP_STRING([--disable-aload], [disable reading /dev/aload*]),
-+ aload="$enableval", aload="yes")
-+AC_MSG_RESULT($aload)
-+if test "$aload" = "yes"; then
-+ AC_DEFINE(SUPPORT_ALOAD, "1", [Support /dev/aload* access for auto-loading])
-+fi
-+
-+dnl Check for non-standard /dev directory
-+AC_MSG_CHECKING([for ALSA device file directory])
-+AC_ARG_WITH(alsa-devdir,
-+ AS_HELP_STRING([--with-alsa-devdir=dir],
-+ [directory with ALSA device files (default /dev/snd)]),
-+ [alsa_dev_dir="$withval"],
-+ [alsa_dev_dir="/dev/snd"])
-+dnl make sure it has a trailing slash
-+if echo "$alsa_dev_dir" | grep -v '/$' > /dev/null; then
-+ alsa_dev_dir="$alsa_dev_dir/"
-+fi
-+AC_DEFINE_UNQUOTED(ALSA_DEVICE_DIRECTORY, "$alsa_dev_dir", [Directory with ALSA device files])
-+AC_MSG_RESULT([$alsa_dev_dir])
-+
-+AC_MSG_CHECKING([for aload* device file directory])
-+AC_ARG_WITH(aload-devdir,
-+ AS_HELP_STRING([--with-aload-devdir=dir],
-+ [directory with aload* device files (default /dev)]),
-+ [aload_dev_dir="$withval"],
-+ [aload_dev_dir="/dev"])
-+if echo "$aload_dev_dir" | grep -v '/$' > /dev/null; then
-+ aload_dev_dir="$aload_dev_dir/"
-+fi
-+AC_DEFINE_UNQUOTED(ALOAD_DEVICE_DIRECTORY, "$aload_dev_dir", [Directory with aload* device files])
-+AC_MSG_RESULT([$aload_dev_dir])
-+
-+dnl Build conditions
-+AC_ARG_ENABLE(mixer,
-+ AS_HELP_STRING([--disable-mixer], [disable the mixer component]),
-+ [build_mixer="$enableval"], [build_mixer="yes"])
-+AC_ARG_ENABLE(pcm,
-+ AS_HELP_STRING([--disable-pcm], [disable the PCM component]),
-+ [build_pcm="$enableval"], [build_pcm="yes"])
-+AC_ARG_ENABLE(rawmidi,
-+ AS_HELP_STRING([--disable-rawmidi], [disable the raw MIDI component]),
-+ [build_rawmidi="$enableval"], [build_rawmidi="yes"])
-+AC_ARG_ENABLE(hwdep,
-+ AS_HELP_STRING([--disable-hwdep], [disable the hwdep component]),
-+ [build_hwdep="$enableval"], [build_hwdep="yes"])
-+AC_ARG_ENABLE(seq,
-+ AS_HELP_STRING([--disable-seq], [disable the sequencer component]),
-+ [build_seq="$enableval"], [build_seq="yes"])
-+AC_ARG_ENABLE(ucm,
-+ AS_HELP_STRING([--disable-ucm], [disable the use-case-manager component]),
-+ [build_ucm="$enableval"], [build_ucm="yes"])
-+AC_ARG_ENABLE(alisp,
-+ AS_HELP_STRING([--disable-alisp], [disable the alisp component]),
-+ [build_alisp="$enableval"], [build_alisp="yes"])
-+test "$softfloat" = "yes" && build_alisp="no"
-+AC_ARG_ENABLE(old-symbols,
-+ AS_HELP_STRING([--disable-old-symbols], [disable old obsoleted symbols]),
-+ [keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
-+AM_CONDITIONAL([KEEP_OLD_SYMBOLS], [test x$keep_old_symbols = xyes])
-+
-+AC_ARG_ENABLE(python,
-+ AS_HELP_STRING([--disable-python], [disable the python components]),
-+ [build_python="$enableval"], [build_python="yes"])
-+PYTHON_LIBS=""
-+PYTHON_INCLUDES=""
-+if test "$build_python" = "yes"; then
-+ AC_ARG_WITH(pythonlibs,
-+ AS_HELP_STRING([--with-pythonlibs=ldflags],
-+ [specify python libraries (-lpthread -lm -ldl -lpython2.4)]),
-+ pythonlibs="$withval", pythonlibs=`python-config --libs`)
-+ AC_ARG_WITH(pythonincludes,
-+ AS_HELP_STRING([--with-pythonincludes=Cflags],
-+ [specify python C header files (-I/usr/include/python)]),
-+ pythonincludes="$withval", pythonincludes=`python-config --includes`)
-+ if test -z "$pythonlibs"; then
-+ echo "Unable to determine python libraries! Probably python-config is not"
-+ echo "available on this system. Please, use --with-pythonlibs and"
-+ echo "--with-pythonincludes options. Python components are disabled in this build."
-+ build_python="no"
-+ else
-+ PYTHON_LIBS="$pythonlibs"
-+ PYTHON_INCLUDES="$pythonincludes"
-+ fi
-+fi
-+AC_SUBST(PYTHON_LIBS)
-+AC_SUBST(PYTHON_INCLUDES)
-+
-+AM_CONDITIONAL([BUILD_MIXER], [test x$build_mixer = xyes])
-+AM_CONDITIONAL([BUILD_PCM], [test x$build_pcm = xyes])
-+AM_CONDITIONAL([BUILD_RAWMIDI], [test x$build_rawmidi = xyes])
-+AM_CONDITIONAL([BUILD_HWDEP], [test x$build_hwdep = xyes])
-+AM_CONDITIONAL([BUILD_SEQ], [test x$build_seq = xyes])
-+AM_CONDITIONAL([BUILD_UCM], [test x$build_ucm = xyes])
-+AM_CONDITIONAL([BUILD_ALISP], [test x$build_alisp = xyes])
-+AM_CONDITIONAL([BUILD_PYTHON], [test x$build_python = xyes])
-+
-+if test "$build_mixer" = "yes"; then
-+ AC_DEFINE([BUILD_MIXER], "1", [Build mixer component])
-+fi
-+if test "$build_pcm" = "yes"; then
-+ AC_DEFINE([BUILD_PCM], "1", [Build PCM component])
-+fi
-+if test "$build_rawmidi" = "yes"; then
-+ AC_DEFINE([BUILD_RAWMIDI], "1", [Build raw MIDI component])
-+fi
-+if test "$build_hwdep" = "yes"; then
-+ AC_DEFINE([BUILD_HWDEP], "1", [Build hwdep component])
-+fi
-+if test "$build_seq" = "yes"; then
-+ AC_DEFINE([BUILD_SEQ], "1", [Build sequencer component])
-+fi
-+if test "$build_ucm" = "yes"; then
-+ AC_DEFINE([BUILD_UCM], "1", [Build UCM component])
-+fi
-+
-+dnl PCM Plugins
-+
-+if test "$build_pcm" = "yes"; then
-+AC_ARG_WITH(pcm-plugins,
-+ AS_HELP_STRING([--with-pcm-plugins=],
-+ [build PCM plugins (default = all)]),
-+ [pcm_plugins="$withval"], [pcm_plugins="all"])
-+else
-+pcm_plugins=""
-+fi
-+
-+dnl check atomics for pcm_meter
-+
-+AC_MSG_CHECKING([whether GCC supports builtin atomic intrinsics])
-+if test -z "$gcc_have_atomics"; then
-+ gcc_have_atomics=no
-+ AC_TRY_LINK([],
-+ [int i;
-+ __atomic_load_n(&i, __ATOMIC_SEQ_CST);
-+ __atomic_add_fetch(&i, 0, __ATOMIC_SEQ_CST);
-+ ],
-+ [gcc_have_atomics=yes],
-+ [gcc_have_atomics=no])
-+fi
-+AC_MSG_RESULT($gcc_have_atomics)
-+
-+PCM_PLUGIN_LIST="copy linear route mulaw alaw adpcm rate plug multi shm file null empty share meter hooks lfloat ladspa dmix dshare dsnoop asym iec958 softvol extplug ioplug mmap_emul"
-+
-+build_pcm_plugin="no"
-+for t in $PCM_PLUGIN_LIST; do
-+ eval build_pcm_$t="no"
-+done
-+
-+pcm_plugins=`echo $pcm_plugins | sed 's/,/ /g'`
-+for p in $pcm_plugins; do
-+ for t in $PCM_PLUGIN_LIST; do
-+ if test "$p" = "$t" -o "$p" = "all"; then
-+ eval build_pcm_$t="yes"
-+ build_pcm_plugin="yes"
-+ fi
-+ done
-+done
-+
-+dnl special dependencies
-+if test "$build_pcm_plug" = "yes"; then
-+ build_pcm_linear="yes"
-+ build_pcm_copy="yes"
-+fi
-+
-+if test "$build_pcm_ioplug" = "yes"; then
-+ build_pcm_extplug="yes"
-+fi
-+
-+if test "$HAVE_LIBDL" != "yes"; then
-+ build_pcm_meter="no"
-+ build_pcm_ladspa="no"
-+ build_pcm_pcm_ioplug="no"
-+ build_pcm_pcm_extplug="no"
-+fi
-+
-+if test "$HAVE_LIBPTHREAD" != "yes"; then
-+ build_pcm_share="no"
-+fi
-+
-+if test "$softfloat" = "yes"; then
-+ build_pcm_lfloat="no"
-+ build_pcm_ladspa="no"
-+fi
-+
-+if test "$gcc_have_atomics" != "yes"; then
-+ build_pcm_meter="no"
-+fi
-+
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN], [test x$build_pcm_plugin = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_COPY], [test x$build_pcm_copy = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_LINEAR], [test x$build_pcm_linear = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_ROUTE], [test x$build_pcm_route = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_MULAW], [test x$build_pcm_mulaw = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_ALAW], [test x$build_pcm_alaw = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_ADPCM], [test x$build_pcm_adpcm = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_RATE], [test x$build_pcm_rate = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_PLUG], [test x$build_pcm_plug = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_MULTI], [test x$build_pcm_multi = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_SHM], [test x$build_pcm_shm = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_FILE], [test x$build_pcm_file = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_NULL], [test x$build_pcm_null = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_EMPTY], [test x$build_pcm_empty = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_SHARE], [test x$build_pcm_share = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_METER], [test x$build_pcm_meter = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_HOOKS], [test x$build_pcm_hooks = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_LFLOAT], [test x$build_pcm_lfloat = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_LADSPA], [test x$build_pcm_ladspa = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_DMIX], [test x$build_pcm_dmix = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_DSHARE], [test x$build_pcm_dshare = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_DSNOOP], [test x$build_pcm_dsnoop = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_ASYM], [test x$build_pcm_asym = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_IEC958], [test x$build_pcm_iec958 = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_SOFTVOL], [test x$build_pcm_softvol = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_EXTPLUG], [test x$build_pcm_extplug = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_IOPLUG], [test x$build_pcm_ioplug = xyes])
-+AM_CONDITIONAL([BUILD_PCM_PLUGIN_MMAP_EMUL], [test x$build_pcm_mmap_emul = xyes])
-+
-+dnl Defines for plug plugin
-+if test "$build_pcm_rate" = "yes"; then
-+ AC_DEFINE([BUILD_PCM_PLUGIN_RATE], "1", [Build PCM rate plugin])
-+fi
-+if test "$build_pcm_route" = "yes"; then
-+ AC_DEFINE([BUILD_PCM_PLUGIN_ROUTE], "1", [Build PCM route plugin])
-+fi
-+if test "$build_pcm_lfloat" = "yes"; then
-+ AC_DEFINE([BUILD_PCM_PLUGIN_LFLOAT], "1", [Build PCM lfloat plugin])
-+fi
-+if test "$build_pcm_adpcm" = "yes"; then
-+ AC_DEFINE([BUILD_PCM_PLUGIN_ADPCM], "1", [Build PCM adpcm plugin])
-+fi
-+if test "$build_pcm_mulaw" = "yes"; then
-+ AC_DEFINE([BUILD_PCM_PLUGIN_MULAW], "1", [Build PCM mulaw plugin])
-+fi
-+if test "$build_pcm_alaw" = "yes"; then
-+ AC_DEFINE([BUILD_PCM_PLUGIN_ALAW], "1", [Build PCM alaw plugin])
-+fi
-+if test "$build_pcm_mmap_emul" = "yes"; then
-+ AC_DEFINE([BUILD_PCM_PLUGIN_MMAP_EMUL], "1", [Build PCM mmap-emul plugin])
-+fi
-+
-+
-+dnl Create PCM plugin symbol list for static library
-+rm -f "$srcdir"/src/pcm/pcm_symbols_list.c
-+touch "$srcdir"/src/pcm/pcm_symbols_list.c
-+for t in $PCM_PLUGIN_LIST; do
-+ if eval test \$build_pcm_$t = yes; then
-+ echo \&_snd_module_pcm_$t, >> "$srcdir"/src/pcm/pcm_symbols_list.c
-+ fi
-+done
-+
-+dnl Control Plugins
-+
-+AC_ARG_WITH(ctl-plugins,
-+ AS_HELP_STRING([--with-ctl-plugins=],
-+ [build control plugins (default = all)]),
-+ [ctl_plugins="$withval"], [ctl_plugins="all"])
-+
-+CTL_PLUGIN_LIST="shm ext"
-+
-+build_ctl_plugin="no"
-+for t in $CTL_PLUGIN_LIST; do
-+ eval build_ctl_$t="no"
-+done
-+
-+ctl_plugins=`echo $ctl_plugins | sed 's/,/ /g'`
-+for p in $ctl_plugins; do
-+ for t in $CTL_PLUGIN_LIST; do
-+ if test "$p" = "$t" -o "$p" = "all"; then
-+ eval build_ctl_$t="yes"
-+ build_ctl_plugin="yes"
-+ fi
-+ done
-+done
-+
-+AM_CONDITIONAL([BUILD_CTL_PLUGIN], [test x$build_ctl_plugin = xyes])
-+AM_CONDITIONAL([BUILD_CTL_PLUGIN_SHM], [test x$build_ctl_shm = xyes])
-+AM_CONDITIONAL([BUILD_CTL_PLUGIN_EXT], [test x$build_ctl_ext = xyes])
-+
-+dnl Create ctl plugin symbol list for static library
-+rm -f "$srcdir"/src/control/ctl_symbols_list.c
-+touch "$srcdir"/src/control/ctl_symbols_list.c
-+for t in $CTL_PLUGIN_LIST; do
-+ if eval test \$build_ctl_$t = yes; then
-+ echo \&_snd_module_control_$t, >> "$srcdir"/src/control/ctl_symbols_list.c
-+ fi
-+done
-+
-+dnl Max number of cards
-+AC_MSG_CHECKING(for max number of cards)
-+AC_ARG_WITH(max-cards,
-+ AS_HELP_STRING([--with-max-cards], [Specify the max number of cards (default = 32)]),
-+ [ max_cards="$withval" ], [ max_cards="32" ])
-+AC_MSG_RESULT([$max_cards])
-+
-+if test "$max_cards" -lt 1; then
-+ AC_ERROR([Invalid max cards $max_cards])
-+elif test "$max_cards" -gt 256; then
-+ AC_ERROR([Invalid max cards $max_cards])
-+fi
-+AC_DEFINE_UNQUOTED(SND_MAX_CARDS, $max_cards, [Max number of cards])
-+
-+dnl Make a symlink for inclusion of alsa/xxx.h
-+if test ! -L "$srcdir"/include/alsa ; then
-+ echo "Making a symlink include/alsa"
-+ rm -f "$srcdir"/include/alsa
-+ ln -sf . "$srcdir"/include/alsa
-+fi
-+
-+AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
-+ include/Makefile include/sound/Makefile src/Versions src/Makefile \
-+ src/control/Makefile src/mixer/Makefile \
-+ src/pcm/Makefile src/pcm/scopes/Makefile \
-+ src/rawmidi/Makefile src/timer/Makefile \
-+ src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
-+ src/alisp/Makefile \
-+ src/conf/Makefile src/conf/alsa.conf.d/Makefile \
-+ src/conf/cards/Makefile \
-+ src/conf/pcm/Makefile \
-+ src/conf/ucm/Makefile \
-+ src/conf/ucm/DAISY-I2S/Makefile \
-+ src/conf/ucm/PandaBoard/Makefile \
-+ src/conf/ucm/PandaBoardES/Makefile \
-+ src/conf/ucm/SDP4430/Makefile \
-+ src/conf/ucm/tegraalc5632/Makefile \
-+ modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
-+ alsalisp/Makefile aserver/Makefile \
-+ test/Makefile test/lsb/Makefile \
-+ utils/Makefile utils/alsa-lib.spec utils/alsa.pc)
-+
-+dnl Create asoundlib.h dynamically according to configure options
-+echo "Creating asoundlib.h..."
-+cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
-+test "$ac_cv_header_endian_h" = "yes" && echo "#include " >> include/asoundlib.h
-+if test "$ac_cv_header_sys_endian_h" = "yes"; then
-+cat >> include/asoundlib.h <
-+#ifndef __BYTE_ORDER
-+#define __BYTE_ORDER BYTE_ORDER
-+#endif
-+#ifndef __LITTLE_ENDIAN
-+#define __LITTLE_ENDIAN LITTLE_ENDIAN
-+#endif
-+#ifndef __BIG_ENDIAN
-+#define __BIG_ENDIAN BIG_ENDIAN
-+#endif
-+EOF
-+fi
-+cat >> include/asoundlib.h <
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+EOF
-+test "$build_pcm" = "yes" && echo "#include " >> include/asoundlib.h
-+test "$build_rawmidi" = "yes" && echo "#include " >> include/asoundlib.h
-+test "$build_pcm" = "yes" && echo "#include " >> include/asoundlib.h
-+test "$build_hwdep" = "yes" && echo "#include " >> include/asoundlib.h
-+echo "#include " >> include/asoundlib.h
-+test "$build_mixer" = "yes" && echo "#include " >> include/asoundlib.h
-+test "$build_seq" = "yes" && echo "#include " >> include/asoundlib.h
-+test "$build_seq" = "yes" && echo "#include " >> include/asoundlib.h
-+test "$build_seq" = "yes" && echo "#include " >> include/asoundlib.h
-+test "$build_seq" = "yes" && echo "#include " >> include/asoundlib.h
-+cat "$srcdir"/include/asoundlib-tail.h >> include/asoundlib.h
-+
-diff --git a/configure.in b/configure.in
-deleted file mode 100644
-index 9463b5ad4766..000000000000
---- a/configure.in
-+++ /dev/null
-@@ -1,703 +0,0 @@
--dnl Process this file with autoconf to produce a configure script.
--AC_PREREQ(2.59)
--AC_INIT(src/control/control.c)
--
--AC_CONFIG_MACRO_DIR([m4])
--
--dnl *************************************************
--dnl current:revision:age
--dnl change (without API) = c:r+1:a
--dnl change API = c+1:0:a
--dnl add API = c+1:0:a+1
--dnl remove API = c+1:0:0
--dnl *************************************************
--AC_CANONICAL_HOST
--AM_INIT_AUTOMAKE(alsa-lib, 1.0.27.2)
--eval LIBTOOL_VERSION_INFO="2:0:0"
--dnl *************************************************
--AM_CONDITIONAL([INSTALL_M4], [test -n "${ACLOCAL}"])
--
--AM_MAINTAINER_MODE([enable])
--
--# Test for new silent rules and enable only if they are available
--m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
--
--AC_PREFIX_DEFAULT(/usr)
--
--dnl Checks for programs.
--
--dnl try to gues cross-compiler if not set
--if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`";
--then
-- AC_MSG_CHECKING(for cross-compiler)
--
-- which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
-- which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \
-- && CC=${host_cpu}-${host_os}-gcc
-- which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \
-- && CC=${host_cpu}-${host_vendor}-${host_os}-gcc
--
-- AC_MSG_RESULT($CC)
--fi
--
--CFLAGS="$CFLAGS -D_GNU_SOURCE"
--
--
--AC_PROG_CC
--AC_PROG_CPP
--AC_PROG_INSTALL
--AC_PROG_LN_S
--AC_DISABLE_STATIC
--AC_LIBTOOL_DLOPEN
--AM_PROG_LIBTOOL
--
--CC_NOUNDEFINED
--
--dnl Checks for header files.
--AC_HEADER_STDC
--AC_CONFIG_HEADERS(include/config.h)
--
--dnl Checks for typedefs, structures, and compiler characteristics.
--AC_C_CONST
--AC_C_INLINE
--AC_HEADER_TIME
--
--dnl Checks for library functions.
--AC_PROG_GCC_TRADITIONAL
--AC_CHECK_FUNCS([uselocale])
--
--SAVE_LIBRARY_VERSION
--AC_SUBST(LIBTOOL_VERSION_INFO)
--
--test "x$prefix" = xNONE && prefix=$ac_default_prefix
--
--dnl Do not build static and shared libraries together
--if test "$enable_static" = "$enable_shared" -a "$enable_static" = "yes"; then
--cat <&1 \
-- | ${EGREP-grep} "^PREFIX=" \
-- | ${SED-sed} "s:^PREFIX=::"`
--AC_DEFINE_UNQUOTED([__SYMBOL_PREFIX], "$SYMBOL_PREFIX", [Toolchain Symbol Prefix])
--AC_SUBST(SYMBOL_PREFIX)
--AC_MSG_RESULT($SYMBOL_PREFIX)
--
--dnl Check for debug...
--AC_MSG_CHECKING(for debug)
--AC_ARG_WITH(debug,
-- AS_HELP_STRING([--with-debug],
-- [library will be compiled with asserts (default = yes)]),
-- debug="$withval", debug="yes")
--if test "$debug" = "yes"; then
-- AC_MSG_RESULT(yes)
--else
-- AC_DEFINE(NDEBUG,,[No assert debug])
-- AC_MSG_RESULT(no)
--fi
--
--if test "$debug" = "yes"; then
-- AC_MSG_CHECKING(for debug assert)
-- AC_ARG_ENABLE(debug-assert,
-- AS_HELP_STRING([--enable-debug],
-- [enable assert call at the default error message handler]),
-- debug_assert="$enableval", debug_assert="no")
-- if test "$debug_assert" = "yes"; then
-- AC_MSG_RESULT(yes)
-- AC_DEFINE(ALSA_DEBUG_ASSERT,,[Enable assert at error message handler])
-- else
-- AC_MSG_RESULT(no)
-- fi
--fi
--
--dnl Temporary directory
--AC_MSG_CHECKING(for tmpdir)
--AC_ARG_WITH(tmpdir,
-- AS_HELP_STRING([--with-tmpdir=directory],
-- [directory to put tmp socket files (/tmp)]),
-- tmpdir="$withval", tmpdir="/tmp")
--AC_MSG_RESULT($tmpdir)
--AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [directory to put tmp socket files])
--
--dnl Check for softfloat...
--AC_MSG_CHECKING(for softfloat)
--AC_ARG_WITH(softfloat,
-- AS_HELP_STRING([--with-softfloat],
-- [do you have floating point unit on this machine? (optional)]),
-- [case "$withval" in
-- y|yes) softfloat=yes ;;
-- *) softfloat=no ;;
-- esac],)
--if test "$softfloat" = "yes" ; then
-- AC_DEFINE(HAVE_SOFT_FLOAT, "1", [Avoid calculation in float])
-- AC_MSG_RESULT(yes)
--else
-- AC_MSG_RESULT(no)
--fi
--
--ALSA_DEPLIBS=""
--if test "$softfloat" != "yes"; then
-- ALSA_DEPLIBS="-lm"
--fi
--
--dnl Check for libdl
--AC_MSG_CHECKING(for libdl)
--AC_ARG_WITH(libdl,
-- AS_HELP_STRING([--with-libdl], [Use libdl for plugins (default = yes)]),
-- [ have_libdl="$withval" ], [ have_libdl="yes" ])
--HAVE_LIBDL=
--if test "$have_libdl" = "yes"; then
-- AC_CHECK_LIB([dl], [dlsym], [HAVE_LIBDL="yes"])
-- if test "$HAVE_LIBDL" = "yes" ; then
-- ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl"
-- AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
-- fi
--else
-- AC_MSG_RESULT(no)
--fi
--AM_CONDITIONAL([BUILD_MODULES], [test "$HAVE_LIBDL" = "yes"])
--
--dnl Check for pthread
--AC_MSG_CHECKING(for pthread)
--AC_ARG_WITH(pthread,
-- AS_HELP_STRING([--with-pthread], [Use pthread (default = yes)]),
-- [ have_pthread="$withval" ], [ have_pthread="yes" ])
--if test "$have_pthread" = "yes"; then
-- AC_CHECK_LIB([pthread], [pthread_join], [HAVE_LIBPTHREAD="yes"])
-- if test "$HAVE_LIBPTHREAD" = "yes"; then
-- ALSA_DEPLIBS="$ALSA_DEPLIBS -lpthread"
-- AC_DEFINE([HAVE_LIBPTHREAD], 1, [Have libpthread])
-- fi
--else
-- AC_MSG_RESULT(no)
--fi
--
--dnl Check for __thread
--AC_MSG_CHECKING([for __thread])
--AC_LINK_IFELSE([AC_LANG_PROGRAM([#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) || (__GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ < 2))
--#error gcc has this bug: http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html
--#endif], [static __thread int p = 0])],
--[AC_DEFINE(HAVE___THREAD, 1,
--Define to 1 if compiler supports __thread)
--AC_MSG_RESULT([yes])],
--[AC_MSG_RESULT([no])])
--
--dnl Check for librt
--AC_MSG_CHECKING(for librt)
--AC_ARG_WITH(librt,
-- AS_HELP_STRING([--with-librt], [Use librt for monotonic clock (default = yes)]),
-- [ have_librt="$withval" ], [ have_librt="yes" ])
--if test "$have_librt" = "yes"; then
-- AC_CHECK_LIB([rt], [clock_gettime], [HAVE_LIBRT="yes"])
-- if test "$HAVE_LIBRT" = "yes" ; then
-- ALSA_DEPLIBS="$ALSA_DEPLIBS -lrt"
-- AC_DEFINE([HAVE_LIBRT], 1, [Have librt])
-- AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Have clock gettime])
-- fi
--else
-- AC_MSG_RESULT(no)
--fi
--
--AC_SUBST(ALSA_DEPLIBS)
--
--dnl Check for headers
--AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h])
--
--dnl Check for resmgr support...
--AC_MSG_CHECKING(for resmgr support)
--AC_ARG_ENABLE(resmgr,
-- AS_HELP_STRING([--enable-resmgr], [support resmgr (optional)]),
-- resmgr="$enableval", resmgr="no")
--AC_MSG_RESULT($resmgr)
--if test "$resmgr" = "yes"; then
-- AC_CHECK_LIB(resmgr, rsm_open_device,,
-- AC_ERROR([Cannot find libresmgr]))
-- AC_DEFINE(SUPPORT_RESMGR, "1", [Support resmgr with alsa-lib])
--fi
--
--dnl Check for aload* support...
--AC_MSG_CHECKING(for aload* support)
--AC_ARG_ENABLE(aload,
-- AS_HELP_STRING([--disable-aload], [disable reading /dev/aload*]),
-- aload="$enableval", aload="yes")
--AC_MSG_RESULT($aload)
--if test "$aload" = "yes"; then
-- AC_DEFINE(SUPPORT_ALOAD, "1", [Support /dev/aload* access for auto-loading])
--fi
--
--dnl Check for non-standard /dev directory
--AC_MSG_CHECKING([for ALSA device file directory])
--AC_ARG_WITH(alsa-devdir,
-- AS_HELP_STRING([--with-alsa-devdir=dir],
-- [directory with ALSA device files (default /dev/snd)]),
-- [alsa_dev_dir="$withval"],
-- [alsa_dev_dir="/dev/snd"])
--dnl make sure it has a trailing slash
--if echo "$alsa_dev_dir" | grep -v '/$' > /dev/null; then
-- alsa_dev_dir="$alsa_dev_dir/"
--fi
--AC_DEFINE_UNQUOTED(ALSA_DEVICE_DIRECTORY, "$alsa_dev_dir", [Directory with ALSA device files])
--AC_MSG_RESULT([$alsa_dev_dir])
--
--AC_MSG_CHECKING([for aload* device file directory])
--AC_ARG_WITH(aload-devdir,
-- AS_HELP_STRING([--with-aload-devdir=dir],
-- [directory with aload* device files (default /dev)]),
-- [aload_dev_dir="$withval"],
-- [aload_dev_dir="/dev"])
--if echo "$aload_dev_dir" | grep -v '/$' > /dev/null; then
-- aload_dev_dir="$aload_dev_dir/"
--fi
--AC_DEFINE_UNQUOTED(ALOAD_DEVICE_DIRECTORY, "$aload_dev_dir", [Directory with aload* device files])
--AC_MSG_RESULT([$aload_dev_dir])
--
--dnl Build conditions
--AC_ARG_ENABLE(mixer,
-- AS_HELP_STRING([--disable-mixer], [disable the mixer component]),
-- [build_mixer="$enableval"], [build_mixer="yes"])
--AC_ARG_ENABLE(pcm,
-- AS_HELP_STRING([--disable-pcm], [disable the PCM component]),
-- [build_pcm="$enableval"], [build_pcm="yes"])
--AC_ARG_ENABLE(rawmidi,
-- AS_HELP_STRING([--disable-rawmidi], [disable the raw MIDI component]),
-- [build_rawmidi="$enableval"], [build_rawmidi="yes"])
--AC_ARG_ENABLE(hwdep,
-- AS_HELP_STRING([--disable-hwdep], [disable the hwdep component]),
-- [build_hwdep="$enableval"], [build_hwdep="yes"])
--AC_ARG_ENABLE(seq,
-- AS_HELP_STRING([--disable-seq], [disable the sequencer component]),
-- [build_seq="$enableval"], [build_seq="yes"])
--AC_ARG_ENABLE(ucm,
-- AS_HELP_STRING([--disable-ucm], [disable the use-case-manager component]),
-- [build_ucm="$enableval"], [build_ucm="yes"])
--AC_ARG_ENABLE(alisp,
-- AS_HELP_STRING([--disable-alisp], [disable the alisp component]),
-- [build_alisp="$enableval"], [build_alisp="yes"])
--test "$softfloat" = "yes" && build_alisp="no"
--AC_ARG_ENABLE(old-symbols,
-- AS_HELP_STRING([--disable-old-symbols], [disable old obsoleted symbols]),
-- [keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
--AM_CONDITIONAL([KEEP_OLD_SYMBOLS], [test x$keep_old_symbols = xyes])
--
--AC_ARG_ENABLE(python,
-- AS_HELP_STRING([--disable-python], [disable the python components]),
-- [build_python="$enableval"], [build_python="yes"])
--PYTHON_LIBS=""
--PYTHON_INCLUDES=""
--if test "$build_python" = "yes"; then
-- AC_ARG_WITH(pythonlibs,
-- AS_HELP_STRING([--with-pythonlibs=ldflags],
-- [specify python libraries (-lpthread -lm -ldl -lpython2.4)]),
-- pythonlibs="$withval", pythonlibs=`python-config --libs`)
-- AC_ARG_WITH(pythonincludes,
-- AS_HELP_STRING([--with-pythonincludes=Cflags],
-- [specify python C header files (-I/usr/include/python)]),
-- pythonincludes="$withval", pythonincludes=`python-config --includes`)
-- if test -z "$pythonlibs"; then
-- echo "Unable to determine python libraries! Probably python-config is not"
-- echo "available on this system. Please, use --with-pythonlibs and"
-- echo "--with-pythonincludes options. Python components are disabled in this build."
-- build_python="no"
-- else
-- PYTHON_LIBS="$pythonlibs"
-- PYTHON_INCLUDES="$pythonincludes"
-- fi
--fi
--AC_SUBST(PYTHON_LIBS)
--AC_SUBST(PYTHON_INCLUDES)
--
--AM_CONDITIONAL([BUILD_MIXER], [test x$build_mixer = xyes])
--AM_CONDITIONAL([BUILD_PCM], [test x$build_pcm = xyes])
--AM_CONDITIONAL([BUILD_RAWMIDI], [test x$build_rawmidi = xyes])
--AM_CONDITIONAL([BUILD_HWDEP], [test x$build_hwdep = xyes])
--AM_CONDITIONAL([BUILD_SEQ], [test x$build_seq = xyes])
--AM_CONDITIONAL([BUILD_UCM], [test x$build_ucm = xyes])
--AM_CONDITIONAL([BUILD_ALISP], [test x$build_alisp = xyes])
--AM_CONDITIONAL([BUILD_PYTHON], [test x$build_python = xyes])
--
--if test "$build_mixer" = "yes"; then
-- AC_DEFINE([BUILD_MIXER], "1", [Build mixer component])
--fi
--if test "$build_pcm" = "yes"; then
-- AC_DEFINE([BUILD_PCM], "1", [Build PCM component])
--fi
--if test "$build_rawmidi" = "yes"; then
-- AC_DEFINE([BUILD_RAWMIDI], "1", [Build raw MIDI component])
--fi
--if test "$build_hwdep" = "yes"; then
-- AC_DEFINE([BUILD_HWDEP], "1", [Build hwdep component])
--fi
--if test "$build_seq" = "yes"; then
-- AC_DEFINE([BUILD_SEQ], "1", [Build sequencer component])
--fi
--if test "$build_ucm" = "yes"; then
-- AC_DEFINE([BUILD_UCM], "1", [Build UCM component])
--fi
--
--dnl PCM Plugins
--
--if test "$build_pcm" = "yes"; then
--AC_ARG_WITH(pcm-plugins,
-- AS_HELP_STRING([--with-pcm-plugins=],
-- [build PCM plugins (default = all)]),
-- [pcm_plugins="$withval"], [pcm_plugins="all"])
--else
--pcm_plugins=""
--fi
--
--dnl check atomics for pcm_meter
--
--AC_MSG_CHECKING([whether GCC supports builtin atomic intrinsics])
--if test -z "$gcc_have_atomics"; then
-- gcc_have_atomics=no
-- AC_TRY_LINK([],
-- [int i;
-- __atomic_load_n(&i, __ATOMIC_SEQ_CST);
-- __atomic_add_fetch(&i, 0, __ATOMIC_SEQ_CST);
-- ],
-- [gcc_have_atomics=yes],
-- [gcc_have_atomics=no])
--fi
--AC_MSG_RESULT($gcc_have_atomics)
--
--PCM_PLUGIN_LIST="copy linear route mulaw alaw adpcm rate plug multi shm file null empty share meter hooks lfloat ladspa dmix dshare dsnoop asym iec958 softvol extplug ioplug mmap_emul"
--
--build_pcm_plugin="no"
--for t in $PCM_PLUGIN_LIST; do
-- eval build_pcm_$t="no"
--done
--
--pcm_plugins=`echo $pcm_plugins | sed 's/,/ /g'`
--for p in $pcm_plugins; do
-- for t in $PCM_PLUGIN_LIST; do
-- if test "$p" = "$t" -o "$p" = "all"; then
-- eval build_pcm_$t="yes"
-- build_pcm_plugin="yes"
-- fi
-- done
--done
--
--dnl special dependencies
--if test "$build_pcm_plug" = "yes"; then
-- build_pcm_linear="yes"
-- build_pcm_copy="yes"
--fi
--
--if test "$build_pcm_ioplug" = "yes"; then
-- build_pcm_extplug="yes"
--fi
--
--if test "$HAVE_LIBDL" != "yes"; then
-- build_pcm_meter="no"
-- build_pcm_ladspa="no"
-- build_pcm_pcm_ioplug="no"
-- build_pcm_pcm_extplug="no"
--fi
--
--if test "$HAVE_LIBPTHREAD" != "yes"; then
-- build_pcm_share="no"
--fi
--
--if test "$softfloat" = "yes"; then
-- build_pcm_lfloat="no"
-- build_pcm_ladspa="no"
--fi
--
--if test "$gcc_have_atomics" != "yes"; then
-- build_pcm_meter="no"
--fi
--
--AM_CONDITIONAL([BUILD_PCM_PLUGIN], [test x$build_pcm_plugin = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_COPY], [test x$build_pcm_copy = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_LINEAR], [test x$build_pcm_linear = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_ROUTE], [test x$build_pcm_route = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_MULAW], [test x$build_pcm_mulaw = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_ALAW], [test x$build_pcm_alaw = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_ADPCM], [test x$build_pcm_adpcm = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_RATE], [test x$build_pcm_rate = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_PLUG], [test x$build_pcm_plug = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_MULTI], [test x$build_pcm_multi = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_SHM], [test x$build_pcm_shm = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_FILE], [test x$build_pcm_file = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_NULL], [test x$build_pcm_null = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_EMPTY], [test x$build_pcm_empty = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_SHARE], [test x$build_pcm_share = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_METER], [test x$build_pcm_meter = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_HOOKS], [test x$build_pcm_hooks = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_LFLOAT], [test x$build_pcm_lfloat = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_LADSPA], [test x$build_pcm_ladspa = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_DMIX], [test x$build_pcm_dmix = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_DSHARE], [test x$build_pcm_dshare = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_DSNOOP], [test x$build_pcm_dsnoop = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_ASYM], [test x$build_pcm_asym = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_IEC958], [test x$build_pcm_iec958 = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_SOFTVOL], [test x$build_pcm_softvol = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_EXTPLUG], [test x$build_pcm_extplug = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_IOPLUG], [test x$build_pcm_ioplug = xyes])
--AM_CONDITIONAL([BUILD_PCM_PLUGIN_MMAP_EMUL], [test x$build_pcm_mmap_emul = xyes])
--
--dnl Defines for plug plugin
--if test "$build_pcm_rate" = "yes"; then
-- AC_DEFINE([BUILD_PCM_PLUGIN_RATE], "1", [Build PCM rate plugin])
--fi
--if test "$build_pcm_route" = "yes"; then
-- AC_DEFINE([BUILD_PCM_PLUGIN_ROUTE], "1", [Build PCM route plugin])
--fi
--if test "$build_pcm_lfloat" = "yes"; then
-- AC_DEFINE([BUILD_PCM_PLUGIN_LFLOAT], "1", [Build PCM lfloat plugin])
--fi
--if test "$build_pcm_adpcm" = "yes"; then
-- AC_DEFINE([BUILD_PCM_PLUGIN_ADPCM], "1", [Build PCM adpcm plugin])
--fi
--if test "$build_pcm_mulaw" = "yes"; then
-- AC_DEFINE([BUILD_PCM_PLUGIN_MULAW], "1", [Build PCM mulaw plugin])
--fi
--if test "$build_pcm_alaw" = "yes"; then
-- AC_DEFINE([BUILD_PCM_PLUGIN_ALAW], "1", [Build PCM alaw plugin])
--fi
--if test "$build_pcm_mmap_emul" = "yes"; then
-- AC_DEFINE([BUILD_PCM_PLUGIN_MMAP_EMUL], "1", [Build PCM mmap-emul plugin])
--fi
--
--
--dnl Create PCM plugin symbol list for static library
--rm -f "$srcdir"/src/pcm/pcm_symbols_list.c
--touch "$srcdir"/src/pcm/pcm_symbols_list.c
--for t in $PCM_PLUGIN_LIST; do
-- if eval test \$build_pcm_$t = yes; then
-- echo \&_snd_module_pcm_$t, >> "$srcdir"/src/pcm/pcm_symbols_list.c
-- fi
--done
--
--dnl Control Plugins
--
--AC_ARG_WITH(ctl-plugins,
-- AS_HELP_STRING([--with-ctl-plugins=],
-- [build control plugins (default = all)]),
-- [ctl_plugins="$withval"], [ctl_plugins="all"])
--
--CTL_PLUGIN_LIST="shm ext"
--
--build_ctl_plugin="no"
--for t in $CTL_PLUGIN_LIST; do
-- eval build_ctl_$t="no"
--done
--
--ctl_plugins=`echo $ctl_plugins | sed 's/,/ /g'`
--for p in $ctl_plugins; do
-- for t in $CTL_PLUGIN_LIST; do
-- if test "$p" = "$t" -o "$p" = "all"; then
-- eval build_ctl_$t="yes"
-- build_ctl_plugin="yes"
-- fi
-- done
--done
--
--AM_CONDITIONAL([BUILD_CTL_PLUGIN], [test x$build_ctl_plugin = xyes])
--AM_CONDITIONAL([BUILD_CTL_PLUGIN_SHM], [test x$build_ctl_shm = xyes])
--AM_CONDITIONAL([BUILD_CTL_PLUGIN_EXT], [test x$build_ctl_ext = xyes])
--
--dnl Create ctl plugin symbol list for static library
--rm -f "$srcdir"/src/control/ctl_symbols_list.c
--touch "$srcdir"/src/control/ctl_symbols_list.c
--for t in $CTL_PLUGIN_LIST; do
-- if eval test \$build_ctl_$t = yes; then
-- echo \&_snd_module_control_$t, >> "$srcdir"/src/control/ctl_symbols_list.c
-- fi
--done
--
--dnl Max number of cards
--AC_MSG_CHECKING(for max number of cards)
--AC_ARG_WITH(max-cards,
-- AS_HELP_STRING([--with-max-cards], [Specify the max number of cards (default = 32)]),
-- [ max_cards="$withval" ], [ max_cards="32" ])
--AC_MSG_RESULT([$max_cards])
--
--if test "$max_cards" -lt 1; then
-- AC_ERROR([Invalid max cards $max_cards])
--elif test "$max_cards" -gt 256; then
-- AC_ERROR([Invalid max cards $max_cards])
--fi
--AC_DEFINE_UNQUOTED(SND_MAX_CARDS, $max_cards, [Max number of cards])
--
--dnl Make a symlink for inclusion of alsa/xxx.h
--if test ! -L "$srcdir"/include/alsa ; then
-- echo "Making a symlink include/alsa"
-- rm -f "$srcdir"/include/alsa
-- ln -sf . "$srcdir"/include/alsa
--fi
--
--AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
-- include/Makefile include/sound/Makefile src/Versions src/Makefile \
-- src/control/Makefile src/mixer/Makefile \
-- src/pcm/Makefile src/pcm/scopes/Makefile \
-- src/rawmidi/Makefile src/timer/Makefile \
-- src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
-- src/alisp/Makefile \
-- src/conf/Makefile src/conf/alsa.conf.d/Makefile \
-- src/conf/cards/Makefile \
-- src/conf/pcm/Makefile \
-- src/conf/ucm/Makefile \
-- src/conf/ucm/DAISY-I2S/Makefile \
-- src/conf/ucm/PandaBoard/Makefile \
-- src/conf/ucm/PandaBoardES/Makefile \
-- src/conf/ucm/SDP4430/Makefile \
-- src/conf/ucm/tegraalc5632/Makefile \
-- modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
-- alsalisp/Makefile aserver/Makefile \
-- test/Makefile test/lsb/Makefile \
-- utils/Makefile utils/alsa-lib.spec utils/alsa.pc)
--
--dnl Create asoundlib.h dynamically according to configure options
--echo "Creating asoundlib.h..."
--cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
--test "$ac_cv_header_endian_h" = "yes" && echo "#include " >> include/asoundlib.h
--if test "$ac_cv_header_sys_endian_h" = "yes"; then
--cat >> include/asoundlib.h <
--#ifndef __BYTE_ORDER
--#define __BYTE_ORDER BYTE_ORDER
--#endif
--#ifndef __LITTLE_ENDIAN
--#define __LITTLE_ENDIAN LITTLE_ENDIAN
--#endif
--#ifndef __BIG_ENDIAN
--#define __BIG_ENDIAN BIG_ENDIAN
--#endif
--EOF
--fi
--cat >> include/asoundlib.h <
--#include
--#include
--#include
--#include
--#include
--#include
--EOF
--test "$build_pcm" = "yes" && echo "#include " >> include/asoundlib.h
--test "$build_rawmidi" = "yes" && echo "#include " >> include/asoundlib.h
--test "$build_pcm" = "yes" && echo "#include " >> include/asoundlib.h
--test "$build_hwdep" = "yes" && echo "#include " >> include/asoundlib.h
--echo "#include " >> include/asoundlib.h
--test "$build_mixer" = "yes" && echo "#include " >> include/asoundlib.h
--test "$build_seq" = "yes" && echo "#include " >> include/asoundlib.h
--test "$build_seq" = "yes" && echo "#include " >> include/asoundlib.h
--test "$build_seq" = "yes" && echo "#include " >> include/asoundlib.h
--test "$build_seq" = "yes" && echo "#include " >> include/asoundlib.h
--cat "$srcdir"/include/asoundlib-tail.h >> include/asoundlib.h
--
-diff --git a/doc/Makefile.am b/doc/Makefile.am
-index 406fde763ede..e087f42449a5 100644
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -2,7 +2,7 @@ SUBDIRS=pictures
-
- EXTRA_DIST=README.1st asoundrc.txt doxygen.cfg index.doxygen
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-
- doc:
- test -e doxygen.cfg || sed s:[@]top_srcdir[@]:..:g doxygen.cfg.in > doxygen.cfg
-diff --git a/include/Makefile.am b/include/Makefile.am
-index de37f2cc3996..0127d5c4b200 100644
---- a/include/Makefile.am
-+++ b/include/Makefile.am
-@@ -61,7 +61,7 @@ alsa:
- version.h: stamp-vh alsa
- @:
-
--stamp-vh: $(top_builddir)/configure.in
-+stamp-vh: $(top_builddir)/configure.ac
- @echo "/*" > ver.tmp
- @echo " * version.h" >> ver.tmp
- @echo " */" >> ver.tmp
-@@ -83,7 +83,7 @@ stamp-vh: $(top_builddir)/configure.in
- echo timestamp > stamp-vh)
- -@rm -f ver.tmp
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-
- install-data-hook:
- test -d $(DESTDIR)$(sysincludedir) || mkdir -p $(DESTDIR)$(sysincludedir)
-diff --git a/modules/mixer/simple/Makefile.am b/modules/mixer/simple/Makefile.am
-index bad09444fb04..cb64ee8ca665 100644
---- a/modules/mixer/simple/Makefile.am
-+++ b/modules/mixer/simple/Makefile.am
-@@ -3,7 +3,7 @@ pkglibdir = $(alsaplugindir)/smixer
-
- AM_CFLAGS = -g -O2 -W -Wall
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-
- pkglib_LTLIBRARIES = smixer-sbase.la \
- smixer-ac97.la \
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 8f789fecc125..fa255ff43ee0 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -87,4 +87,4 @@ instr/libinstr.la:
- alisp/libalisp.la:
- $(MAKE) -C alisp libalisp.la
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/src/alisp/Makefile.am b/src/alisp/Makefile.am
-index e6d4ac537961..1234e111e388 100644
---- a/src/alisp/Makefile.am
-+++ b/src/alisp/Makefile.am
-@@ -8,4 +8,4 @@ noinst_HEADERS = alisp_local.h
-
- all: libalisp.la
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/src/control/Makefile.am b/src/control/Makefile.am
-index 8076c732b77d..3d476a210e6e 100644
---- a/src/control/Makefile.am
-+++ b/src/control/Makefile.am
-@@ -15,4 +15,4 @@ noinst_HEADERS = control_local.h
- all: libcontrol.la
-
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/src/hwdep/Makefile.am b/src/hwdep/Makefile.am
-index 0b626b904a02..b543e581e473 100644
---- a/src/hwdep/Makefile.am
-+++ b/src/hwdep/Makefile.am
-@@ -5,4 +5,4 @@ noinst_HEADERS = hwdep_local.h
- all: libhwdep.la
-
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/src/mixer/Makefile.am b/src/mixer/Makefile.am
-index c0749a476d7d..6eeff8af459a 100644
---- a/src/mixer/Makefile.am
-+++ b/src/mixer/Makefile.am
-@@ -11,4 +11,4 @@ noinst_HEADERS = mixer_local.h mixer_simple.h
- all: libmixer.la
-
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/src/pcm/Makefile.am b/src/pcm/Makefile.am
-index 28faa5425550..81598f634bc3 100644
---- a/src/pcm/Makefile.am
-+++ b/src/pcm/Makefile.am
-@@ -114,4 +114,4 @@ alsadir = $(datadir)/alsa
-
- all: libpcm.la
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/src/rawmidi/Makefile.am b/src/rawmidi/Makefile.am
-index 2470c7ad0e06..41858a1fb07e 100644
---- a/src/rawmidi/Makefile.am
-+++ b/src/rawmidi/Makefile.am
-@@ -9,4 +9,4 @@ noinst_HEADERS = rawmidi_local.h
- all: librawmidi.la
-
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/src/seq/Makefile.am b/src/seq/Makefile.am
-index 1ea92f02d80f..6cefe3970f4a 100644
---- a/src/seq/Makefile.am
-+++ b/src/seq/Makefile.am
-@@ -10,4 +10,4 @@ noinst_HEADERS = seq_local.h
- all: libseq.la
-
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/src/timer/Makefile.am b/src/timer/Makefile.am
-index e7cf77b64995..7cfbe455af56 100644
---- a/src/timer/Makefile.am
-+++ b/src/timer/Makefile.am
-@@ -6,4 +6,4 @@ noinst_HEADERS = timer_local.h
- all: libtimer.la
-
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/src/ucm/Makefile.am b/src/ucm/Makefile.am
-index 7435d90333c4..9d66b24439c2 100644
---- a/src/ucm/Makefile.am
-+++ b/src/ucm/Makefile.am
-@@ -7,4 +7,4 @@ noinst_HEADERS = ucm_local.h
- all: libucm.la
-
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
-diff --git a/test/Makefile.am b/test/Makefile.am
-index 87054021a70c..a06e79b39d18 100644
---- a/test/Makefile.am
-+++ b/test/Makefile.am
-@@ -22,7 +22,7 @@ code_CFLAGS=-Wall -pipe -g -O2
- chmap_LDADD=../src/libasound.la
- audio_time_LDADD=../src/libasound.la
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
- AM_CFLAGS=-Wall -pipe -g
-
- EXTRA_DIST=seq-decoder.c seq-sender.c midifile.h midifile.c midifile.3
-diff --git a/utils/Makefile.am b/utils/Makefile.am
-index 447d5251207d..7220c02029f4 100644
---- a/utils/Makefile.am
-+++ b/utils/Makefile.am
-@@ -11,4 +11,4 @@ pkgconfig_DATA = alsa.pc
- rpm: buildrpm alsa-lib.spec
- VERSION=$(VERSION) $(srcdir)/buildrpm
-
--INCLUDES=-I$(top_srcdir)/include
-+AM_CPPFLAGS=-I$(top_srcdir)/include
---
-1.9.0
-
diff --git a/0031-pcm-Insert-linear-to-float-conversion-when-rate-or-c.patch b/0031-pcm-Insert-linear-to-float-conversion-when-rate-or-c.patch
deleted file mode 100644
index 22d63b6..0000000
--- a/0031-pcm-Insert-linear-to-float-conversion-when-rate-or-c.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 2da7b0c2c194a457de9d9a1a9b93c47e2dad1507 Mon Sep 17 00:00:00 2001
-From: Maarten Baert
-Date: Wed, 26 Feb 2014 14:23:45 +0100
-Subject: [PATCH] pcm: Insert linear-to-float conversion when rate or channel
- count is incorrect
-
-This fixes a bug where snd_pcm_plug_insert_plugins fails when both
-client and slave use format float, but the rate or channel count does
-not match. I also removed some redundant code.
-
-Signed-off-by: Maarten Baert
-Signed-off-by: Takashi Iwai
----
- src/pcm/pcm_plug.c | 14 ++++++--------
- 1 file changed, 6 insertions(+), 8 deletions(-)
-
-diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c
-index fa84eaacaedc..ede9c1525a74 100644
---- a/src/pcm/pcm_plug.c
-+++ b/src/pcm/pcm_plug.c
-@@ -522,15 +522,13 @@ static int snd_pcm_plug_change_format(snd_pcm_t *pcm, snd_pcm_t **new, snd_pcm_p
- }
- #ifdef BUILD_PCM_PLUGIN_LFLOAT
- } else if (snd_pcm_format_float(slv->format)) {
-- /* Conversion is done in another plugin */
-- if (clt->format == slv->format &&
-- clt->rate == slv->rate &&
-- clt->channels == slv->channels)
-- return 0;
-- cfmt = clt->format;
-- if (snd_pcm_format_linear(clt->format))
-+ if (snd_pcm_format_linear(clt->format)) {
-+ cfmt = clt->format;
- f = snd_pcm_lfloat_open;
-- else
-+ } else if (clt->rate != slv->rate || clt->channels != slv->channels) {
-+ cfmt = SND_PCM_FORMAT_S16;
-+ f = snd_pcm_lfloat_open;
-+ } else
- return -EINVAL;
- #endif
- #ifdef BUILD_PCM_NONLINEAR
---
-1.9.0
-
diff --git a/0032-pcm-route-Allow-chmap-syntax-for-slave-channels-in-t.patch b/0032-pcm-route-Allow-chmap-syntax-for-slave-channels-in-t.patch
deleted file mode 100644
index d116478..0000000
--- a/0032-pcm-route-Allow-chmap-syntax-for-slave-channels-in-t.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 8ad8d22216f818872a764ef5dafcaae1adeee211 Mon Sep 17 00:00:00 2001
-From: David Henningsson
-Date: Fri, 28 Feb 2014 08:57:05 +0100
-Subject: [PATCH] pcm: route: Allow chmap syntax for slave channels in ttable
-
-Instead of writing e g "0" and "1", one can now write "FL" and "FR" instead.
-
-E g:
- ttable.0.FL 1
- ttable.1.FR 1
- ttable.2.LFE 1
-
-Signed-off-by: David Henningsson
-Signed-off-by: Takashi Iwai