mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/3] alsa-lib: provide a way to limit the PCM modules
@ 2019-11-04  8:56 Juergen Borleis
  2019-11-04  8:56 ` [ptxdist] [PATCH 2/3] alsa-libs: honor inter-package dependencies Juergen Borleis
  2019-11-04  8:56 ` [ptxdist] [PATCH 3/3] alsa-utils: replace dependencies added by accident by the real ones Juergen Borleis
  0 siblings, 2 replies; 3+ messages in thread
From: Juergen Borleis @ 2019-11-04  8:56 UTC (permalink / raw)
  To: ptxdist

On some platforms it makes sense to limit the available PCM modules to
the really required ones (application specific) or useful ones (hardware
specific). This change enables the user to select specific modules which
will be later on present in the run-time system.

To be backward compatible, the default keyword 'all' will still build all
available PCM modules. The list of available PCM modules is part of the
package's 'configure' help text.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 rules/alsa-lib.in   | 13 +++++++++++++
 rules/alsa-lib.make |  8 ++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/rules/alsa-lib.in b/rules/alsa-lib.in
index adba896ac..edc40e186 100644
--- a/rules/alsa-lib.in
+++ b/rules/alsa-lib.in
@@ -47,6 +47,19 @@ config ALSA_LIB_PCM
 	help
 	  Disable the PCM component if you do not need it
 
+config ALSA_LIB_PCM_MODULES
+	depends on ALSA_LIB_PCM
+	string
+	prompt "pcm modules"
+	default "all"
+	help
+	  You can use the keyword 'all' here for all supported PCM modules or a
+	  comma separated list of required module keywords. The list of module
+	  keywords is:
+	    copy linear route mulaw alaw adpcm rate plug multi shm file null
+	    empty share meter hooks lfloat ladspa dmix dshare dsnoop asym
+	    iec958 softvol extplug ioplug mmap_emul
+
 config ALSA_LIB_RAWMIDI
 	bool
 	default y
diff --git a/rules/alsa-lib.make b/rules/alsa-lib.make
index 3dac61ea5..227a4156e 100644
--- a/rules/alsa-lib.make
+++ b/rules/alsa-lib.make
@@ -62,8 +62,12 @@ ALSA_LIB_CONF_OPT	:= \
 	--with-pthread \
 	--with-librt \
 	--with-alsa-devdir=/dev/snd \
-	--with-aload-devdir=/dev \
-	--with-pcm-plugins=all
+	--with-aload-devdir=/dev
+
+ifdef PTXCONF_ALSA_LIB_PCM
+ALSA_LIB_CONF_OPT += \
+	--with-pcm-plugins=$(PTXCONF_ALSA_LIB_PCM_MODULES)
+endif
 
 # ----------------------------------------------------------------------------
 # Target-Install
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ptxdist] [PATCH 2/3] alsa-libs: honor inter-package dependencies
  2019-11-04  8:56 [ptxdist] [PATCH 1/3] alsa-lib: provide a way to limit the PCM modules Juergen Borleis
@ 2019-11-04  8:56 ` Juergen Borleis
  2019-11-04  8:56 ` [ptxdist] [PATCH 3/3] alsa-utils: replace dependencies added by accident by the real ones Juergen Borleis
  1 sibling, 0 replies; 3+ messages in thread
From: Juergen Borleis @ 2019-11-04  8:56 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 rules/alsa-lib.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rules/alsa-lib.in b/rules/alsa-lib.in
index edc40e186..ae859fee3 100644
--- a/rules/alsa-lib.in
+++ b/rules/alsa-lib.in
@@ -35,6 +35,7 @@ config ALSA_LIB_READ
 
 config ALSA_LIB_MIXER
 	bool
+	select ALSA_LIB_PCM
 	default y
 	prompt "mixer"
 	help
@@ -76,6 +77,7 @@ config ALSA_LIB_HWDEP
 
 config ALSA_LIB_SEQ
 	bool
+	select ALSA_LIB_PCM
 	default y
 	prompt "sequencer"
 	help
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ptxdist] [PATCH 3/3] alsa-utils: replace dependencies added by accident by the real ones
  2019-11-04  8:56 [ptxdist] [PATCH 1/3] alsa-lib: provide a way to limit the PCM modules Juergen Borleis
  2019-11-04  8:56 ` [ptxdist] [PATCH 2/3] alsa-libs: honor inter-package dependencies Juergen Borleis
@ 2019-11-04  8:56 ` Juergen Borleis
  1 sibling, 0 replies; 3+ messages in thread
From: Juergen Borleis @ 2019-11-04  8:56 UTC (permalink / raw)
  To: ptxdist

These old dependencies do not really exist. It seems so, if one does tests
with libalsa and does not remove the header files from the previous try.
Then the header detection in alsa-utils reports false positives and tries
to build files, where no backend support is available in the current
libalsa.
On the other hand, if one enables an alsa-utils tool and the alsa-lib
headers are missing, the tool gets disabled again silently. It only works,
if all dependencies are correct (like always...).

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 rules/alsa-utils.in   | 66 ++++++++++++++++++++++++++++++++++++++++++++-------
 rules/alsa-utils.make | 21 +++++++++++++---
 2 files changed, 76 insertions(+), 11 deletions(-)

diff --git a/rules/alsa-utils.in b/rules/alsa-utils.in
index b6529d75d..0615e73f6 100644
--- a/rules/alsa-utils.in
+++ b/rules/alsa-utils.in
@@ -4,15 +4,17 @@ menuconfig ALSA_UTILS
 	tristate
 	prompt "alsa utils                    "
 	select ALSA_LIB
