int eamp_command( unsigned int  type)
{
	switch(type)
	{
		case EAMP_SPEAKER_CLOSE:
		{
			eamp_closespeaker();
			break;
		}
		case EAMP_SPEAKER_OPEN:
		{
			eamp_openspeaker();
			break;
		}
		case EAMP_HEADPHONE_CLOSE:
		{
			eamp_closeheadPhone();
			break;
		}
		case EAMP_HEADPHONE_OPEN:
		{
			eamp_openheadPhone();
			break;
		}	
		default:
			EAMP_PRINTK("eamp_command TYPE = %d",type);
			return 0;
	}	
	return 0;
}
static ssize_t eamp_resume()
{
	EAMP_PRINTK("eamp_resume");

	if(ghp_on)
	{
		eamp_openheadPhone();
	}

	return 0;
}
static ssize_t eamp_resume()
{
	EAMP_PRINTK("eamp_resume");
	I2CWrite(0x80, 0x01);
	if(gsk_on)
	{
		eamp_openspeaker();
	}
	if(ghp_on)
	{
		eamp_openheadPhone();
	}
	return 0;
}
static ssize_t eamp_resume()
{
    EAMP_PRINTK("");
    if(gsk_on)
    {
        eamp_openspeaker();
    }
    if(ghp_on)
    {
        eamp_openheadPhone();
    }
    if(gep_on)
    {
        eamp_openEarpiece();
    }
    return 0;
}
static int eamp_command( unsigned int  type, unsigned long args,unsigned int count)
{
    EAMP_PRINTK("type(%u) test22",type);
    switch(type)
    {
        case EAMP_SPEAKER_CLOSE:
        {
            eamp_closespeaker();
            break;
        }
        case EAMP_SPEAKER_OPEN:
        {
            eamp_openspeaker();
            break;
        }
        case EAMP_HEADPHONE_CLOSE:
        {
            eamp_closeheadPhone();
            break;
        }
        case EAMP_HEADPHONE_OPEN:
        {
            eamp_openheadPhone();
            break;
        }
        case EAMP_EARPIECE_OPEN:
        {
            eamp_openEarpiece();
            break;
        }
        case EAMP_EARPIECE_CLOSE:
        {
            eamp_closeEarpiece();
            break;
        }
        case EAMP_GETREGISTER_VALUE:
        {
            return eamp_getRegister(args);
            break;
        }
        case EAMP_GETAMP_GAIN:
        {
            return eamp_getGainVolume();
            break;
        }
        case EAMP_SETAMP_GAIN:
        {
            eamp_changeGainVolume(args);
            break;
        }
        case EAMP_SETREGISTER_VALUE:
        {
            eamp_setRegister(args);
            break;
        }
//                                                                                     
        case EAMP_SETMODE:
        {
            eamp_setMode(args);
            break;
        }
//                                                                                   
//                                                                                                         
        case EAMP_SETDEVICE:
		{
			eamp_setDevice(args);
			break;
		}
//                                                                                                       
        default:
        {
        	EAMP_PRINTK("Not support command=%d", type);
        	return 0;
        }
    }
    return 0;
}
static int eamp_command( unsigned int  type, unsigned long args,unsigned int count)
{
	EAMP_PRINTK("eamp_command type(%u)",type);
	switch(type)
	{
		case EAMP_SPEAKER_CLOSE:
		{
/*                                                                     */
			eamp_closespeaker(args);
/*                                                                     */			
			break;
		}
		case EAMP_SPEAKER_OPEN:
		{
/*                                                                                        */
			eamp_openspeaker(args);
/*                                                                                        */
			break;
		}
		case EAMP_HEADPHONE_CLOSE:
		{
			eamp_closeheadPhone();
			break;
		}
		case EAMP_HEADPHONE_OPEN:
		{
			eamp_openheadPhone();
			break;
		}
		case EAMP_EARPIECE_OPEN:
		{
			eamp_openEarpiece();
			break;
		}
		case EAMP_EARPIECE_CLOSE:
		{
			eamp_closeEarpiece();
			break;
		}
		case EAMP_GETREGISTER_VALUE:
		{
			return eamp_getRegister(args);
			break;
		}
		case EAMP_GETAMP_GAIN:
		{
			return eamp_getGainVolume();
			break;
		}
		case EAMP_SETAMP_GAIN:
		{
			eamp_changeGainVolume(args);
			break;
		}
		case EAMP_SETREGISTER_VALUE:
		{
			eamp_setRegister(args);
			break;
		}
		case EAMP_GET_CTRP_NUM:
		{
			return eamp_getCtrlPointNum();
			break;
		}
		case EAMP_GET_CTRP_BITS:
		{
			return eamp_getCtrPointBits(args);
			break;
		}
		case EAMP_GET_CTRP_TABLE:
		{
			eamp_getCtrlPointTable(args);
			break;
		}
		case EAMP_SETMODE:
		{
			eamp_setMode(args);
		}
		default:
		return 0;
	}
	return 0;
}