From: Thomas De Schampheleire Date: Sun, 23 Feb 2014 10:11:15 +0000 (+0100) Subject: alsa-lib: add sequence number to existing patches X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f895a67968c201ee8b84e1b181a6b5973c1fd8f4;p=buildroot.git alsa-lib: add sequence number to existing patches Signed-off-by: Thomas De Schampheleire Acked-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- diff --git a/package/alsa-lib/alsa-lib-0001-avr32-bad-inline.patch b/package/alsa-lib/alsa-lib-0001-avr32-bad-inline.patch new file mode 100644 index 0000000000..568ba40a4e --- /dev/null +++ b/package/alsa-lib/alsa-lib-0001-avr32-bad-inline.patch @@ -0,0 +1,91 @@ +diff -urN alsa-lib-1.0.18-0rig//src/pcm/pcm_local.h alsa-lib-1.0.18/src/pcm/pcm_local.h +--- alsa-lib-1.0.18-0rig//src/pcm/pcm_local.h 2009-01-31 11:02:12.000000000 +0100 ++++ alsa-lib-1.0.18/src/pcm/pcm_local.h 2009-01-31 11:03:24.000000000 +0100 +@@ -611,6 +611,13 @@ + snd_pcm_hw_param_t var); + int _snd_pcm_hw_param_set(snd_pcm_hw_params_t *params, + snd_pcm_hw_param_t var, unsigned int val, int dir); ++ ++#if defined(AVR32_INLINE_BUG) ++int _snd_pcm_hw_params_set_format(snd_pcm_hw_params_t *params, ++ snd_pcm_format_t val); ++int _snd_pcm_hw_params_set_subformat(snd_pcm_hw_params_t *params, ++ snd_pcm_subformat_t val); ++#else + static inline int _snd_pcm_hw_params_set_format(snd_pcm_hw_params_t *params, + snd_pcm_format_t val) + { +@@ -624,7 +631,7 @@ + return _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_SUBFORMAT, + (unsigned long) val, 0); + } +- ++#endif + int _snd_pcm_hw_param_set_min(snd_pcm_hw_params_t *params, + snd_pcm_hw_param_t var, unsigned int val, int dir); + int _snd_pcm_hw_param_set_max(snd_pcm_hw_params_t *params, +diff -urN alsa-lib-1.0.18-0rig//src/pcm/pcm_route.c alsa-lib-1.0.18/src/pcm/pcm_route.c +--- alsa-lib-1.0.18-0rig//src/pcm/pcm_route.c 2009-01-31 11:02:12.000000000 +0100 ++++ alsa-lib-1.0.18/src/pcm/pcm_route.c 2009-01-31 11:03:18.000000000 +0100 +@@ -26,6 +26,7 @@ + * + */ + ++ + #include + #include + #include "pcm_local.h" +@@ -106,6 +107,23 @@ + + #endif /* DOC_HIDDEN */ + ++ ++#if defined(AVR32_INLINE_BUG) ++int _snd_pcm_hw_params_set_format(snd_pcm_hw_params_t *params, ++ snd_pcm_format_t val) ++{ ++ return _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_FORMAT, ++ (unsigned long) val, 0); ++} ++ ++int _snd_pcm_hw_params_set_subformat(snd_pcm_hw_params_t *params, ++ snd_pcm_subformat_t val) ++{ ++ return _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_SUBFORMAT, ++ (unsigned long) val, 0); ++} ++#endif ++ + static void snd_pcm_route_convert1_zero(const snd_pcm_channel_area_t *dst_area, + snd_pcm_uframes_t dst_offset, + const snd_pcm_channel_area_t *src_areas ATTRIBUTE_UNUSED, +@@ -483,6 +501,8 @@ + snd_pcm_uframes_t frames, + snd_pcm_route_params_t *params) + { ++#if defined(AVR32_INLINE_BUG) ++#endif + unsigned int dst_channel; + snd_pcm_route_ttable_dst_t *dstp; + const snd_pcm_channel_area_t *dst_area; +@@ -551,8 +571,20 @@ + _snd_pcm_hw_param_set_mask(sparams, SND_PCM_HW_PARAM_ACCESS, + &saccess_mask); + if (route->sformat != SND_PCM_FORMAT_UNKNOWN) { ++#if defined(AVR32_INLINE_BUG) ++/* Start of of problem */ ++#endif + _snd_pcm_hw_params_set_format(sparams, route->sformat); + _snd_pcm_hw_params_set_subformat(sparams, SND_PCM_SUBFORMAT_STD); ++#if 0 ++ _snd_pcm_hw_param_set(sparams, SND_PCM_HW_PARAM_FORMAT, ++ (unsigned long) route->sformat, 0); ++ _snd_pcm_hw_param_set(sparams, SND_PCM_HW_PARAM_SUBFORMAT, ++ (unsigned long) SND_PCM_SUBFORMAT_STD, 0); ++#endif ++#if defined(AVR32_INLINE_BUG) ++/* End of problem */ ++#endif + } + if (route->schannels >= 0) { + _snd_pcm_hw_param_set(sparams, SND_PCM_HW_PARAM_CHANNELS, diff --git a/package/alsa-lib/alsa-lib-0002-no-mmu.patch b/package/alsa-lib/alsa-lib-0002-no-mmu.patch new file mode 100644 index 0000000000..317676af4c --- /dev/null +++ b/package/alsa-lib/alsa-lib-0002-no-mmu.patch @@ -0,0 +1,44 @@ +Don't use fork() on noMMU platforms + +Signed-off-by: Thomas Petazzoni + +Index: alsa-lib-1.0.26/configure.in +=================================================================== +--- alsa-lib-1.0.26.orig/configure.in 2012-09-06 10:55:14.000000000 +0200 ++++ alsa-lib-1.0.26/configure.in 2013-03-09 16:22:08.000000000 +0100 +@@ -66,6 +66,8 @@ + AM_CONDITIONAL(ALSA_HSEARCH_R, [test "x$HAVE_HSEARCH_R" != xyes]) + AC_CHECK_FUNCS([uselocale]) + ++AC_CHECK_FUNC([fork]) ++ + SAVE_LIBRARY_VERSION + AC_SUBST(LIBTOOL_VERSION_INFO) + +Index: alsa-lib-1.0.26/src/pcm/pcm_direct.c +=================================================================== +--- alsa-lib-1.0.26.orig/src/pcm/pcm_direct.c 2012-09-06 10:55:14.000000000 +0200 ++++ alsa-lib-1.0.26/src/pcm/pcm_direct.c 2013-03-09 16:22:51.000000000 +0100 +@@ -424,13 +424,21 @@ + close(dmix->server_fd); + return ret; + } +- ++ ++#ifdef HAVE_FORK + ret = fork(); ++#else ++ ret = vfork(); ++#endif + if (ret < 0) { + close(dmix->server_fd); + return ret; + } else if (ret == 0) { ++#ifdef HAVE_FORK + ret = fork(); ++#else ++ ret = vfork(); ++#endif + if (ret == 0) + server_job(dmix); + _exit(EXIT_SUCCESS); diff --git a/package/alsa-lib/alsa-lib-avr32-bad-inline.patch b/package/alsa-lib/alsa-lib-avr32-bad-inline.patch deleted file mode 100644 index 568ba40a4e..0000000000 --- a/package/alsa-lib/alsa-lib-avr32-bad-inline.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff -urN alsa-lib-1.0.18-0rig//src/pcm/pcm_local.h alsa-lib-1.0.18/src/pcm/pcm_local.h ---- alsa-lib-1.0.18-0rig//src/pcm/pcm_local.h 2009-01-31 11:02:12.000000000 +0100 -+++ alsa-lib-1.0.18/src/pcm/pcm_local.h 2009-01-31 11:03:24.000000000 +0100 -@@ -611,6 +611,13 @@ - snd_pcm_hw_param_t var); - int _snd_pcm_hw_param_set(snd_pcm_hw_params_t *params, - snd_pcm_hw_param_t var, unsigned int val, int dir); -+ -+#if defined(AVR32_INLINE_BUG) -+int _snd_pcm_hw_params_set_format(snd_pcm_hw_params_t *params, -+ snd_pcm_format_t val); -+int _snd_pcm_hw_params_set_subformat(snd_pcm_hw_params_t *params, -+ snd_pcm_subformat_t val); -+#else - static inline int _snd_pcm_hw_params_set_format(snd_pcm_hw_params_t *params, - snd_pcm_format_t val) - { -@@ -624,7 +631,7 @@ - return _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_SUBFORMAT, - (unsigned long) val, 0); - } -- -+#endif - int _snd_pcm_hw_param_set_min(snd_pcm_hw_params_t *params, - snd_pcm_hw_param_t var, unsigned int val, int dir); - int _snd_pcm_hw_param_set_max(snd_pcm_hw_params_t *params, -diff -urN alsa-lib-1.0.18-0rig//src/pcm/pcm_route.c alsa-lib-1.0.18/src/pcm/pcm_route.c ---- alsa-lib-1.0.18-0rig//src/pcm/pcm_route.c 2009-01-31 11:02:12.000000000 +0100 -+++ alsa-lib-1.0.18/src/pcm/pcm_route.c 2009-01-31 11:03:18.000000000 +0100 -@@ -26,6 +26,7 @@ - * - */ - -+ - #include - #include - #include "pcm_local.h" -@@ -106,6 +107,23 @@ - - #endif /* DOC_HIDDEN */ - -+ -+#if defined(AVR32_INLINE_BUG) -+int _snd_pcm_hw_params_set_format(snd_pcm_hw_params_t *params, -+ snd_pcm_format_t val) -+{ -+ return _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_FORMAT, -+ (unsigned long) val, 0); -+} -+ -+int _snd_pcm_hw_params_set_subformat(snd_pcm_hw_params_t *params, -+ snd_pcm_subformat_t val) -+{ -+ return _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_SUBFORMAT, -+ (unsigned long) val, 0); -+} -+#endif -+ - static void snd_pcm_route_convert1_zero(const snd_pcm_channel_area_t *dst_area, - snd_pcm_uframes_t dst_offset, - const snd_pcm_channel_area_t *src_areas ATTRIBUTE_UNUSED, -@@ -483,6 +501,8 @@ - snd_pcm_uframes_t frames, - snd_pcm_route_params_t *params) - { -+#if defined(AVR32_INLINE_BUG) -+#endif - unsigned int dst_channel; - snd_pcm_route_ttable_dst_t *dstp; - const snd_pcm_channel_area_t *dst_area; -@@ -551,8 +571,20 @@ - _snd_pcm_hw_param_set_mask(sparams, SND_PCM_HW_PARAM_ACCESS, - &saccess_mask); - if (route->sformat != SND_PCM_FORMAT_UNKNOWN) { -+#if defined(AVR32_INLINE_BUG) -+/* Start of of problem */ -+#endif - _snd_pcm_hw_params_set_format(sparams, route->sformat); - _snd_pcm_hw_params_set_subformat(sparams, SND_PCM_SUBFORMAT_STD); -+#if 0 -+ _snd_pcm_hw_param_set(sparams, SND_PCM_HW_PARAM_FORMAT, -+ (unsigned long) route->sformat, 0); -+ _snd_pcm_hw_param_set(sparams, SND_PCM_HW_PARAM_SUBFORMAT, -+ (unsigned long) SND_PCM_SUBFORMAT_STD, 0); -+#endif -+#if defined(AVR32_INLINE_BUG) -+/* End of problem */ -+#endif - } - if (route->schannels >= 0) { - _snd_pcm_hw_param_set(sparams, SND_PCM_HW_PARAM_CHANNELS, diff --git a/package/alsa-lib/alsa-lib-no-mmu.patch b/package/alsa-lib/alsa-lib-no-mmu.patch deleted file mode 100644 index 317676af4c..0000000000 --- a/package/alsa-lib/alsa-lib-no-mmu.patch +++ /dev/null @@ -1,44 +0,0 @@ -Don't use fork() on noMMU platforms - -Signed-off-by: Thomas Petazzoni - -Index: alsa-lib-1.0.26/configure.in -=================================================================== ---- alsa-lib-1.0.26.orig/configure.in 2012-09-06 10:55:14.000000000 +0200 -+++ alsa-lib-1.0.26/configure.in 2013-03-09 16:22:08.000000000 +0100 -@@ -66,6 +66,8 @@ - AM_CONDITIONAL(ALSA_HSEARCH_R, [test "x$HAVE_HSEARCH_R" != xyes]) - AC_CHECK_FUNCS([uselocale]) - -+AC_CHECK_FUNC([fork]) -+ - SAVE_LIBRARY_VERSION - AC_SUBST(LIBTOOL_VERSION_INFO) - -Index: alsa-lib-1.0.26/src/pcm/pcm_direct.c -=================================================================== ---- alsa-lib-1.0.26.orig/src/pcm/pcm_direct.c 2012-09-06 10:55:14.000000000 +0200 -+++ alsa-lib-1.0.26/src/pcm/pcm_direct.c 2013-03-09 16:22:51.000000000 +0100 -@@ -424,13 +424,21 @@ - close(dmix->server_fd); - return ret; - } -- -+ -+#ifdef HAVE_FORK - ret = fork(); -+#else -+ ret = vfork(); -+#endif - if (ret < 0) { - close(dmix->server_fd); - return ret; - } else if (ret == 0) { -+#ifdef HAVE_FORK - ret = fork(); -+#else -+ ret = vfork(); -+#endif - if (ret == 0) - server_job(dmix); - _exit(EXIT_SUCCESS);