Loading hal/audio_extn/fm.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -251,7 +251,7 @@ void audio_extn_fm_set_parameters(struct audio_device *adev, * Currently, platform_get_wsa_mode will directly return * Currently, platform_get_wsa_mode will directly return * 1 when wsa is in analog mode. * 1 when wsa is in analog mode. */ */ if (platform_get_wsa_mode(adev->platform) == 1) { if (platform_get_wsa_mode(adev) == 1) { fm_stop(adev); fm_stop(adev); fm_start(adev); fm_start(adev); } else { } else { Loading hal/audio_extn/spkr_protection.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -925,6 +925,12 @@ void audio_extn_spkr_prot_init(void *adev) handle.spkr_prot_t0 = -1; handle.spkr_prot_t0 = -1; if (is_wsa_present()) { if (is_wsa_present()) { if (platform_get_wsa_mode(adev) == 1) { ALOGD("%s: WSA analog mode", __func__); platform_set_snd_device_acdb_id(SND_DEVICE_OUT_SPEAKER_PROTECTED, 136); platform_set_snd_device_acdb_id(SND_DEVICE_IN_CAPTURE_VI_FEEDBACK, 137); pcm_config_skr_prot.channels = 2; } pthread_cond_init(&handle.spkr_calib_cancel, NULL); pthread_cond_init(&handle.spkr_calib_cancel, NULL); pthread_cond_init(&handle.spkr_calibcancel_ack, NULL); pthread_cond_init(&handle.spkr_calibcancel_ack, NULL); pthread_mutex_init(&handle.mutex_spkr_prot, NULL); pthread_mutex_init(&handle.mutex_spkr_prot, NULL); Loading hal/audio_hw.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -486,7 +486,7 @@ int enable_snd_device(struct audio_device *adev, if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device) if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device) audio_extn_usb_start_capture(adev); audio_extn_usb_start_capture(adev); if ((snd_device == SND_DEVICE_OUT_SPEAKER || if ((snd_device == SND_DEVICE_OUT_SPEAKER || snd_device == SND_DEVICE_OUT_SPEAKER_WSA || snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) && snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) && audio_extn_spkr_prot_is_enabled()) { audio_extn_spkr_prot_is_enabled()) { if (audio_extn_spkr_prot_get_acdb_id(snd_device) < 0) { if (audio_extn_spkr_prot_get_acdb_id(snd_device) < 0) { Loading Loading @@ -556,7 +556,7 @@ int disable_snd_device(struct audio_device *adev, if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device) if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device) audio_extn_usb_stop_capture(); audio_extn_usb_stop_capture(); if ((snd_device == SND_DEVICE_OUT_SPEAKER || if ((snd_device == SND_DEVICE_OUT_SPEAKER || snd_device == SND_DEVICE_OUT_SPEAKER_WSA || snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) && snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) && audio_extn_spkr_prot_is_enabled()) { audio_extn_spkr_prot_is_enabled()) { audio_extn_spkr_prot_stop_processing(snd_device); audio_extn_spkr_prot_stop_processing(snd_device); Loading hal/msm8916/platform.c +4 −3 Original line number Original line Diff line number Diff line Loading @@ -4506,13 +4506,14 @@ done: return ret; return ret; } } int platform_get_wsa_mode(void *platform) int platform_get_wsa_mode(void *adev) { { struct platform_data *my_data = (struct platform_data *)platform; struct audio_device *adev_h = adev; char *snd_card_name; char *snd_card_name; snd_card_name = mixer_get_name(my_data->adev->mixer); snd_card_name = mixer_get_name(adev_h->mixer); if ((!strcmp(snd_card_name, "msm8952-skum-snd-card")) || if ((!strcmp(snd_card_name, "msm8952-skum-snd-card")) || (!strcmp(snd_card_name, "msm8952-snd-card")) || (!strcmp(snd_card_name, "msm8952-snd-card-mtp"))) (!strcmp(snd_card_name, "msm8952-snd-card-mtp"))) return 1; return 1; else else Loading hal/msm8960/platform.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1176,7 +1176,7 @@ int platform_set_spkr_device_tz_names(snd_device_t index, return -ENOSYS; return -ENOSYS; } } int platform_get_wsa_mode(void *platform) int platform_get_wsa_mode(void *adev) { { return 0; return 0; } } Loading
hal/audio_extn/fm.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -251,7 +251,7 @@ void audio_extn_fm_set_parameters(struct audio_device *adev, * Currently, platform_get_wsa_mode will directly return * Currently, platform_get_wsa_mode will directly return * 1 when wsa is in analog mode. * 1 when wsa is in analog mode. */ */ if (platform_get_wsa_mode(adev->platform) == 1) { if (platform_get_wsa_mode(adev) == 1) { fm_stop(adev); fm_stop(adev); fm_start(adev); fm_start(adev); } else { } else { Loading
hal/audio_extn/spkr_protection.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -925,6 +925,12 @@ void audio_extn_spkr_prot_init(void *adev) handle.spkr_prot_t0 = -1; handle.spkr_prot_t0 = -1; if (is_wsa_present()) { if (is_wsa_present()) { if (platform_get_wsa_mode(adev) == 1) { ALOGD("%s: WSA analog mode", __func__); platform_set_snd_device_acdb_id(SND_DEVICE_OUT_SPEAKER_PROTECTED, 136); platform_set_snd_device_acdb_id(SND_DEVICE_IN_CAPTURE_VI_FEEDBACK, 137); pcm_config_skr_prot.channels = 2; } pthread_cond_init(&handle.spkr_calib_cancel, NULL); pthread_cond_init(&handle.spkr_calib_cancel, NULL); pthread_cond_init(&handle.spkr_calibcancel_ack, NULL); pthread_cond_init(&handle.spkr_calibcancel_ack, NULL); pthread_mutex_init(&handle.mutex_spkr_prot, NULL); pthread_mutex_init(&handle.mutex_spkr_prot, NULL); Loading
hal/audio_hw.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -486,7 +486,7 @@ int enable_snd_device(struct audio_device *adev, if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device) if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device) audio_extn_usb_start_capture(adev); audio_extn_usb_start_capture(adev); if ((snd_device == SND_DEVICE_OUT_SPEAKER || if ((snd_device == SND_DEVICE_OUT_SPEAKER || snd_device == SND_DEVICE_OUT_SPEAKER_WSA || snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) && snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) && audio_extn_spkr_prot_is_enabled()) { audio_extn_spkr_prot_is_enabled()) { if (audio_extn_spkr_prot_get_acdb_id(snd_device) < 0) { if (audio_extn_spkr_prot_get_acdb_id(snd_device) < 0) { Loading Loading @@ -556,7 +556,7 @@ int disable_snd_device(struct audio_device *adev, if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device) if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device) audio_extn_usb_stop_capture(); audio_extn_usb_stop_capture(); if ((snd_device == SND_DEVICE_OUT_SPEAKER || if ((snd_device == SND_DEVICE_OUT_SPEAKER || snd_device == SND_DEVICE_OUT_SPEAKER_WSA || snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) && snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) && audio_extn_spkr_prot_is_enabled()) { audio_extn_spkr_prot_is_enabled()) { audio_extn_spkr_prot_stop_processing(snd_device); audio_extn_spkr_prot_stop_processing(snd_device); Loading
hal/msm8916/platform.c +4 −3 Original line number Original line Diff line number Diff line Loading @@ -4506,13 +4506,14 @@ done: return ret; return ret; } } int platform_get_wsa_mode(void *platform) int platform_get_wsa_mode(void *adev) { { struct platform_data *my_data = (struct platform_data *)platform; struct audio_device *adev_h = adev; char *snd_card_name; char *snd_card_name; snd_card_name = mixer_get_name(my_data->adev->mixer); snd_card_name = mixer_get_name(adev_h->mixer); if ((!strcmp(snd_card_name, "msm8952-skum-snd-card")) || if ((!strcmp(snd_card_name, "msm8952-skum-snd-card")) || (!strcmp(snd_card_name, "msm8952-snd-card")) || (!strcmp(snd_card_name, "msm8952-snd-card-mtp"))) (!strcmp(snd_card_name, "msm8952-snd-card-mtp"))) return 1; return 1; else else Loading
hal/msm8960/platform.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1176,7 +1176,7 @@ int platform_set_spkr_device_tz_names(snd_device_t index, return -ENOSYS; return -ENOSYS; } } int platform_get_wsa_mode(void *platform) int platform_get_wsa_mode(void *adev) { { return 0; return 0; } }