[pulseaudio-commits] 7 commits - src/modules src/pulse src/pulsecore src/tests

Colin Guthrie colin at kemper.freedesktop.org
Sat Sep 3 03:46:36 PDT 2011


 src/modules/alsa/mixer/paths/analog-output-headphones-2.conf |    5 -
 src/modules/alsa/mixer/paths/analog-output-headphones.conf   |    5 -
 src/modules/bluetooth/sbc/sbc_primitives_armv6.c             |    4 -
 src/modules/bluetooth/sbc/sbc_primitives_iwmmxt.c            |    4 -
 src/modules/bluetooth/sbc/sbc_primitives_mmx.c               |   14 ++--
 src/modules/bluetooth/sbc/sbc_primitives_neon.c              |   28 ++++----
 src/modules/echo-cancel/adrian-aec.c                         |    4 +
 src/modules/module-equalizer-sink.c                          |   38 +++++------
 src/modules/module-rygel-media-server.c                      |    1 
 src/pulse/ext-device-restore.c                               |    2 
 src/pulsecore/flist.c                                        |    2 
 src/pulsecore/macro.h                                        |    4 +
 src/pulsecore/memtrap.c                                      |    3 
 src/tests/alsa-time-test.c                                   |    4 +
 14 files changed, 67 insertions(+), 51 deletions(-)

New commits:
commit 9133c6c9359b6f22b25176fbd2c435a21590230c
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Fri Sep 2 14:11:52 2011 +0200

    Make gcc --std=c99 happy
    
    We're now more or less C99 compliant

diff --git a/src/modules/echo-cancel/adrian-aec.c b/src/modules/echo-cancel/adrian-aec.c
index e969e8c..1476ee4 100644
--- a/src/modules/echo-cancel/adrian-aec.c
+++ b/src/modules/echo-cancel/adrian-aec.c
@@ -10,6 +10,10 @@
  * Version 0.4 Leaky Normalized LMS - pre whitening algorithm
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <math.h>
 #include <string.h>
 #include <stdint.h>
diff --git a/src/modules/module-rygel-media-server.c b/src/modules/module-rygel-media-server.c
index 9af0ceb..94b2d68 100644
--- a/src/modules/module-rygel-media-server.c
+++ b/src/modules/module-rygel-media-server.c
@@ -37,6 +37,7 @@
 #include <pulsecore/source.h>
 #include <pulsecore/core-util.h>
 #include <pulsecore/log.h>
+#include <pulsecore/macro.h>
 #include <pulsecore/modargs.h>
 #include <pulsecore/dbus-shared.h>
 #include <pulsecore/namereg.h>
diff --git a/src/pulsecore/flist.c b/src/pulsecore/flist.c
index acdeff3..d279271 100644
--- a/src/pulsecore/flist.c
+++ b/src/pulsecore/flist.c
@@ -53,7 +53,7 @@ struct pa_flist {
     pa_atomic_ptr_t stored;
     /* Stack that contains empty list elements */
     pa_atomic_ptr_t empty;
-    pa_flist_elem table[0];
+    pa_flist_elem table[];
 };
 
 /* Lock free pop from linked list stack */
diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h
index 1207a10..7459e6f 100644
--- a/src/pulsecore/macro.h
+++ b/src/pulsecore/macro.h
@@ -84,6 +84,10 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
     #define PA_DECLARE_ALIGNED(n,t,v)      t v
 #endif
 
