After upgrading to kernel 3.4, there is 5 second delay
at the closing of PCM playback. The delay is due to missing
EOS from QDSP6 audio session manager causing pcm close function
of PCM platform driver to wait for 5 seconds. The root cause
for missing EOS is that ALSA dynmic PCM shutdown sequence has
changed. Now, trigger stop is called on the back-end DAI-LINK.
Furthermore, back-end trigger stop is called before front-end
trigger stop. Since sink stops rendering data, data at source
will never get consumed. EOS event will not arrive. As trigger
operation has to be atomic, it is very difficult to guarantee
sequence on shutting down various modules in QDSP6. The decision
is to abandon starting and stopping QDSP6 AFE port in trigger
function. This decision is considered acceptable as playback
and capture over SLIMBUS is no longer subject to strict sequence
which Q6 AFE port must be started after CODEC configuration.
Change-Id: Ief351168b08d5cca0a76405834cf3d6aa14a3941
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
Currently, at the end of compress audio playback, session is
terminated without ensuring compressed audio stream is completely
rendered. Use ioctl drain to drain out all the data before EOS is
signalled and session is closed. This is to make sure all the
data is played out by DSP.
CRs-Fixed: 390897
Change-Id: I3e39b210a8924180de9eb4453c6f6f6435ded0ee
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
There is use case that the HDMI input goes through MI2S TX
interface to ADSP. Add 8-channel L-PCM TX support for this
use case.
Change-Id: Iaf10ec357a25fe4cf80e36a2ceba3d113e9b0416
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Starting with B family chips, the IOMMU client is responsible
for registering a domain (page table) and attaching it with
the corresponding device context when required.
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Conflicts:
include/media/videobuf2-msm-mem.h
Change-Id: I2105f3cdd94a5e42c09a46e32ed615a35615485d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
This reverts commit 181fc587a179363624b9a3b47bcd0c04c05a8553
Reverting as Bluez stack need to be supported
Change-Id: I057586ea30381cf9ef0fa0bdcb26f9fc734b1423
To workaround a Krait errata on 8064, disable secondary clock source
gating during the MUX switch. This errata was already worked around
in msm-krait-l2-accessors.c in a different way, but that will soon
be removed in favor of this and some power-collapse changes.
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Change-Id: Iffe42ee7216c9b9c4a4e68ddfe80fbc03b0413b0
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Add support for 1.7 GHz and 2.0 GHz parts and their corresponding
L2 and memory bandwidth votes.
Support selecting different PVS tables based upon EFUSE speed bin
across all krait targets.
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Conflicts:
arch/arm/mach-msm/acpuclock-8064.c
Change-Id: I560371c3c5476f72444a8f2a88b9c441f3451ae1
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
With use of the QSB clock source recently eliminated, only one
input of the secondary clock MUX is used on any target. Since
there is overhead involved reprogramming this MUX when changing
the CPU and L2 frequencies, change the code to just program the
MUX at boot. Most noticeably, this removes a 1us delay from
every CPU and L2 frequency switch.
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Conflicts:
arch/arm/mach-msm/acpuclock-8064.c
Change-Id: I404913cec05f8893e08bf3f8d0c0f691c8d0f7d9
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Devices appear stable at these increased rates, even on early
hardware. Raise the frequency limit from 1.0GHz to 1.5GHz.
Change-Id: Ic0b5e8193a94d39c53721350b966656d5f734e33
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
When AVS support is available, it must be disabled during any
CPU frequency or CPU voltage changes. Add the hooks to do this.
Since AVS isn't supported on all variants of Krait that
acpuclock-krait supports, have a flag indicating if AVS is
enabled and only configure AVS if the tables support an AVS
setting.
Change-Id: Ide542596b51af18dece4c062b38173ce6e1bc2a0
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Correct the efuse address base and offset for 8974. Since the offset
is now different on 8974 than on other Krait-based targets, it's no
longer possible to hard-code it in acpuclock-krait.c. Instead, move
it into the QFPROM address passed from SoC specific files.
Since the PTE EFUSE is not yet used on 8974 to select different
frequency/voltage tables, this change should have no current
functional effect.
Change-Id: I26de7c9ce84e2873b883123f9fe420b3cb14e364
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
This line was somehow left out when initially copying the
acpuclock-8960 file over to the acpuclock-8960ab file.
Without this line, power collapse leaves the Krait PLL enabled,
causing failures upon resume.
Change-Id: I1339192d59d8b7f4135b32dcb5807bfc4dababfc
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Starting with B family chips, the IOMMU client is responsible
for registering a domain (page table) and attaching it with
the corresponding device context when required.
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Conflicts:
include/media/videobuf2-msm-mem.h
Change-Id: I98f97805a67d597da55780f8c6739c9734a19a14
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
The version of packing support excepted by the linux community is
slightly different from the one that was merged. This revert is needed
in order to upload the latest version from the linux community.
This patch reverts the following commits:
1.mmc: card: Add eMMC4.5 write packed commands unit-tests
2.mmc: card: Fix packing control enabling algorithm
3.mmc: block: Add MMC write packing statistics
4.mmc: msm_sdcc: enable the write packing control
5.mmc: msm_sdcc: Enable write packing capability
6.mmc: block: Add write packing control
7.mmc: core: Support packed write command for eMMC4.5 device
8.mmc: core: Add packed command feature of eMMC4.5
(cherry picked from commit f94cf3da103b344b13fa4d6665fd21dad1b95ead)
Change-Id: I2efc6dc8d8f6d5cc7e9efa99ec74914ffff96fcd
commit: 9b54d88c6a11ebfe069b7fdebcb521da21754c3f
commit: e2ecb58a6c5011549aac3e86fb1c13e7b7c65104
commit: e544d700e2dac1584a8172c4dc347d81ede203bd
commit: 8afe8d2a98a1bbf3804162ff5c95a56226935f5a
commit: 25e2261a556c4393f79d58bce814bb3df34b9549
commit: 63c61d6d8b8f37c71b4162b3affffdf72ac06811
commit: 968c774ea6466fa7adbf2eac333220132acda306
commit: 516994eee39282b8648b509e449ff83b49833209.
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
(cherry picked from commit 31fe84d6edae65f9df5663538e528697897be86e)
Signed-off-by: Maya Erez <merez@codeaurora.org>
Set MMC_CAP2_INIT_BKOPS. This will set the BKOPS_EN bit in the
ext_csd register. The BKOPS_EN bit is one time programmable.
(cherry picked from commit b7f382b25fbd363c43af2332b4ff490e13aab6e4)
Change-Id: Ie913561b2b82ff28366ffe564ffcafe8fc19a96a
Signed-off-by: Maya Erez <merez@codeaurora.org>
(cherry picked from commit 2d29e0d34e3304d976291d3ab29c7c893c12d740)
If the card and the host support BKOPS, and BKOPS is not enabled
yet, set the BKOPS_EN bit to enable BKOPS.
This bit is one time programmable.
(cherry picked from commit e966c1ca32d118b26ca6e26267f0c13c9c0e0052)
Change-Id: I2b97898857bed676021fe56a6f6e49762cf609fa
Signed-off-by: Maya Erez <merez@codeaurora.org>
(cherry picked from commit 5ebe331e59e9c30bffead8e3030e3581ee699895)
Enable eMMC background operations (BKOPS) feature.
If URGENT_BKOPS is set after a response, note that BKOPS are required.
Immediately run BKOPS if required. Read/write operations should be
requested during BKOPS(LEVEL-1), then issue HPI to interrupt the
ongoing BKOPS and service the foreground operation.
(This patch only controls the LEVEL2/3.)
When repeating the writing 1GB data, at a certain time, performance is
decreased. At that time, card triggers the Level-3 or Level-2. After
running bkops, performance is recovered.
Future considerations:
* Check BKOPS_LEVEL=1 and start BKOPS in a preventive manner.
* Interrupt ongoing BKOPS before powering off the card.
* How do we get BKOPS_STATUS value (periodically send ext_csd command)?
* If using periodic bkops, also consider runtime_pm control.
(cherry picked from commit 6807769f7bf68984a5aeda4b9b521f1167cbaf00)
[merez@codeaurora.org: core.c: release_host when stopping BKOPs for
non SDIO cards in suspend]
(cherry picked from commit c1a56a1247341d13af7c8f84d5ac1211a3c4b376)
Change-Id: I5ac2ac909222e2b4e94cd97ce7da79f4488f06f0
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Reviewed-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
(cherry picked from commit 653abe2434532e4d2886d27dfdc3f42ae1c7ade1)
A newer version of BKOps should be picked from the community.
Therefore the old support is reverted.
Revert the following commits:
9db69fca22bd2970f6b14b50cf8533a1edb64364
8ac659eb3d96e31b8bb6b8d09143ddd6eb83ae19
f886c80ee2f4c29aeaab2d76c9303c00263bb428
(cherry picked from commit 3402d2b725a5af16bc62a2e788913a46d3f7e54a)
Change-Id: I5df105753bef7ee10215526006187673b85bb0c1
Signed-off-by: Maya Erez <merez@codeaurora.org>
(cherry picked from commit b5763af04035cd5e3264225f40270d175985adc5)
This reverts commit 304d9f5172c8c0210e2e29b175e8f68ea8257f69.
low power mode changes are causing issues like,delay in reponse to
touch , and controller is not recognizing the touch events as its
scan rate is also low in low power mode state . since controller is
not recognizing the touch in low power mode state , so only way
for the controller to come out of low power mode is to do multi-touch
and controller responds randomly to one of the touches and comes out
of the low power mode.
Signed-off-by: Sreenivasulu Chalam Charla <sreeniva@codeaurora.org>
Change-Id: I35e0797f819cfbce6630d70af443b96546eacfb5
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
There are situations when we observe that charging is in progress
but the end of charge (EOC) worker is not running. This leads to
problems like
-never detecting end of charge
-not adjusting vddmax
-not preventing suspend while charging.
The reason is that the bootloader could have started charging already,
causing a fastchg interrupt to not happen. If the fastchg interrupt is
missed the driver will never start EOC worker.
Check the real time status of the fastchg interrupt and if it is fast
charging invoke the handler so that the eoc worker could be
started.
(cherry picked from commit 7f1d97fd69c3afe66577e731105207e5db544ab2)
CRs-Fixed: 393301
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Change-Id: I5c0ba3b8f0653c5f9d64f35346601763c059505a
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
This processor-awake signaling can be used by remote processors to
determine if the Apps processor is asleep and if so, if it wants to send
data to the Apps processor that would trigger a wakeup sequence.
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Change-Id: Ifef10ead33297697c6cb1726bff21798a11caa97
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Certain ADB commands like "adb usb" and "adb root" restart the
adb daemon running on the device. These commands require USB
bus reset, otherwise adb commands on the host side would stuck
for ever.
USB bus reset can be forced from device side by re-enabling the
same composition. Earlier, configuration is disabled when adb
daemon closes /dev/android_usb device file. The configuration
is enabled again after adb daemon opens the device file. This
approach solves the "adb usb" problem with the below side effects.
1. When USB cable is disconnected, the Rx request is flushed and
an error code is returned to user space. The adb daemon is simply
restarted in this case which cause an unnecessary rebinding of
all functions.
2. The above scenario can happen if host reset the bus when device
is in configured state. If device disable pull-up during, bus
reset, USB CV CH9 test cases are failing.
The commit d9b1897 (USB: android: Avoid re-enabling the same
configuration) fixed the above side effects. But silently ignores the
original "adb usb" problem.
This commit is another attempt to solve all the above mentioned problems
by forcing re-enumeration only when device is in connected state. That
means, "adb usb" and "adb root" commands force usb bus reset where as
plugging out a cable does not.
(cherry picked from commit 1aa235a6c0a3d67bff24609766baf5a7d5d8e3e4)
(cherry picked from commit 81fefe664ab6333f05209bed959a599a47baf71f)
Change-Id: Id3a40f62dd51aba6ec690d3326ed67ced32b946a
CRs-Fixed: 407882
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Modify the start address of RPM RBCPR stats in RPM MSG RAM to
match the address being used by RBCPR driver on RPM. This change
is needed to allow reading of RBCPR stats from RPM MSG RAM.
(cherry picked from commit ea1a1d78c1617cc62af5f0ea3fe836d4d9b87191)
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Change-Id: Id5d6b08dca4f56687fff506e676bfe12845acef9
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
New characterization data shows that vdd_dig voltage for L2@384MHz
can be lowered to 0.95v. Update the data in this patch.
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
(cherry picked from commit 7a904ecd4f43f228cd1b3ea0d8ef4054b69cdb35)
Change-Id: I7f38657930231ce8969bd16e793b57e606fcd162
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
We have an active set vote for the multimedia fpb and chip fpb so
that the registers are accessible whenever the processor is
awake. Unfortunately these requests are at the highest rate
supported which is not really necessary to ensure that the buses
are clocking. Lower the rate requests to the fastest speed that
doesn't require increasing voltages to allow the chip to hit low
voltages when the processor is awake.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 9e497f042d8525e57e11d417e9e37c2932a18dbf)
Change-Id: I3ee4926da0d953e7e31c3c64dffd11f6ee5edb72
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
while queueing requests to USB HW, waiting till EP PRIME bit
get cleared after setting it leads to wathdog timeout. Fix
this by implementing timer based solution instead of infinite
PRIME check loop.
(cherry picked from commit 9e4a5053b0f25cb18ed394fa517be620db673d44)
(cherry picked from commit dcfe03cd167f1b4916de85ce0a0a5516191741cc)
CRs-Fixed: 397907
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Change-Id: Iad7504c77c02870d9fa3b7b9decf13afcf2c9e12
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Due to higher HSIC interrupt threshold value, sometimes
driver is running short of enough rx urbs queued to HSIC
HW to receive IP packets from mdm device. In this case
driver is busy processing large number of completed rx
urbs and left with fewer pending urbs with HW. This causes
occasional throughput drops on rx data path. Hence increase
number of rx urb from 50 to 100, to keep HSIC HW busy in
pulling data from mdm device while completed urbs are getting
processed.
(cherry picked from commit e8f691f60db39b50951148c3e68ae35c89cdd397)
CRs-Fixed: 397809
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Change-Id: I590c203551c5ac83a71b8628d195f2a15840edf1
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
If MBHC GPIO IRQ for mechanical headset detection asserted while power
management's suspend call chain is being called, wcd9xxx_lock_sleep will
fail to wait for system's resume since power management interface has
to finish suspend in order to resume system.
In this case, interrupt cannot be handled as codec driver cannot
guarantee if underlying bus is awake.
Wake up system and resend the IRQ for this situation.
(cherry picked from commit ecf379cd17b7fe94e6f0df0598a472b6f1828ad5)
(cherry picked from commit bdda99b93915d217150f5484f9c718c905703f1e)
CRs-fixed: 404167
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Change-Id: Id5970b359b80e0cd1f701b30c61ade23e0f67b9e
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Add necessary functions for AR6004 to control BT related GPIO.
This change will only be used by AR6004
(cherry picked from commit 9baad179a8a7996e1912de14eb6f02f17c932e03)
(cherry picked from commit 493557fce821ae201b4cc3c6a125d703ac5de60e)
Signed-off-by: Ming-yi Lin <mylin@codeaurora.org>
Change-Id: I0fb3a59761dc3e994254bdc0241281e4bbcdf402
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
SMD or any client for WCNSS SSR notification can use the same name
(wcnss) for both Pronto and Riva.
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Change-Id: I956d9623f99855402add40b3e999bfacace7d2f3
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Toggle the CHG_USB_SUSPEND bit when utilizing the VBUS boost.
This bit controls ensures that no current is being drawn from
a USB device and the charger runs off the battery.
This makes sure that when pm8921_disable_source_current is called
the correct setting is written to the suspend bit depending
on the disable flag.
(cherry picked from commit d8878596b9b19668fd1f1b226a333d955f2218c4)
CRs-Fixed: 393498
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Change-Id: Iae390fd10e59d6ba1fe85743c1015eea35b06f7a
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
(cherry picked from commit 19a992314983c132d97b0d670b40e535580955da)
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
Change-Id: I16af92f174ac8a9b9ac15e96cbf2b89db4de1df5
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
ID ground interrupt processing and system suspend can run in parallel.
When Id is grounded, USB is brought out of low power mode(LPM) and state
machine work is run to activate host mode. While waiting for the VBUS
valid event, device suspend callback is executed from system suspend
context. The current code put USB in LPM, without activating host mode
completely. Abort suspend when A_BUS_REQ is asserted which indicate
that host mode is active.
(cherry picked from commit cfe0539e389c52ec6c4d99cf1915d806d42f1abe)
CRs-Fixed: 412841
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Change-Id: I9ecd4f55a328d63ddbf0e415a9bcff1158874203
Signed-off-by: Neha Pandey <nehap@codeaurora.org>