Commit graph

5168 commits

Author SHA1 Message Date
sam_chen
6fa1fe7eb4 audio: asoc: wcd9310: fix headset mic recording fail.
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>
2013-11-08 23:24:05 +00:00
sam_chen
af2f3c6ec8 audio: asoc: headset: fix build-in mic recording fail.
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>
2013-11-05 18:51:54 +00:00
Karl Yu
a9b960e8f3 Audio: prevent headphone insertion event handler from turning micbias ON.
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>
2013-08-13 06:47:51 +00:00
ChungYi_Guan
9b3ebd48d3 Audio: Support headset button feature.
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>
2013-06-24 10:55:26 -07:00
ChungYi_Guan
48d9df1a1e Audio: Avoid playback paused after a quick headset removal.
Reduce debouncing time for unplug cases according to EE measurement.

Bug: 9083368

Change-Id: I9025f852beb69ece7f85863f86388e833e4ef64a
Signed-off-by: ChungYi_Guan <ChungYi_Guan@asus.com>
2013-05-24 23:44:24 +00:00
sam_chen
56a4f115ea audio: headset: avoid recording noise by setting D-mic vdd to 1.8V.
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>
2013-05-20 16:22:53 +08:00
Jeeja KP
129fc3f4be ASoC: compress - add support for metadata apis
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>
2013-05-18 13:40:36 -07:00
Eric Laurent
5b2a1140bf ASoc: fix compilation error
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>
2013-05-18 13:40:36 -07:00
Charles Keepax
5d9f618167 ASoC: compress: Cancel delayed power down if needed
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>
2013-05-18 13:40:35 -07:00
chungyi_guan
6572f26e20 Audio: Remove controls for REV_A.
HW_REV_A is no longer supported.

Bug: 8862570
Change-Id: I92e75c45af54b988f8329ffc212c2d36e09d9796
Signed-off-by: chungyi_guan <ChungYi_Guan@asus.com>
2013-05-09 19:49:47 +08:00
Mekala Natarajan
eb7d99e93f ASoC: msm: Change QOS value for low latency path
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>
2013-05-02 01:13:24 +00:00
sam_chen
4095062f42 Audio: soc: wcd9310: workaround for d-mic noise on flo hardware revision C.
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>
2013-04-18 16:09:24 -07:00
Mark Brown
2f7b4f43d6 ASoC: compress: Only mute playback streams
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>
2013-04-18 16:08:47 -07:00
Eric Laurent
b8634e24ea ASoc: fix compilation error
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>
2013-04-18 16:08:47 -07:00
Charles Keepax
978eeda17a ASoC: soc-compress: Add support for not memory mapped DSPs
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>
2013-04-18 16:08:47 -07:00
Charles Keepax
8e35e80110 ASoC: soc-compress: Initialise delayed work to power down audio
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>
2013-04-18 16:08:46 -07:00
Charles Keepax
c9a8524348 ASoC: soc-compress: Serialise compressed ops
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>
2013-04-18 16:08:46 -07:00
Charles Keepax
97d183e49c ASoC: soc-compress: Add missing brackets around else
Conflicts:
	sound/soc/soc-compress.c

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>
2013-04-18 16:08:46 -07:00
Vinod Koul
91d9712511 ASoC: compress - fix code alignment
Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-18 16:08:46 -07:00
Eric Laurent
e4ad230988 ASoc: fix compilation error
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>
2013-04-18 16:08:46 -07:00
Namarta Kohli
493ea89cd3 ASoC: add compress stream support
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>
2013-04-18 16:08:45 -07:00
Mekala Natarajan
e523090a19 ASoC: msm: Reduce min buffer size for low latency
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>
2013-04-18 16:08:42 -07:00
sam_chen
a8801c73fc Audio: soc: wcd9310: fix wrong kcontrol for RX HPF setting.
The contorl bit should be 0 shift for RX HPF frequency setting.

Change-Id: Ida8981c7e5c3fe693dadf62e95f31a99e1b05001
Signed-off-by: sam_chen <sam_chen@asus.com>
2013-04-18 16:08:16 -07:00
sam_chen
33d48fa019 Audio: headset: disable micbias power after remove headset.
Change-Id: I439e1448b394c93783d85934fadb3ac3d31ab465
Signed-off-by: sam_chen <sam_chen@asus.com>
2013-04-18 16:08:16 -07:00
sam_chen
a966a967c5 Audio: headset: Disable bandgap power according to codec bandgap status.
Change-Id: Ieefd76b0cc02fd58e240a934fd9f84b309d48c5b
Signed-off-by: sam_chen <sam_chen@asus.com>
2013-04-18 16:08:15 -07:00
sam_chen
37f530ec4e Audio: soc: wcd9310: add check bandgap status function.
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>
2013-04-18 16:08:15 -07:00
sam_chen
52e2c2eeca Audio: headset: add debug board detection mechanism.
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>
2013-04-18 16:08:13 -07:00
Iliyan Malchev
2c0066767d ASoC: msm: Flexible period size for pcm playback
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>
2013-04-18 16:08:12 -07:00
Iliyan Malchev
caffd83aca Revert "Revert "ASoC: msm: Decrease the playback period size of PCM driver""
This reverts commit 3747be787b4fa0f65c9c112744c28ef7ea438806.
2013-04-18 16:08:05 -07:00
sam_chen
435713f729 Audio: add headset detection function.
Change-Id: I9af88313ecdb072b0aa71c3991359becac9cdcf9
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/68260
Reviewed-by: Jive Hwang <jive_hwang@asus.com>
Tested-by: Jive Hwang <jive_hwang@asus.com>
2013-04-18 16:07:59 -07:00
sam_chen
f09e036eab Audio: Enable speaker.
1.Use PM8921_GPIO_PM_TO_SYS(18) as speaker amp.
2.Disable wcd9310 headset detection function.