+#ifdef __GNUC__
+#define typeof __typeof__
+#endif
+
 /* The users of PA_MIN and PA_MAX, PA_CLAMP, PA_ROUND_UP should be
  * aware that these macros on non-GCC executed code with side effects
  * twice. It is thus considered misuse to use code with side effects
diff --git a/src/tests/alsa-time-test.c b/src/tests/alsa-time-test.c
index 1a572b3..ab194ee 100644
--- a/src/tests/alsa-time-test.c
+++ b/src/tests/alsa-time-test.c
@@ -1,3 +1,7 @@
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <assert.h>
 #include <inttypes.h>
 #include <time.h>

commit dfd706da71322c03a958cb5994bdb72953eaffa3
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Fri Sep 2 14:11:51 2011 +0200

    Squash the last gcc warnings

diff --git a/src/pulse/ext-device-restore.c b/src/pulse/ext-device-restore.c
index 7d7b24f..25d33d1 100644
--- a/src/pulse/ext-device-restore.c
+++ b/src/pulse/ext-device-restore.c
@@ -203,7 +203,7 @@ static void ext_device_restore_read_device_formats_cb(pa_pdispatch *pd, uint32_t
                         uint8_t k;
 
                         pa_context_fail(o->context, PA_ERR_PROTOCOL);
-                        for (k = 0; k <= j; k++)
+                        for (k = 0; k < j+1; k++)
                             pa_format_info_free(i.formats[k]);
                         pa_xfree(i.formats);
                         goto finish;
diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c
index 4df1fb7..4236934 100644
--- a/src/pulsecore/memtrap.c
+++ b/src/pulsecore/memtrap.c
@@ -69,7 +69,8 @@ pa_bool_t pa_memtrap_is_good(pa_memtrap *m) {
 
 #ifdef HAVE_SIGACTION
 static void sigsafe_error(const char *s) {
-    (void) write(STDERR_FILENO, s, strlen(s));
+    size_t ret PA_GCC_UNUSED;
+    ret = write(STDERR_FILENO, s, strlen(s));
 }
 
 static void signal_handler(int sig, siginfo_t* si, void *data) {

commit 647048ebc49ed4ccb6f44b731c1850799e2a9253
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Fri Sep 2 14:11:50 2011 +0200

    module-equalizer-sink: Use correct limit in loop

diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index a45df1a..19b679b 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -909,7 +909,7 @@ static void save_profile(struct userdata *u, size_t channel, char *name){
     profile[0] = u->Xs[a_i][channel];
     H = u->Hs[channel][a_i];
     H_n = profile + 1;
-    for(size_t i = 0 ; i <= FILTER_SIZE(u); ++i){
+    for(size_t i = 0 ; i < FILTER_SIZE(u); ++i){
         H_n[i] = H[i] * u->fft_size;
         //H_n[i] = H[i];
     }

commit 3d04a057363026b59462ef1b00d4e2f38b9b193a
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Fri Sep 2 14:11:49 2011 +0200

    bluetooth/sbc: Use __asm__ keyword

diff --git a/src/modules/bluetooth/sbc/sbc_primitives_armv6.c b/src/modules/bluetooth/sbc/sbc_primitives_armv6.c
index 9586098..b321272 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives_armv6.c
+++ b/src/modules/bluetooth/sbc/sbc_primitives_armv6.c
@@ -41,7 +41,7 @@
 static void __attribute__((naked)) sbc_analyze_four_armv6()
 {
 	/* r0 = in, r1 = out, r2 = consts */
