当前位置: 首页>>代码示例>>C++>>正文


C++ MM_INFO函数代码示例

本文整理汇总了C++中MM_INFO函数的典型用法代码示例。如果您正苦于以下问题:C++ MM_INFO函数的具体用法?C++ MM_INFO怎么用?C++ MM_INFO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了MM_INFO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: aux_pcm_probe

static int aux_pcm_probe(struct platform_device *pdev)
{
	int rc = 0;
	struct resource *mem_src;

	MM_INFO("aux_pcm_probe \n");
	mem_src = platform_get_resource_byname(pdev, IORESOURCE_MEM,
						"aux_codec_reg_addr");
	if (!mem_src) {
		rc = -ENODEV;
		goto done;
	}

	the_aux_pcm_state.aux_pcm_base = ioremap(mem_src->start,
		(mem_src->end - mem_src->start) + 1);
	if (!the_aux_pcm_state.aux_pcm_base) {
		rc = -ENOMEM;
		goto done;
	}
	rc = get_aux_pcm_gpios(pdev);
	if (rc) {
		MM_ERR("GPIO configuration failed\n");
		rc = -ENODEV;
	}

done:	return rc;

}
开发者ID:Akinus,项目名称:htc-kernel-msm7x30,代码行数:28,代码来源:aux_pcm.c

示例2: afe_dsp_event

static void afe_dsp_event(void *data, unsigned id, size_t len,
			    void (*getevent)(void *ptr, size_t len))
{
	struct msm_afe_state *afe = data;

	MM_DBG("msg_id %d \n", id);

	switch (id) {
	case AFE_APU_MSG_CODEC_CONFIG_ACK: {
		struct afe_msg_codec_config_ack afe_ack;
		getevent(&afe_ack, AFE_APU_MSG_CODEC_CONFIG_ACK_LEN);
		MM_DBG("%s: device_id: %d device activity: %d\n", __func__,
		afe_ack.device_id, afe_ack.device_activity);
		if (afe_ack.device_activity == AFE_MSG_CODEC_CONFIG_DISABLED)
			afe->codec_config[GETDEVICEID(afe_ack.device_id)] = 0;
		else
			afe->codec_config[GETDEVICEID(afe_ack.device_id)] =
			afe_ack.device_activity;

		wake_up(&afe->wait);
		break;
	}
	case AFE_APU_MSG_VOC_TIMING_SUCCESS:
		MM_INFO("Received VOC_TIMING_SUCCESS message from AFETASK\n");
		break;
	case ADSP_MESSAGE_ID:
		MM_DBG("Received ADSP event: module enable/disable(audpptask)");
		break;
	default:
		MM_ERR("unexpected message from afe \n");
	}

	return;
}
开发者ID:DRHAX34,项目名称:android_kernel_zte_sailboat,代码行数:34,代码来源:afe.c

示例3: snddev_icodec_debug_write

static ssize_t snddev_icodec_debug_write(struct file *filp,
	const char __user *ubuf, size_t cnt, loff_t *ppos)
{
	char *lb_str = filp->private_data;
	char cmd;

	if (get_user(cmd, ubuf))
		return -EFAULT;

	MM_INFO("%s %c\n", lb_str, cmd);

	if (!strcmp(lb_str, "adie_loopback")) {
		switch (cmd) {
		case '1':
			debugfs_adie_loopback(1);
			break;
		case '0':
			debugfs_adie_loopback(0);
			break;
		}
	} else if (!strcmp(lb_str, "afe_loopback")) {
		switch (cmd) {
		case '1':
			debugfs_afe_loopback(1);
			break;
		case '0':
			debugfs_afe_loopback(0);
			break;
		}
	}

	return cnt;
}
开发者ID:lupohirp,项目名称:Acer-Liquid-A1-2.6.35,代码行数:33,代码来源:snddev_icodec.c

示例4: snddev_ecodec_init

