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

Commit 869ae49f authored by Revathi Uddaraju's avatar Revathi Uddaraju
Browse files

hal: Fix Glitch issue during concurrent playback

- VOIP Playback and VOIP Record streams are opened with 8k for whatsapp
  call. Then resume of compress offload playback happens.

- In this scenario, Compress offload backend would be configured to 48k
  even though clip is of different sample rate.

- This results in backend reconfiguration for next Low Latency playback
  which would be heard as glitch.

- Fix this by avoiding default sample rate selection based on usecase
  sample rate. Instead check the condition for backend sample rate
  configuration.

Change-Id: If9b1825628dee4717740b442431fb17487e503c1
parent c6e9ca61
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -5983,7 +5983,11 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev,
                            bit_width = out->bit_width;
                        if (sample_rate < out->sample_rate)
                            sample_rate = out->sample_rate;
                        if (out->sample_rate < OUTPUT_SAMPLING_RATE_44100)
                        /*
                         * TODO: Add Support for Backend configuration for devices which support
                         * sample rate less than 44.1
                         */
                        if (sample_rate < OUTPUT_SAMPLING_RATE_44100)
                            sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE;
                        if (channels < out_channels)
                            channels = out_channels;
+5 −1
Original line number Diff line number Diff line
@@ -5945,7 +5945,11 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev,
                            bit_width = out->bit_width;
                        if (sample_rate < out->sample_rate)
                            sample_rate = out->sample_rate;
                        if (out->sample_rate < OUTPUT_SAMPLING_RATE_44100)
                        /*
                         * TODO: Add Support for Backend configuration for devices which support
                         * sample rate less than 44.1
                         */
                        if (sample_rate < OUTPUT_SAMPLING_RATE_44100)
                            sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE;
                        if (channels < out_channels)
                            channels = out_channels;