Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68c1310f authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat Committed by Gerrit - the friendly Code Review server
Browse files

hal : set Non SA+ app type for PCM Capture

 -SA+ topology is being set for incall recording use case.
 -hal does not use the normal audio record use case id for
  in call recording, so it sets the default app type.
 -For PCM Capture set the 'General Recording' app type
  irrespective of use case id.

Change-Id: I0ce017ea4dca04eb25055e669e72bda0c281b22c
parent 82dbecf1
Loading
Loading
Loading
Loading
+7 −15
Original line number Diff line number Diff line
@@ -1304,27 +1304,19 @@ int platform_send_audio_calibration(void *platform, struct audio_usecase *usecas
    struct audio_device *adev = my_data->adev;
    int snd_device = SND_DEVICE_OUT_SPEAKER;

    if (usecase->type == PCM_PLAYBACK)
    if (usecase->type == PCM_PLAYBACK){
        snd_device = platform_get_output_snd_device(adev->platform,
                                            usecase->stream.out->devices);
    else if ((usecase->type == PCM_HFP_CALL) || (usecase->type == PCM_CAPTURE))
        if(usecase->id != USECASE_AUDIO_PLAYBACK_OFFLOAD)
            app_type = APP_TYPE_SYSTEM_SOUNDS;
    }
    else if ((usecase->type == PCM_HFP_CALL) || (usecase->type == PCM_CAPTURE)){
        snd_device = platform_get_input_snd_device(adev->platform,
                                            adev->primary_output->devices);
    acdb_dev_id = acdb_device_table[snd_device];


    switch (usecase->id) {
        case USECASE_AUDIO_PLAYBACK_DEEP_BUFFER:
            app_type = APP_TYPE_SYSTEM_SOUNDS;
            break;
        case USECASE_AUDIO_PLAYBACK_LOW_LATENCY:
            app_type = APP_TYPE_SYSTEM_SOUNDS;
            break;
        case USECASE_AUDIO_RECORD:
        app_type = APP_TYPE_GENERAL_RECORDING;
            break;
    }

    acdb_dev_id = acdb_device_table[snd_device];
    if (acdb_dev_id < 0) {
        ALOGE("%s: Could not find acdb id for device(%d)",
              __func__, snd_device);