本文整理汇总了C++中pr_aud_info函数的典型用法代码示例。如果您正苦于以下问题:C++ pr_aud_info函数的具体用法?C++ pr_aud_info怎么用?C++ pr_aud_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pr_aud_info函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runnymede_snddev_bt_sco_pamp_on
void runnymede_snddev_bt_sco_pamp_on(int en)
{
static int bt_sco_refcount;
pr_aud_info("%s %d\n", __func__, en);
mutex_lock(&bt_sco_lock);
if (en) {
if (++bt_sco_refcount == 1)
config_gpio_table(aux_pcm_gpio_on,
ARRAY_SIZE(aux_pcm_gpio_on));
} else {
if (--bt_sco_refcount == 0) {
config_gpio_table(aux_pcm_gpio_off,
ARRAY_SIZE(aux_pcm_gpio_off));
gpio_set_value(runnymede_GPIO_BT_PCM_OUT, 0);
gpio_set_value(runnymede_GPIO_BT_PCM_SYNC, 0);
gpio_set_value(runnymede_GPIO_BT_PCM_CLK, 0);
}
}
mutex_unlock(&bt_sco_lock);
}
示例2: rider_snddev_bmic_pamp_on
void rider_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_err("%s: Enabling int mic power failed\n", __func__);
/* select internal mic path */
gpio_set_value(PM8058_GPIO_PM_TO_SYS(RIDER_AUD_MIC_SEL), 0);
} else {
ret = pm8058_micbias_enable(OTHC_MICBIAS_1, OTHC_SIGNAL_OFF);
if (ret)
pr_err("%s: Enabling int mic power failed\n", __func__);
}
}
示例3: doubleshot_snddev_hs_spk_pamp_on
void doubleshot_snddev_hs_spk_pamp_on(int en)
{
pr_aud_info("%s %d\n", __func__, en);
if (en) {
msleep(50);
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(DOUBLESHOT_AUD_HP_EN), 1);
set_speaker_headset_amp(1);
if (!atomic_read(&aic3254_ctl)) {
curr_rx_mode |= BIT_SPEAKER;
curr_rx_mode |= BIT_HEADSET;
}
} else {
set_speaker_headset_amp(0);
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(DOUBLESHOT_AUD_HP_EN), 0);
if (!atomic_read(&aic3254_ctl)) {
curr_rx_mode &= ~BIT_SPEAKER;
curr_rx_mode &= ~BIT_HEADSET;
}
}
}
示例4: doubleshot_snddev_imic_pamp_on
void doubleshot_snddev_imic_pamp_on(int en)
{
int ret;
pr_aud_info("%s %d\n", __func__, en);
doubleshot_snddev_bmic_pamp_on(en);
if (en) {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);
} else {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);
}
}
示例5: aprv2_core_fn_q
static int32_t aprv2_core_fn_q(struct apr_client_data *data, void *priv)
{
struct adsp_get_version *payload;
uint32_t *payload1;
struct adsp_service_info *svc_info;
int i;
pr_aud_info("core msg: payload len = %d\n", data->payload_size);
switch (data->opcode) {
case APR_BASIC_RSP_RESULT:{
payload1 = data->payload;
if (payload1[0] == ADSP_CMD_SET_POWER_COLLAPSE_STATE) {
pr_aud_info("Cmd[0x%x] status[0x%x]\n", payload1[0],
payload1[1]);
break;
} else
pr_aud_err("Invalid cmd rsp[0x%x][0x%x]\n", payload1[0],
payload1[1]);
break;
}
case ADSP_GET_VERSION_RSP:{
if (data->payload_size) {
payload = data->payload;
svc_info = (struct adsp_service_info *)
((char *)payload + sizeof(struct adsp_get_version));
pr_aud_info("----------------------------------------\n");
pr_aud_info("Build id = %x\n", payload->build_id);
pr_aud_info("Number of services= %x\n", payload->svc_cnt);
pr_aud_info("----------------------------------------\n");
for (i = 0; i < payload->svc_cnt; i++)
pr_aud_info("%s\t%x.%x\n",
svc_names[svc_info[i].svc_id],
(svc_info[i].svc_ver & 0xFFFF0000) >> 16,
(svc_info[i].svc_ver & 0xFFFF));
pr_aud_info("-----------------------------------------\n");
} else
pr_aud_info("zero payload for ADSP_GET_VERSION_RSP\n");
break;
}
示例6: holiday_snddev_hs_spk_pamp_on
void holiday_snddev_hs_spk_pamp_on(int en)
{
pr_aud_info("%s %d\n", __func__, en);
if (en) {
gpio_set_value(PM8058_GPIO_PM_TO_SYS(HOLIDAY_AUD_HANDSET_ENO), 1);
msleep(50);
set_speaker_headset_amp(1);
if (!atomic_read(&aic3254_ctl)) {
curr_rx_mode |= BIT_SPEAKER;
curr_rx_mode |= BIT_HEADSET;
}
} else {
set_speaker_headset_amp(0);
gpio_set_value(PM8058_GPIO_PM_TO_SYS(HOLIDAY_AUD_HANDSET_ENO), 0);
if (!atomic_read(&aic3254_ctl)) {
curr_rx_mode &= ~BIT_SPEAKER;
curr_rx_mode &= ~BIT_HEADSET;
}
}
}
示例7: pyramid_snddev_poweramp_on
void pyramid_snddev_poweramp_on(int en)
{
pr_aud_info("%s %d\n", __func__, en);
if (en) {
msleep(50);
gpio_request(PM8058_GPIO_PM_TO_SYS(PYRAMID_AUD_HP_EN),
"AUD_HP_EN");
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(PYRAMID_AUD_HP_EN), 1);
set_speaker_amp(1);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode |= BIT_SPEAKER;
} else {
set_speaker_amp(0);
gpio_request(PM8058_GPIO_PM_TO_SYS(PYRAMID_AUD_HP_EN),
"AUD_HP_EN");
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(PYRAMID_AUD_HP_EN), 0);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode &= ~BIT_SPEAKER;
}
}
示例8: shooter_u_snddev_hsed_pamp_on
void shooter_u_snddev_hsed_pamp_on(int en)
{
pr_aud_info("%s %d\n", __func__, en);
if (en) {
msleep(30);
gpio_request(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_AUD_HP_EN),
"AUD_HP_EN");
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_AUD_HP_EN), 1);
set_headset_amp(1);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode |= BIT_HEADSET;
} else {
set_headset_amp(0);
gpio_request(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_AUD_HP_EN),
"AUD_HP_EN");
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_AUD_HP_EN), 0);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode &= ~BIT_HEADSET;
}
}
示例9: msm_set_voice_mute
int msm_set_voice_mute(int dir, int mute)
{
MM_AUD_INFO("dir %x mute %x\n", dir, mute);
#ifdef CONFIG_2WCR
if (!audio_dev_ctrl.voice_rx_dev
|| !audio_dev_ctrl.voice_tx_dev)
return -EPERM;
#endif
if (dir == DIR_TX) {
routing_info.tx_mute = mute;
broadcast_event(AUDDEV_EVT_DEVICE_VOL_MUTE_CHG,
routing_info.voice_tx_dev_id, SESSION_IGNORE);
} else{
routing_info.rx_mute = mute;
pr_aud_info("%s, rx_mute=%d\n", __func__, routing_info.rx_mute);
broadcast_event(AUDDEV_EVT_DEVICE_VOL_MUTE_CHG,
routing_info.voice_rx_dev_id, SESSION_IGNORE);
}
return 0;
}
示例10: rider_snddev_hsed_pamp_on
void rider_snddev_hsed_pamp_on(int en)
{
pr_aud_info("%s %d\n", __func__, en);
if (en) {
/* enable rx route */
msleep(30);
gpio_set_value(PM8058_GPIO_PM_TO_SYS(RIDER_AUD_HANDSET_ENO), 1);
set_headset_amp(1);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode |= BIT_HEADSET;
msleep(5);
} else {
/* disable rx route */
set_headset_amp(0);
gpio_set_value(PM8058_GPIO_PM_TO_SYS(RIDER_AUD_HANDSET_ENO), 0);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode &= ~BIT_HEADSET;
}
}
示例11: runnymede_snddev_poweramp_on
void runnymede_snddev_poweramp_on(int en)
{
pr_aud_info("%s %d\n", __func__, en);
if (en) {
mdelay(30);
gpio_request(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_SPK_SD),
"AMP_EN");
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_SPK_SD), 1);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode |= BIT_SPEAKER;
} else {
/* Reset AIC3254 */
gpio_request(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_SPK_SD),
"AMP_EN");
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_SPK_SD), 0);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode &= ~BIT_SPEAKER;
}
}
示例12: verdi_lte_snddev_stereo_mic_pamp_on
void verdi_lte_snddev_stereo_mic_pamp_on(int en)
{
int ret;
pr_aud_info("%s %d\n", __func__, en);
if (en) {
verdi_lte_audio_2v85_enable(en);
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, \
OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", \
__func__);
ret = pm8058_micbias_enable(OTHC_MICBIAS_1, \
OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", \
__func__);
/* select internal mic path */
gpio_set_value(PM8058_GPIO_PM_TO_SYS( \
VERDI_LTE_AUD_STEREO_REC), 1);
gpio_set_value(PM8058_GPIO_PM_TO_SYS(VERDI_LTE_AUD_MIC_SEL), 0);
} else {
gpio_set_value(PM8058_GPIO_PM_TO_SYS( \
VERDI_LTE_AUD_STEREO_REC), 0);
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Disabling int mic power failed\n", \
__func__);
ret = pm8058_micbias_enable(OTHC_MICBIAS_1, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Disabling int mic power failed\n", \
__func__);
verdi_lte_audio_2v85_enable(en);
}
}
示例13: shooter_u_snddev_receiver_pamp_on
void shooter_u_snddev_receiver_pamp_on(int en)
{
pr_aud_info("%s %d\n", __func__, en);
if (en) {
/* enable rx route */
gpio_request(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_AUD_HP_EN),
"AUD_HP_EN");
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_AUD_HP_EN), 1);
set_handset_amp(1);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode |= BIT_RECEIVER;
} else {
/* disable rx route */
set_handset_amp(0);
gpio_request(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_AUD_HP_EN),
"AUD_HP_EN");
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_AUD_HP_EN), 0);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode &= ~BIT_RECEIVER;
}
}
示例14: pyramid_snddev_bmic_pamp_on
void pyramid_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__);
/* select internal mic path */
gpio_request(PM8058_GPIO_PM_TO_SYS(PYRAMID_AUD_MIC_SEL),
"AUD_MIC_SEL");
gpio_direction_output(PM8058_GPIO_PM_TO_SYS(PYRAMID_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__);
}
}
示例15: runnymede_snddev_receiver_pamp_on
void runnymede_snddev_receiver_pamp_on(int en)
{
pr_aud_info("%s %d\n", __func__, en);
if (en) {
gpio_set_value(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_AMP_EN), 1);
gpio_request(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_AMP_EN),
"HP_AMP_EN");
mdelay(20);
set_handset_amp(1);
if (!atomic_read(&aic3254_ctl))
curr_rx_mode |= BIT_RECEIVER;
} else {
set_handset_amp(0);
gpio_set_value(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_AMP_EN), 0);
gpio_request(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_AMP_EN),
"HP_AMP_EN");
if (!atomic_read(&aic3254_ctl))
curr_rx_mode &= ~BIT_RECEIVER;
}
}