From 5d6f32878f707f4c28fe09d02e960d851c76e3c3 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Mon, 30 Apr 2012 03:48:16 +0000 Subject: package/multimedia: move audio libraries out Move audio libraries out of the Audio and Video category into the Libraries/Audio one. Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/alsa-lib/Config.in | 73 +++++++++++++++++++ package/alsa-lib/alsa-lib-avr32-bad-inline.patch | 91 ++++++++++++++++++++++++ package/alsa-lib/alsa-lib.mk | 86 ++++++++++++++++++++++ 3 files changed, 250 insertions(+) create mode 100644 package/alsa-lib/Config.in create mode 100644 package/alsa-lib/alsa-lib-avr32-bad-inline.patch create mode 100644 package/alsa-lib/alsa-lib.mk (limited to 'package/alsa-lib') diff --git a/package/alsa-lib/Config.in b/package/alsa-lib/Config.in new file mode 100644 index 000000000..98b83139d --- /dev/null +++ b/package/alsa-lib/Config.in @@ -0,0 +1,73 @@ +config BR2_PACKAGE_ALSA_LIB + bool "alsa-lib" + # Temporary until + # https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4913 + # is fixed + select BR2_PACKAGE_ALSA_LIB_PCM + help + The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI + functionality to the Linux operating system. + + http://www.alsa-project.org/ + +config BR2_PACKAGE_ALSA_LIB_PYTHON + bool "Python support for alsa-lib" + depends on BR2_PACKAGE_ALSA_LIB + depends on BR2_PACKAGE_PYTHON + help + Add python support for alsa-lib. + Python will be built and libpython will be installed + in the target directory + http://www.alsa-project.org/ + +if BR2_PACKAGE_ALSA_LIB +menu "ALSA lib selection" + +config BR2_PACKAGE_ALSA_LIB_DEVDIR + string "directory with ALSA device files" + default "/dev/snd" + +config BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS + string "built PCM plugins" + default "all" + +config BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS + string "built control plugins" + default "all" + +config BR2_PACKAGE_ALSA_LIB_ALOAD + bool "aload" + default y + +config BR2_PACKAGE_ALSA_LIB_MIXER + bool "mixer" + default y + +config BR2_PACKAGE_ALSA_LIB_PCM + bool "pcm" + default y + +config BR2_PACKAGE_ALSA_LIB_RAWMIDI + bool "rawmidi" + default y + +config BR2_PACKAGE_ALSA_LIB_HWDEP + bool "hwdep" + default y + +config BR2_PACKAGE_ALSA_LIB_SEQ + bool "seq" + default y + +config BR2_PACKAGE_ALSA_LIB_ALISP + bool "alisp" + default y + +config BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS + bool "old-symbols" + default y + +endmenu + +endif + diff --git a/package/alsa-lib/alsa-lib-avr32-bad-inline.patch b/package/alsa-lib/alsa-lib-avr32-bad-inline.patch new file mode 100644 index 000000000..568ba40a4 --- /dev/null +++ b/package/alsa-lib/alsa-lib-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.mk b/package/alsa-lib/alsa-lib.mk new file mode 100644 index 000000000..2d27c960c --- /dev/null +++ b/package/alsa-lib/alsa-lib.mk @@ -0,0 +1,86 @@ +############################################################# +# +# alsa-lib +# +############################################################# + +ALSA_LIB_VERSION = 1.0.25 +ALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2 +ALSA_LIB_SITE = ftp://ftp.alsa-project.org/pub/lib +ALSA_LIB_INSTALL_STAGING = YES +ALSA_LIB_CFLAGS=$(TARGET_CFLAGS) +ALSA_LIB_CONF_OPT = --with-alsa-devdir=$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_DEVDIR)) \ + --with-pcm-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS))" \ + --with-ctl-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS))" \ + --without-versioned + +# Can't build with static & shared at the same time (1.0.25+) +ifeq ($(BR2_PREFER_STATIC),y) +ALSA_LIB_CONF_OPT += --enable-shared=no +else +ALSA_LIB_CONF_OPT += --enable-static=no +endif + +ifneq ($(BR2_PACKAGE_ALSA_LIB_ALOAD),y) +ALSA_LIB_CONF_OPT += --disable-aload +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_MIXER),y) +ALSA_LIB_CONF_OPT += --disable-mixer +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM),y) +ALSA_LIB_CONF_OPT += --disable-pcm +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_RAWMIDI),y) +ALSA_LIB_CONF_OPT += --disable-rawmidi +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_HWDEP),y) +ALSA_LIB_CONF_OPT += --disable-hwdep +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_SEQ),y) +ALSA_LIB_CONF_OPT += --disable-seq +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_ALISP),y) +ALSA_LIB_CONF_OPT += --disable-alisp +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS),y) +ALSA_LIB_CONF_OPT += --disable-old-symbols +endif + +ifeq ($(BR2_ENABLE_DEBUG),y) +ALSA_LIB_CONF_OPT += --enable-debug +endif + +ifeq ($(BR2_avr32),y) +ALSA_LIB_CFLAGS+=-DAVR32_INLINE_BUG +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB_PYTHON),y) +ALSA_LIB_CONF_OPT += \ + --with-pythonlibs=-lpython$(PYTHON_VERSION_MAJOR) \ + --with-pythonincludes=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) +ALSA_LIB_CFLAGS+=-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) +ALSA_LIB_DEPENDENCIES = python +else +ALSA_LIB_CONF_OPT += --disable-python +endif + +ifeq ($(BR2_SOFT_FLOAT),y) +ALSA_LIB_CONF_OPT += --with-softfloat +endif + +ALSA_LIB_CONF_ENV = CFLAGS="$(ALSA_LIB_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lm" + +define ALSA_LIB_UNINSTALL_TARGET_CMDS + -rm -f $(TARGET_DIR)/usr/lib/libasound.so* + -rm -rf $(TARGET_DIR)/usr/lib/alsa-lib + -rm -rf $(TARGET_DIR)/usr/share/alsa +endef + +define ALSA_LIB_UNINSTALL_STAGING_CMDS + -rm -f $(STAGING_DIR)/usr/lib/libasound.* + -rm -rf $(STAGING_DIR)/usr/lib/alsa-lib + -rm -rf $(STAGING_DIR)/usr/share/alsa +endef + +$(eval $(call AUTOTARGETS)) -- cgit v1.2.3