static int __init snddev_ecodec_init(void)
{
	int rc = 0;
	struct snddev_ecodec_drv_state *ecodec_drv = &snddev_ecodec_drv;

	MM_INFO("snddev_ecodec_init\n");
	rc = platform_driver_register(&snddev_ecodec_driver);
	if (IS_ERR_VALUE(rc))
		goto error_platform_driver;
	ecodec_drv->ecodec_clk = clk_get(NULL, "ecodec_clk");
	if (IS_ERR(ecodec_drv->ecodec_clk))
		goto error_ecodec_clk;
	ecodec_drv->lpa_core_clk = clk_get(NULL, "lpa_core_clk");
	if (IS_ERR(ecodec_drv->lpa_core_clk))
		goto error_lpa_core_clk;


	mutex_init(&ecodec_drv->dev_lock);
	ecodec_drv->rx_active = 0;
	ecodec_drv->tx_active = 0;
	return 0;

error_lpa_core_clk:
	clk_put(ecodec_drv->ecodec_clk);
error_ecodec_clk:
	platform_driver_unregister(&snddev_ecodec_driver);
error_platform_driver:

	MM_ERR("encounter error\n");
	return -ENODEV;
}
开发者ID:andr00ib,项目名称:3.0.94-victor-kernel,代码行数:31,代码来源:snddev_ecodec.c

示例5: afe_config_fm_volume

int afe_config_fm_volume(uint16_t volume)
{
	struct afe_cmd_fm_volume_config cmd;
	struct msm_afe_state *afe = &the_afe_state;
	int rc = 0;

	MM_INFO(" configure fm volume\n");
	mutex_lock(&afe->lock);
	if (!afe->in_use) {
		/* enable afe */
		rc = msm_adsp_get("AFETASK", &afe->mod, &afe->adsp_ops, afe);
		if (rc < 0) {
			MM_ERR("%s: failed to get AFETASK module\n", __func__);
			goto error_adsp_get;
		}
		rc = msm_adsp_enable(afe->mod);
		if (rc < 0)
			goto error_adsp_enable;
	}
	memset(&cmd, 0, sizeof(cmd));
	cmd.cmd_id = AFE_CMD_FM_PLAYBACK_VOLUME_CMD;
	cmd.volume = volume;

	afe_send_queue(afe, &cmd, sizeof(cmd));

	mutex_unlock(&afe->lock);
	return rc;
error_adsp_enable:
	msm_adsp_put(afe->mod);
error_adsp_get:
	mutex_unlock(&afe->lock);
	return rc;
}
开发者ID:DRHAX34,项目名称:android_kernel_zte_sailboat,代码行数:33,代码来源:afe.c

示例6: afe_config_loopback

/*******************************************************************************
*	Function Name :  afe_config_loopback
*	Args : enable or disable DSP loopback.
*	dependencies : If QCOM changes ADSP firmware loopback command  may not work. 
*
********************************************************************************/
int afe_config_loopback(uint16_t enable)
{
	struct afe_cmd_loopback_config cmd;
	struct msm_afe_state *afe = &the_afe_state;
	int rc = 0;

	MM_INFO(" configure loopback %d\n",enable);
	mutex_lock(&afe->lock);
	if (!afe->in_use) {
		/* enable afe */
		rc = msm_adsp_get("AFETASK", &afe->mod, &afe->adsp_ops, afe);
		if (rc < 0) {
			MM_ERR("%s: failed to get AFETASK module\n", __func__);
			goto error_adsp_get;
		}
		rc = msm_adsp_enable(afe->mod);
		if (rc < 0)
			goto error_adsp_enable;
	}
	memset(&cmd, 0, sizeof(cmd));
	cmd.cmd_id = AFE_CMD_VOICE_LOOPBACK_CMD;
	cmd.enable = enable;

	afe_send_queue(afe, &cmd, sizeof(cmd));

	mutex_unlock(&afe->lock);
	return rc;
error_adsp_enable:
	msm_adsp_put(afe->mod);
error_adsp_get:
	mutex_unlock(&afe->lock);
	return rc;
}
开发者ID:lMonsterl,项目名称:LG_Revolution_Kernel,代码行数:39,代码来源:afe.c

示例7: lge_amp_ctl_probe

