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

Unverified Commit 944cd5cc authored by Ethan Chen's avatar Ethan Chen Committed by Michael Bestas
Browse files

hal: Correctly set backend to best available parameters

* For the case where CALL/IN_COMMUNICATION, new_bit_width and
  new_sample_rate were unconditionally reset to 0, resulting
  in a sample rate/bit width change always occurring.
  Don't do this for CALL/IN_COMMUNICATION as the original
  logic intended.

Change-Id: Ib647cec084f4af9a044f90935dd57257bba0ec06
parent f803d047
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3282,9 +3282,9 @@ bool platform_check_codec_backend_cfg(struct audio_device* adev,
                }
            }
        }
    }
        *new_bit_width = best_bw;
        *new_sample_rate = best_sr;
    }

    // Force routing if the expected bitwdith or samplerate
    // is not same as current backend comfiguration