本文整理匯總了C++中EAMP_PRINTK函數的典型用法代碼示例。如果您正苦於以下問題:C++ EAMP_PRINTK函數的具體用法?C++ EAMP_PRINTK怎麽用?C++ EAMP_PRINTK使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了EAMP_PRINTK函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: eamp_read_byte
ssize_t static eamp_read_byte(u8 addr, u8 *returnData)
{
char cmd_buf[1]={0x00};
char readData = 0;
int ret=0;
if(!new_client)
{
EAMP_PRINTK("I2C client not initialized!!");
return -1;
}
cmd_buf[0] = addr;
ret = i2c_master_send(new_client, &cmd_buf[0], 1);
if (ret < 0) {
EAMP_PRINTK("read sends command error!!");
return -1;
}
ret = i2c_master_recv(new_client, &readData, 1);
if (ret < 0) {
EAMP_PRINTK("reads recv data error!!");
return -1;
}
*returnData = readData;
EAMP_PRINTK("addr 0x%x data 0x%x",addr, readData);
return 0;
}
示例2: amp_enable
static int amp_enable(int on_state)
{
int err = 0;
switch (on_state) {
case 0:
err = mt_set_gpio_out(GPIO_SPK_AMP_EN, GPIO_OUT_ZERO);
EAMP_PRINTK("AMP_EN is set to %d\n", mt_get_gpio_out(GPIO_SPK_AMP_EN));
break;
case 1:
err = mt_set_gpio_out(GPIO_SPK_AMP_EN, GPIO_OUT_ONE);
EAMP_PRINTK("AMP_EN is set to %d\n", mt_get_gpio_out(GPIO_SPK_AMP_EN));
break;
case 2:
EAMP_PRINTK("amp enable bypass(%d)\n", on_state);
err = 0;
break;
default:
pr_err("amp enable fail\n");
err = 1;
break;
}
return err;
}
示例3: eamp_openspeaker
static ssize_t eamp_openspeaker(unsigned long param)
{
EAMP_PRINTK("eamp_openspeaker");
/* */
if ( param == 1 ) {
EAMP_PRINTK("AAT Camcorder Test -> eamp_right_open & eamp_left_close");
mt_set_gpio_out(GPIO_SPK_AMP_L_EN, GPIO_OUT_ZERO);
mt_set_gpio_out(GPIO_SPK_AMP_R_EN, GPIO_OUT_ONE);
}
else if ( param == 2 ) {
EAMP_PRINTK("AAT Ring Test -> eamp_right_close & eamp_left_open");
mt_set_gpio_out(GPIO_SPK_AMP_L_EN, GPIO_OUT_ONE);
mt_set_gpio_out(GPIO_SPK_AMP_R_EN, GPIO_OUT_ZERO);
}
else {
EAMP_PRINTK("Normal mode -> eamp_openspeaker");
mt_set_gpio_out(GPIO_SPK_AMP_L_EN, GPIO_OUT_ONE);
mt_set_gpio_out(GPIO_SPK_AMP_R_EN, GPIO_OUT_ONE);
}
/* */
gsk_on = true;
/* */
msleep(speaker_response_time);
/* */
return 0;
}
示例4: eamp_write_procmem
static int eamp_write_procmem(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char *register_data;
int addr;
int value;
int fail;
register_data = (char*)data;
copy_from_user(register_data, buffer, count);
register_data[count] = '\0';
if(register_data[count - 1] == '\n')
register_data[count - 1] = '\0';
sscanf(register_data, "%d %d", &addr, &value);
EAMP_PRINTK("S register_data=%s %d %d\n", register_data, addr, value);
if(addr >= IC_CONTROL && addr <= AGC2_CONTROL){
if(AGC_FIXED_GAIN_CONTROL == addr){
if(value >= -28 && value <= 30)
register_setting_mode = value;
else{
EAMP_PRINTK("S Wrong value\n");
return count;
}
}
fail |= I2CWrite(addr, value);
EAMP_PRINTK("S register Write Done Gain=%d\n", I2CRead(addr));
}
else
EAMP_PRINTK("S Wrong addr or value\n");
return count;
}
示例5: eamp_i2c_probe
static int eamp_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) {
EAMP_PRINTK("+++++++++++++++eamp_i2c_probe++++++++++++++++++"); //add for test
new_client = client;
eamp_resetRegister();
EAMP_PRINTK("client=%x !!",client);
return 0;
}
示例6: eamp_register
static int eamp_register()
{
EAMP_PRINTK("");
i2c_register_board_info(SOUND_I2C_CHANNEL,&tpa2028_eamp_dev,1);
if (i2c_add_driver(&tpa2028_eamp_i2c_driver)){
EAMP_PRINTK("fail to add device into i2c");
return -1;
}
return 0;
}
示例7: eamp_openheadPhone
static ssize_t eamp_openheadPhone()
{
EAMP_PRINTK("eamp_openheadPhone");
mt_set_gpio_out(GPIO_HEADSET_AMP_EN, GPIO_OUT_ONE);
if(ghplvol == ghprvol)
{
/* */
if (gMode == 2) {
msleep(270); // for pop-noise
}
}
else
{
/* */
if (gMode == 2) {
msleep(270); // for pop-noise
}
}
ghp_on = true;
/* */
msleep(headphone_response_time);
/* */
return 0;
}
示例8: eamp_closeEarpiece
static ssize_t eamp_closeEarpiece()
{
EAMP_PRINTK("eamp_closeEarpiece");
gep_on=false;
return 0;
}
示例9: eamp_openEarpiece
static ssize_t eamp_openEarpiece()
{
EAMP_PRINTK("eamp_openEarpiece");
gep_on=true;
return 0;
}
示例10: eamp_openheadPhone
static ssize_t eamp_openheadPhone()
{
EAMP_PRINTK("eamp_openheadPhone");
mt_set_gpio_out(GPIO_AUDIO_SEL, GPIO_OUT_ONE);
if(ghplvol == ghprvol)
{
/* LGE_CHANGE_S : [email protected] , for reduce pop-noise, rev1.0, TD 260828 */
if (gMode == 2) {
msleep(270); // for pop-noise
}
}
else
{
/* LGE_CHANGE_S : [email protected] , for reduce pop-noise, rev1.0, TD 260828 */
if (gMode == 2) {
msleep(270); // for pop-noise
}
}
ghp_on = true;
/* LGE_CHANGE_S : 20121031 [email protected] sound play volume change issue fix MTK patch ALPS00373024 */
msleep(headphone_response_time);
/* LGE_CHANGE_E : 20121031 [email protected] sound play volume change issue fix MTK patch ALPS00373024 */
return 0;
}
示例11: Speaker_DeInit
bool Speaker_DeInit(void)
{
EAMP_PRINTK("Speaker_DeInit");
eamp_deinit();
return true;
}
示例12: eamp_closespeaker
static ssize_t eamp_closespeaker()
{
EAMP_PRINTK("");
set_amp_gain(SPK_OFF);
gsk_on = false;
return 0;
}
示例13: eamp_command
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;
}
示例14: tpa2028_eamp_i2c_probe
static int tpa2028_eamp_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) {
int ret = 0;
EAMP_PRINTK("tpa2028_eamp_i2c_probe success");
new_client = client;
ret = eamp_resetRegister();
EAMP_PRINTK("client=%x !!",client);
if(ret < 0) {
new_client = NULL;
EAMP_PRINTK("[ERROR] maybe, chip is died by .. !!",client);
return -1;
}else {
return 0;
}
}
示例15: eamp_closespeaker
static ssize_t eamp_closespeaker(unsigned long param)
{
EAMP_PRINTK("eamp_closespeaker param = %d gsk_on = %d", param, gsk_on);
if ( param == 1 ) {
if ( gsk_on ) {
del_timer(&EXT_AMP_ON_Timer);
init_timer(&EXT_AMP_ON_Timer);
spk_amp_on = TPA2015_SPK_ON;
EXT_AMP_ON_Timer.expires = get_jiffies_64() + (9*HZ/10); //(1200ms)
EXT_AMP_ON_Timer.data = spk_amp_on;
EXT_AMP_ON_Timer.function = timer_spk_amp_on;
add_timer(&EXT_AMP_ON_Timer);
irrc_on = true;
}
mt_set_gpio_out(GPIO_SPK_AMP_L_EN, GPIO_OUT_ZERO);
mt_set_gpio_out(GPIO_SPK_AMP_R_EN, GPIO_OUT_ZERO);
}
else {
mt_set_gpio_out(GPIO_SPK_AMP_L_EN, GPIO_OUT_ZERO);
mt_set_gpio_out(GPIO_SPK_AMP_R_EN, GPIO_OUT_ZERO);
gsk_on = false;
irrc_on = false;
}
return 0;
}