-	asm volatile (
+	__asm__ volatile (
 		"push   {r1, r4-r7, lr}\n"
 		"push   {r8-r11}\n"
 		"ldrd   r4,  r5,  [r0, #0]\n"
@@ -112,7 +112,7 @@ static void __attribute__((naked)) sbc_analyze_four_armv6()
 static void __attribute__((naked)) sbc_analyze_eight_armv6()
 {
 	/* r0 = in, r1 = out, r2 = consts */
-	asm volatile (
+	__asm__ volatile (
 		"push   {r1, r4-r7, lr}\n"
 		"push   {r8-r11}\n"
 		"ldrd   r4,  r5,  [r0, #24]\n"
diff --git a/src/modules/bluetooth/sbc/sbc_primitives_iwmmxt.c b/src/modules/bluetooth/sbc/sbc_primitives_iwmmxt.c
index 213967e..e0bd060 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives_iwmmxt.c
+++ b/src/modules/bluetooth/sbc/sbc_primitives_iwmmxt.c
@@ -42,7 +42,7 @@
 static inline void sbc_analyze_four_iwmmxt(const int16_t *in, int32_t *out,
 					const FIXED_T *consts)
 {
-	asm volatile (
+	__asm__ volatile (
 		"wldrd        wr0, [%0]\n"
 		"tbcstw       wr4, %2\n"
 		"wldrd        wr2, [%1]\n"
@@ -115,7 +115,7 @@ static inline void sbc_analyze_four_iwmmxt(const int16_t *in, int32_t *out,
 static inline void sbc_analyze_eight_iwmmxt(const int16_t *in, int32_t *out,
 							const FIXED_T *consts)
 {
-	asm volatile (
+	__asm__ volatile (
 		"wldrd        wr0, [%0]\n"
 		"tbcstw       wr15, %2\n"
 		"wldrd        wr1, [%0, #8]\n"
diff --git a/src/modules/bluetooth/sbc/sbc_primitives_mmx.c b/src/modules/bluetooth/sbc/sbc_primitives_mmx.c
index 7f2fbc3..27e9a56 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives_mmx.c
+++ b/src/modules/bluetooth/sbc/sbc_primitives_mmx.c
@@ -45,7 +45,7 @@ static inline void sbc_analyze_four_mmx(const int16_t *in, int32_t *out,
 		1 << (SBC_PROTO_FIXED4_SCALE - 1),
 		1 << (SBC_PROTO_FIXED4_SCALE - 1),
 	};
-	asm volatile (
+	__asm__ volatile (
 		"movq        (%0), %%mm0\n"
 		"movq       8(%0), %%mm1\n"
 		"pmaddwd     (%1), %%mm0\n"
@@ -111,7 +111,7 @@ static inline void sbc_analyze_eight_mmx(const int16_t *in, int32_t *out,
 		1 << (SBC_PROTO_FIXED8_SCALE - 1),
 		1 << (SBC_PROTO_FIXED8_SCALE - 1),
 	};
-	asm volatile (
+	__asm__ volatile (
 		"movq        (%0), %%mm0\n"
 		"movq       8(%0), %%mm1\n"
 		"movq      16(%0), %%mm2\n"
@@ -258,7 +258,7 @@ static inline void sbc_analyze_4b_4s_mmx(int16_t *x, int32_t *out,
 	out += out_stride;
 	sbc_analyze_four_mmx(x + 0, out, analysis_consts_fixed4_simd_even);
 
-	asm volatile ("emms\n");
+	__asm__ volatile ("emms\n");
 }
 
 static inline void sbc_analyze_4b_8s_mmx(int16_t *x, int32_t *out,
@@ -273,7 +273,7 @@ static inline void sbc_analyze_4b_8s_mmx(int16_t *x, int32_t *out,
 	out += out_stride;
 	sbc_analyze_eight_mmx(x + 0, out, analysis_consts_fixed8_simd_even);
 
-	asm volatile ("emms\n");
+	__asm__ volatile ("emms\n");
 }
 
 static void sbc_calc_scalefactors_mmx(
@@ -291,7 +291,7 @@ static void sbc_calc_scalefactors_mmx(
 		for (sb = 0; sb < subbands; sb += 2) {
 			blk = (blocks - 1) * (((char *) &sb_sample_f[1][0][0] -
 				(char *) &sb_sample_f[0][0][0]));
-			asm volatile (
+			__asm__ volatile (
 				"movq         (%4), %%mm0\n"
 			"1:\n"
 				"movq     (%1, %0), %%mm1\n"
@@ -326,7 +326,7 @@ static void sbc_calc_scalefactors_mmx(
 			: "cc", "memory");
 		}
 	}
-	asm volatile ("emms\n");
+	__asm__ volatile ("emms\n");
 }
 
 static int check_mmx_support(void)
@@ -335,7 +335,7 @@ static int check_mmx_support(void)
 	return 1; /* We assume that all 64-bit processors have MMX support */
 #else
 	int cpuid_feature_information;
-	asm volatile (
+	__asm__ volatile (
 		/* According to Intel manual, CPUID instruction is supported
 		 * if the value of ID bit (bit 21) in EFLAGS can be modified */
 		"pushf\n"
diff --git a/src/modules/bluetooth/sbc/sbc_primitives_neon.c b/src/modules/bluetooth/sbc/sbc_primitives_neon.c
index 0572158..5d4d0e3 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives_neon.c
+++ b/src/modules/bluetooth/sbc/sbc_primitives_neon.c
@@ -44,7 +44,7 @@ static inline void _sbc_analyze_four_neon(const int16_t *in, int32_t *out,
 	/* TODO: merge even and odd cases (or even merge all four calls to this
 	 * function) in order to have only aligned reads from 'in' array
 	 * and reduce number of load instructions */
-	asm volatile (
+	__asm__ volatile (
 		"vld1.16    {d4, d5}, [%0, :64]!\n"
 		"vld1.16    {d8, d9}, [%1, :128]!\n"
 
@@ -104,7 +104,7 @@ static inline void _sbc_analyze_eight_neon(const int16_t *in, int32_t *out,
 	/* TODO: merge even and odd cases (or even merge all four calls to this
 	 * function) in order to have only aligned reads from 'in' array
 	 * and reduce number of load instructions */
-	asm volatile (
+	__asm__ volatile (
 		"vld1.16    {d4, d5}, [%0, :64]!\n"
 		"vld1.16    {d8, d9}, [%1, :128]!\n"
 
@@ -247,7 +247,7 @@ static void sbc_calc_scalefactors_neon(
 		for (sb = 0; sb < subbands; sb += 4) {
 			int blk = blocks;
 			int32_t *in = &sb_sample_f[0][ch][sb];
-			asm volatile (
+			__asm__ volatile (
 				"vmov.s32  q0, #0\n"
 				"vmov.s32  q1, %[c1]\n"
 				"vmov.s32  q14, #1\n"
@@ -306,7 +306,7 @@ int sbc_calc_scalefactors_j_neon(
 
 	i = subbands;
 
-	asm volatile (
+	__asm__ volatile (
 		/*
 		 * constants: q13 = (31 - SCALE_OUT_BITS), q14 = 1
 		 * input:     q0  = ((1 << SCALE_OUT_BITS) + 1)
@@ -561,7 +561,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_4s_neon_internal(
 	if (position < nsamples) {
 		int16_t *dst = &X[0][SBC_X_BUFFER_SIZE - 40];
 		int16_t *src = &X[0][position];
-		asm volatile (
+		__asm__ volatile (
 			"vld1.16 {d0, d1, d2, d3}, [%[src], :128]!\n"
 			"vst1.16 {d0, d1, d2, d3}, [%[dst], :128]!\n"
 			"vld1.16 {d0, d1, d2, d3}, [%[src], :128]!\n"
@@ -575,7 +575,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_4s_neon_internal(
 		if (nchannels > 1) {
 			dst = &X[1][SBC_X_BUFFER_SIZE - 40];
 			src = &X[1][position];
-			asm volatile (
+			__asm__ volatile (
 				"vld1.16 {d0, d1, d2, d3}, [%[src], :128]!\n"
 				"vst1.16 {d0, d1, d2, d3}, [%[dst], :128]!\n"
 				"vld1.16 {d0, d1, d2, d3}, [%[src], :128]!\n"
@@ -594,7 +594,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_4s_neon_internal(
 		/* poor 'pcm' alignment */
 		int16_t *x = &X[0][position];
 		int16_t *y = &X[1][position];
-		asm volatile (
+		__asm__ volatile (
 			"vld1.8  {d0, d1}, [%[perm], :128]\n"
 		"1:\n"
 			"sub     %[x], %[x], #16\n"
@@ -628,7 +628,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_4s_neon_internal(
 		/* proper 'pcm' alignment */
 		int16_t *x = &X[0][position];
 		int16_t *y = &X[1][position];
-		asm volatile (
+		__asm__ volatile (
 			"vld1.8  {d0, d1}, [%[perm], :128]\n"
 		"1:\n"
 			"sub     %[x], %[x], #16\n"
@@ -658,7 +658,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_4s_neon_internal(
 			  "d20", "d21", "d22", "d23");
 	} else {
 		int16_t *x = &X[0][position];
-		asm volatile (
+		__asm__ volatile (
 			"vld1.8  {d0, d1}, [%[perm], :128]\n"
 		"1:\n"
 			"sub     %[x], %[x], #16\n"
@@ -703,7 +703,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_8s_neon_internal(
 	if (position < nsamples) {
 		int16_t *dst = &X[0][SBC_X_BUFFER_SIZE - 72];
 		int16_t *src = &X[0][position];
-		asm volatile (
+		__asm__ volatile (
 			"vld1.16 {d0, d1, d2, d3}, [%[src], :128]!\n"
 			"vst1.16 {d0, d1, d2, d3}, [%[dst], :128]!\n"
 			"vld1.16 {d0, d1, d2, d3}, [%[src], :128]!\n"
@@ -721,7 +721,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_8s_neon_internal(
 		if (nchannels > 1) {
 			dst = &X[1][SBC_X_BUFFER_SIZE - 72];
 			src = &X[1][position];
-			asm volatile (
+			__asm__ volatile (
 				"vld1.16 {d0, d1, d2, d3}, [%[src], :128]!\n"
 				"vst1.16 {d0, d1, d2, d3}, [%[dst], :128]!\n"
 				"vld1.16 {d0, d1, d2, d3}, [%[src], :128]!\n"
@@ -744,7 +744,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_8s_neon_internal(
 		/* poor 'pcm' alignment */
 		int16_t *x = &X[0][position];
 		int16_t *y = &X[1][position];
-		asm volatile (
+		__asm__ volatile (
 			"vld1.8  {d0, d1, d2, d3}, [%[perm], :128]\n"
 		"1:\n"
 			"sub     %[x], %[x], #32\n"
@@ -782,7 +782,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_8s_neon_internal(
 		/* proper 'pcm' alignment */
 		int16_t *x = &X[0][position];
 		int16_t *y = &X[1][position];
-		asm volatile (
+		__asm__ volatile (
 			"vld1.8  {d0, d1, d2, d3}, [%[perm], :128]\n"
 		"1:\n"
 			"sub     %[x], %[x], #32\n"
@@ -816,7 +816,7 @@ static SBC_ALWAYS_INLINE int sbc_enc_process_input_8s_neon_internal(
 			  "d20", "d21", "d22", "d23");
 	} else {
 		int16_t *x = &X[0][position];
-		asm volatile (
+		__asm__ volatile (
 			"vld1.8  {d0, d1, d2, d3}, [%[perm], :128]\n"
 		"1:\n"
 			"sub     %[x], %[x], #32\n"

commit 918f168c15830d6e9f2d528fa26e4c1c0897dfd2
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Fri Sep 2 10:33:59 2011 +0200

    module-equalizer-sink: Use = in initialising variables
    
    This makes the compiler in C99 mode happy

diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index 91fa43b..a45df1a 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -1381,7 +1381,7 @@ pa_dbus_arg_info remove_profile_args[]={
 };
 
 static pa_dbus_method_handler manager_methods[MANAGER_METHOD_MAX]={
-    [MANAGER_METHOD_REMOVE_PROFILE]{
+    [MANAGER_METHOD_REMOVE_PROFILE]={
         .method_name="RemoveProfile",
         .arguments=remove_profile_args,
         .n_arguments=sizeof(remove_profile_args)/sizeof(pa_dbus_arg_info),
@@ -1488,42 +1488,42 @@ pa_dbus_arg_info base_profile_name_args[]={
 };
 
 static pa_dbus_method_handler equalizer_methods[EQUALIZER_METHOD_MAX]={
-    [EQUALIZER_METHOD_SEED_FILTER]{
+    [EQUALIZER_METHOD_SEED_FILTER]={
         .method_name="SeedFilter",
         .arguments=seed_filter_args,
         .n_arguments=sizeof(seed_filter_args)/sizeof(pa_dbus_arg_info),
         .receive_cb=equalizer_handle_seed_filter},
-    [EQUALIZER_METHOD_FILTER_POINTS]{
+    [EQUALIZER_METHOD_FILTER_POINTS]={
         .method_name="FilterAtPoints",
         .arguments=filter_points_args,
         .n_arguments=sizeof(filter_points_args)/sizeof(pa_dbus_arg_info),
         .receive_cb=equalizer_handle_get_filter_points},
-    [EQUALIZER_METHOD_SET_FILTER]{
+    [EQUALIZER_METHOD_SET_FILTER]={
         .method_name="SetFilter",
         .arguments=set_filter_args,
         .n_arguments=sizeof(set_filter_args)/sizeof(pa_dbus_arg_info),
         .receive_cb=equalizer_handle_set_filter},
-    [EQUALIZER_METHOD_GET_FILTER]{
+    [EQUALIZER_METHOD_GET_FILTER]={
         .method_name="GetFilter",
         .arguments=get_filter_args,
         .n_arguments=sizeof(get_filter_args)/sizeof(pa_dbus_arg_info),
         .receive_cb=equalizer_handle_get_filter},
-    [EQUALIZER_METHOD_SAVE_PROFILE]{
+    [EQUALIZER_METHOD_SAVE_PROFILE]={
         .method_name="SaveProfile",
         .arguments=save_profile_args,
         .n_arguments=sizeof(save_profile_args)/sizeof(pa_dbus_arg_info),
         .receive_cb=equalizer_handle_save_profile},
-    [EQUALIZER_METHOD_LOAD_PROFILE]{
+    [EQUALIZER_METHOD_LOAD_PROFILE]={
         .method_name="LoadProfile",
         .arguments=load_profile_args,
         .n_arguments=sizeof(load_profile_args)/sizeof(pa_dbus_arg_info),
         .receive_cb=equalizer_handle_load_profile},
-    [EQUALIZER_METHOD_SAVE_STATE]{
+    [EQUALIZER_METHOD_SAVE_STATE]={
         .method_name="SaveState",
         .arguments=NULL,
         .n_arguments=0,
         .receive_cb=equalizer_handle_save_state},
-    [EQUALIZER_METHOD_GET_PROFILE_NAME]{
+    [EQUALIZER_METHOD_GET_PROFILE_NAME]={
         .method_name="BaseProfile",
         .arguments=base_profile_name_args,
         .n_arguments=sizeof(base_profile_name_args)/sizeof(pa_dbus_arg_info),
@@ -1532,10 +1532,10 @@ static pa_dbus_method_handler equalizer_methods[EQUALIZER_METHOD_MAX]={
 
 static pa_dbus_property_handler equalizer_handlers[EQUALIZER_HANDLER_MAX]={
     [EQUALIZER_HANDLER_REVISION]={.property_name="InterfaceRevision",.type="u",.get_cb=equalizer_get_revision,.set_cb=NULL},
-    [EQUALIZER_HANDLER_SAMPLERATE]{.property_name="SampleRate",.type="u",.get_cb=equalizer_get_sample_rate,.set_cb=NULL},
-    [EQUALIZER_HANDLER_FILTERSAMPLERATE]{.property_name="FilterSampleRate",.type="u",.get_cb=equalizer_get_filter_rate,.set_cb=NULL},
-    [EQUALIZER_HANDLER_N_COEFS]{.property_name="NFilterCoefficients",.type="u",.get_cb=equalizer_get_n_coefs,.set_cb=NULL},
-    [EQUALIZER_HANDLER_N_CHANNELS]{.property_name="NChannels",.type="u",.get_cb=equalizer_get_n_channels,.set_cb=NULL},
+    [EQUALIZER_HANDLER_SAMPLERATE]={.property_name="SampleRate",.type="u",.get_cb=equalizer_get_sample_rate,.set_cb=NULL},
+    [EQUALIZER_HANDLER_FILTERSAMPLERATE]={.property_name="FilterSampleRate",.type="u",.get_cb=equalizer_get_filter_rate,.set_cb=NULL},
+    [EQUALIZER_HANDLER_N_COEFS]={.property_name="NFilterCoefficients",.type="u",.get_cb=equalizer_get_n_coefs,.set_cb=NULL},
+    [EQUALIZER_HANDLER_N_CHANNELS]={.property_name="NChannels",.type="u",.get_cb=equalizer_get_n_channels,.set_cb=NULL},
 };
 
 enum equalizer_signal_index{

commit fc3ddfb7f520732aff8bf51aadcc23eed106dec7
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Fri Sep 2 10:33:58 2011 +0200

    module-equalizer-sink: Use %z for printf of size_t variables

diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index 285ca0e..91fa43b 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -1112,7 +1112,7 @@ int pa__init(pa_module*m) {
 
     u->channels = ss.channels;
     u->fft_size = pow(2, ceil(log(ss.rate) / log(2)));//probably unstable near corner cases of powers of 2
-    pa_log_debug("fft size: %ld", u->fft_size);
+    pa_log_debug("fft size: %zd", u->fft_size);
     u->window_size = 15999;
     if (u->window_size % 2 == 0)
         u->window_size--;
@@ -1802,11 +1802,11 @@ void equalizer_handle_seed_filter(DBusConnection *conn, DBusMessage *msg, void *
         }
     }
     if(!is_monotonic(xs, x_npoints) || !points_good){
-        pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "xs must be monotonic and 0<=x<=%ld", u->fft_size / 2);
+        pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "xs must be monotonic and 0<=x<=%zd", u->fft_size / 2);
         dbus_error_free(&error);
         return;
     }else if(x_npoints != y_npoints || x_npoints < 2 || x_npoints > FILTER_SIZE(u)){
-        pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "xs and ys must be the same length and 2<=l<=%ld!", FILTER_SIZE(u));
+        pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "xs and ys must be the same length and 2<=l<=%zd!", FILTER_SIZE(u));
         dbus_error_free(&error);
         return;
     }else if(xs[0] != 0 || xs[x_npoints - 1] != u->fft_size / 2){
@@ -1883,7 +1883,7 @@ void equalizer_handle_get_filter_points(DBusConnection *conn, DBusMessage *msg,
     }
 
     if(x_npoints > FILTER_SIZE(u) || !points_good){
-        pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "xs indices/length must be <= %ld!", FILTER_SIZE(u));
+        pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "xs indices/length must be <= %zd!", FILTER_SIZE(u));
         dbus_error_free(&error);
         return;
     }
@@ -2015,7 +2015,7 @@ void equalizer_handle_set_filter(DBusConnection *conn, DBusMessage *msg, void *_
         return;
     }
     if(_n_coefs != FILTER_SIZE(u)){
-        pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "This filter takes exactly %ld coefficients, you gave %d", FILTER_SIZE(u), _n_coefs);
+        pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "This filter takes exactly %zd coefficients, you gave %d", FILTER_SIZE(u), _n_coefs);
         return;
     }
     set_filter(u, channel, H, preamp);

commit 96369919e5100865e2469e42fb8f4b8e38e41aef
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Mon Jul 4 10:12:17 2011 +0200

    alsa-mixer: Set "Front" control to 0 dB on headphone path
    
    I've seen more than one system where the volume control named
    "Front" is a part of audio path for headphones. This is somewhat
    of a compromise: While we don't merge it into the path, as that
    would be regressing machines where "Front" isn't a part of the
    audio path, it would still enable sound on these machines.
    
    BugLink: http://bugs.launchpad.net/bugs/804178
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
index e47543f..284713b 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
@@ -60,9 +60,10 @@ volume = off
 switch = off
 volume = off
 
+; On some machines Front is actually a part of the Headphone path
 [Element Front]
-switch = off
-volume = off
+switch = mute
+volume = zero
 
 [Element Rear]
 switch = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
index 1d8d3fe..7f95f0a 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
@@ -63,9 +63,10 @@ volume = off
 switch = off
 volume = off
 
+; On some machines Front is actually a part of the Headphone path
 [Element Front]
-switch = off
-volume = off
+switch = mute
+volume = zero
 
 [Element Rear]
 switch = off



More information about the pulseaudio-commits mailing list