From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Dmitry Torokhov <dtor@insightbb.com>,
linux-input@vger.kernel.org
Subject: Re: [PATCH/RFC 1/2] Add jack reporting API for ALSA
Date: Fri, 30 May 2008 11:15:57 +0100 [thread overview]
Message-ID: <20080530101557.GB7729@sirena.org.uk> (raw)
In-Reply-To: <s5hhccgjjgw.wl%tiwai@suse.de>
On Fri, May 30, 2008 at 10:15:43AM +0200, Takashi Iwai wrote:
> The implementation looks good, simple enough.
Thanks.
> Mark Brown wrote:
> > +config SND_JACK
> > + tristate
> > + depends on SND
> > + depends on INPUT
> The code is small, and I don't see a big merit to make it a module.
I agree - I had meant to flag this up, actually. I hadn't been sure if
some of the other objects were being built conditionally for size or not
since they seemed relatively small too. When I respin I'll remove this
option.
> > + snprintf(jack->name, sizeof(jack->name), "%s %s",
> > + card->longname, jack->id);
> The longname field could be sometimes really too long and verbose.
> I guess shortname would match better.
The general style for input device names tends towards the long and
verbose. For example, on my work laptop I have devices with names like:
Macintosh mouse button emulation
AT Translated Set 2 Keyboard
Lid Switch
Power Button (CM)
Sleep Button (CM)
AlpsPS/2 ALPS GlidePoint
The ALSA long name seems more idiomatic for this context.
> > +int snd_jack_new(struct snd_card *card, const char *id, int type,
> > + struct snd_jack **jjack)
> (snip)
> > + jack->input_dev->phys = "ALSA";
> > + jack->input_dev->dev.parent = card->dev;
> The card->dev pointer might not be initialized always at this stage.
> You should check rather at register.
Will do.
> Also, someone may want to pass a different device pointer for this.
> Passing struct device * to snd_jack_new would be an alternative.
Good idea, that might be useful for ASoC v2 sound cards. I'll add
something which allows the caller to optionally specify a parent,
defaulting to the sound card if none is given.
The only issue might be for user space figuring out which sound card
corresponds to which jack but if jacks might be implemented outside of
ALSA anyway (which is possible) that could happen anyway.
next prev parent reply other threads:[~2008-05-30 10:15 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 [this message]
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 ` Jack reporting v2 Takashi Iwai
2008-06-03 15:36 ` 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=20080530101557.GB7729@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=dtor@insightbb.com \
--cc=linux-input@vger.kernel.org \
--cc=tiwai@suse.de \
/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