From: Dharageswari R <[email protected]>

This specific implementation is removed in driver.
Applications can get the vmic functionality through
generic ioctl available in driver.

Signed-off-by: Dharageswari R <[email protected]>
Signed-off-by: Ramesh Babu K V <[email protected]>
---
 sound/pci/sst/intel_sst_common.h        |    9 ++----
 sound/pci/sst/intel_sst_drv_interface.c |    6 ----
 sound/pci/sst/intel_sst_fw_ipc.h        |    1 -
 sound/pci/sst/intel_sst_ipc.c           |   17 ------------
 sound/pci/sst/intel_sst_pvt.c           |   30 ---------------------
 sound/pci/sst/intel_sst_stream.c        |    4 ++-
 sound/pci/sst/intelmid.h                |   10 +------
 sound/pci/sst/intelmid_ctrl.c           |   43 +-----------------------------
 8 files changed, 9 insertions(+), 111 deletions(-)

diff --git a/sound/pci/sst/intel_sst_common.h b/sound/pci/sst/intel_sst_common.h
index 5759ea8..c060ca4 100644
--- a/sound/pci/sst/intel_sst_common.h
+++ b/sound/pci/sst/intel_sst_common.h
@@ -28,8 +28,8 @@
  *  Common private declarations for SST
  */
 
-#define SST_DRIVER_VERSION "1.2.15"
-#define SST_VERSION_NUM 0x1215
+#define SST_DRIVER_VERSION "1.2.16"
+#define SST_VERSION_NUM 0x1216
 
 /* driver names */
 #define SST_DRV_NAME "intel_sst_driver"
@@ -394,8 +394,7 @@ struct intel_sst_drv {
        struct stream_info      streams[MAX_NUM_STREAMS];
        struct stream_alloc_block alloc_block[MAX_ACTIVE_STREAM];
        struct sst_block        tgt_dev_blk, fw_info_blk, ppp_params_blk,
-                               vol_info_blk, mute_info_blk, hs_info_blk,
-                               vmic_info_blk;
+                               vol_info_blk, mute_info_blk, hs_info_blk;
        struct mutex            list_lock;/* mutex for IPC list locking */
        spinlock_t      list_spin_lock; /* mutex for IPC list locking */
        struct snd_pmic_ops     *scard_ops;
@@ -414,7 +413,6 @@ struct intel_sst_drv {
        unsigned int            lpe_stalled; /* LPE is stalled or not */
        unsigned int            pmic_port_instance; /*pmic port instance*/
        int                     rx_time_slot_status;
-       int                     vmic_device;
        unsigned int            lpaudio_start;
                /* 1 - LPA stream(MP3 pb) in progress*/
        unsigned int            audio_start;
@@ -448,7 +446,6 @@ int sst_stalled(void);
 int sst_pause_stream(int id);
 int sst_resume_stream(int id);
 int sst_enable_rx_timeslot(int status);
-int sst_enable_vmic(u32 device);
 int sst_drop_stream(int id);
 int sst_free_stream(int id);
 int sst_start_stream(int streamID);
diff --git a/sound/pci/sst/intel_sst_drv_interface.c 
b/sound/pci/sst/intel_sst_drv_interface.c
index 51b19e5..21d227b 100644
--- a/sound/pci/sst/intel_sst_drv_interface.c
+++ b/sound/pci/sst/intel_sst_drv_interface.c
@@ -463,12 +463,6 @@ int sst_device_control(int cmd, void *arg)
                sst_enable_rx_timeslot(status);
                break;
        }
-       case SST_VMIC_CHANNEL_SELECT: {
-               int device = *(int *)arg;
-               sst_drv_ctx->vmic_device = device;
-               sst_enable_vmic(device);
-               break;
-       }
        default:
                /* Illegal case */
                pr_warn("sst: illegal req\n");
diff --git a/sound/pci/sst/intel_sst_fw_ipc.h b/sound/pci/sst/intel_sst_fw_ipc.h
index d5abb8f..7bfa42d 100644
--- a/sound/pci/sst/intel_sst_fw_ipc.h
+++ b/sound/pci/sst/intel_sst_fw_ipc.h
@@ -92,7 +92,6 @@
 #define IPC_IA_ENABLE_RX_TIME_SLOT 0x2E /* Enable Rx time slot 0 or 1 */
 
 #define IPC_IA_START_STREAM 0x30 /* Short msg with str_id */
-#define IPC_IA_VMIC_CHANL_SELECT 0x33
 
 /* Debug msgs */
 #define IPC_IA_DBG_MEM_READ 0x40
diff --git a/sound/pci/sst/intel_sst_ipc.c b/sound/pci/sst/intel_sst_ipc.c
index 82a36ef..cb21961 100644
--- a/sound/pci/sst/intel_sst_ipc.c
+++ b/sound/pci/sst/intel_sst_ipc.c
@@ -625,23 +625,6 @@ void sst_process_reply(struct work_struct *work)
                        wake_up(&sst_drv_ctx->wait_queue);
                }
                break;
