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

Commit fc791e71 authored by Deeraj Soman's avatar Deeraj Soman
Browse files

hal: Ensure that sample rate is not set to a2dp rate

- HAL when tries to capture with HDMI device, sets sample
  rate specific to a2dp dec.
- Add proper check to avoid assigning ad2p dec sample rate
  for other devices.

Change-Id: I6f3d0214193ea36ded93191363b6f2d2ffa700b4
parent 31ada2d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1073,7 +1073,7 @@ static int send_app_type_cfg_for_device(struct audio_device *adev,
        } else {
            audio_extn_btsco_get_sample_rate(snd_device, &usecase->stream.in->app_type_cfg.sample_rate);
        }
        if (usecase->stream.in->device & AUDIO_DEVICE_IN_BLUETOOTH_A2DP) {
        if (usecase->stream.in->device & AUDIO_DEVICE_IN_BLUETOOTH_A2DP & ~AUDIO_DEVICE_BIT_IN) {
            audio_extn_a2dp_get_dec_sample_rate(&usecase->stream.in->app_type_cfg.sample_rate);
            ALOGI("%s using %d sample rate rate for A2DP dec CoPP",
                  __func__, usecase->stream.in->app_type_cfg.sample_rate);