]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/hda/hda_local.h
Merge branch 'x86-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / sound / pci / hda / hda_local.h
index 5c9e578f7f2dd89b745d87594711ed3bec01ec3b..7957fefda730ca05da03160362688ae90119db98 100644 (file)
@@ -368,12 +368,15 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
 #define AMP_OUT_UNMUTE 0xb000
 #define AMP_OUT_ZERO   0xb000
 /* pinctl values */
-#define PIN_IN         0x20
-#define PIN_VREF80     0x24
-#define PIN_VREF50     0x21
-#define PIN_OUT                0x40
-#define PIN_HP         0xc0
-#define PIN_HP_AMP     0x80
+#define PIN_IN                 (AC_PINCTL_IN_EN)
+#define PIN_VREFHIZ    (AC_PINCTL_IN_EN | AC_PINCTL_VREF_HIZ)
+#define PIN_VREF50             (AC_PINCTL_IN_EN | AC_PINCTL_VREF_50)
+#define PIN_VREFGRD    (AC_PINCTL_IN_EN | AC_PINCTL_VREF_GRD)
+#define PIN_VREF80             (AC_PINCTL_IN_EN | AC_PINCTL_VREF_80)
+#define PIN_VREF100    (AC_PINCTL_IN_EN | AC_PINCTL_VREF_100)
+#define PIN_OUT                (AC_PINCTL_OUT_EN)
+#define PIN_HP                 (AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN)
+#define PIN_HP_AMP             (AC_PINCTL_HP_EN)
 
 /*
  * get widget capabilities
@@ -418,4 +421,13 @@ int snd_hda_check_amp_list_power(struct hda_codec *codec,
                                 hda_nid_t nid);
 #endif /* CONFIG_SND_HDA_POWER_SAVE */
 
+/*
+ * AMP control callbacks
+ */
+/* retrieve parameters from private_value */
+#define get_amp_nid(kc)                ((kc)->private_value & 0xffff)
+#define get_amp_channels(kc)   (((kc)->private_value >> 16) & 0x3)
+#define get_amp_direction(kc)  (((kc)->private_value >> 18) & 0x1)
+#define get_amp_index(kc)      (((kc)->private_value >> 19) & 0xf)
+
 #endif /* __SOUND_HDA_LOCAL_H */