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

Commit c4c5417a authored by Rivukanta Bhattacharya's avatar Rivukanta Bhattacharya
Browse files

libeffects: AEC mobile mode set as default

AEC mobile mode enabled by default for new webrtc

Test: Tested using standalone application by listening to the outputs.

Change-Id: Ic22191c68f2f3a67b515a46338529cd882aba58a
parent 7aacb78d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -775,7 +775,7 @@ int AecInit (preproc_effect_t *effect)
#else
    effect->session->config =
        effect->session->apm->GetConfig() ;
    effect->session->config.echo_canceller.mobile_mode = false;
    effect->session->config.echo_canceller.mobile_mode = true;
    effect->session->apm->ApplyConfig(effect->session->config);
#endif
    return 0;
+0 −21
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ enum PreProcParams {
  ARG_AEC_DELAY,
  ARG_NS_LVL,
#ifndef WEBRTC_LEGACY
  ARG_AEC_MOBILE,
  ARG_AGC2_GAIN,
  ARG_AGC2_LVL,
  ARG_AGC2_SAT_MGN
@@ -159,10 +158,6 @@ void printUsage() {
#endif
  printf("\n     --aec_delay <delay>");
  printf("\n           AEC delay value in ms, default value 0ms");
#ifndef WEBRTC_LEGACY
  printf("\n     --aec_mobile");
  printf("\n           Enable mobile mode of echo canceller, default disabled");
#endif
  printf("\n");
}

@@ -213,9 +208,6 @@ int main(int argc, const char *argv[]) {
  const char *outputFile = nullptr;
  const char *farFile = nullptr;
  int effectEn[PREPROC_NUM_EFFECTS] = {0};
#ifndef WEBRTC_LEGACY
  int aecMobileMode = 0;
#endif

  const option long_opts[] = {
      {"help", no_argument, nullptr, ARG_HELP},
@@ -239,9 +231,6 @@ int main(int argc, const char *argv[]) {
      {"agc2", no_argument, &effectEn[PREPROC_AGC2], 1},
#endif
      {"ns", no_argument, &effectEn[PREPROC_NS], 1},
#ifndef WEBRTC_LEGACY
      {"aec_mobile", no_argument, &aecMobileMode, 1},
#endif
      {nullptr, 0, nullptr, 0},
  };
  struct preProcConfigParams_t preProcCfgParams {};
@@ -432,16 +421,6 @@ int main(int argc, const char *argv[]) {
      return EXIT_FAILURE;
    }
  }
#ifndef WEBRTC_LEGACY
  if (effectEn[PREPROC_AEC]) {
    if (int status = preProcSetConfigParam(AEC_PARAM_MOBILE_MODE, (uint32_t)aecMobileMode,
                                           effectHandle[PREPROC_AEC]);
        status != 0) {
      ALOGE("Invalid AEC mobile mode value %d\n", status);
      return EXIT_FAILURE;
    }
  }
#endif

  // Process Call
  const int frameLength = (int)(preProcCfgParams.samplingFreq * kTenMilliSecVal);