All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Andrei Boros <andrei@srr.ro>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: sequencer module problems
Date: Wed, 19 Mar 2003 12:29:59 +0100	[thread overview]
Message-ID: <s5h7kavtwzs.wl@alsa2.suse.de> (raw)
In-Reply-To: <3E784A3C.133F177B@srr.ro>

At Wed, 19 Mar 2003 12:45:16 +0200,
Andrei Boros wrote:
> 
> First of all, my make is 3.77 and lacks support for the  $(if
> CONDITION,THEN-PART[,ELSE-PART])
> function. So I tried to replace it by some sort of equivalent selected
> by existing conditionals. 
> 
> As make does not support the syntax below, it ignore it. 
> 
> in alsa-driver/alsa-kernel/core/seq:
> #
> # this function returns:
> #   "m" - CONFIG_SND_SEQUENCER is m
> #   <empty string> - CONFIG_SND_SEQUENCER is undefined
> #   otherwise parameter #1 value
> #
> 
> sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if
> $(CONFIG_SND_SEQUENCER),$(1)))
> 
> 
> After reading some docs, I understand the following:
> CONFIG_SND_SEQUENCER=m (actually set to anything but "y") -> if $(1) is
> defined -> sequencer=m
> CONFIG_SND_SEQUENCER=y -> sequencer=$(1), since the subsequent test will
> always see it defined.
> CONFIG_SND_SEQUENCER undefined -> sequencer = 
> 
> 
> I checked the configure script and CONFIG_SND_SEQUENCER is set to "m" if
> --with-sequencer=yes or is left undefined otherwise. So any other value
> for CONFIG_SND_SEQUENCER is not possible. 
> 
> I checked that Makefile again and I see that all calls to the function
> sequencer add $(RAWMIDI_OBJS), only some add $(OPL3_OBJS) and some add
> individual modules. 
> 
> Then I believe the following could be done:
> 
> -obj-$(CONFIG_SND_SEQUENCER) += snd-seq.o snd-seq-device.o
> +obj-$(CONFIG_SND_SEQUENCER) += snd-seq.o snd-seq-device.o
> $(RAWMIDI_OBJS)
> 
> Then, 
> 
> # Toplevel Module Dependency
> obj-$(CONFIG_SND_VIRMIDI) += snd-seq-virmidi.o snd-seq-midi-event.o
> ifeq ($(CONFIG_SND_SEQUENCER),m)
> obj-$($(CONFIG_SND_SERIAL_U16550)) +=
> obj-$($(CONFIG_SND_MTPAV)) += 
> obj-$($(CONFIG_SND_MPU401)) += 
> obj-$($(CONFIG_SND_ALS100)) += $(OPL3_OBJS)
> obj-$($(CONFIG_SND_AZT2320)) += $(OPL3_OBJS)
> obj-$($(CONFIG_SND_DT019X)) += $(OPL3_OBJS)
> [snip]
> obj-$($(CONFIG_SND_CS46XX)) += 
> obj-$($(CONFIG_SND_EMU10K1)) += snd-seq-midi-emul.o snd-seq-virmidi.o
> obj-$($(CONFIG_SND_TRIDENT)) += snd-seq-midi-emul.o snd-seq-instr.o
> obj-$($(CONFIG_SND_YMFPCI)) += $(OPL3_OBJS)
> obj-$($(CONFIG_SND_USB_AUDIO)) += 
> obj-$($(CONFIG_SND_HDSP)) += 
> endif
> 
> obj-m := $(sort $(obj-m))
> 
> Then, the sequencer function above is no longer needed.

well, some points noted.

1. CONFIG_SND_SEQUENCER is set to m only in the alsa-driver configure
   because alsa-driver package provides only the modules.
   you change above doesn't handle the case for built-in drivers.

2. rawmidi is not used in every system.  this should belong to
   the card dependent defines.

3. the use of sequencer macro is intended for removal of if condition
   in the definitions of modules.  so, going back to the style shown
   above is not acceptable for 2.5 kernel tree.
   (2.5 kernel tree needs anyway the newer verision of make which can
    handle the macro correctly.)


a workaround would be to rewrite the Makefile in alsa-driver/core/seq
without reading the alsa-kernel Makefile.
but from the maintenace perspective, it's also not nice...


ciao,

Takashi


-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en

  reply	other threads:[~2003-03-19 11:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-19 10:45 sequencer module problems Andrei Boros
2003-03-19 11:29 ` Takashi Iwai [this message]
     [not found]   ` <3E7863A8.B5BACE35@srr.ro>
2003-03-19 13:41     ` Takashi Iwai
2003-03-20  8:17   ` Typo in configure.in : dummy sequencer Andrei Boros
2003-03-20  8:28     ` Jaroslav Kysela
2003-03-20  8:20   ` alsa-driver, make 3.79, cvscompile Andrei Boros
2003-03-20 10:33     ` Takashi Iwai
     [not found]       ` <3E799CB6.EB6ED828@srr.ro>
2003-03-20 10:58         ` Takashi Iwai
2003-03-20  8:28   ` dummy sequencer module problems Andrei Boros
2003-03-20 10:32     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h7kavtwzs.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=andrei@srr.ro \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.