Loading hal/audio_extn/fm.c +1 −2 Original line number Diff line number Diff line Loading @@ -183,6 +183,7 @@ static int32_t fm_start(struct audio_device *adev, audio_devices_t outputDevices fm_out->usecase = USECASE_AUDIO_PLAYBACK_FM; fm_out->config = pcm_config_fm; fm_out->devices = outputDevices; fmmod.is_fm_running = true; uc_info = (struct audio_usecase *)calloc(1, sizeof(struct audio_usecase)); Loading Loading @@ -239,9 +240,7 @@ static int32_t fm_start(struct audio_device *adev, audio_devices_t outputDevices pcm_start(fmmod.fm_pcm_rx); pcm_start(fmmod.fm_pcm_tx); fmmod.is_fm_running = true; fmmod.fm_device = fm_out->devices; fm_set_volume(adev, fmmod.fm_volume, false); ALOGD("%s: exit: status(%d)", __func__, ret); return 0; Loading hal/audio_hw.c +9 −6 Original line number Diff line number Diff line Loading @@ -979,6 +979,7 @@ int enable_audio_route(struct audio_device *adev, snd_device_t snd_device; char mixer_path[MIXER_PATH_MAX_LENGTH]; struct stream_out *out = NULL; int ret = 0; if (usecase == NULL) return -EINVAL; Loading Loading @@ -1008,7 +1009,14 @@ int enable_audio_route(struct audio_device *adev, strlcpy(mixer_path, use_case_table[usecase->id], MIXER_PATH_MAX_LENGTH); platform_add_backend_name(mixer_path, snd_device, usecase); ALOGD("%s: apply mixer and update path: %s", __func__, mixer_path); audio_route_apply_and_update_path(adev->audio_route, mixer_path); ret = audio_route_apply_and_update_path(adev->audio_route, mixer_path); if (!ret && usecase->id == USECASE_AUDIO_PLAYBACK_FM) { struct str_parms *parms = str_parms_create_str("fm_restore_volume=1"); if (parms) { audio_extn_fm_set_parameters(adev, parms); str_parms_destroy(parms); } } ALOGV("%s: exit", __func__); return 0; } Loading Loading @@ -1470,11 +1478,6 @@ static void check_usecases_codec_backend(struct audio_device *adev, usecase->stream.out->volume_l, usecase->stream.out->volume_r); } if (usecase->id == USECASE_AUDIO_PLAYBACK_FM) { struct str_parms *parms = str_parms_create_str("fm_restore_volume=1"); if (parms) audio_extn_fm_set_parameters(adev, parms); } } } } Loading Loading
hal/audio_extn/fm.c +1 −2 Original line number Diff line number Diff line Loading @@ -183,6 +183,7 @@ static int32_t fm_start(struct audio_device *adev, audio_devices_t outputDevices fm_out->usecase = USECASE_AUDIO_PLAYBACK_FM; fm_out->config = pcm_config_fm; fm_out->devices = outputDevices; fmmod.is_fm_running = true; uc_info = (struct audio_usecase *)calloc(1, sizeof(struct audio_usecase)); Loading Loading @@ -239,9 +240,7 @@ static int32_t fm_start(struct audio_device *adev, audio_devices_t outputDevices pcm_start(fmmod.fm_pcm_rx); pcm_start(fmmod.fm_pcm_tx); fmmod.is_fm_running = true; fmmod.fm_device = fm_out->devices; fm_set_volume(adev, fmmod.fm_volume, false); ALOGD("%s: exit: status(%d)", __func__, ret); return 0; Loading
hal/audio_hw.c +9 −6 Original line number Diff line number Diff line Loading @@ -979,6 +979,7 @@ int enable_audio_route(struct audio_device *adev, snd_device_t snd_device; char mixer_path[MIXER_PATH_MAX_LENGTH]; struct stream_out *out = NULL; int ret = 0; if (usecase == NULL) return -EINVAL; Loading Loading @@ -1008,7 +1009,14 @@ int enable_audio_route(struct audio_device *adev, strlcpy(mixer_path, use_case_table[usecase->id], MIXER_PATH_MAX_LENGTH); platform_add_backend_name(mixer_path, snd_device, usecase); ALOGD("%s: apply mixer and update path: %s", __func__, mixer_path); audio_route_apply_and_update_path(adev->audio_route, mixer_path); ret = audio_route_apply_and_update_path(adev->audio_route, mixer_path); if (!ret && usecase->id == USECASE_AUDIO_PLAYBACK_FM) { struct str_parms *parms = str_parms_create_str("fm_restore_volume=1"); if (parms) { audio_extn_fm_set_parameters(adev, parms); str_parms_destroy(parms); } } ALOGV("%s: exit", __func__); return 0; } Loading Loading @@ -1470,11 +1478,6 @@ static void check_usecases_codec_backend(struct audio_device *adev, usecase->stream.out->volume_l, usecase->stream.out->volume_r); } if (usecase->id == USECASE_AUDIO_PLAYBACK_FM) { struct str_parms *parms = str_parms_create_str("fm_restore_volume=1"); if (parms) audio_extn_fm_set_parameters(adev, parms); } } } } Loading