From: Matthew Ranostay <mranostay@embeddedalley.com>
To: Mark Brown <broonie@sirena.org.uk>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: [PATCH] hda: add support for jack detection on IDT/Sigmatel
Date: Wed, 15 Oct 2008 11:45:23 -0400 [thread overview]
Message-ID: <48F61013.7060804@embeddedalley.com> (raw)
In-Reply-To: <20081015154402.GE14068@sirena.org.uk>
Mark Brown wrote:
> On Wed, Oct 15, 2008 at 10:43:28AM -0400, Matthew Ranostay wrote:
>
>> @@ -3639,6 +3640,12 @@ static int stac92xx_init(struct hda_codec *codec)
>> stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0],
>> AC_PINCTL_OUT_EN);
>> stac92xx_auto_init_hp_out(codec);
>> + /* jack detection */
>> + err = snd_jack_new(codec->bus->card,
>> + "Headphone Jack Detection",
>> + SND_JACK_HEADPHONE, &codec->jack);
>> + if (err < 0)
>
> That should probably just be "Headphone Jack".
>
>> + return err;
>
> ...
>
>> + if (codec->jack)
>> + snd_jack_report(codec->jack,
>> + presence ? SND_JACK_HEADPHONE : 0);
>> +
>
> Since you appear to fail init if you can't create the jack there should
> be no need to check for the jack being initialised here. For ease of
> use I'll just submit a patch folding that check into snd_jack_report(),
> though.
>
Good catch.
Thanks,
Matt Ranostay
next prev parent reply other threads:[~2008-10-15 15:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 14:43 [PATCH] hda: add support for jack detection on IDT/Sigmatel Matthew Ranostay
2008-10-15 15:02 ` Takashi Iwai
2008-10-15 15:19 ` Matthew Ranostay
2008-10-15 15:35 ` Takashi Iwai
2008-10-15 15:32 ` Mark Brown
2008-10-15 15:44 ` Mark Brown
2008-10-15 15:45 ` Matthew Ranostay [this message]
2008-10-15 15:47 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2008-10-15 18:45 Matthew Ranostay
2008-10-16 6:54 ` 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=48F61013.7060804@embeddedalley.com \
--to=mranostay@embeddedalley.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@sirena.org.uk \
--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 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.