Headset mic fail in case of inserting headset while dmic is recording.
Keep LDO_H always on while headset is inserted.
Bug: 11506684
Change-Id: I8516d537d2c72d6f71236219e5d3e610e25ecf24
Signed-off-by: sam_chen <sam_chen@asus.com>
During build-in mic recording, insert or remove headphone would
cause LDO_H power down which leads to recording fail.
Power on or down LDO_H by checking dapm widget LDO_H status.
Bug: 11523570
Change-Id: Ib7558748c093b60830eb41b2171c2eae95e4ed0a
Signed-off-by: sam_chen <sam_chen@asus.com>
Always disable micbias when headphone insertion to save power around 1.5mA.
Bug: 9946473
Change-Id: I7cd2df4872b8388287df69a344f1dc1d45653405
Signed-off-by: Karl Yu <Karl_Yu@asus.com>
Support audio control for one-button headsets.
Also refine code formats.
Bug: 9196319
Change-Id: Id572bb86dcefd52ea204c60bf4fda1e6c02fd135
Signed-off-by: ChungYi_Guan <ChungYi_Guan@asus.com>
Reduce debouncing time for unplug cases according to EE measurement.
Bug: 9083368
Change-Id: I9025f852beb69ece7f85863f86388e833e4ef64a
Signed-off-by: ChungYi_Guan <ChungYi_Guan@asus.com>
D-mic Vdd is connected to micbias1.
To set micbias1 to 1.8V, we need to set LDO_H_1 output power to 2.85V
which is the source of micbias1.
Bug: 9042676
Change-Id: I222ac01c24346031d25483e80f554a4dc0833c43
Signed-off-by: sam_chen <sam_chen@asus.com>
Compress core added metadata apis in 9727b4, so add same in ASoC
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix compilation error after merging commit 00642f5
from master: pop_wait is in struct snd_soc_dai
not in struct snd_soc_pcm_runtime.
Signed-off-by: Eric Laurent <elaurent@google.com>
When a new stream is being opened it is necessary to cancel any delayed
power down of the audio.
[Fixed unused variable -- broonie]
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
There were variations in the time taken to
return from each write. This was due
to the delay in switching in and out of
power collapse. To manage this set QOS
value to 1ms so that the core has enough
time to wake up from power collapse
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
On flo hardware revision C, micbias1 is not grounded with external
capacity, so it should set micbias1 capless setting as 1
(no external bypass capacity) to avoid noise.
Bug:8611206
Change-Id: I82644a9123d092490ccc0acf6cdfa68964ef9c22
Signed-off-by: sam_chen <sam_chen@asus.com>
Otherwise capture activity on a compressed DAI would mute any playback
on the same DAI.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Fix compilation error after merging commit 1f88eb0
from master: pop_wait is in struct snd_soc_dai
not in struct snd_soc_pcm_runtime.
Signed-off-by: Eric Laurent <elaurent@google.com>
The ASoC compressed API did not implement the copy callback in its
compressed ops which is required for DSPs that are not memory mapped.
This patch creates a local copy of the compress ops for each runtime and
modifies them with a copy callback as appropriate.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Delayed work was scheduled but not initialised, this patch adds the
actual work and initialises it.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Use the pcm_mutex to serialise the compressed ops.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix compilation error after merging commit 1245b700
from master: snd_soc_dapm_stream_event() protoype has changed.
Signed-off-by: Eric Laurent <elaurent@google.com>
This patch adds the support to parse the compress dai's and then also adds the
soc-compress.c file while handles the compress stream operations, mostly analogus
to what is done in the soc-pcm.c and aditional handling of the compress
opertaions
Conflicts:
sound/soc/soc-core.c
Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The current low latency driver has 512 bytes as
the min buffer size threshold. With this reducing
the playback time to lower values is not possible.
Setting it to 128 bytes gives us more room
to try out lower buffer sizes from the user space
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
The contorl bit should be 0 shift for RX HPF frequency setting.
Change-Id: Ida8981c7e5c3fe693dadf62e95f31a99e1b05001
Signed-off-by: sam_chen <sam_chen@asus.com>
Export function to headset driver to know whether we should disable
badgap power or not after headset detection.
Change-Id: I1b890c559a26537f510dfabed3cfec16120f59de
Signed-off-by: sam_chen <sam_chen@asus.com>
1.Use gpio-85: low = debug board and high = no debug board.
2.Only support hardware revison A and after.
Change-Id: If4db1fd8f94036dfb7428e63e54b4ae41b60e0cd
Signed-off-by: sam_chen <sam_chen@asus.com>
PCM driver was configured for fixed buffer
size on the playback path. With this, varying
the buffer sizes on the playback path was not
possible. To fix this, support for flexible
period sizes is added by setting different
values for min and max buffer sizes
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
Updating the sample rate for the compressed stream playback of the HDMI
interface through the mixer control.
Change-Id: Ib7b01f490f5e209512433a82faf96af0a3a810bd
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
For the use case of Playback over HDMI device, the number of
channels supported varies with the sink capabilities.
Add support to fix the channels based on the sink capabilites
configured by userspace for msm8960
Change-Id: Iba4f1fead17832d7832fabdcba02da671e5fd005
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
There is a missing step to clear OTHR_RESET_CTR before power down.
It could cause a glitch and power hit without it. It has to be reset.
original gerrit is https://review-android.quicinc.com/#/c/191312/
This is cherry-pick gerrit by developer to jb_2.5
Change-Id: Id96070352480be6ea412844d4f71765e2df76afe
CRs-fixed: 420142
Signed-off-by: Fred Oh <fred@codeaurora.org>
Add support for configuring ISO or ARIB stereo mixing
coefficients. This change introduces a function with whichi,
AAC multi-channel driver can configure ISO or ARIB coefficients
according to configuration done by the client.
Change-Id: I72b74033532a276fa3bc1d305a04720ff6767409
Signed-off-by: Amal Paul <amal@codeaurora.org>
AV switch and US Euro headset switches are not supported
on apq8064 target. Hence removing unnecessary gpio pins
configuration.
Change-Id: Ia4747b59b63b0bf7c37054fb1bcebfc54079b481
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Conflicts:
sound/soc/msm/apq8064.c
-In afe_open, trying to unlock mutex on variable
that is already freed.
-correct the sequence by unlock mutex first then
free the variable.
CRs-Fixed: 423196
Change-Id: If7df0e0f46c7d16843c6d52ae821974cc74539ff
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
(cherry picked from commit 4c120ae85c6c5ac2adfdf61956b45d02461a93e3)
WCD9310 codec supports loopback through IIR filters. Either IIR1
or IIR2 can be used to setup loopback path. Add support and routing
to enable loopback through IIR2 filter path
CRs-fixed: 364236
Change-Id: I52cb455ad31aa129f81bac3852ac50d4a5a99bc2
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
(cherry picked from commit 8ba4446a571ed5f7033dc6cb651e19f5d9485abb)
Time stamp is unsigned. There is no need to check for
negative value.
Change-Id: I15e380f81e46908f6a9fe8d29c174de1b7c33173
CRs-fixed: 423372
Signed-off-by: Patrick Lai <plai@codeaurora.org>
The clock is not usable when either the clock source changes between
external MCLK and internal RCO or the bandgap mode changes to fast mode.
In such cases, turn off master clock and turn on again later to avoid
codec from going into bad state
CRs-fixed: 442464
Change-Id: Id8d07bbbd4bf6c7be16016800d19ab332b960d1a
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
For the playback use of compressed pass through on HDMI device,
post processing features are not supported and should not be sent to
DSP. Hence the change is now to send the volume only for the playback
of decode and render in DSP and skip for compressed pass through
CRs-Fixed: 442140
Change-Id: I2125f08baf1676f6bb1d13463a1f01dfe280963f
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
There is maximum number of COPPs ASM session can be routed
to even though there are far more number of AFE ports.
Add the check to make sure caller is not routing to more
than ADM can actually support.
Change-Id: Iee97dd7e5d21820c87244a422fa252c2228185f9
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Remove unnecessary check as it should be reasonable
to assume valid parameter would be issued through
debugfs interface
Change-Id: I1a23d8c5324b813bf9501c5462684234926b5dcc
Signed-off-by: Patrick Lai <plai@codeaurora.org>
When playing a full scale tone with highest gain in the codec, OCP
(Over Current Protection) event is generated. This is caused due to
lower switching frequency for the class G amplifier on headphone
path. Fix the false OCP event trigger by appropriately setting the
class G switching frequency
CRs-fixed: 415990
Change-Id: I9563ab2d06c970b47693293175fe7ae4a711348c
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
For compressed and LPA drivers, set pending_buffers flag to 1 only if the client
issues a trigger_start command, not a pause_release command. This flag
is used to initiate writes to the dsp.
Change-Id: I503156863646210b460613a0b9a26a6bfb8854ed
CRs-Fixed: 442269, 449126
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>