-# all tools from this package rely on special parts in the library:
-	select ALSA_LIB_MIXER
-	select ALSA_LIB_PCM
-	select ALSA_LIB_RAWMIDI
-	select ALSA_LIB_SEQ
-	select ALSA_LIB_UCM
+	select ALSA_LIB_UCM	if ALSA_UTILS_USE_CASE_MANAGER
+	select ALSA_LIB_RAWMIDI if ALSA_UTILS_RAW_MIDI
+	select ALSA_LIB_MIXER	if ALSA_UTILS_AMIXER || ALSA_UTILS_ALSAMIXER
+	select ALSA_LIB_PCM	if ALSA_UTILS_APLAYRECORD || ALSA_UTILS_IECSET || ALSA_UTILS_MIDI || ALSA_UTILS_ALSALOOP
+	select ALSA_LIB_SEQ	if ALSA_UTILS_SEQTOOLS || ALSA_UTILS_ACONNECT || ALSA_UTILS_MIDI
+	select LIBC_M		if ALSA_UTILS_ALSALOOP
 	select LIBC_PTHREAD
 	select NCURSES		if ALSA_UTILS_ALSAMIXER
 	select SYSTEMD		if ALSA_UTILS_SYSTEMD_UNIT
+	# to detect where to install its udev rules
+	select UDEV
 	help
 	  Some utils to handle the Advanced Linux Sound Architecture.
 	  With these utils you can control your sound device, for
@@ -44,7 +46,7 @@ config ALSA_UTILS_ALSAMIXER
 	select NCURSES_MENU
 	select NCURSES_PANEL
 	help
-	  Build the alsamixer tool.
+	  Build the console and ncurses based 'alsamixer' tool.
 
 config ALSA_UTILS_ALSALOOP
 	bool
@@ -53,5 +55,53 @@ config ALSA_UTILS_ALSALOOP
 	  alsaloop allows create a PCM loopback between a PCM capture
 	  device and a PCM playback device.
 
-endif
+config ALSA_UTILS_USE_CASE_MANAGER
+	bool
+	prompt "alsaucm"
+	help
+	  Command-line tool to use the 'ALSA Use Case Interface'.
 
+config ALSA_UTILS_RAW_MIDI
+	bool
+	prompt "amidi"
+	help
+	   Command-line tool to read from and write to ALSA RawMIDI ports.
+
+config ALSA_UTILS_MIDI
+	bool
+	prompt "aplaymidi/arecordmidi"
+	help
+	   FIXME
+
+config ALSA_UTILS_AMIXER
+	bool
+	prompt "amixer"
+	help
+	   Command-line mixer for ALSA soundcard driver.
+
+config ALSA_UTILS_APLAYRECORD
+	bool
+	prompt "aplay/arecord"
+	help
+	   Command-line player and recorder for ALSA soundcard driver.
+
+config ALSA_UTILS_IECSET
+	bool
+	prompt "iecset"
+	help
+	   Command-line tool to set or dump IEC958 status bits
+
+config ALSA_UTILS_SEQTOOLS
+	bool
+	prompt "aseqdump/aseqnet"
+	help
+	  Installs 'aseqdump' to show events received at an ALSA sequencer port
+	  and 'aseqnet' to connect an ALSA sequencer connector over network.
+
+config ALSA_UTILS_ACONNECT
+	bool
+	prompt "aconnect"
+	help
+	  ALSA sequencer connection manager
+
+endif
diff --git a/rules/alsa-utils.make b/rules/alsa-utils.make
index 2031f75f8..77151b137 100644
--- a/rules/alsa-utils.make
+++ b/rules/alsa-utils.make
@@ -63,19 +63,34 @@ $(STATEDIR)/alsa-utils.targetinstall:
 	@$(call install_fixup, alsa-utils, DESCRIPTION, missing)
 
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/sbin/alsactl)
+ifdef PTXCONF_ALSA_UTILS_RAW_MIDI
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/amidi)
+endif
+ifdef PTXCONF_ALSA_UTILS_AMIXER
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/amixer)
+endif
+ifdef PTXCONF_ALSA_UTILS_APLAYRECORD
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/aplay)
-#	# link arecord aplay
+#	# same utility for recording - only a link is required
 	@$(call install_link, alsa-utils, aplay, /usr/bin/arecord)
-
+endif
+ifdef PTXCONF_ALSA_UTILS_IECSET
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/iecset)
+endif
+ifdef PTXCONF_ALSA_UTILS_ACONNECT
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/aconnect)
+endif
+ifdef PTXCONF_ALSA_UTILS_MIDI
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/aplaymidi)
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/arecordmidi)
+endif
+ifdef PTXCONF_ALSA_UTILS_SEQTOOLS
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/aseqdump)
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/aseqnet)
-
+endif
+ifdef PTXCONF_ALSA_UTILS_USE_CASE_MANAGER
+	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/alsaucm)
+endif
 ifdef PTXCONF_ALSA_UTILS_ALSAMIXER
 	@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/alsamixer)
 endif
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-04  8:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04  8:56 [ptxdist] [PATCH 1/3] alsa-lib: provide a way to limit the PCM modules Juergen Borleis
2019-11-04  8:56 ` [ptxdist] [PATCH 2/3] alsa-libs: honor inter-package dependencies Juergen Borleis
2019-11-04  8:56 ` [ptxdist] [PATCH 3/3] alsa-utils: replace dependencies added by accident by the real ones Juergen Borleis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox