* [Buildroot] [PATCH] tinyalsa: new package
@ 2014-10-05 17:51 Maxime Hadjinlian
2014-10-06 19:15 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Maxime Hadjinlian @ 2014-10-05 17:51 UTC (permalink / raw)
To: buildroot
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
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))
--
2.1.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] tinyalsa: new package
2014-10-05 17:51 [Buildroot] [PATCH] tinyalsa: new package Maxime Hadjinlian
@ 2014-10-06 19:15 ` Thomas Petazzoni
2014-10-18 0:42 ` Maarten ter Huurne
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-06 19:15 UTC (permalink / raw)
To: buildroot
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] tinyalsa: new package
2014-10-06 19:15 ` Thomas Petazzoni
@ 2014-10-18 0:42 ` Maarten ter Huurne
2014-10-18 13:01 ` Maxime Hadjinlian
2014-10-18 13:02 ` Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: Maarten ter Huurne @ 2014-10-18 0:42 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] tinyalsa: new package
2014-10-18 0:42 ` Maarten ter Huurne
@ 2014-10-18 13:01 ` Maxime Hadjinlian
2014-10-18 13:02 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Maxime Hadjinlian @ 2014-10-18 13:01 UTC (permalink / raw)
To: buildroot
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] tinyalsa: new package
2014-10-18 0:42 ` Maarten ter Huurne
2014-10-18 13:01 ` Maxime Hadjinlian
@ 2014-10-18 13:02 ` Thomas Petazzoni
2014-10-18 13:19 ` Maxime Hadjinlian
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-18 13:02 UTC (permalink / raw)
To: buildroot
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] tinyalsa: new package
2014-10-18 13:02 ` Thomas Petazzoni
@ 2014-10-18 13:19 ` Maxime Hadjinlian
0 siblings, 0 replies; 6+ messages in thread
From: Maxime Hadjinlian @ 2014-10-18 13:19 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-18 13:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-05 17:51 [Buildroot] [PATCH] tinyalsa: new package Maxime Hadjinlian
2014-10-06 19:15 ` Thomas Petazzoni
2014-10-18 0:42 ` Maarten ter Huurne
2014-10-18 13:01 ` Maxime Hadjinlian
2014-10-18 13:02 ` Thomas Petazzoni
2014-10-18 13:19 ` Maxime Hadjinlian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox