Skip to content

Commit

Permalink
ALSA: seq: Reorganize kconfig and build
Browse files Browse the repository at this point in the history
This is a slightly intensive rewrite of Kconfig and Makefile about
ALSA sequencer stuff.

The first major change is that the kconfig items for the sequencer are
moved to sound/core/seq/Kconfig.  OK, that's easy.

The substantial change is that, instead of hackish top-level module
selection in Makefile, we define a Kconfig item for each sequencer
module.  The driver that requires such sequencer components select
exclusively the kconfig items.  This is more straightforward and
standard way.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jun 9, 2017
1 parent 3d774d5 commit 0181307
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 67 deletions.
47 changes: 0 additions & 47 deletions sound/core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,6 @@ config SND_JACK_INPUT_DEV
depends on SND_JACK
default y if INPUT=y || INPUT=SND

config SND_SEQUENCER
tristate "Sequencer support"
select SND_TIMER
help
Say Y or M to enable MIDI sequencer and router support. This
feature allows routing and enqueueing of MIDI events. Events
can be processed at a given time.

Many programs require this feature, so you should enable it
unless you know what you're doing.

config SND_SEQ_DUMMY
tristate "Sequencer dummy client"
depends on SND_SEQUENCER
help
Say Y here to enable the dummy sequencer client. This client
is a simple MIDI-through client: all normal input events are
redirected to the output port immediately.

You don't need this unless you want to connect many MIDI
devices or applications together.

To compile this driver as a module, choose M here: the module
will be called snd-seq-dummy.

config SND_OSSEMUL
bool "Enable OSS Emulation"
select SOUND_OSS_CORE
Expand Down Expand Up @@ -109,20 +84,6 @@ config SND_PCM_TIMER
For some embedded devices, we may disable it to reduce memory
footprint, about 20KB on x86_64 platform.

config SND_SEQUENCER_OSS
tristate "OSS Sequencer API"
depends on SND_SEQUENCER
depends on SND_OSSEMUL
help
Say Y here to enable OSS sequencer emulation (both
/dev/sequencer and /dev/music interfaces).

Many programs still use the OSS API, so say Y.

If you choose M in "Sequencer support" (SND_SEQUENCER),
this will be compiled as a module. The module will be called
snd-seq-oss.

config SND_HRTIMER
tristate "HR-timer backend support"
depends on HIGH_RES_TIMERS
Expand All @@ -135,14 +96,6 @@ config SND_HRTIMER
To compile this driver as a module, choose M here: the module
will be called snd-hrtimer.

config SND_SEQ_HRTIMER_DEFAULT
bool "Use HR-timer as default sequencer timer"
depends on SND_HRTIMER && SND_SEQUENCER
default y
help
Say Y here to use the HR-timer backend as the default sequencer
timer.

config SND_DYNAMIC_MINORS
bool "Dynamic device file minor numbers"
help
Expand Down
68 changes: 57 additions & 11 deletions sound/core/seq/Kconfig
Original file line number Diff line number Diff line change
@@ -1,16 +1,62 @@
# define SND_XXX_SEQ to min(SND_SEQUENCER,SND_XXX)
config SND_SEQUENCER
tristate "Sequencer support"
select SND_TIMER
help
Say Y or M to enable MIDI sequencer and router support. This
feature allows routing and enqueueing of MIDI events. Events
can be processed at a given time.

config SND_RAWMIDI_SEQ
def_tristate SND_SEQUENCER && SND_RAWMIDI
Many programs require this feature, so you should enable it
unless you know what you're doing.

config SND_OPL3_LIB_SEQ
def_tristate SND_SEQUENCER && SND_OPL3_LIB
if SND_SEQUENCER

config SND_OPL4_LIB_SEQ
def_tristate SND_SEQUENCER && SND_OPL4_LIB
config SND_SEQ_DUMMY
tristate "Sequencer dummy client"
help
Say Y here to enable the dummy sequencer client. This client
is a simple MIDI-through client: all normal input events are
redirected to the output port immediately.

config SND_SBAWE_SEQ
def_tristate SND_SEQUENCER && SND_SBAWE
You don't need this unless you want to connect many MIDI
devices or applications together.

To compile this driver as a module, choose M here: the module
will be called snd-seq-dummy.

config SND_SEQUENCER_OSS
tristate "OSS Sequencer API"
depends on SND_OSSEMUL
select SND_SEQ_MIDI_EVENT
help
Say Y here to enable OSS sequencer emulation (both
/dev/sequencer and /dev/music interfaces).

Many programs still use the OSS API, so say Y.

To compile this driver as a module, choose M here: the module
will be called snd-seq-oss.