-       case IPC_IA_VMIC_CHANL_SELECT:
-               if (!msg->header.part.data) {
-                       pr_debug("sst: VMIC_Device success\n");
-                       sst_drv_ctx->vmic_info_blk.ret_code = 0;
-               } else {
-                       pr_err("sst:  Msg %x reply error %x\n",
-                               msg->header.part.msg_id,
-                               msg->header.part.data);
-                       sst_drv_ctx->vmic_info_blk.ret_code =
-                               -msg->header.part.data;
-               }
-               if (sst_drv_ctx->vmic_info_blk.on == true) {
-                       sst_drv_ctx->vmic_info_blk.on = false;
-                       sst_drv_ctx->vmic_info_blk.condition = true;
-                       wake_up(&sst_drv_ctx->wait_queue);
-               }
-               break;
 
        case IPC_IA_PAUSE_STREAM:
        case IPC_IA_RESUME_STREAM:
diff --git a/sound/pci/sst/intel_sst_pvt.c b/sound/pci/sst/intel_sst_pvt.c
index 5105070..1b8d7f8 100644
--- a/sound/pci/sst/intel_sst_pvt.c
+++ b/sound/pci/sst/intel_sst_pvt.c
@@ -307,33 +307,3 @@ int sst_enable_rx_timeslot(int status)
                                &sst_drv_ctx->hs_info_blk, SST_BLOCK_TIMEOUT);
        return retval;
 }
-/**
- * sst_enable_vmic - Send information of the vmic device selected to the 
firmware
- * @status: rx timeslot to be enabled
- *
- * This function is called when VMIC info is to be sent to the firmware
- */
-int sst_enable_vmic(u32 device)
-{
-       int retval = 0;
-       struct ipc_post *msg = NULL;
-
-       if (sst_create_short_msg(&msg)) {
-               pr_err("sst: mem allocation failed\n");
-                       return -ENOMEM;
-       }
-       pr_debug("sst: ipc message sending: VMIC_DEVICE:%d\n", device);
-       sst_fill_header(&msg->header, IPC_IA_VMIC_CHANL_SELECT, 0, 0);
-       msg->header.part.data = device;
-       sst_drv_ctx->vmic_info_blk.condition = false;
-       sst_drv_ctx->vmic_info_blk.ret_code = 0;
-       sst_drv_ctx->vmic_info_blk.on = true;
-       spin_lock(&sst_drv_ctx->list_spin_lock);
-       list_add_tail(&msg->node, &sst_drv_ctx->ipc_dispatch_list);
-       spin_unlock(&sst_drv_ctx->list_spin_lock);
-       sst_post_message(&sst_drv_ctx->ipc_post_msg_wq);
-       retval = sst_wait_interruptible_timeout(sst_drv_ctx,
-                               &sst_drv_ctx->vmic_info_blk, SST_BLOCK_TIMEOUT);
-       return retval;
-}
-
diff --git a/sound/pci/sst/intel_sst_stream.c b/sound/pci/sst/intel_sst_stream.c
index 2d247fb..03aad38 100644
--- a/sound/pci/sst/intel_sst_stream.c
+++ b/sound/pci/sst/intel_sst_stream.c
@@ -68,8 +68,10 @@ int sst_check_device_type(u32 device, u32 num_chan, u32 
*pcm_slot)
                        *pcm_slot = 0x03;
                else if (device == SND_SST_DEVICE_CAPTURE && num_chan == 3)
                        *pcm_slot = 0x07;
-               else if (device == SND_SST_DEVICE_CAPTURE && num_chan >= 4)
+               else if (device == SND_SST_DEVICE_CAPTURE && num_chan == 4)
                        *pcm_slot = 0x0F;