static int lge_amp_ctl_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
	struct amp_data *data;
	struct i2c_adapter *adapter = client->adapter;
	int err;

	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA))	{
		err = -EOPNOTSUPP;
		return err;
	}

	MM_INFO("\n");

	data = kzalloc(sizeof(struct amp_data), GFP_KERNEL);
	if (NULL == data)
		return -ENOMEM;
	_data = data;
	data->client = client;
	i2c_set_clientdata(client, data);

	if (lge_bd_rev >= LGE_REV_B)
		wm9093_amp_init(data);
	else
		tpa2055_amp_init(data);

	MM_ERR("%s chip found : bd rev : %d\n", client->name, lge_bd_rev);

	data->amp_off_all();
	err = misc_register(&lge_amp_misc);

	return 0;
}
开发者ID:poogie,项目名称:kernel_optimus_sol,代码行数:32,代码来源:lge_audio_amp.c

示例8: audrec_dsp_event

static void audrec_dsp_event(void *data, unsigned id, size_t len,
			    void (*getevent)(void *ptr, size_t len))
{
	struct audio_in *audio = data;
	uint16_t msg[3];
	getevent(msg, sizeof(msg));

	switch (id) {
	case AUDREC_MSG_CMD_CFG_DONE_MSG:
		if (msg[0] & AUDREC_MSG_CFG_DONE_TYPE_0_UPDATE) {
			if (msg[0] & AUDREC_MSG_CFG_DONE_TYPE_0_ENA) {
				MM_INFO("CFG ENABLED\n");
				audio_in_encoder_config(audio);
			} else {
				MM_INFO("CFG SLEEP\n");
				audio->running = 0;
				audio->tx_agc_enable = 0;
				audio->ns_enable = 0;
				audio->iir_enable = 0;
			}
		} else {
			MM_INFO("CMD_CFG_DONE %x\n", msg[0]);
		}
		break;
	case AUDREC_MSG_CMD_AREC_PARAM_CFG_DONE_MSG: {
		MM_INFO("PARAM CFG DONE\n");
		audio->running = 1;
		audio_dsp_set_tx_agc(audio);
		audio_dsp_set_ns(audio);
		audio_dsp_set_iir(audio);
		break;
	}
	case AUDREC_MSG_FATAL_ERR_MSG:
		MM_ERR("ERROR %x\n", msg[0]);
		break;
	case AUDREC_MSG_PACKET_READY_MSG:
/* REC_DBG("type %x, count %d", msg[0], (msg[1] | (msg[2] << 16))); */
		audio_in_get_dsp_frames(audio);
		break;
	case ADSP_MESSAGE_ID:
		MM_DBG("Received ADSP event: module \
				enable/disable(audrectask)\n");
		break;
	default:
		MM_ERR("unknown event %d\n", id);
	}
}
开发者ID:F4uzan,项目名称:skernel_u0,代码行数:47,代码来源:audio_in.c

示例9: msm_adsp_get

int msm_adsp_get(const char *name, struct msm_adsp_module **out,
		 struct msm_adsp_ops *ops, void *driver_data)
{
	struct msm_adsp_module *module;
	int rc = 0;
	static uint32_t init_info_cmd_sent;

	mutex_lock(&adsp_info.lock);
	if (!init_info_cmd_sent) {
		init_waitqueue_head(&adsp_info.init_info_wait);
		msm_get_init_info();
		rc = wait_event_timeout(adsp_info.init_info_wait,
			adsp_info.init_info_state == ADSP_STATE_INIT_INFO,
			5 * HZ);
		if (!rc) {
			MM_ERR("INIT_INFO failed\n");
			mutex_unlock(&adsp_info.lock);
			return -ETIMEDOUT;

		}
		init_info_cmd_sent++;
	}
	mutex_unlock(&adsp_info.lock);

	module = find_adsp_module_by_name(&adsp_info, name);
	if (!module)
		return -ENODEV;

	mutex_lock(&module->lock);
	MM_INFO("opening module %s\n", module->name);

	if (module->ops) {
		rc = -EBUSY;
		goto done;
	}

	rc = adsp_rpc_init(module);
	if (rc)
		goto done;