Change-Id: I5a5b8a38ef2cd30efb318a919f9490415302d67c
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/67836
Reviewed-by: Jive Hwang <jive_hwang@asus.com>
Tested-by: Jive Hwang <jive_hwang@asus.com>
2013-04-18 16:07:52 -07:00
paris_yeh
a225765d0c deb: initial bring up the deb hardware
Change-Id: I428beb5964726f009cd7a6402de0e83f0cf9924f
Signed-off-by: paris_yeh <paris_yeh@asus.com>
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/67828
Reviewed-by: Sam hblee <Sam_hblee@asus.com>
2013-04-18 16:07:51 -07:00
paris_yeh
e33d2be0f6 flo: separate flo codes from qcom's codes (apq8064_mtp)
Change-Id: Idb2f3bd99fa3a0b4061a1cd65155bc6fed163048
Signed-off-by: paris_yeh <paris_yeh@asus.com>
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/67810
Reviewed-by: Edward Lu <Edward_Lu@asus.com>
2013-04-18 16:07:50 -07:00
Ajay Dudani
ef1120d0a4 Revert "ASoC: msm: Decrease the playback period size of PCM driver"
This reverts commit b0580099ac7d5e735fb42946612a499bf196cda1.

Change-Id: I487797334cf75978daa3c536ff92de8a54b1f7fb
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-15 17:13:31 -07:00
Aviral Gupta
861201c3f0 ASoC: msm: Mixer control to update the sample rate of HDMI interface
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>
2013-03-15 17:09:19 -07:00
Subhash Chandra Bose Naripeddy
66d4bd46d8 ASoC: msm: Add support to fix up the channels for HDMI
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>
2013-03-15 17:09:18 -07:00
Fred Oh
95c41ddd89 ASoC: wcd9310: Reset OTHR_RESET_CTR before power down
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>
2013-03-15 17:09:13 -07:00
Amal Paul
ed056a5a55 ASoC: msm: qdsp6: Add support to configure ISO and ARIB coefficients
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>
2013-03-15 17:09:03 -07:00
Ravi Kumar Alamanda
b8d36696be ASoc: msm: Remove incorrect headset mic gpios
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
2013-03-15 17:09:00 -07:00
Laxminath Kasam
d471a93ec3 ASoC: audio: fix unlock Null pointer issue
-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)
2013-03-15 17:08:43 -07:00
Bhalchandra Gajare
45ab1a7a2b ASoC: WCD9310: Enable codec loopback support through IIR2 path
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)
2013-03-15 17:08:37 -07:00
Patrick Lai
c58e2f4bb2 ASoC: msm: avoid negative time stamp check
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>
2013-03-15 17:08:28 -07:00
Joonwoo Park
a76e7e31e0 ASoC: wcd9304: Turn off mclk during clock transition
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>
2013-03-15 17:08:23 -07:00
Subhash Chandra Bose Naripeddy
968c5e7d4f ASoC: msm: skip sending volume in compressed pass through playback
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>
2013-03-15 17:08:01 -07:00
Patrick Lai
ebd937e2fe ASoC: msm: qdsp6: add check for maximum COPPs allowed
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>
2013-03-15 17:07:59 -07:00
Patrick Lai
5f5e11cab1 ASoC: msm: qdsp6: avoid unnecessary check
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>
2013-03-15 17:07:58 -07:00
Duy Truong
04e554807c Update copyright to The Linux Foundation
Change-Id: Ibead64ce2e901dede2ddd1b86088b88f2350ce92
Signed-off-by: Duy Truong <dtruong@codeaurora.org>
2013-03-15 17:07:39 -07:00
Bhalchandra Gajare
66eb764d85 ASoC: WCD9304: Fix threshold value for class G headphone
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>
2013-03-15 17:07:16 -07:00
Haynes Mathew George
043544f462 ASoC: msm: Resume writes only for start command
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>
2013-03-15 17:07:10 -07:00
Damir Didjusto
0ebf5a8502 ASoC: wcd9xxx: Support earpiece ANC
Added virtual widgets for enabling and disabling earpiece ANC.

Change-Id: Ia235928c34022de89ec0e66dbe533143f4d56684
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
2013-03-15 17:06:49 -07:00