From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Dmitry Torokhov <dtor@insightbb.com>,
Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, linux-input@vger.kernel.org
Subject: Re: Jack reporting v2
Date: Tue, 03 Jun 2008 16:49:38 +0200 [thread overview]
Message-ID: <s5h8wxm7ev1.wl%tiwai@suse.de> (raw)
In-Reply-To: <20080603104048.GA17007@rakim.wolfsonmicro.main>
At Tue, 3 Jun 2008 11:40:48 +0100,
Mark Brown wrote:
>
> The following couple of patches update the jack reporting API I posted
> last week with the feedback I have received so far. The changes since
> the last submision are:
>
> - Addition of snd_jack_set_parent(), allowing drivers to override the
> default parent for the input device prior to registration.
> - The jack detection support is now included unconditionally in ALSA,
> requiring a dependency on the input subsystem.
>
> I'm not entirely happy with making ALSA depend on input but given that
> it is only optional on embedded systems and that the input core is not
> that large it seemed the best way of ensuring that the input subsystem
> is available for the jack API without hassle for drivers using it,
> especially given the lack of dependency propagation from select.
I also feel uneasy that it's built in unconditionally and requires an
additional dependency on CONFIG_INPUT. The fact that both SND and
INPUT can be modules makes things a bit complicated.
As a workaround, how about to select with "if" conditions?
For example, in sound/core/Kconfig,
config SND_JACK
bool
while the driver requires SND_JACK has the below:
config SND_FOO
tristate "..."
...
select SND_JACK if INPUT=y || INPUT=SND
Yeah, it looks horrible at a first glance, but it's a known workaround
for reverse selections...
In sound/core/Makefile, just add the line:
snd-$(CONFIG_SND_JACK) += jack.o
so that the code is built into snd module only when necessary.
Also, sound/jack.h should provide empty inline functions for the case
CONFIG_SND_JACK=n. Then you'll be able to reduce ifdefs in the driver
codes.
thanks,
Takashi
next prev parent reply other threads:[~2008-06-03 14:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 21:09 [PATCH/RFC 1/2] Add jack reporting API for ALSA Mark Brown
2008-05-29 21:09 ` [PATCH/RFC 2/2] Add microphone and headset reporting Mark Brown
2008-05-30 8:15 ` [PATCH/RFC 1/2] Add jack reporting API for ALSA Takashi Iwai
2008-05-30 10:15 ` Mark Brown
2008-06-03 10:40 ` Jack reporting v2 Mark Brown
2008-06-03 10:42 ` [PATCH 1/2] Add jack reporting API for ALSA Mark Brown
2008-06-03 10:42 ` [PATCH 2/2] Add microphone and headset reporting Mark Brown
2008-06-03 14:49 ` Takashi Iwai [this message]
2008-06-03 15:36 ` Jack reporting v2 Mark Brown
2008-06-03 15:17 ` Dmitry Torokhov
2008-06-03 23:38 ` Mark Brown
2008-06-06 14:23 ` Mark Brown
2008-07-01 9:24 ` Mark Brown
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=s5h8wxm7ev1.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dtor@insightbb.com \
--cc=linux-input@vger.kernel.org \
--cc=perex@perex.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).