	module->ops = ops;
	module->driver_data = driver_data;
	*out = module;
	rc = rpc_adsp_rtos_app_to_modem(RPC_ADSP_RTOS_CMD_REGISTER_APP,
					module->id, module);
	if (rc) {
		module->ops = NULL;
		module->driver_data = NULL;
		*out = NULL;
		MM_ERR("REGISTER_APP failed\n");
		goto done;
	}

	MM_DBG("module %s has been registered\n", module->name);

done:
	mutex_unlock(&module->lock);
	return rc;
}
开发者ID:Alexxis2233,项目名称:gcore_kernel,代码行数:59,代码来源:adsp.c

示例10: remote_cb_function

static void remote_cb_function(void *context, u32 param,
				void *evt_buf, u32 len)
{
	struct voice_header *hdr;
	struct voice_data *v = context;

	hdr = (struct voice_header *)evt_buf;

	MM_INFO("len=%d id=%d\n", len, hdr->id);

	if (len <= 0) {
		MM_ERR("unexpected event with length %d \n", len);
		return;
	}

	switch (hdr->id) {
	case EVENT_ACQUIRE_START:
		atomic_inc(&v->acq_start_flag);
		wake_up(&v->dev_wait);
		mutex_lock(&voice.lock);
		v->voc_event = VOICE_ACQUIRE_START;
		v->network = ((struct voice_network *)evt_buf)->network_info;
		mutex_unlock(&voice.lock);
		complete(&v->complete);
		break;
	case EVENT_RELEASE_START:
		/* If ACQUIRED come in before the RELEASE,
		* will only services the RELEASE */
		atomic_inc(&v->rel_start_flag);
		wake_up(&v->voc_wait);
		wake_up(&v->dev_wait);
		mutex_lock(&voice.lock);
		v->voc_event = VOICE_RELEASE_START;
		mutex_unlock(&voice.lock);
		complete(&v->complete);
		break;
	case EVENT_CHANGE_START:
		mutex_lock(&voice.lock);
		v->voc_event = VOICE_CHANGE_START;
		mutex_unlock(&voice.lock);
		complete(&v->complete);
		break;
	case EVENT_NETWORK_RECONFIG:
		/* send network change to audio_dev,
		if sample rate is less than 16k,
		otherwise, send acquire done */
		mutex_lock(&voice.lock);
		v->voc_event = VOICE_NETWORK_RECONFIG;
		v->network = ((struct voice_network *)evt_buf)->network_info;
		mutex_unlock(&voice.lock);
		complete(&v->complete);
		break;
	default:
		MM_ERR("Undefined event %d \n", hdr->id);
	}

}
开发者ID:lupohirp,项目名称:Acer-Liquid-A1-2.6.35,代码行数:57,代码来源:voice.c

示例11: lge_amp_ctl_remove

static int lge_amp_ctl_remove(struct i2c_client *client)
{
	struct amp_data *data = i2c_get_clientdata(client);
	kfree(data);

	MM_INFO("\n");
	i2c_set_clientdata(client, NULL);
	return 0;
}
开发者ID:poogie,项目名称:kernel_optimus_sol,代码行数:9,代码来源:lge_audio_amp.c

示例12: set_amp_speaker_stereo_audio

void set_amp_speaker_stereo_audio(void)
{
	int fail=0;
	fail |= WriteI2C(SUBSYSTEM_CONTROL, (~SWS & ~BYPASS & ~SSM_EN));
	fail |= WriteI2C(INPUT_CONTROL, (amp_cal_data[SPEAKER_AUDIO_INPUT] | IN2_SE)); 							//Modify for desired IN gain 
	fail |= WriteI2C(SPEAKER_VOLUME, (SPK_EN | amp_cal_data[SPEAKER_AUDIO_OUTPUT]));							//Modify for desired SP gain
	fail |= WriteI2C(SPEAKER_OUTPUT, SPKOUT_IN2);

    MM_INFO("7 set_amp_speaker_stereo_voice() %d\n", fail);
}
开发者ID:Bengineered,项目名称:kernel-lge-msm7x30,代码行数:10,代码来源:lge_tpa2055-amp_C800.c

示例13: voice_cmd_device_info

