forked from rubenslte/android_kernel_samsung_msm8226
Revert "ASoC: compr: Disable soft-pause for compress playback"
Re-enable soft pause feature to smooth drastic gain change as to remove pop noise for offload playback. Change-Id: Idf5e1044f11a37e1ebcb00e7df5eea2d80552d45 CRs-Fixed: 745564 Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
@@ -577,6 +577,12 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream)
|
||||
int dir = IN, ret = 0;
|
||||
struct audio_client *ac = prtd->audio_client;
|
||||
uint32_t stream_index;
|
||||
struct asm_softpause_params softpause = {
|
||||
.enable = SOFT_PAUSE_ENABLE,
|
||||
.period = SOFT_PAUSE_PERIOD,
|
||||
.step = SOFT_PAUSE_STEP,
|
||||
.rampingcurve = SOFT_PAUSE_CURVE_LINEAR,
|
||||
};
|
||||
struct asm_softvolume_params softvol = {
|
||||
.period = SOFT_VOLUME_PERIOD,
|
||||
.step = SOFT_VOLUME_STEP,
|
||||
@@ -621,6 +627,11 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream)
|
||||
pr_err("%s: Send SoftVolume Param failed ret=%d\n",
|
||||
__func__, ret);
|
||||
|
||||
ret = q6asm_set_softpause(ac, &softpause);
|
||||
if (ret < 0)
|
||||
pr_err("%s: Send SoftPause Param failed ret=%d\n",
|
||||
__func__, ret);
|
||||
|
||||
ret = q6asm_set_io_mode(ac, (COMPRESSED_STREAM_IO | ASYNC_IO_MODE));
|
||||
if (ret < 0) {
|
||||
pr_err("%s: Set IO mode failed\n", __func__);
|
||||
|
||||
Reference in New Issue
Block a user