[alsa-devel] [PATCH] ALSA: HDA: Add jack detection for HDMI

Takashi Iwai tiwai at suse.de
Wed May 18 12:02:00 CEST 2011


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


More information about the Alsa-devel mailing list