ASoC: DPCM: Remove redundant code introduced during framework update

There is redundant code introduced during ALSA DPCM update to add
support for compressed audio, which calls the soc_pcm_prepare()
twice. Update to remove the reduandant code.

Change-Id: I5b3b7bc005816141537434be47ec743c7c02b274
CRs-fixed: 672001
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
ASoC: compr: timestamp fix for non-gapless mode

Cache last known playback timestamp before resetting the
in use session in preparation for possible re-use of the
same session.

Change-Id: Id422f5654960818c159f9f07d5af3c497192bae2
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
ASoC: msm: propagate the error code from the compr driver

Propagate the error code to the upper layers to avoid the
unwanted sequence of the commands to DSP.

CRs-Fixed: 671241
Change-Id: I72b4700f01f6953c13e64878acf5bed882eb41a5
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
ASoC: compr: Disable soft-pause for compress playback

Soft-pause (i.e pause ack after a timeout) adversely affects
audio/video sync during pause/resume use cases leading to some
frame drops. Disable this feature for compress playback.

Change-Id: I3ce444dadf1e4b94c1e8d6f017a1c639b082285f
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 636328
ASoC: msm: Configure correct gain on set Volume command

Output channel gain is product of per channel gain and master gain.
Hence if only per channel gain is set and master gain is set to 0
then no audio is heard at the output.
Ensure that if we change per channel gain then we set master gain
to unity and vice versa. This enables only one gain to be effective.

Change-Id: I4cc2990efbb3e86edcc3d4328761cb64ed8fa775
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
ASoC: msm: set the master gain to 0 on DSP while configuring

- Mute media volume and play any music clip then reboot
  the phone. Play music again noise comes. This noise
  is introduced in DSP/LPASS.

- DSP suggestion is to mute master volume gain while
  configuring ASM session to avoid such noise at
  begining of asm playback.

Change-Id: I2aa2846d6e3e9a85c459534e9108e6fe7aebb962
Signed-off-by: Ramjee Singh <ramjee@codeaurora.org>
cpufreq: interactive: Move definition of cpufreq_gov_interactive downwards

This moves definition of cpufreq_gov_interactive towards the bottom of file, so
that we don't have to add prototype of cpufreq_governor_interactive() in the
beginning of file.

Change-Id: I04bd1004954eb36502c5cd7e35d3d7274cddaf95
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Git-commit: e50d640cacfe61e69f1b4fa92fa0174c688e919c
Git-Repo: https://android.googlesource.com/kernel/common.git
[junjiew@codeaurora.org: Resolve merge conflicts]
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
cpufreq: interactive: fix compiling warnings

The gcc warns like:

  cpufreq_interactive.c:745:6: warning: operation on 'ret' may be undefined [-Wsequence-point]

It was introduced by commit cf0fad49d17cb8273ce555dd5b7afab67d7923bf.

Since sprintf(...) just return 1 (one character) in this case, ret should not changed.
Just discarding the result of sprintf(...) leads to the result that
the committer of cf0fad49d17cb8273ce555dd5b7afab67d7923bf wants.

Change-Id: Ifed1cef6d6a31c3ed23dad03a567b3b9eddf3a57
Signed-off-by: Chih-Wei Huang <cwhuang@android-x86.org>
Git-commit: 0715d10b9e6c04327adb189e13ecd6a3c2df48ce
Git-Repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
cpufreq: interactive: Honor changed minimum frequency

This saves a few cycles in the timer routine.

Change-Id: I4c0e89094a00a0b63eae6320e6c3bdbb2d4c307e
cpufreq: interactive: Revert timer start modification

commit f8b276565ce95bd788af0fc8d060f92632590a40
(cpufreq: Sync on thread migration optimizations)
introduced a change to cpufreq_interactive_timer_start() in order
to reschedule the timer differently based on whether min or max
is changed. A better way is to reschedule the timer only when
necessary.

Revert timer start modification in preparation for the final fix.

Change-Id: I13f3b75a6eee03ac6380c24db899806a9bfbc96a
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
cpufreq: interactive: restructure CPUFREQ_GOV_LIMITS

The cpufreq_interactive_timer gets cancelled and rescheduled
whenever the cpufreq_policy is changed. When the cpufreq policy is
changed at a rate faster than the sampling_rate of the interactive
governor, then the governor misses to change the target frequency
for long duration. The patch removes the need of cancelling the
timers when policy->min is changed.

Change-Id: Ibd98d151e1c73b8bd969484583ff98ee9f1135ef
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Git-commit: 9b97d655a558607c5d46ef1f21365d695f8d1ee2
Git-Repo: https://android.googlesource.com/kernel/common.git
[junjiew@codeaurora.org: resolve merge conflicts]
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
cpufreq: interactive: Simplify frequency calculations

Previously, complicated calculations led to oscillating cpu
frequencies that ruined user experience even on high-end
devices. Revert to the classic calculations based on a
percentage of current max frequency.  This way, we're using
freqs more evenly and much more predictable.

Change-Id: Id7898618607f0e26b272e3c74932a92380e3db7a
cpufreq: interactive: Consider changed min limit a frequency boost

A changed policy->min can safely be considered a frequency boost.
Process this change analogous to the cpufreq_interactive_boost()
routine.

Change-Id: Ie4ca2be2dad0f5bd541c2b79afee3bad3a349d80
cpufreq: interactive: Honor boosted state in several timer calculations

Change-Id: If03da12c52d89a5293e32ac918db44a00ef34884
mondrianwifi: Enable RCU_FAST_NO_HZ across the board for msm8974

Change-Id: Id92d5d94394499056c436a718aea574a9e7e5ee7
Revert "mondrianwifi: Enable TSP_BOOSTER"

This reverts commit 05532fb69c4ce6e0e5ca059e37424ca2a8069c54.

Change-Id: I4d644ab7f6af709c6faaa750751787528b3f013c
Revert "cpufreq: interactive: Simplify frequency calculations"

This reverts commit f140ff573408d6789d1aa3d1095e7ee39c8f9e1a.

Change-Id: I331b06d1689d624df7d76ca2b2e59852496fdbe8
Merge branch 'cm-11.0' into stable/cm-11.0