rk2928phonepad:
author邱建斌 <qjb@rock-chips.com>
Wed, 24 Oct 2012 09:48:13 +0000 (17:48 +0800)
committer邱建斌 <qjb@rock-chips.com>
Wed, 24 Oct 2012 09:48:13 +0000 (17:48 +0800)
modfiy modem_sound ioctl cmd

drivers/misc/modem_sound.c
drivers/misc/modem_sound.h

index 1f402b30cbf92353c8c068069e159fbde6087baf..b767cb964617f54830189674c137121a37a3d3dd 100755 (executable)
 #else\r
 #define DBG(x...)\r
 #endif\r
-#define MODEM_EARPHOEN     0      //ÌýͲµç»°\r
-#define MODEM_HANDFREE     1   //ÃâÌá\r
-#define MODEM_HPPHONE      2   //¶ú»úµç»°\r
-#define MODEM_BTPHONE      3      //À¶ÑÀµç»°\r
-#define MODEM_STOP_PHONE   4      //ֹͣͨ»°\r
-\r
 #define ENABLE             1\r
 #define DISABLE            0\r
 \r
@@ -82,28 +76,28 @@ static long modem_sound_ioctl(struct file *filp, unsigned int cmd, unsigned long
        }\r
 \r
        switch (cmd){\r
-               case MODEM_EARPHOEN:\r
+               case IOCTL_MODEM_EAR_PHOEN:\r
                        DBG("modem_sound_ioctl: MODEM_EAR_PHONE\n");\r
                        call_set_spk(0);\r
                        modem_sound_spkctl(DISABLE);\r
                        break;\r
-               case MODEM_HANDFREE:\r
+               case IOCTL_MODEM_SPK_PHONE:\r
                        DBG("modem_sound_ioctl: MODEM_SPK_PHONE\n");\r
                        call_set_spk(0);\r
                        modem_sound_spkctl(ENABLE);\r
                        break;\r
-               case MODEM_HPPHONE:\r
+               case IOCTL_MODEM_HP_PHONE:\r
                        DBG("modem_sound_ioctl: MODEM_HP_PHONE\n");\r
                        call_set_spk(0);\r
                        modem_sound_spkctl(DISABLE);\r
                        break;\r
                        \r
-               case MODEM_BTPHONE:\r
+               case IOCTL_MODEM_BT_PHONE:\r
                        call_set_spk(0);\r
                        modem_sound_spkctl(DISABLE);\r
                        DBG("modem_sound_ioctl: MODEM_BT_PHONE\n");\r
                        break;\r
-               case MODEM_STOP_PHONE:\r
+               case IOCTL_MODEM_STOP_PHONE:\r
                        DBG("modem_sound_ioctl: MODEM_STOP_PHONE\n");\r
                        call_set_spk(1);\r
                        break;\r
index e78314ee9ecf044f532442a757ecb330248d60bf..4f03327bf11c8a95d6adec51948b2b98fd5394b7 100755 (executable)
@@ -1,6 +1,15 @@
 \r
 #ifndef __MODEM_SOUND_H__\r
 #define __MODEM_SOUND_H__\r
+#include <linux/ioctl.h>\r
+\r
+#define MODEM_SOUND                   0x1B\r
+\r
+#define IOCTL_MODEM_EAR_PHOEN                  _IO(MODEM_SOUND, 0x01)\r
+#define IOCTL_MODEM_SPK_PHONE                  _IO(MODEM_SOUND, 0x02) \r
+#define IOCTL_MODEM_HP_PHONE                   _IO(MODEM_SOUND, 0x03)\r
+#define IOCTL_MODEM_BT_PHONE                   _IO(MODEM_SOUND, 0x04)\r
+#define IOCTL_MODEM_STOP_PHONE                 _IO(MODEM_SOUND, 0x05) \r
 \r
 struct modem_sound_data {\r
        int spkctl_io;\r