+               else if (device == SND_SST_DEVICE_CAPTURE && num_chan > 4)
+                       *pcm_slot = 0x1F;
                else {
                        pr_debug("sst: No condition satisfied.. ret err\n");
                        return -EINVAL;
diff --git a/sound/pci/sst/intelmid.h b/sound/pci/sst/intelmid.h
index 3de11e5..0b8ee18 100644
--- a/sound/pci/sst/intelmid.h
+++ b/sound/pci/sst/intelmid.h
@@ -58,7 +58,7 @@
 #define FIFO_SIZE              0 /* fifo not being used */
 #define INTEL_MAD              "Intel MAD"
 #define MAX_CTRL_MRST          7
-#define MAX_CTRL_MFLD          8
+#define MAX_CTRL_MFLD          7
 #define MAX_CTRL               7
 #define MAX_VENDORS            4
 /* TODO +6 db */
@@ -163,7 +163,6 @@ enum mad_drv_status {
     PAUSED,
     DROPPED,
 };
-
 enum mad_pmic_status {
        PMIC_UNINIT = 1,
        PMIC_INIT,
@@ -179,13 +178,6 @@ enum _widget_ctrl {
 };
 enum _widget_ctrl_mfld {
        LINEOUT_SEL_MFLD = 3,
-       VMIC_SEL_MFLD,
-};
-enum vmic_controls {
-       IHFL,
-       IHFR,
-       HSL,
-       HSR
 };
 enum hw_chs {
        HW_CH0 = 0,
diff --git a/sound/pci/sst/intelmid_ctrl.c b/sound/pci/sst/intelmid_ctrl.c
index ede668a..e4a6e32 100644
--- a/sound/pci/sst/intelmid_ctrl.c
+++ b/sound/pci/sst/intelmid_ctrl.c
@@ -31,7 +31,7 @@
 #include "intelmid_snd_control.h"
 #include "intelmid.h"
 
-#define HW_CH_BASE 5
+#define HW_CH_BASE 4
 
 
 #define HW_CH_0        "Hw1"
@@ -57,10 +57,6 @@ static char *line_out_names_mfld[] = {"Headset",
                                "Vibra1 ",
                                "Vibra2 ",
                                "NONE   "};
-static char *vmic_names_mfld[] = {"IHF-left     ",
-                               "IHF-right    ",
-                               "Headset-Left ",
-                               "Headset-Right"};
 static char *out_names_mfld[] = {"Headset ",
                                "EarPiece  "};
 static char *in_names_mfld[] = {"AMIC",
@@ -218,9 +214,7 @@ static int snd_intelmad_device_info_mfld(struct 
snd_kcontrol *kcontrol,
        else if (kcontrol->id.numid == LINEOUT_SEL_MFLD) {
                uinfo->value.enumerated.items = ARRAY_SIZE(line_out_names_mfld);
                scard_ops->line_out_names_cnt = uinfo->value.enumerated.items;
-       } else if (kcontrol->id.numid == VMIC_SEL_MFLD)
-               uinfo->value.enumerated.items = ARRAY_SIZE(vmic_names_mfld);
-       else
+       } else
                return -EINVAL;
        uinfo->count = MONO_CNTL;
        uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
@@ -239,10 +233,6 @@ static int snd_intelmad_device_info_mfld(struct 
snd_kcontrol *kcontrol,
                strncpy(uinfo->value.enumerated.name,
                        line_out_names_mfld[uinfo->value.enumerated.item],
                        sizeof(uinfo->value.enumerated.name)-1);
-       else if (kcontrol->id.numid == VMIC_SEL_MFLD)
-               strncpy(uinfo->value.enumerated.name,
-                       vmic_names_mfld[uinfo->value.enumerated.item],
-                       sizeof(uinfo->value.enumerated.name)-1);
        else
                return -EINVAL;
        return 0;
@@ -521,9 +511,6 @@ static int snd_intelmad_device_get(struct snd_kcontrol 
*kcontrol,
                else if (kcontrol->id.numid == LINEOUT_SEL_MFLD)
                        uval->value.enumerated.item[0] =
                                        scard_ops->lineout_dev_id;
-               else if (kcontrol->id.numid == VMIC_SEL_MFLD)
-                       uval->value.enumerated.item[0] =
-                                       kcontrol->private_value;
                else
                        return -EINVAL;
        } else
@@ -546,7 +533,6 @@ static int snd_intelmad_device_set(struct snd_kcontrol 
*kcontrol,
        struct snd_intelmad *intelmaddata;
        struct snd_pmic_ops *scard_ops;
        int ret_val = 0, vendor, status;
-       u32 device;
        struct intel_sst_pcm_control *pcm_control;
 
        pr_debug("sst: snd_intelmad_device_set called\n");
@@ -592,22 +578,6 @@ static int snd_intelmad_device_set(struct snd_kcontrol 
*kcontrol,
                                        uval->value.enumerated.item[0]);
                intelmaddata->lineout_sel = uval->value.enumerated.item[0];
                break;
-       case VMIC_SEL_MFLD:
-               pcm_control = intelmaddata->sstdrv_ops->pcm_control;
-               if (uval->value.enumerated.item[0] == IHFL)
-                       device = 0x02;
-               else if (uval->value.enumerated.item[0] == IHFR)
-                       device = 0x03;
-               else if (uval->value.enumerated.item[0] == HSL)
-                       device = 0x00;
-               else if (uval->value.enumerated.item[0] == HSR)
-                       device = 0x01;
-               else
-               pr_debug("sst: Invalid selection\n");
-               pcm_control->device_control(
-                                       SST_VMIC_CHANNEL_SELECT, &device);
-               break;
-
        default:
                return -EINVAL;
        }
@@ -858,15 +828,6 @@ snd_intelmad_controls_mfld[MAX_CTRL_MFLD] __devinitdata = {
 },
 {
        .iface          =       SNDRV_CTL_ELEM_IFACE_MIXER,
-       .name           =       "Virtual MIC",
-       .access         =       SNDRV_CTL_ELEM_ACCESS_READWRITE,
-       .info           =       snd_intelmad_device_info_mfld,
-       .get            =       snd_intelmad_device_get,
-       .put            =       snd_intelmad_device_set,
-       .private_value  =       0,
-},
-{
-       .iface          =       SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           =       HW_CH_0,
        .access         =       SNDRV_CTL_ELEM_ACCESS_READWRITE,
        .info           =       snd_intelmad_device_dmic_info_mfld,
-- 
1.6.2.5

_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to