コード例 #1
0
static int msm_v_volume_put(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{
	int dir = ucontrol->value.integer.value[0];
	int volume = ucontrol->value.integer.value[1];

	return msm_set_voice_vol(dir, volume);
}
コード例 #2
0
static int msm_v_volume_put(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{
	int dir = ucontrol->value.integer.value[0];
	int volume = ucontrol->value.integer.value[1];

	pr_aud_info("[ALSA] msm_set_voice_rx_vol: volume %d\n", volume);
	return msm_set_voice_vol(dir, volume);
}
コード例 #3
0
ファイル: msm7x30.c プロジェクト: OMFGB/OMFGB_Mecha_Kernel
static int msm_v_volume_put(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{
	int dir = ucontrol->value.integer.value[0];
	int volume = ucontrol->value.integer.value[1];

	pr_aud_info("[ALSA] msm_set_voice_rx_vol: volume %d\n", volume);
	if (volume < 0) /*set rx mute/unmute.*/
		return msm_set_voice_mute(1, volume == -100 ? 1 : 0);
	else
			return msm_set_voice_vol(dir, volume);
}
コード例 #4
0
static int msm_v_volume_put(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{
	int dir = ucontrol->value.integer.value[0];
	int volume = ucontrol->value.integer.value[1];
	u32 session_id = ucontrol->value.integer.value[2];

	if ((session_id != 0) &&
	    ((session_id < SESSION_ID_BASE) ||
	     (session_id >= SESSION_ID_BASE + MAX_VOC_SESSIONS))) {
		pr_err("%s: Invalid session_id 0x%x\n", __func__, session_id);

		return -EINVAL;
	}

	return msm_set_voice_vol(dir, volume, session_id);
}