From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] ALSA: HDA: Add jack detection for HDMI Date: Wed, 18 May 2011 12:02:00 +0200 Message-ID: References: <4DD27C43.3050509@canonical.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 38A1A10383E for ; Wed, 18 May 2011 12:02:06 +0200 (CEST) In-Reply-To: <4DD27C43.3050509@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: David Henningsson Cc: ALSA Development Mailing List List-Id: alsa-devel@alsa-project.org At Tue, 17 May 2011 15:46:43 +0200, David Henningsson wrote: > > static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res) > @@ -919,6 +922,17 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) > return -E2BIG; > } > > +#ifdef CONFIG_SND_HDA_INPUT_JACK > + { > + int err; > + err = snd_hda_input_jack_add(codec, pin_nid, > + SND_JACK_VIDEOOUT, NULL); > + if (err < 0) > + return err; > + snd_hda_input_jack_report(codec, pin_nid); > + } > +#endif You don't need ifdef here since dummy functions are defined when CONFIG_SND_HDA_INPUT_JACK=n. Then don't need to make a block here, as you won't get an unused-variable compile warning. Takashi