Loading hal/audio_hw.c +0 −38 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ #define DIRECT_PCM_NUM_FRAGMENTS 2 #define COMPRESS_PLAYBACK_VOLUME_MAX 0x2000 #define VOIP_PLAYBACK_VOLUME_MAX 0x2000 #define PCM_PLAYBACK_VOLUME_MAX 0x2000 #define DSD_VOLUME_MIN_DB (-110) #define PROXY_OPEN_RETRY_COUNT 100 Loading Loading @@ -444,7 +443,6 @@ static int last_known_cal_step = -1 ; static int check_a2dp_restore_l(struct audio_device *adev, struct stream_out *out, bool restore); static int out_set_compr_volume(struct audio_stream_out *stream, float left, float right); static int out_set_voip_volume(struct audio_stream_out *stream, float left, float right); static int out_set_pcm_volume(struct audio_stream_out *stream, float left, float right); static bool may_use_noirq_mode(struct audio_device *adev, audio_usecase_t uc_id, int flags __unused) Loading Loading @@ -3101,8 +3099,6 @@ int start_output_stream(struct stream_out *out) // apply volume for voip playback after path is set up if (out->usecase == USECASE_AUDIO_PLAYBACK_VOIP) out_set_voip_volume(&out->stream, out->volume_l, out->volume_r); else if ((out->usecase == USECASE_AUDIO_PLAYBACK_LOW_LATENCY || out->usecase == USECASE_AUDIO_PLAYBACK_DEEP_BUFFER)) out_set_pcm_volume(&out->stream, out->volume_l, out->volume_r); } else { platform_set_stream_channel_map(adev->platform, out->channel_mask, out->pcm_device_id, &out->channel_map_param.channel_map[0]); Loading Loading @@ -4159,33 +4155,6 @@ static int out_set_voip_volume(struct audio_stream_out *stream, float left, return 0; } static int out_set_pcm_volume(struct audio_stream_out *stream, float left, float right) { struct stream_out *out = (struct stream_out *)stream; /* Volume control for pcm playback */ if (left != right) { return -EINVAL; } else { char mixer_ctl_name [128]; struct audio_device *adev = out->dev; struct mixer_ctl *ctl; int pcm_device_id = platform_get_pcm_device_id(out->usecase, PCM_PLAYBACK); snprintf(mixer_ctl_name, sizeof(mixer_ctl_name), "Playback %d Volume", pcm_device_id); ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name); if (!ctl) { ALOGE("%s : Could not get ctl for mixer cmd - %s", __func__, mixer_ctl_name); return -EINVAL; } int volume = (int) (left * PCM_PLAYBACK_VOLUME_MAX); mixer_ctl_set_value(ctl, 0, volume); ALOGV("%s : Pcm set volume value %d", __func__, volume); return 0; } } static int out_set_volume(struct audio_stream_out *stream, float left, float right) { Loading Loading @@ -4235,13 +4204,6 @@ static int out_set_volume(struct audio_stream_out *stream, float left, out->volume_l = left; out->volume_r = right; return ret; } else { /* Volume control for pcm playback */ if (!out->standby) ret = out_set_pcm_volume(stream, left, right); out->volume_l = left; out->volume_r = right; return ret; } return -ENOSYS; Loading Loading
hal/audio_hw.c +0 −38 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ #define DIRECT_PCM_NUM_FRAGMENTS 2 #define COMPRESS_PLAYBACK_VOLUME_MAX 0x2000 #define VOIP_PLAYBACK_VOLUME_MAX 0x2000 #define PCM_PLAYBACK_VOLUME_MAX 0x2000 #define DSD_VOLUME_MIN_DB (-110) #define PROXY_OPEN_RETRY_COUNT 100 Loading Loading @@ -444,7 +443,6 @@ static int last_known_cal_step = -1 ; static int check_a2dp_restore_l(struct audio_device *adev, struct stream_out *out, bool restore); static int out_set_compr_volume(struct audio_stream_out *stream, float left, float right); static int out_set_voip_volume(struct audio_stream_out *stream, float left, float right); static int out_set_pcm_volume(struct audio_stream_out *stream, float left, float right); static bool may_use_noirq_mode(struct audio_device *adev, audio_usecase_t uc_id, int flags __unused) Loading Loading @@ -3101,8 +3099,6 @@ int start_output_stream(struct stream_out *out) // apply volume for voip playback after path is set up if (out->usecase == USECASE_AUDIO_PLAYBACK_VOIP) out_set_voip_volume(&out->stream, out->volume_l, out->volume_r); else if ((out->usecase == USECASE_AUDIO_PLAYBACK_LOW_LATENCY || out->usecase == USECASE_AUDIO_PLAYBACK_DEEP_BUFFER)) out_set_pcm_volume(&out->stream, out->volume_l, out->volume_r); } else { platform_set_stream_channel_map(adev->platform, out->channel_mask, out->pcm_device_id, &out->channel_map_param.channel_map[0]); Loading Loading @@ -4159,33 +4155,6 @@ static int out_set_voip_volume(struct audio_stream_out *stream, float left, return 0; } static int out_set_pcm_volume(struct audio_stream_out *stream, float left, float right) { struct stream_out *out = (struct stream_out *)stream; /* Volume control for pcm playback */ if (left != right) { return -EINVAL; } else { char mixer_ctl_name [128]; struct audio_device *adev = out->dev; struct mixer_ctl *ctl; int pcm_device_id = platform_get_pcm_device_id(out->usecase, PCM_PLAYBACK); snprintf(mixer_ctl_name, sizeof(mixer_ctl_name), "Playback %d Volume", pcm_device_id); ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name); if (!ctl) { ALOGE("%s : Could not get ctl for mixer cmd - %s", __func__, mixer_ctl_name); return -EINVAL; } int volume = (int) (left * PCM_PLAYBACK_VOLUME_MAX); mixer_ctl_set_value(ctl, 0, volume); ALOGV("%s : Pcm set volume value %d", __func__, volume); return 0; } } static int out_set_volume(struct audio_stream_out *stream, float left, float right) { Loading Loading @@ -4235,13 +4204,6 @@ static int out_set_volume(struct audio_stream_out *stream, float left, out->volume_l = left; out->volume_r = right; return ret; } else { /* Volume control for pcm playback */ if (!out->standby) ret = out_set_pcm_volume(stream, left, right); out->volume_l = left; out->volume_r = right; return ret; } return -ENOSYS; Loading