config SND_SEQ_HRTIMER_DEFAULT
bool "Use HR-timer as default sequencer timer"
depends on SND_HRTIMER
default y
help
Say Y here to use the HR-timer backend as the default sequencer
timer.

config SND_SEQ_MIDI_EVENT
def_tristate SND_RAWMIDI

config SND_SEQ_MIDI
tristate
select SND_SEQ_MIDI_EVENT

config SND_SEQ_MIDI_EMUL
tristate

config SND_SEQ_VIRMIDI
tristate

endif # SND_SEQUENCER

config SND_EMU10K1_SEQ
def_tristate SND_SEQUENCER && SND_EMU10K1
13 changes: 4 additions & 9 deletions sound/core/seq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@ snd-seq-dummy-objs := seq_dummy.o
snd-seq-virmidi-objs := seq_virmidi.o

obj-$(CONFIG_SND_SEQUENCER) += snd-seq.o snd-seq-device.o
obj-$(CONFIG_SND_SEQUENCER_OSS) += snd-seq-midi-event.o
obj-$(CONFIG_SND_SEQUENCER_OSS) += oss/

obj-$(CONFIG_SND_SEQ_DUMMY) += snd-seq-dummy.o

# Toplevel Module Dependency
obj-$(CONFIG_SND_VIRMIDI) += snd-seq-virmidi.o snd-seq-midi-event.o
obj-$(CONFIG_SND_RAWMIDI_SEQ) += snd-seq-midi.o snd-seq-midi-event.o
obj-$(CONFIG_SND_OPL3_LIB_SEQ) += snd-seq-midi-event.o snd-seq-midi-emul.o
obj-$(CONFIG_SND_OPL4_LIB_SEQ) += snd-seq-midi-event.o snd-seq-midi-emul.o
obj-$(CONFIG_SND_SBAWE_SEQ) += snd-seq-midi-emul.o snd-seq-virmidi.o
obj-$(CONFIG_SND_EMU10K1_SEQ) += snd-seq-midi-emul.o snd-seq-virmidi.o
obj-$(CONFIG_SND_SEQ_MIDI) += snd-seq-midi.o
obj-$(CONFIG_SND_SEQ_MIDI_EMUL) += snd-seq-midi-emul.o
obj-$(CONFIG_SND_SEQ_MIDI_EVENT) += snd-seq-midi-event.o
obj-$(CONFIG_SND_SEQ_VIRMIDI) += snd-seq-virmidi.o
13 changes: 13 additions & 0 deletions sound/drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ config SND_OPL4_LIB
select SND_TIMER
select SND_HWDEP

# select SEQ stuff to min(SND_SEQUENCER,SND_XXX)
config SND_OPL3_LIB_SEQ
def_tristate SND_SEQUENCER && SND_OPL3_LIB
select SND_SEQ_MIDI_EMUL
select SND_SEQ_MIDI_EVENT

config SND_OPL4_LIB_SEQ
def_tristate SND_SEQUENCER && SND_OPL4_LIB
select SND_SEQ_MIDI_EMUL
select SND_SEQ_MIDI_EVENT

config SND_VX_LIB
tristate
select FW_LOADER
Expand Down Expand Up @@ -99,6 +110,8 @@ config SND_VIRMIDI
depends on SND_SEQUENCER
select SND_TIMER
select SND_RAWMIDI
select SND_SEQ_VIRMIDI
select SND_SEQ_MIDI_EVENT
help
Say Y here to include the virtual MIDI driver. This driver
allows to connect applications using raw MIDI devices to
Expand Down
6 changes: 6 additions & 0 deletions sound/isa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ config SND_SBAWE
To compile this driver as a module, choose M here: the module
will be called snd-sbawe.

# select SEQ stuff to min(SND_SEQUENCER,SND_XXX)
config SND_SBAWE_SEQ
def_tristate SND_SEQUENCER && SND_SBAWE
select SND_SEQ_MIDI_EMUL
select SND_SEQ_VIRMIDI

config SND_SB16_CSP
bool "Sound Blaster 16/AWE CSP support"
depends on (SND_SB16 || SND_SBAWE) && (BROKEN || !PPC)
Expand Down
6 changes: 6 additions & 0 deletions sound/pci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,12 @@ config SND_EMU10K1
To compile this driver as a module, choose M here: the module
will be called snd-emu10k1.

# select SEQ stuff to min(SND_SEQUENCER,SND_XXX)
config SND_EMU10K1_SEQ
def_tristate SND_SEQUENCER && SND_EMU10K1
select SND_SEQ_MIDI_EMUL
select SND_SEQ_VIRMIDI

config SND_EMU10K1X
tristate "Emu10k1X (Dell OEM Version)"
select SND_AC97_CODEC
Expand Down

0 comments on commit 0181307

Please sign in to comment.