summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-03-03 13:40:14 (GMT)
committerTakashi Iwai <tiwai@suse.de>2011-03-03 13:40:14 (GMT)
commitcd372fb3befde3bceef3fdcbc550dde50c894e36 (patch)
tree300fec172522d11408ccd8086f7789cdcd2a8509 /sound/pci/hda/hda_local.h
parentd207df2df064c19a2cf4eac8f887351fe5ce526e (diff)
downloadlinux-fsl-qoriq-cd372fb3befde3bceef3fdcbc550dde50c894e36.tar.xz
ALSA: hda - Make common input-jack helper functions
Since multiple codec drivers already use the input-jack stuff, let's make common helper functions to reduce the duplicated codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r--sound/pci/hda/hda_local.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 3ab5e7a..ff5e2ac 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -656,4 +656,28 @@ static inline void snd_hda_eld_proc_free(struct hda_codec *codec,
#define SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE 80
void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen);
+/*
+ * Input-jack notification support
+ */
+#ifdef CONFIG_SND_HDA_INPUT_JACK
+int snd_hda_input_jack_add(struct hda_codec *codec, hda_nid_t nid, int type,
+ const char *name);
+void snd_hda_input_jack_report(struct hda_codec *codec, hda_nid_t nid);
+void snd_hda_input_jack_free(struct hda_codec *codec);
+#else /* CONFIG_SND_HDA_INPUT_JACK */
+static inline int snd_hda_input_jack_add(struct hda_codec *codec,
+ hda_nid_t nid, int type,
+ const char *name)
+{
+ return 0;
+}
+static inline void snd_hda_input_jack_report(struct hda_codec *codec,
+ hda_nid_t nid)
+{
+}
+static inline void snd_hda_input_jack_free(struct hda_codec *codec)
+{
+}
+#endif /* CONFIG_SND_HDA_INPUT_JACK */
+
#endif /* __SOUND_HDA_LOCAL_H */