usr/src/uts/common/io/audio/drv/audiohd/audiohd.h
changeset 11942 7c085d34b43f
parent 11936 54dc8a89ba0d
child 11986 fef9abb0309c
--- a/usr/src/uts/common/io/audio/drv/audiohd/audiohd.h	Tue Mar 16 22:07:28 2010 -0400
+++ b/usr/src/uts/common/io/audio/drv/audiohd/audiohd.h	Wed Mar 17 10:41:03 2010 +0800
@@ -545,8 +545,6 @@
 	AUDIOHD_PIN_OTHER = 0xf,
 };
 
-#define	CTRL_NUM	16
-
 /* values for audiohd_widget.path_flags */
 #define	AUDIOHD_PATH_DAC	(1 << 0)
 #define	AUDIOHD_PATH_ADC	(1 << 1)
@@ -695,11 +693,33 @@
 	audiohd_state_t		*statep;
 }audiohd_port_t;
 
+enum {
+	CTL_VOLUME = 0,
+	CTL_FRONT,
+	CTL_SPEAKER,
+	CTL_HEADPHONE,
+	CTL_REAR,
+	CTL_CENTER,
+	CTL_SURROUND,
+	CTL_LFE,
+	CTL_IGAIN,
+	CTL_LINEIN,
+	CTL_MIC,
+	CTL_CD,
+	CTL_MONGAIN,
+	CTL_MONSRC,
+	CTL_RECSRC,
+	CTL_BEEP,
+
+	/* this one must be last */
+	CTL_MAX
+};
+
 typedef struct audiohd_ctrl
 {
 	audiohd_state_t		*statep;
 	audio_ctrl_t		*ctrl;
-	uint32_t		num;
+	int			num;
 	uint64_t		val;
 } audiohd_ctrl_t;
 
@@ -825,7 +845,6 @@
 	 * Suspend/Resume used fields
 	 */
 	boolean_t	suspended;
-	boolean_t	monitor_unsupported;
 
 	audiohd_path_t	*path[AUDIOHD_PORT_MAX];
 	uint8_t		pathnum;
@@ -841,7 +860,8 @@
 	/*
 	 * Controls
 	 */
-	audiohd_ctrl_t		*controls[CTRL_NUM];
+	audiohd_ctrl_t		ctrls[CTL_MAX];
+	boolean_t		monitor_unsupported;
 
 	/* for multichannel */
 	uint8_t			chann[AUDIOHD_MAX_ASSOC];