Return-Path: From: Andrei Emeltchenko To: linux-bluetooth@vger.kernel.org Subject: [PATCHv1 19/32] android/hal-sco: Skip resampling for output stream with 8k Date: Fri, 4 Jul 2014 16:47:04 +0300 Message-Id: <1404481637-900-20-git-send-email-Andrei.Emeltchenko.news@gmail.com> In-Reply-To: <1404481637-900-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> References: <1404481637-900-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: From: Andrei Emeltchenko --- android/hal-sco.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/hal-sco.c b/android/hal-sco.c index 1f5eb23..3bcb50a 100644 --- a/android/hal-sco.c +++ b/android/hal-sco.c @@ -661,6 +661,9 @@ static int sco_open_output_stream(struct audio_hw_device *dev, return -ENOMEM; } + if (out->cfg.rate == AUDIO_STREAM_SCO_RATE) + goto skip_resampler; + /* Channel numbers for resampler */ chan_num = 1; @@ -693,7 +696,7 @@ static int sco_open_output_stream(struct audio_hw_device *dev, DBG("Resampler: input %d output %d chan %d frames %u size %zd", out->cfg.rate, AUDIO_STREAM_SCO_RATE, chan_num, out->resample_frame_num, resample_size); - +skip_resampler: *stream_out = &out->stream; adev->out = out; -- 1.9.1