本文整理汇总了C++中pr_aud_err函数的典型用法代码示例。如果您正苦于以下问题:C++ pr_aud_err函数的具体用法?C++ pr_aud_err怎么用?C++ pr_aud_err使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pr_aud_err函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: snddev_icodec_set_device_volume_impl
static int snddev_icodec_set_device_volume_impl(
struct msm_snddev_info *dev_info, u32 volume)
{
struct snddev_icodec_state *icodec;
u8 afe_path_id;
int rc = 0;
icodec = dev_info->private_data;
if (icodec->data->capability & SNDDEV_CAP_RX) {
if (support_aic3254)
return rc;
afe_path_id = AFE_HW_PATH_CODEC_RX;
} else
afe_path_id = AFE_HW_PATH_CODEC_TX;
if (icodec->data->dev_vol_type & SNDDEV_DEV_VOL_DIGITAL) {
if (support_adie) {
rc = adie_codec_set_device_digital_volume(icodec->adie_path,
icodec->data->channel_mode ==
REAL_STEREO_CHANNEL_MODE ?
2 : icodec->data->channel_mode, volume);
if (rc < 0) {
pr_aud_err("%s: unable to set_device_digital_volume for"
"%s volume in percentage = %u\n",
__func__, dev_info->name, volume);
return rc;
}
}
} else if (icodec->data->dev_vol_type & SNDDEV_DEV_VOL_ANALOG) {
if (support_adie) {
rc = adie_codec_set_device_analog_volume(icodec->adie_path,
icodec->data->channel_mode ==
REAL_STEREO_CHANNEL_MODE ?
2 : icodec->data->channel_mode, volume);
if (rc < 0) {
pr_aud_err("%s: unable to set_device_analog_volume for"
"%s volume in percentage = %u\n",
__func__, dev_info->name, volume);
return rc;
}
}
} else {
pr_aud_err("%s: Invalid device volume control\n", __func__);
return -EPERM;
}
return rc;
}
开发者ID:MaxGomez,项目名称:HTC-SPADE-7x30-3.0-ION,代码行数:51,代码来源:snddev_icodec.c
示例2: elite_audio_init
static int __init elite_audio_init(void)
{
int ret;
#ifdef CONFIG_AUDIO_USAGE_FOR_POWER_CONSUMPTION
int retval = 0;
#endif
pr_aud_info("%s", __func__);
msm8960_snd_device = platform_device_alloc("soc-audio", 0);
if (!msm8960_snd_device) {
pr_aud_err("%s, Platform device allocation failed\n", __func__);
return -ENOMEM;
}
platform_set_drvdata(msm8960_snd_device, &snd_soc_card_msm8960);
ret = platform_device_add(msm8960_snd_device);
if (ret) {
pr_aud_err("%s, Platform device add failed\n", __func__);
platform_device_put(msm8960_snd_device);
return ret;
}
mutex_init(&audio_notifier_lock);
pr_aud_info("%s: register cable detect func for dock", __func__);
ret = cable_detect_register_notifier(&audio_dock_notifier);
#ifdef CONFIG_AUDIO_USAGE_FOR_POWER_CONSUMPTION
/* Create two audio status file nodes, audio_speaker_t and
* audio_headset_t under /sys/audio_stats/ */
if (audio_stat_kobj == NULL)
{
audio_stat_kobj = kobject_create_and_add("audio_stats", NULL);
retval = sysfs_create_file(audio_stat_kobj, attrs[0]);
if (!retval)
{
pr_err("Speaker file node creation failed under kobject\n");
}
retval = sysfs_create_file(audio_stat_kobj, attrs[1]);
if (!retval)
{
pr_err("Headset file node creation failed under kobject\n");
}
}
#endif
htc_8960_register_q6asm_ops(&qops);
htc_8960_register_pcm_routing_ops(&rops);
acoustic_register_ops(&acoustic);
return ret;
}
开发者ID:Team-Blackout,项目名称:BeastMode-Evita,代码行数:51,代码来源:board-elite-audio.c
示例3: audio_mvs_stop
static int audio_mvs_stop(struct audio_mvs_info_type *audio)
{
int rc = 0;
struct audio_mvs_release_msg release_msg;
pr_aud_info("%s:\n", __func__);
/* Release MVS. */
memset(&release_msg, 0, sizeof(release_msg));
release_msg.client_id = cpu_to_be32(MVS_CLIENT_ID_VOIP);
msm_rpc_setup_req(&release_msg.rpc_hdr,
audio->rpc_prog,
audio->rpc_ver,
MVS_RELEASE_PROC);
audio->rpc_status = RPC_STATUS_FAILURE;
rc = msm_rpc_write(audio->rpc_endpt, &release_msg, sizeof(release_msg));
if (rc >= 0) {
pr_debug("%s: RPC write for release done\n", __func__);
rc = wait_event_timeout(audio->wait,
(audio->rpc_status != RPC_STATUS_FAILURE),
1 * HZ);
if (rc > 0) {
pr_debug("%s: Wait event for release succeeded\n",
__func__);
audio->state = AUDIO_MVS_STOPPED;
/* Un-block read in case it is waiting for data. */
wake_up(&audio->out_wait);
rc = 0;
} else {
pr_aud_err("%s: Wait event for release failed %d\n",
__func__, rc);
}
} else {
pr_aud_err("%s: RPC write for release failed %d\n", __func__, rc);
}
/* Allow sleep. */
wake_unlock(&audio->suspend_lock);
wake_unlock(&audio->idle_lock);
return rc;
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:50,代码来源:audio_mvs.c
示例4: audio_mvs_setup_voc
static int audio_mvs_setup_voc(struct audio_mvs_info_type *audio)
{
int rc = 0;
struct audio_mvs_set_voc_mode_msg set_voc_mode_msg;
pr_debug("%s:\n", __func__);
/* Set EVRC mode. */
memset(&set_voc_mode_msg, 0, sizeof(set_voc_mode_msg));
set_voc_mode_msg.min_rate = cpu_to_be32(audio->rate_type);
set_voc_mode_msg.max_rate = cpu_to_be32(audio->rate_type);
msm_rpc_setup_req(&set_voc_mode_msg.rpc_hdr,
audio->rpc_prog,
audio->rpc_ver,
MVS_VOC_SET_FRAME_RATE_PROC);
audio->rpc_status = RPC_STATUS_FAILURE;
rc = msm_rpc_write(audio->rpc_endpt,
&set_voc_mode_msg,
sizeof(set_voc_mode_msg));
if (rc >= 0) {
pr_debug("%s: RPC write for set voc mode done\n", __func__);
rc = wait_event_timeout(audio->wait,
(audio->rpc_status != RPC_STATUS_FAILURE),
1 * HZ);
if (rc > 0) {
pr_debug("%s: Wait event for set voc mode succeeded\n",
__func__);
/* Save the MVS configuration information. */
audio->frame_mode = MVS_FRAME_MODE_VOC_RX;
rc = 0;
} else {
pr_aud_err("%s: Wait event for set voc mode failed %d\n",
__func__, rc);
}
} else {
pr_aud_err("%s: RPC write for set voc mode failed %d\n",
__func__, rc);
}
return rc;
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:48,代码来源:audio_mvs.c
示例5: msm_device_volume_put
static int msm_device_volume_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
int rc = -EPERM;
struct msm_snddev_info *dev_info;
int dev_id = ucontrol->value.integer.value[0];
int volume = ucontrol->value.integer.value[1];
MM_DBG("dev_id = %d, volume = %d\n", dev_id, volume);
pr_aud_info("[ALSA] msm_set_device_volume: dev %d, volume %d\n",
dev_id, volume);
dev_info = audio_dev_ctrl_find_dev(dev_id);
if (IS_ERR(dev_info)) {
rc = PTR_ERR(dev_info);
pr_aud_err("%s: audio_dev_ctrl_find_dev failed. %ld \n",
__func__, PTR_ERR(dev_info));
return rc;
}
MM_DBG("dev_name = %s dev_id = %d, volume = %d\n",
dev_info->name, dev_id, volume);
if (dev_info->dev_ops.set_device_volume)
rc = dev_info->dev_ops.set_device_volume(dev_info, volume);
else {
pr_aud_info("%s : device %s does not support device volume "
"control.", __func__, dev_info->name);
return -EPERM;
}
return rc;
}
开发者ID:OMFGB,项目名称:OMFGB_Mecha_Kernel,代码行数:35,代码来源:msm7x30.c
示例6: shooter_u_snddev_bmic_pamp_on
void shooter_u_snddev_bmic_pamp_on(int en)
{
int ret;
pr_aud_info("%s %d\n", __func__, en);
if (en) {
ret = pm8058_micbias_enable(OTHC_MICBIAS_1, OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling back mic power failed\n", __func__);
} else {
ret = pm8058_micbias_enable(OTHC_MICBIAS_1, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Enabling back mic power failed\n", __func__);
}
}
开发者ID:cmartinbaughman,项目名称:msm8660_3.4_htc_kernel,代码行数:16,代码来源:board-shooter_u-audio.c
示例7: audio_out_listener
static void audio_out_listener(u32 evt_id, union auddev_evt_data *evt_payload,
void *private_data)
{
struct audio *audio = private_data;
switch (evt_id) {
case AUDDEV_EVT_DEV_RDY:
MM_DBG(":AUDDEV_EVT_DEV_RDY\n");
audio->source |= (0x1 << evt_payload->routing_id);
if (audio->running == 1 && audio->enabled == 1)
audpp_route_stream(audio->dec_id, audio->source);
break;
case AUDDEV_EVT_DEV_RLS:
MM_DBG(":AUDDEV_EVT_DEV_RLS\n");
audio->source &= ~(0x1 << evt_payload->routing_id);
if (audio->running == 1 && audio->enabled == 1)
audpp_route_stream(audio->dec_id, audio->source);
break;
case AUDDEV_EVT_STREAM_VOL_CHG:
audio->vol_pan.volume = evt_payload->session_vol;
MM_DBG(":AUDDEV_EVT_STREAM_VOL_CHG, stream vol %d\n",
audio->vol_pan.volume);
if (audio->running)
audpp_dsp_set_vol_pan(audio->dec_id, &audio->vol_pan,
POPP);
break;
default:
pr_aud_err("ERROR:wrong event\n");
break;
}
}
开发者ID:MaxGomez,项目名称:HTC-SPADE-7x30-3.0-ION,代码行数:30,代码来源:audio_out.c
示例8: fm_audio_ioctl
static long fm_audio_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct audio *audio = file->private_data;
int rc = -EINVAL;
mutex_lock(&audio->lock);
switch (cmd) {
case AUDIO_START:
pr_aud_info("%s: AUDIO_START\n", __func__);
rc = fm_audio_enable(audio);
break;
case AUDIO_STOP:
pr_aud_info("%s: AUDIO_STOP\n", __func__);
rc = fm_audio_disable(audio);
audio->running = 0;
audio->enabled = 0;
break;
case AUDIO_GET_SESSION_ID:
if (copy_to_user((void *) arg, &audio->dec_id,
sizeof(unsigned short)))
rc = -EFAULT;
else
rc = 0;
break;
default:
rc = -EINVAL;
pr_aud_err("%s: Un supported IOCTL\n", __func__);
}
mutex_unlock(&audio->lock);
return rc;
}
开发者ID:Albinoman887,项目名称:pyramid-3.4.10,代码行数:33,代码来源:fm.c
示例9: msm_clear_all_session
int msm_clear_all_session()
{
int rc = 0;
int i = 0, j = 0;
pr_aud_info("%s:\n", __func__);
mutex_lock(&routing_info.adm_mutex);
mutex_lock(&routing_info.copp_list_mutex);
for (j = 1; j < MAX_SESSIONS; j++) {
for (i = 0; i < AFE_MAX_PORTS; i++) {
if (routing_info.copp_list[j][i] != DEVICE_IGNORE) {
rc = adm_close(
routing_info.copp_list[j][i]);
if (rc < 0) {
pr_aud_err("%s: adm close fail copp[%d]"
"session[%d] rc[%d]\n",
__func__,
routing_info.copp_list[j][i],
j, rc);
continue;
}
routing_info.copp_list[j][i] = DEVICE_IGNORE;
rc = 0;
}
}
}
mutex_unlock(&routing_info.copp_list_mutex);
mutex_unlock(&routing_info.adm_mutex);
return rc;
}
开发者ID:Alex163,项目名称:htc-kernel-pyramid,代码行数:29,代码来源:audio_dev_ctl.c
示例10: adie_codec_set_device_analog_volume
int adie_codec_set_device_analog_volume(struct adie_codec_path *path_ptr,
u32 num_channels, u32 volume /* in percentage */)
{
pr_aud_err("%s: analog device volume not supported\n", __func__);
return -EPERM;
}
开发者ID:Flemmard,项目名称:htc7x30-3.0,代码行数:7,代码来源:marimba-codec.c
示例11: verdi_lte_reset_timpani
void verdi_lte_reset_timpani(void)
{
pr_aud_err("hard reset timpani\n");
gpio_set_value(VERDI_LTE_AUD_QTR_RESET, 0);
mdelay(10);
gpio_set_value(VERDI_LTE_AUD_QTR_RESET, 1);
}
开发者ID:finniest,项目名称:hive_kernel,代码行数:7,代码来源:board-verdi-lte-audio.c
示例12: verdi_lte_reset_3254
void verdi_lte_reset_3254(void)
{
pr_aud_err("hard reset aic3254\n");
gpio_set_value(PM8058_GPIO_PM_TO_SYS(VERDI_LTE_AUD_CODEC_RST), 0);
mdelay(1);
gpio_set_value(PM8058_GPIO_PM_TO_SYS(VERDI_LTE_AUD_CODEC_RST), 1);
}
开发者ID:finniest,项目名称:hive_kernel,代码行数:7,代码来源:board-verdi-lte-audio.c
示例13: msm_clear_session_id
int msm_clear_session_id(int session_id)
{
int rc = 0;
int i = 0;
if (session_id < 1 || session_id > 8)
return -EINVAL;
pr_debug("%s: session[%d]\n", __func__, session_id);
mutex_lock(&routing_info.adm_mutex);
mutex_lock(&routing_info.copp_list_mutex);
for (i = 0; i < AFE_MAX_PORTS; i++) {
if (routing_info.copp_list[session_id][i] != DEVICE_IGNORE) {
rc = adm_close(routing_info.copp_list[session_id][i]);
if (rc < 0) {
pr_aud_err("%s: adm close fail port[%d] rc[%d]\n",
__func__,
routing_info.copp_list[session_id][i],
rc);
continue;
}
routing_info.copp_list[session_id][i] = DEVICE_IGNORE;
rc = 0;
}
}
mutex_unlock(&routing_info.copp_list_mutex);
mutex_unlock(&routing_info.adm_mutex);
return rc;
}
开发者ID:Alex163,项目名称:htc-kernel-pyramid,代码行数:28,代码来源:audio_dev_ctl.c
示例14: msm8960_enable_codec_ext_clk
int msm8960_enable_codec_ext_clk(
struct snd_soc_codec *codec, int enable)
{
pr_debug("%s: enable = %d\n", __func__, enable);
if (enable) {
clk_users++;
pr_debug("%s: clk_users = %d\n", __func__, clk_users);
if (clk_users != 1)
return 0;
codec_clk = clk_get(NULL, "i2s_spkr_osr_clk");
if (codec_clk) {
clk_set_rate(codec_clk, TABLA_EXT_CLK_RATE);
clk_enable(codec_clk);
tabla_mclk_enable(codec, 1);
} else {
pr_aud_err("%s: Error setting Tabla MCLK\n", __func__);
clk_users--;
return -EINVAL;
}
} else {
pr_debug("%s: clk_users = %d\n", __func__, clk_users);
if (clk_users == 0)
return 0;
clk_users--;
if (!clk_users) {
pr_debug("%s: disabling MCLK. clk_users = %d\n",
__func__, clk_users);
clk_disable(codec_clk);
clk_put(codec_clk);
tabla_mclk_enable(codec, 0);
}
}
return 0;
}
开发者ID:KIMMINWOO,项目名称:FusionUlt-AOSP-MR1,代码行数:35,代码来源:board-fighter-audio.c
示例15: audio_enable
/* must be called with audio->lock held */
static int audio_enable(struct audio *audio)
{
pr_aud_info("audio_enable\n");
if (audio->enabled)
return 0;
/* refuse to start if we're not ready */
if (!audio->out[0].used || !audio->out[1].used)
return -EIO;
/* we start buffers 0 and 1, so buffer 0 will be the
* next one the dsp will want
*/
audio->out_tail = 0;
audio->out_needed = 0;
audio_prevent_sleep(audio);
if (audpp_enable(-1, audio_dsp_event, audio)) {
pr_aud_err("audpp_enable() failed\n");
audio_allow_sleep(audio);
return -ENODEV;
}
audio->enabled = 1;
htc_pwrsink_set(PWRSINK_AUDIO, 100);
return 0;
}
开发者ID:MaxGomez,项目名称:HTC-SPADE-7x30-3.0-ION,代码行数:30,代码来源:audio_out.c
示例16: snddev_mi2s_probe
static int snddev_mi2s_probe(struct platform_device *pdev)
{
int rc = 0;
struct snddev_mi2s_data *pdata;
struct msm_snddev_info *dev_info;
if (!pdev || !pdev->dev.platform_data) {
printk(KERN_ALERT "Invalid caller\n");
return -ENODEV;
}
pdata = pdev->dev.platform_data;
dev_info = kzalloc(sizeof(struct msm_snddev_info), GFP_KERNEL);
if (!dev_info) {
pr_aud_err("%s: uneable to allocate memeory for msm_snddev_info\n",
__func__);
return -ENOMEM;
}
dev_info->name = pdata->name;
dev_info->copp_id = pdata->copp_id;
dev_info->dev_ops.open = snddev_mi2s_open;
dev_info->dev_ops.close = snddev_mi2s_close;
dev_info->private_data = (void *)pdata;
dev_info->dev_ops.set_freq = snddev_mi2s_set_freq;
dev_info->capability = pdata->capability;
dev_info->opened = 0;
dev_info->sample_rate = pdata->sample_rate;
msm_snddev_register(dev_info);
pr_aud_info("%s: probe done for %s\n", __func__, pdata->name);
return rc;
}
开发者ID:johnnyslt,项目名称:pyramid-3.4.10,代码行数:35,代码来源:snddev_mi2s.c
示例17: audpreproc_dsp_event
/* ------------------- dsp preproc event handler--------------------- */
static void audpreproc_dsp_event(void *data, unsigned id, void *msg)
{
struct audio_in *audio = data;
switch (id) {
case AUDPREPROC_ERROR_MSG: {
struct audpreproc_err_msg *err_msg = msg;
pr_aud_err("ERROR_MSG: stream id %d err idx %d\n",
err_msg->stream_id, err_msg->aud_preproc_err_idx);
/* Error case */
wake_up(&audio->wait_enable);
break;
}
case AUDPREPROC_CMD_CFG_DONE_MSG: {
MM_DBG("CMD_CFG_DONE_MSG \n");
break;
}
case AUDPREPROC_CMD_ENC_CFG_DONE_MSG: {
struct audpreproc_cmd_enc_cfg_done_msg *enc_cfg_msg = msg;
MM_DBG("CMD_ENC_CFG_DONE_MSG: stream id %d enc type \
0x%8x\n", enc_cfg_msg->stream_id,
enc_cfg_msg->rec_enc_type);
/* Encoder enable success */
if (enc_cfg_msg->rec_enc_type & ENCODE_ENABLE)
audamrnb_in_param_config(audio);
else { /* Encoder disable success */
audio->running = 0;
audamrnb_in_record_config(audio, 0);
}
break;
}
case AUDPREPROC_CMD_ENC_PARAM_CFG_DONE_MSG: {
MM_DBG("CMD_ENC_PARAM_CFG_DONE_MSG \n");
audamrnb_in_mem_config(audio);
break;
}
case AUDPREPROC_AFE_CMD_AUDIO_RECORD_CFG_DONE_MSG: {
MM_DBG("AFE_CMD_AUDIO_RECORD_CFG_DONE_MSG \n");
wake_up(&audio->wait_enable);
break;
}
default:
pr_aud_err("Unknown Event id %d\n", id);
}
}
开发者ID:kenkit,项目名称:AndromadusMod-New,代码行数:48,代码来源:audio_amrnb_in.c
示例18: auddev_register_evt_listner
int auddev_register_evt_listner(u32 evt_id, u32 clnt_type, u32 clnt_id,
void (*listner)(u32 evt_id,
union auddev_evt_data *evt_payload,
void *private_data),
void *private_data)
{
int rc;
struct msm_snd_evt_listner *callback = NULL;
struct msm_snd_evt_listner *new_cb;
#ifdef CONFIG_MACH_SHOOTER_U
pr_aud_info("%s(%d) ++\n", __func__, __LINE__);
#endif
new_cb = kzalloc(sizeof(struct msm_snd_evt_listner), GFP_KERNEL);
#ifdef CONFIG_MACH_SHOOTER_U
pr_aud_info("%s(%d) \n", __func__, __LINE__);
#endif
if (!new_cb) {
pr_aud_err("No memory to add new listener node\n");
return -ENOMEM;
}
mutex_lock(&session_lock);
#ifdef CONFIG_MACH_SHOOTER_U
pr_aud_info("%s(%d) \n", __func__, __LINE__);
#endif
new_cb->cb_next = NULL;
new_cb->auddev_evt_listener = listner;
new_cb->evt_id = evt_id;
new_cb->clnt_type = clnt_type;
new_cb->clnt_id = clnt_id;
new_cb->private_data = private_data;
if (event.cb == NULL) {
event.cb = new_cb;
new_cb->cb_prev = NULL;
} else {
callback = event.cb;
for (; ;) {
if (callback->cb_next == NULL)
break;
else {
callback = callback->cb_next;
continue;
}
}
#ifdef CONFIG_MACH_SHOOTER_U
pr_aud_info("%s(%d) \n", __func__, __LINE__);
#endif
callback->cb_next = new_cb;
new_cb->cb_prev = callback;
}
event.num_listner++;
mutex_unlock(&session_lock);
#ifdef CONFIG_MACH_SHOOTER_U
pr_aud_info("%s(%d) --\n", __func__, __LINE__);
#endif
rc = 0;
return rc;
}
开发者ID:cmartinbaughman,项目名称:android_kernel_htc_msm8660-bt,代码行数:59,代码来源:audio_dev_ctl.c
示例19: spi_aic3254_init
static int __init spi_aic3254_init(void)
{
int ret = 0;
struct ecodec_aic3254_state *codec_drv = &codec_clk;
pr_aud_info("%s\n", __func__);
mutex_init(&lock);
ret = spi_register_driver(&spi_aic3254);
if (ret < 0) {
pr_aud_err("%s:failed to register spi driver(%d)\n", __func__, ret);
return ret;
}
ret = misc_register(&aic3254_misc);
if (ret < 0) {
pr_aud_err("%s:failed to register misc device\n", __func__);
spi_unregister_driver(&spi_aic3254);
return ret;
}
#if defined(CONFIG_ARCH_MSM7X30)
codec_drv->rx_mclk = clk_get(NULL, "mi2s_codec_rx_m_clk");
if (IS_ERR(codec_drv->rx_mclk)) {
pr_aud_err("%s:failed to get mi2s mclk\n", __func__);
misc_deregister(&aic3254_misc);
spi_unregister_driver(&spi_aic3254);
return -ENODEV;
}
codec_drv->rx_sclk = clk_get(NULL, "mi2s_codec_rx_s_clk");
if (IS_ERR(codec_drv->rx_sclk)) {
pr_aud_err("%s:failed to get mi2s sclk\n", __func__);
misc_deregister(&aic3254_misc);
spi_unregister_driver(&spi_aic3254);
clk_put(codec_drv->rx_mclk);
return -ENODEV;
}
#endif
pm_qos_add_request(&codec_drv->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
PM_QOS_DEFAULT_VALUE);
wake_lock_init(&codec_drv->wakelock, WAKE_LOCK_SUSPEND,
"aic3254_suspend_lock");
return 0;
}
开发者ID:jekapaty,项目名称:SebastianFM-kernel,代码行数:46,代码来源:spi_aic3254.c
示例20: doubleshot_snddev_bmic_pamp_on
void doubleshot_snddev_bmic_pamp_on(int en)
{
int ret;
pr_aud_info("%s %d\n", __func__, en);
if (en) {
ret = pm8058_micbias_enable(OTHC_MICBIAS_1, OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling back mic power failed\n", __func__);
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(DOUBLESHOT_AUD_MIC_SEL), 0);
} else {
ret = pm8058_micbias_enable(OTHC_MICBIAS_1, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Enabling back mic power failed\n", __func__);
}
}
开发者ID:TeamSXL,项目名称:ds-kernel-3.4,代码行数:17,代码来源:board-doubleshot-audio.c
注:本文中的pr_aud_err函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论