static int voice_cmd_device_info(struct voice_data *v)
{
	struct voice_device cmd;
	int err, vol;

	MM_INFO("tx_dev=%d, rx_dev=%d, tx_sample=%d, tx_mute=%d\n",
			v->dev_tx.dev_acdb_id, v->dev_rx.dev_acdb_id,
			v->dev_tx.sample, v->dev_tx.mute);

	mutex_lock(&voice.vol_lock);

	cmd.hdr.id = CMD_DEVICE_INFO;
	cmd.hdr.data_len = sizeof(struct voice_device) -
			sizeof(struct voice_header);
	cmd.tx_device = v->dev_tx.dev_acdb_id;
	cmd.rx_device = v->dev_rx.dev_acdb_id;
	if (v->network == NETWORK_WCDMA_WB)
		vol = v->min_rx_vol[VOC_WB_INDEX] +
			((v->max_rx_vol[VOC_WB_INDEX] -
			v->min_rx_vol[VOC_WB_INDEX]) * v->dev_rx.volume)/100;
	else
		vol = v->min_rx_vol[VOC_NB_INDEX] +
			((v->max_rx_vol[VOC_NB_INDEX] -
			v->min_rx_vol[VOC_NB_INDEX]) * v->dev_rx.volume)/100;
	cmd.rx_volume = (u32)vol; /* in mb */
	cmd.rx_mute = 0;
	cmd.tx_mute = v->dev_tx.mute;
	cmd.rx_sample = v->dev_rx.sample/1000;
	cmd.tx_sample = v->dev_tx.sample/1000;
#if 1 // CPAUDIO : send more info to CP from AP
	if (v->network == NETWORK_WCDMA_WB)
	{
		cmd.rx_volume_min = v->min_rx_vol[VOC_WB_INDEX];
		cmd.rx_volume_max = v->max_rx_vol[VOC_WB_INDEX];
	}
	else
	{
		cmd.rx_volume_min = v->min_rx_vol[VOC_NB_INDEX];
		cmd.rx_volume_max = v->max_rx_vol[VOC_NB_INDEX];
	}
	cmd.rx_volume_percentage = v->dev_rx.volume;
#endif

	MM_DBG("rx_vol=%d, rx_sample=%d\n", cmd.rx_volume, v->dev_rx.sample);

	err = dalrpc_fcn_5(VOICE_DALRPC_CMD, v->handle, &cmd,
			 sizeof(struct voice_device));

	mutex_unlock(&voice.vol_lock);

	if (err)
		MM_ERR("Voice device command failed\n");
	return err;
}
开发者ID:erik96,项目名称:Samsung-Galaxy-S-Plus,代码行数:54,代码来源:voice.c

示例14: afe_exit

static void __exit afe_exit(void)
{
	MM_INFO("AFE driver exit\n");
#ifdef CONFIG_DEBUG_FS
	if (debugfs_afelb)
		debugfs_remove(debugfs_afelb);
#endif
	if (the_afe_state.mod)
		msm_adsp_put(the_afe_state.mod);
	return;
}
开发者ID:LDrifta,项目名称:Kernel_MS910_ZVD_Speed_Unlshd,代码行数:11,代码来源:afe.c

示例15: audpre_dsp_event

/* ------------------- dsp --------------------- */
static void audpre_dsp_event(void *data, unsigned id, size_t len,
			    void (*getevent)(void *ptr, size_t len))
{
	uint16_t msg[2];
	getevent(msg, sizeof(msg));

	switch (id) {
	case AUDPREPROC_MSG_CMD_CFG_DONE_MSG:
		MM_INFO("type %d, status_flag %d\n", msg[0], msg[1]);
		break;
	case AUDPREPROC_MSG_ERROR_MSG_ID:
		MM_INFO("err_index %d\n", msg[0]);
		break;
	case ADSP_MESSAGE_ID:
		MM_DBG("Received ADSP event: module enable(audpreproctask)\n");
		break;
	default:
		MM_ERR("unknown event %d\n", id);
	}
}
开发者ID:F4uzan,项目名称:skernel_u0,代码行数:21,代码来源:audio_in.c


注:本文中的MM_INFO函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。