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

Commit 8a1384f2 authored by Yuyang Huang's avatar Yuyang Huang Committed by Gerrit Code Review
Browse files

Merge "store NREC value into p_scb so that when later SCO is created, native...

Merge "store NREC value into p_scb so that when later SCO is created, native layer can pass this value to Audio HAL" into main
parents 47b269c9 0822237f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1151,6 +1151,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB* p_scb, uint16_t cmd, uint8_t arg_type,
    case BTA_AG_AT_NREC_EVT:
      /* if feature send OK, else don't call callback, send ERROR */
      if (p_scb->features & BTA_AG_FEAT_ECNR) {
        p_scb->nrec_enabled = (val.num == 1);
        bta_ag_send_ok(p_scb);
      } else {
        event = BTA_AG_ENABLE_EVT;
+3 −2
Original line number Diff line number Diff line
@@ -242,6 +242,7 @@ struct tBTA_AG_SCB {
  bool cmer_enabled;        /* set to true if HF enables CMER reporting */
  bool cmee_enabled;        /* set to true if HF enables CME ERROR reporting */
  bool inband_enabled;      /* set to true if inband ring enabled */
  bool nrec_enabled;        /* noise reduction & echo canceling */
  bool svc_conn;            /* set to true when service level connection up */
  uint8_t state;            /* state machine state */
  uint8_t conn_service;     /* connected service */
@@ -290,10 +291,10 @@ struct tBTA_AG_SCB {

  std::string ToString() const {
    return base::StringPrintf(
        "codec_updated=%d, codec_fallback=%d, "
        "codec_updated=%d, codec_fallback=%d, nrec=%d"
        "sco_codec=%d, peer_codec=%d, msbc_settings=%d, lc3_settings=%d, "
        "device=%s",
        codec_updated, codec_fallback, sco_codec, peer_codecs,
        codec_updated, codec_fallback, nrec_enabled, sco_codec, peer_codecs,
        codec_msbc_settings, codec_lc3_settings,
        ADDRESS_TO_LOGGABLE_CSTR(peer_addr));
  }