Message ID | 1412531488-8849-1-git-send-email-maxime.hadjinlian@gmail.com |
---|---|
State | Accepted |
Headers | show |
Dear Maxime Hadjinlian, On Sun, 5 Oct 2014 19:51:28 +0200, Maxime Hadjinlian wrote: > Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> > --- > package/Config.in | 1 + > package/tinyalsa/Config.in | 14 ++++++++++++++ > package/tinyalsa/tinyalsa.mk | 34 ++++++++++++++++++++++++++++++++++ > 3 files changed, 49 insertions(+) > create mode 100644 package/tinyalsa/Config.in > create mode 100644 package/tinyalsa/tinyalsa.mk Thanks, applied, after doing a few changes: [Thomas: - remove 'default n', since it's the default - add dependency on !BR2_PREFER_STATIC_LIB since the Makefile always builds a shared library. - move from Audio/video applications to Libraries -> Audio.] Best regards, Thomas
Hi Maxime and Thomas, > +++ b/package/tinyalsa/tinyalsa.mk > [snip] > + $(INSTALL) -D -m 0644 $(@D)/include/sound/asound.h \ > + $(STAGING_DIR)/usr/include/sound/asound.h This will overwrite the pre-existing (from libc or kernel headers) version of <sound/asound.h> with the Android-style stripped version from tinyalsa. I think it would be better to keep the pre-existing version of this header, do you agree? Bye, Maarten
Hi Maarten, all On Sat, Oct 18, 2014 at 2:42 AM, Maarten ter Huurne <maarten@treewalker.org> wrote: > Hi Maxime and Thomas, > >> +++ b/package/tinyalsa/tinyalsa.mk >> [snip] >> + $(INSTALL) -D -m 0644 $(@D)/include/sound/asound.h \ >> + $(STAGING_DIR)/usr/include/sound/asound.h > > This will overwrite the pre-existing (from libc or kernel headers) version > of <sound/asound.h> with the Android-style stripped version from tinyalsa. > I think it would be better to keep the pre-existing version of this header, > do you agree? IMHO, it's the benefit of using tinyalsa, is not in the tools it provides, but mainly because of these stripped library and headers that you want to use in your applications. Otherwise, you don't really need the tinyalsa package at all. > > Bye, > Maarten >
Dear Maarten ter Huurne, On Sat, 18 Oct 2014 02:42:45 +0200, Maarten ter Huurne wrote: > > +++ b/package/tinyalsa/tinyalsa.mk > > [snip] > > + $(INSTALL) -D -m 0644 $(@D)/include/sound/asound.h \ > > + $(STAGING_DIR)/usr/include/sound/asound.h > > This will overwrite the pre-existing (from libc or kernel headers) version > of <sound/asound.h> with the Android-style stripped version from tinyalsa. > I think it would be better to keep the pre-existing version of this header, > do you agree? Yes, overwriting this header file indeed looks brutal. Is the original asound.h a superset of the tinyalsa asound.h ? If that's the case, then we can simply keep the original asound.h and that's it. Thomas
On Sat, Oct 18, 2014 at 3:02 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Dear Maarten ter Huurne, > > On Sat, 18 Oct 2014 02:42:45 +0200, Maarten ter Huurne wrote: > >> > +++ b/package/tinyalsa/tinyalsa.mk >> > [snip] >> > + $(INSTALL) -D -m 0644 $(@D)/include/sound/asound.h \ >> > + $(STAGING_DIR)/usr/include/sound/asound.h >> >> This will overwrite the pre-existing (from libc or kernel headers) version >> of <sound/asound.h> with the Android-style stripped version from tinyalsa. >> I think it would be better to keep the pre-existing version of this header, >> do you agree? > > Yes, overwriting this header file indeed looks brutal. Is the original > asound.h a superset of the tinyalsa asound.h ? If that's the case, then > we can simply keep the original asound.h and that's it. Indeed, I originally though they were different headers, after doing a diff between the two, the one of tinyalsa is simply a subset. I'll submit a patch to remove the install. > > Thomas > -- > Thomas Petazzoni, CTO, Free Electrons > Embedded Linux, Kernel and Android engineering > http://free-electrons.com
diff --git a/package/Config.in b/package/Config.in index c4ea688..e19e6ec 100644 --- a/package/Config.in +++ b/package/Config.in @@ -27,6 +27,7 @@ menu "Audio and video applications" source "package/pulseaudio/Config.in" source "package/sox/Config.in" source "package/tidsp-binaries/Config.in" + source "package/tinyalsa/Config.in" source "package/tstools/Config.in" source "package/twolame/Config.in" source "package/upmpdcli/Config.in" diff --git a/package/tinyalsa/Config.in b/package/tinyalsa/Config.in new file mode 100644 index 0000000..0295c51 --- /dev/null +++ b/package/tinyalsa/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_TINYALSA + bool "tinyalsa" + default n + help + a small library to interface with ALSA in the Linux kernel + + The aims are: + + - Provide a basic pcm and mixer API + - If it's not absolutely needed, don't add it to the API + - Avoid supporting complex and unnecessary operations that could be dealt + with at a higher level + + https://github.com/tinyalsa/tinyalsa diff --git a/package/tinyalsa/tinyalsa.mk b/package/tinyalsa/tinyalsa.mk new file mode 100644 index 0000000..b287e78 --- /dev/null +++ b/package/tinyalsa/tinyalsa.mk @@ -0,0 +1,34 @@ +############################################################# +# +# tinyalsa +# +############################################################# + +TINYALSA_VERSION = f2a7b6d3d81bd337a540d56704b4aaa7bdb046fe +TINYALSA_SITE = $(call github,tinyalsa,tinyalsa,$(TINYALSA_VERSION)) +TINYALSA_LICENSE = BSD-3c +TINYALSA_INSTALL_STAGING = YES + +define TINYALSA_BUILD_CMDS + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) +endef + +define TINYALSA_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/libtinyalsa.so \ + $(STAGING_DIR)/usr/lib/libtinyalsa.so + $(INSTALL) -D -m 0644 $(@D)/include/sound/asound.h \ + $(STAGING_DIR)/usr/include/sound/asound.h + $(INSTALL) -D -m 0644 $(@D)/include/tinyalsa/asoundlib.h \ + $(STAGING_DIR)/usr/include/tinyalsa/asoundlib.h +endef + +define TINYALSA_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/libtinyalsa.so \ + $(TARGET_DIR)/usr/lib/libtinyalsa.so + $(INSTALL) -D -m 0755 $(@D)/tinyplay $(TARGET_DIR)/usr/bin/tinyplay + $(INSTALL) -D -m 0755 $(@D)/tinycap $(TARGET_DIR)/usr/bin/tinycap + $(INSTALL) -D -m 0755 $(@D)/tinymix $(TARGET_DIR)/usr/bin/tinymix + $(INSTALL) -D -m 0755 $(@D)/tinypcminfo $(TARGET_DIR)/usr/bin/tinypcminfo +endef + +$(eval $(generic-package))
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> --- package/Config.in | 1 + package/tinyalsa/Config.in | 14 ++++++++++++++ package/tinyalsa/tinyalsa.mk | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 package/tinyalsa/Config.in create mode 100644 package/tinyalsa/tinyalsa.mk