mgross [Wed, 9 Nov 2011 21:31:15 +0000 (13:31 -0800)]
cherry-pick clean up betwen the new AOSP android-3.0 and our tree
Change-Id: I70ae3e1fb39faaf653f95bf05cd0b00da4fcf850
Hitesh K. Patel [Wed, 9 Nov 2011 01:05:48 +0000 (17:05 -0800)]
GFX: Enable Panel Backlight and Framebuffer driver
Enable Graphics backlight so the screen get's turned off
during OSPM.
Enable Framebuffer driver which is needed by Android.
Change-Id: Ife74753e8ba7ecbb9b25971ba3f78b0c498e9ecb
Signed-off-by: Hitesh K. Patel <hitesh.k.patel@intel.com>
Reviewed-on: http://android.intel.com:8080/23641
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Tue, 8 Nov 2011 23:33:53 +0000 (15:33 -0800)]
Fork lifted the following commit from git://jfumg-gcrmirror.jf.intel.com/a/bsp/hardware/intel/linux-2.6.git
commit
5e46481b899c2b71f28920387bec8a450ea8c34d
Author: Gilles Rimauro <gilles.rimauro@intel.com>
Date: Wed Oct 19 13:28:11 2011 +0200
arch/x86: Workaround to support PR3-PnP board
BZ: 12576
This is a workaround in kernel to support Medfield PR3-PnP boards. Without this
patch, I2C_0 (touchscreen) and I2C_5 (sensors and Audience) are not registered.
Implementation follows what is currently done for CDK and PRx to provide quick
support. However, mrst.c and blackbay_pr2.c code has to be cleaned to remove
hard-coded configurations and rely on SFI table instead. Current SFI table
already contains most of the needed configurations.
Change-Id: I1b043d0d10337282c86788b67c1fc85075d82fd4
Signed-off-by: Gilles Rimauro <gilles.rimauro@intel.com>
Reviewed-on: http://android.intel.com:8080/22020
Reviewed-by: Tardy, Pierre <pierre.tardy@intel.com>
Tested-by: Martin, LoicX <loicx.martin@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Change-Id: I7071b5e52bb8228a3b6dddbaefc62f1efe210e24
Reviewed-on: http://android.intel.com:8080/23639
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Tue, 8 Nov 2011 22:35:17 +0000 (14:35 -0800)]
Adding accl,compass,als,baro,gyro sensor support
Change-Id: I680aaec36ec6d045c1060eeae477066c019583a3
Reviewed-on: http://android.intel.com:8080/23632
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Fri, 4 Nov 2011 23:09:37 +0000 (16:09 -0700)]
Ambient light sensor support: Fork lifted ltr502als from git://jfumg-gcrmirror.jf.intel.com/a/bsp/hardware/intel/linux-2.6.git
Change-Id: I01e5b452a823d49aab584c69563e4b2fc21ea64b
Reviewed-on: http://android.intel.com:8080/23345
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Fri, 4 Nov 2011 21:32:53 +0000 (14:32 -0700)]
Support for baro sensor: fork lifted ms5607 driver from git://jfumg-gcrmirror.jf.intel.com/a/bsp/hardware/intel/linux-2.6.git
Change-Id: If05236ef565fbd51641ea322bdcc810cf52d3034
Reviewed-on: http://android.intel.com:8080/23344
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Fri, 4 Nov 2011 20:33:46 +0000 (13:33 -0700)]
Added Gyro sensor driver:
Fork lifted mpu3050 driver from git://jfumg-gcrmirror.jf.intel.com/a/bsp/hardware/intel/linux-2.6.git
Change-Id: I82992c5870c3d9327d321d3b4781822eba5354e3
Reviewed-on: http://android.intel.com:8080/23222
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Tue, 8 Nov 2011 22:17:55 +0000 (14:17 -0800)]
compass driver support:
hmc5883 driver fork lifted from git://jfumg-gcrmirror.jf.intel.com/a/bsp/hardware/intel/linux-2.6.git
Change-Id: I7013d0930a0eda017da9588d9f2b2df525da3a40
Reviewed-on: http://android.intel.com:8080/23220
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Tue, 8 Nov 2011 21:27:52 +0000 (13:27 -0800)]
Adding board based initialization support.
Change-Id: I5dcecea2b701a1cd4297e80c29eada81434fef15
Reviewed-on: http://android.intel.com:8080/23631
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Tue, 8 Nov 2011 21:23:44 +0000 (13:23 -0800)]
Adding bypass path for PR2 I2c devices.I2c devices in bus 0 & 5 are handeled in blackbay_pr2.c.
Change-Id: I46ba5a531e2e657871ac22edf0bea8fc36b5b559
Reviewed-on: http://android.intel.com:8080/23630
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Tue, 8 Nov 2011 21:39:24 +0000 (13:39 -0800)]
Accel sensor support & forklift of lis3dh_acc driver from git://jfumg-gcrmirror.jf.intel.com/a/bsp/hardware/intel/linux-2.6.git,commit id#
06dfd4d089008396a737a171afed3eec8b5da87c.
Change-Id: I541c660102a162631d3b559990f3a072aa410d80
Reviewed-on: http://android.intel.com:8080/23114
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
sathya [Thu, 3 Nov 2011 20:49:37 +0000 (13:49 -0700)]
Adding board ID proc entry & OEMB parser
Change-Id: I37c2b43b51b72fd09ec86950cc827863706d2149
Reviewed-on: http://android.intel.com:8080/23108
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Fei Yang [Mon, 7 Nov 2011 22:40:33 +0000 (14:40 -0800)]
I2C: the i2c controller is expected to be enabled when there is a
transfer request. Runtiem resume should only power on and initialize
the device to a known default state. Enabling the device on runtime
resume would trigger a spurious interrupt even when there is no
function driver acutally using the i2c device, thus causing a kernel
panic as dev->msgs == NULL.
Change-Id: I708e0d532aa0cdd7cb5161d8643dd5186d193243
Signed-off-by: Fei Yang <fei.yang@intel.com>
Reviewed-on: http://android.intel.com:8080/23503
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
mgross [Fri, 4 Nov 2011 20:07:33 +0000 (13:07 -0700)]
recomended changes for mmc driver
Change-Id: Id78f914d9b97ee6fa951a24f5f84ea5e325e0f2d
Reviewed-on: http://android.intel.com:8080/23221
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Chuanxiao Dong [Mon, 24 Oct 2011 02:14:26 +0000 (10:14 +0800)]
mmc: core: add background operations for eMMC card
Driver will check if need to do a BKOPS after completed each
user request. If BKOPS is need, then will start BKOPS when
request queue is idle.
So before start user request, driver should also check whether
card is doing a BKOPS. If so, check card status until BKOPS is done
or send HPI command is supported.
Change-Id: I204fab3d124c5a209cb0cc3a2915380a31c22b79
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/23123
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Chuanxiao Dong [Fri, 21 Oct 2011 07:44:54 +0000 (15:44 +0800)]
mmc: core: enable BKOPS feature for supported eMMC card
Background operations is a new feature defined in eMMC4.41 standard.
Since this feature is opertional for eMMC card, so driver only enable
for those eMMC card which supports this feature
Change-Id: I76308fed34b729d511e531fb7827d8f2b16afd3e
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/23122
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Chuanxiao Dong [Mon, 24 Oct 2011 02:12:40 +0000 (10:12 +0800)]
mmc: core: support HPI send command
HPI command is defined in eMMC4.41. This patch implements sending
HPI command to eMMC card if card supports.
Besides these changes, this patch also exported some sysfs which can
be used check whether the hpi is supported easily
Change-Id: I14ad85fe47a080564731228c3fe816f4f0b847eb
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/23121
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Chuanxiao Dong [Mon, 24 Oct 2011 02:34:14 +0000 (10:34 +0800)]
mmc: core: Fix hangs related to cards initialization
This patch is ported from upstream.
Actually we should understand this patch only can fix the hangs related
with cards initialization part. Insert/remove of cards can not only
cause cards initialization, but also some operation in mmc stack block
layer and host layer, which this patch cannot prevent can do nothing with.
Below is the original commint:
----------------------------------------------------------------
mmc: core: Fix hangs related to insert/remove of cards
During a rescan operation mmc_attach(sd|mmc|sdio) functions are
called. The error handling in these function can trigger a detach
of the bus, which also meant a power off. This is not notified by
the rescan operation which then continues to the next attach function.
If a power off has been done, the framework must never send any
new commands to the host driver, without first doing a new power up.
This will most likely trigger any host driver to hang.
Moving power off out of detach and instead handle power off
separately when it is actually needed, solves the issue.
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
---------------------------------------------------------------
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Change-Id: I7884d9bff2a9d9ef51e72ced03e4517560aedb0d
Reviewed-on: http://android.intel.com:8080/23124
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Chuanxiao Dong [Mon, 24 Oct 2011 05:01:52 +0000 (13:01 +0800)]
mmc: SDHCI: fix the issue related with SD card insert/remove
BZ 1605
insert/remove a SD card quickly while the card is inusing, can cause
MMC driver print timeout error message. This is reasonable. But should
not cause system getting slow. This patch will fix this.
Change-Id: Iffb1fe615603f2cd5ab74d28120d38167d317cb7
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/23125
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Chuanxiao Dong [Mon, 24 Oct 2011 05:10:00 +0000 (13:10 +0800)]
mmc: SDHCI: add some additional messages for SDHCI driver to dump
BZ: 9241
Add some additional debug messages in sdhci_dumpregs for debug purpose.
With this messages, it will be easily to identify what is going on
in driver when we encounter some issue.
Change-Id: I93eb910b808b485536dfd9882d668b4e284cdd28
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/23126
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Chuanxiao Dong [Mon, 24 Oct 2011 05:59:20 +0000 (13:59 +0800)]
mmc: SDHCI: The driver should not put the device into a low-power state
It is not required (in fact it even is not recommended) that a PCI driver's
suspend() callback save the standard configuration registers of the device,
prepare it for waking up the system, or put it into a low-power state.
All of these operations can very well be taken care of by the PCI subsystem,
without the driver's participation.
Change-Id: I69184088bda601739faf1436629805034c07241f
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/23127
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Hao Ying [Thu, 21 Jul 2011 04:36:15 +0000 (12:36 +0800)]
mmc: Add SD Status register to debugfs
BZ: 5522
This patch add the SD status register to debugfs. SD Status register is
a SD card register which contains status bits that are related to the SD
Memory Card proprietary features and may be used by future application-specific
usge, it is helpful to see its value.
Change-Id: Ia9041833bd432bd37df9e1d846aa66a856b19efc
Signed-off-by: Hao Ying <hao.ying@intel.com>
Reviewed-on: http://android.intel.com:8080/23128
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Hao Ying [Wed, 20 Jul 2011 07:11:38 +0000 (15:11 +0800)]
mmc: export the speed class info of SD card to sysfs
BZ: 5474
This patch exports the SD status register's speed class info to sysfs
Change-Id: I847ced0d3a632c706c0f7ab93b0dac2f7d6c8d00
Signed-off-by: Hao Ying <hao.ying@intel.com>
Reviewed-on: http://android.intel.com:8080/23129
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Chuanxiao Dong [Mon, 24 Oct 2011 08:19:19 +0000 (16:19 +0800)]
mmc: core_sdhci: emmc mutex support for medfield
One of the Medfield eMMC controller (PCI device id 0x0823, SDIO3)
is a shared resource used by the SCU and the IA processors.
SCU primarily uses the eMMC host controller to access the eMMC device's
Boot Partition, while the IA CPU uses the eMMC host controller to
access the eMMC device's User Partition.
After the SCU hands off the system to the IA processor, the IA processor
assumes ownership to the eMMC host controller. Due to absence of any
arbitration at the eMMC host controller, this could result in concurrent
eMMC host accesses resulting in bus contention and garbage data ending up
in either of the partitions.
To circumvent this from happening, eMMC host controller locking mechanism
is employed, where at any one given time, only one agent, SCU or IA,
may be allowed to access the host. This is achieved by implementing
Dekker's Algorithm (http://en.wikipedia.org/wiki/Dekker's_algorithm)
between the two processors.
Before handing off the system to the IA processor, SCU must set up three
housekeeping mutex variables allocated in the shared SRAM as follows:
eMMC_Owner = IA (SCU and IA processors - RW, 32bit)
IA_Req = FALSE (IA -RW, SCU - RO, 32bit)
SCU_Req = FALSE (IA - RO, SCU - R/W, 32bit)
There is no hardware based access control to these variables and so code
executing on SCU and IA processors must follow access rules of
Dekker's algorithm. Detail info about this algorithm can be found in
comments and code of this patch.
Change-Id: I303c18cbab815ce1d71aae8160c3fd595b0a516c
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/23130
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Chuanxiao Dong [Mon, 24 Oct 2011 09:06:42 +0000 (17:06 +0800)]
mmc: core: Remove the wakelock.
Keep the same usage with MFLD R1 & R2 branch.
The wakelock is not needed in current mmc driver.
This implementation from qualcom is actually conflicting with
our runtime_pm implementation, and the wakelock will stay locked
in return from S3.
Change-Id: I2d75bebc21d16dfec4c7498227c6d110d945d8af
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/23131
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
German Monroy [Thu, 3 Nov 2011 01:27:00 +0000 (18:27 -0700)]
config: enable watchdog driver
Needed to prevent reboots with some versions of the IFW.
Change-Id: I000e6240598be5b547fdfded85efa0b4ee9dcdb2
Reviewed-on: http://android.intel.com:8080/22988
Reviewed-by: Monroy, German <german.monroy@intel.com>
Tested-by: Monroy, German <german.monroy@intel.com>
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
mgross [Tue, 1 Nov 2011 22:36:59 +0000 (15:36 -0700)]
fix touch screen for k30
Change-Id: Iff7fa9bb9a85e7fc1af98d59327ad24e8ce1ff8e
Reviewed-on: http://android.intel.com:8080/22891
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
mgross [Tue, 1 Nov 2011 21:46:31 +0000 (14:46 -0700)]
enable some SFI tracing in the early startup
Change-Id: I043d476e8470b55c0317b6f464bb975271c73a01
Reviewed-on: http://android.intel.com:8080/22887
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
mgross [Tue, 1 Nov 2011 21:45:53 +0000 (14:45 -0700)]
turn on power button driver so we can wake up the phone after the display trys to turn off
Change-Id: I7871813331181b43e9d16976d67a690247a95745
Reviewed-on: http://android.intel.com:8080/22886
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
mgross [Tue, 1 Nov 2011 19:21:24 +0000 (12:21 -0700)]
enable kernrel compont building using android tool chain
Change-Id: Ibe9ecdc9fab633ed49f82c9ddaca8925c998fb64
Reviewed-on: http://android.intel.com:8080/22880
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
mgross [Thu, 27 Oct 2011 23:50:20 +0000 (16:50 -0700)]
fix up old touch screen implementation
Change-Id: Ib7fe714a770f5295d43a1b40dca40b3abd8a4a16
mgross [Wed, 26 Oct 2011 23:17:20 +0000 (16:17 -0700)]
fixup configs
Change-Id: I53114a6086aa5083185d0ede156e33a6b9044fc0
mgross [Wed, 26 Oct 2011 23:16:35 +0000 (16:16 -0700)]
forklift of touch screen from
git://jfumg-gcrmirror.jf.intel.com/a/bsp/hardware/intel/linux-2.6.git
commit
3d9f0662a963acad6de0dc2b2c3fb44c07956fbf
Change-Id: Iaced0c8177afcb5f34f75024317c43eae4aff02c
Jim Bish [Sat, 22 Oct 2011 02:44:23 +0000 (19:44 -0700)]
Updates for drm change in K3.0. The fb fix gets local display working but HDMI will not work correctly._ Please enter the commit message for your changes. Lines starting
Change-Id: I3b3452eccfa4747c903cbb3b243d391af2a6ae24
mark gross [Fri, 21 Oct 2011 11:37:20 +0000 (04:37 -0700)]
fix ttm io space initialization busted in video tare out
Change-Id: I3ae983b92c40300eebc5c0bd7bd92f3b31751b86
Jim Bish [Fri, 21 Oct 2011 02:42:12 +0000 (19:42 -0700)]
Removed video decode and encode through kernel config for 3.0 port
Change-Id: Ia52a008d0f3a88389fe9a67ad7d2f7e2dddde81a
Jim Bish [Thu, 20 Oct 2011 20:52:02 +0000 (13:52 -0700)]
Starting point for ddk 1.7 upgrade to kernel 3.0
Change-Id: Ia1595f7c049900a960f40b9730772d94afbc8ba6
Fei Yang [Fri, 14 Oct 2011 21:00:28 +0000 (14:00 -0700)]
ADC: fix MSIC GPADC platform device registration issue.
All MSIC platform devices are registered through Intel MSIC driver,
however corresponding change needed for ADC device is missing.
Change-Id: I835a15cb44115702f8a5aba296094cc0e09736d5
Signed-off-by: Fei Yang <fei.yang@intel.com>
Alan Cox [Thu, 6 Oct 2011 15:17:41 +0000 (16:17 +0100)]
sfi: Kill the IRQ as id hack
Nothing should now need it so take it out
Change-Id: Idb07dee19761b10e82efe0fc3ffc0179a720ce78
Signed-off-by: Alan Cox <alan@linux.intel.com>
Alan Cox [Thu, 6 Oct 2011 15:17:36 +0000 (16:17 +0100)]
SFI tables reside in RAM and should not be modified once they are written.
Current code went to set pentry->irq to zero which causes subsequent reads
to fail with invalid SFI table checksum.
To fix this we use temporary variable for irq number.
Change-Id: I3305eb07e9559f8c37364a0a4cfbd1e79a09bc45
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Mika Westerberg [Thu, 6 Oct 2011 15:17:41 +0000 (16:17 +0100)]
x86/mrst: add platform support for MSIC MFD driver
The MSIC MFD driver creates platform devices for MSIC device drivers so we
don't need to create them in platform code anymore.
This patch adds a new runtime check which determines whether we are running
on a Medfield platform and enables the MSIC MFD driver accordingly.
Change-Id: I151613e6bf6c98ef520a1c531c64749942cc2230
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[Hand applied]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Mika Westerberg [Thu, 6 Oct 2011 15:17:41 +0000 (16:17 +0100)]
mfd: add Intel MSIC driver
Add support for Intel MSIC chip found on Intel Medfield platforms. This
chip embeds several subdevices: audio, ADC, GPIO, power button, etc. The
driver creates platform device for each subdevice.
We also provide an MSIC register access API which should replace the more
generic SCU IPC interface currently used. Existing drivers can choose
whether they convert to this new API or stick with the SCU IPC interface.
Change-Id: I99d9184a3391887357fba7d8e2cfc105117b5c6a
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:35 +0000 (16:18 +0100)]
gpadc: add reg dump after timeout
Sometimes, it is very hard to duplicate ADC timeout issue.
Some issue only can be duplicated on a small quantity of boards.
To add the registers dump after timeout will help debugging.
Change-Id: I875af1654236ff725dfd765fd06a61e454dc2224
Signed-off-by: Bin Yang <bin.yang@intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:35 +0000 (16:18 +0100)]
gpadc: fix battery temp accuracy
From oscilloscope result, BPTHERM takes <1ms to stabilize.
So it needs to add 1ms delay after VBUSREF is enabled.
Change-Id: I34503b94bd9eec73432bfe817bceed18a104edcc
Signed-off-by: Bin Yang <bin.yang@intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:34 +0000 (16:18 +0100)]
gpadc: optimize driver initialization
ADC trimming cost a long time. It blocks the kernel boot sequence.
Change to do trimming in a single workqueue.
Change-Id: Icd3232fb40d13e1b0c3d544840d2a975fe005d6e
Signed-off-by: Bin Yang <bin.yang@intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:32 +0000 (16:18 +0100)]
gpadc: read sample result in one loop
RR bit is used to inform HW for sample result read.
it needs to hold the RR bit for all channels result read.
this patch moves the lines to set/clear RR bit outside the loop.
Change-Id: I6e810d03eab6f59d16315fb38ae81864dc37bd02
Signed-off-by: Bin Yang <bin.yang@intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:32 +0000 (16:18 +0100)]
gpadc: fix logic err of last addr checking
it has logic error to check last addr which is used.
Change-Id: Ia5ec6610b60a402166349369bf03918ec6e89eb4
Signed-off-by: Bin Yang <bin.yang@intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:30 +0000 (16:18 +0100)]
gpadc: update the calibration algorithm
gpadc document had updated this algorithm in new version.
This patch updates the driver base on new document.
Change-Id: I367916df9a394e681dedb5ccf5c6672954250d3c
Signed-off-by: Bin Yang <bin.yang@intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:30 +0000 (16:18 +0100)]
gpadc: fix sample result error
During stress test, ADC results have some bad valules.
Driver has a race condition issue. It initializes the output data to 0 first
without any lock. And the caller may access the output pointer before function
return.
This patch moves the output data initializing code inside mutex protected period.
And it also adds a limitation which forbid caller to access output pointer
before function return.
Change-Id: I7a108abf4fc5c0bb7a2e9c135add4f977d29c919
Signed-off-by: Bin Yang <bin.yang@intel.com>
He Bo [Thu, 6 Oct 2011 15:18:28 +0000 (16:18 +0100)]
gpadc: system does not enter S3 after incoming call
intel_mid_gpadc driver causes deadlock in S3, fix it.
Change-Id: I9878f3dd97402bbf9b9ad53cfc12e9dda4c90122
Signed-off-by: He Bo <bo.he@intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:26 +0000 (16:18 +0100)]
gpadc: prevent CPU from S0i3 when ADC is active
Under the following scenario:
1. IPC1 request sent to SCU
2. PM_CMD s0ix entry request sent to SCU
3. MWAIT C6 abort (or no attempt at MWAIT C6)
If steps #1 an #2 are sufficiently close (maybe within 200us) there is
a possibility that SCU will handle the PM_CMD first and begin waiting on an
ack_c6 response from the MWAIT that is expected. Since the MWAIT never comes
(or is aborted) SCU will have to eventually time out before being able to move
on and handle the IPC1 request.
Change-Id: I00674d66806d127cef0810fa023eed5dd0fda7c2
Signed-off-by: Bin Yang <bin.yang@intel.com>
[ port to new pm_qos_add_request() interface -Guanqun ]
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:24 +0000 (16:18 +0100)]
The coulomb count interrupt is not used by kernel driver. It needs to be
handled inside firmware.
Change-Id: Idf8f9a3ddc8bc2253a27f69d4757330722bd3550
Signed-off-by: Bin Yang <bin.yang@intel.com>
Bin Yang [Thu, 6 Oct 2011 15:18:19 +0000 (16:18 +0100)]
gpadc: add gpadc driver support
The general purpose ADC inside MSIC is used by battery and thermal. This
driver provides the channel allocation and basic ADC functions.
Signed-off-by: Bin Yang <bin.yang@intel.com>
Signed-off-by: Hao Wu <hao.wu@intel.com>
NEEDS MOVING TO THE RIGHT PLACE
Change-Id: Ia0592d5f61b213109c3aa562f1a8b9a9313a7f62
Kirill A. Shutemov [Thu, 6 Oct 2011 15:18:39 +0000 (16:18 +0100)]
ASoC: core: fix few -Wunused-but-set-variable warnings
sound/soc/soc-core.c: In function ‘codec_reg_write_file’:
sound/soc/soc-core.c:248:6: warning: variable ‘step’ set but not used [-Wunused-but-set-variable]
sound/soc/soc-cache.c: In function ‘snd_soc_rbtree_cache_init’:
sound/soc/soc-cache.c:657:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
sound/soc/soc-cache.c: In function ‘snd_soc_flat_cache_init’:
sound/soc/soc-cache.c:1123:37: warning: variable ‘codec_drv’ set but not used [-Wunused-but-set-variable]
Change-Id: I153b1387d23a9cc7ba3f096ef0674cf694df5f2c
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:22 +0000 (16:18 +0100)]
ASoC: add set_params function in codec driver
This patch adds new function for alsa soc framework. The set_params
function can be called by asoc drivers to configure the codec
parameters like word size.
Change-Id: I737af5c53aa6966f6a23cc7b234943b2eefc2fb4
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Alan Cox [Thu, 6 Oct 2011 15:18:47 +0000 (16:18 +0100)]
a1026: import speech processor code
This is 'as it comes' and needs further work
Change-Id: I6299038bec3d643b74b5c3d1969f1a4bde203bd4
Signed-off-by: Alan Cox <alan@linux.intel.com>
Kirill A. Shutemov [Thu, 6 Oct 2011 15:18:39 +0000 (16:18 +0100)]
intel_sst: fix -Wtype-limits warnings
drivers/staging/intel_sst/intel_sst_app_interface.c: In function ‘sst_ioctl_tuning_params’:
drivers/staging/intel_sst/intel_sst_app_interface.c:980:2: warning: comparison is always false due to limited range of data type [-Wtype-limits]
drivers/staging/intel_sst/intel_sst_stream_encoded.c: In function ‘sst_target_device_select’:
drivers/staging/intel_sst/intel_sst_stream_encoded.c:438:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
Change-Id: If5160a3d9424585843e3dc1b5f39775843c5b8cd
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Kirill A. Shutemov [Thu, 6 Oct 2011 15:18:39 +0000 (16:18 +0100)]
intel_sst: drop sst_get_sfreq()/get_wdsize
There are no sst_get_sfreq()/get_wdsize() users
Change-Id: I9ed55c57a7a6f43d64b8e6ad35904162f920fcec
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Kirill A. Shutemov [Thu, 6 Oct 2011 15:18:39 +0000 (16:18 +0100)]
intel_sst: fix -Wunused-but-set-variable warnings
drivers/staging/intel_sst/intel_sst_app_interface.c: In function ‘snd_sst_fill_kernel_list’:
drivers/staging/intel_sst/intel_sst_app_interface.c:407:23: warning: variable ‘sent_index’ set but not used [-Wunused-but-set-variable]
drivers/staging/intel_sst/intel_sst_app_interface.c: In function ‘intel_sst_ioctl’:
drivers/staging/intel_sst/intel_sst_app_interface.c:1097:35: warning: variable ‘num_channel’ set but not used [-Wunused-but-set-variable]
drivers/staging/intel_sst/intel_sst_app_interface.c:1097:20: warning: variable ‘word_size’ set but not used [-Wunused-but-set-variable]
drivers/staging/intel_sst/intel_sst_app_interface.c:1097:9: warning: variable ‘sfreq’ set but not used [-Wunused-but-set-variable]
drivers/staging/intel_sst/intel_sst_app_interface.c:1224:34: warning: variable ‘mod’ set but not used [-Wunused-but-set-variable]
drivers/staging/intel_sst/intel_sst_drv_interface.c: In function ‘sst_get_stream’:
drivers/staging/intel_sst/intel_sst_drv_interface.c:277:34: warning: variable ‘response’ set but not used [-Wunused-but-set-variable]
drivers/staging/intel_sst/intel_sst_drv_interface.c: In function ‘sst_process_mad_ops’:
drivers/staging/intel_sst/intel_sst_drv_interface.c:357:6: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable]
drivers/staging/intel_sst/intel_sst_ipc.c: In function ‘sst_process_message’:
drivers/staging/intel_sst/intel_sst_ipc.c:225:24: warning: variable ‘stream’ set but not used [-Wunused-but-set-variable]
drivers/staging/intel_sst/intel_sst_stream_encoded.c: In function ‘sst_play_frame’:
drivers/staging/intel_sst/intel_sst_stream_encoded.c:562:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
drivers/staging/intel_sst/intel_sst_stream_encoded.c: In function ‘sst_capture_frame’:
drivers/staging/intel_sst/intel_sst_stream_encoded.c:644:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
sound/soc/mid-x86/sst_platform.c: In function ‘sst_platform_pcm_prepare’:
sound/soc/mid-x86/sst_platform.c:354:19: warning: variable ‘str_id’ set but not used [-Wunused-but-set-variable]
Change-Id: I69f48155673805747f9c8e95c6980f3583d0ee00
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Kirill A. Shutemov [Thu, 6 Oct 2011 15:18:38 +0000 (16:18 +0100)]
intel_sst: add missed static qualifiers
Change-Id: Ie18967f216d59106206c2b3249b5096f2f58a7a2
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Lu Guanqun [Thu, 6 Oct 2011 15:18:38 +0000 (16:18 +0100)]
intel_sst: remove old intelmid driver
We'd prefer ASoC audio driver, and the old intelmid driver will not be
maintained anymore, so remove it.
Change-Id: I1b5844218d083f8df9ed06e1cae640f460051cda
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
dharageswari.r [Thu, 6 Oct 2011 15:18:38 +0000 (16:18 +0100)]
intel_sst: error handling in alloc stream, when the firmware timeout happens
This patch returns the SST_IPC_ERR_STREAM_ALLOC_FAILED error, incase of
firmware timeout, for the alloc stream IPC message from audio driver.
Change-Id: I1dc77246f3e31faef89ea7f73a1472b6da1b270c
Signed-off-by: dharageswari.r <dharageswari.r@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:38 +0000 (16:18 +0100)]
ASoC: mfld_machine: disable dmic2, dmic4 and dmic 6
The PR2 hardware has only 3 DMICs on board. They are connected
to DMIC1, 3 and 5. Machine driver needs to disable DMIC2, 4 and 6 to
minimize power consumption.
This patch disables the DMIC2, 4 and 6 in machine driver.
Change-Id: Id28f7cd88180d6e6548ede649c94781164f3c67e
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:37 +0000 (16:18 +0100)]
ASoC: sn95031: Avoiding spurious OC interrupts and reduction of delay in OC Interrupt handler
This patch masks the OCVOLSTSMASK bit of OCAUDIOMASK regsiter as soon as the
Over current interrupt is received by the audio driver and it unmasks the same
register after restoring the IHF volume.Also the delay to schedule the
delayed Over current workqueue has been reduced to 100msec from 1 sec.
This patch will fix audio driver from receiving the spurious Over Current
interrupts and also reduces the delay in the over current interrupt handler.
Change-Id: I30c0a2dcff1104a1b400467ab39370dc5c3d731b
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Rohit Kumar Sindhu [Thu, 6 Oct 2011 15:18:37 +0000 (16:18 +0100)]
intel_sst: changes for get tuning parameter interface
There has been a change in SNDRV_SST_GET_ALGO ioctl interface. Earlier it only
used to receive data from FW, but now it will take data from user space, send
it to LPE and then get back the same buffer back from LPE. So The maximum size
it will receive from LPE is the equal to the size of data which was sent to LPE.
It will take data from user space exactly in similar fashion as done in
SNDRV_SST_SET_ALGO ioctl.
Change-Id: I3e5a5ec69569a3f287dd5ba8bc19d7587eafc665
Signed-off-by: Rohit Kumar Sindhu <rohit.k.sindhu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:37 +0000 (16:18 +0100)]
intel_sst: Removal of pmic_state instance from sst driver
This patch removes the pmic_state instance from the sst driver code.
pmic_state variable is no longer required in the sst driver.
Change-Id: I1849fd586e5eee2bf8a1f42ecf2022f8fbe09f93
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:37 +0000 (16:18 +0100)]
intel_sst: Fixes the wrong debug trace in intel_sst_app_interface
This patch fixes the wrong debug trace in intel_sst_app_interface, from
"SNDRV_SST_SET_VOLUME" to "SNDRV_SST_SET_MUTE"
Change-Id: I6d5dcfd15a5cabb8f91e191d82bdc82620741b70
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Jeeja [Thu, 6 Oct 2011 15:18:36 +0000 (16:18 +0100)]
ASoC: sst_platform: Fix the range of playback and capture parameters
Audio driver was exposing the unsupported paramter for Playback and Capture
This patch handles the range of the playback and capture parameter
Change-Id: Iff9b78786d69ef5e3fe36be7380949ebd53a9887
Signed-off-by: Jeeja <jeeja.kp@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:36 +0000 (16:18 +0100)]
ASoC: mfld_machine: prevent the deadlock in interrupt handler of machine driver
This patches uses spin_lock_irqsave to store and handle the jack and
over current interrupts.There by it prevents the deadlock issue caused due to
spin_lock in the threaded interrupt handler.
Change-Id: I693c153d0a1f39d02d9d114a8ae0c99d19badebe
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Jeeja [Thu, 6 Oct 2011 15:18:36 +0000 (16:18 +0100)]
ASoC: mfld_machine: Enabled PM Functionality Audio codec driver
During voice call and System in S3, disconnect the call. HAL opens the
headset-dai and plays a short tone after call is disconnected. Audio driver
responds to Headset-close(), by disabling the PLL. But DAPM for disabling the
widgets and VAUD is trigger after 5 seconds,by this time system goes to S3 and
function to invoke vaud off is not called.This will cause power dissipation.
This patch implements PM in ASoC driver which disable VAUD when system enters
S3.
Change-Id: If5383fd70f2bfb8a0c350d1eeb2a13a44be3ef1c
Signed-off-by: Jeeja <jeeja.kp@intel.com>
Jeeja [Thu, 6 Oct 2011 15:18:35 +0000 (16:18 +0100)]
ASoC: sn95031: intel_sst: Fixes delay in powering up PLL and firmware download
Powering up of Audio rail and firmware download together was consuming 80ms
which didn't meet the latency requirement for openning a pcm device.
This patch fixes the delay during firmware download by caching the firmware
instead of using request_firmware() when firmware download is required and also
reduces the delay from 10ms to 1ms to power up PLL.
Change-Id: I4585bb9fc4b9ede9f99c001d8538bf4246c1b22f
Signed-off-by: Jeeja <jeeja.kp@intel.com>
Louis Le Gall [Thu, 6 Oct 2011 15:18:35 +0000 (16:18 +0100)]
intel_sst: Allow automatic DMA LLI for I2S SSP
The DMA LLI stall after first block if the CSR2 register in
LPE Shim are not configured properly.
The LPE Shim register are not accessible from SSP I2S driver,
only by SST driver.
Modification will not impact other component, change will be
done for SSP0 and SSP1.
Change-Id: I502931a1bef9809bbd35c39845416af6d80843fb
Signed-off-by: Louis Le Gall <louis.le.gall@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:34 +0000 (16:18 +0100)]
ASoC: sn95031: msic pcm1 is configured to short sync mode when not in use
PCM1 port is used for voice call communication. Currently PCM1 port
of MSIC is configured to I2S mode. But in I2S mode, even when
PCM1 is disabled, the TX line is pulled low. This should be ideally
Hi-Z state when disabled.
After few experiments, it has been found that configuring the
PCM1 port to short sync or long sync mode when not in use makes
the TX line to Hi-Z state.
This patch configures the PCM1 port to short sync mode when the port
is not in use. When PCM1 is in use, it will be configured to I2S mode.
Change-Id: I36901afe873bf40920b34fbc24d670ae96c7293e
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Guillaume Denneulin [Thu, 6 Oct 2011 15:18:34 +0000 (16:18 +0100)]
intel_sst: fix post processing ioctl header and size management
The sst driver was wrongly calculating the size of headers for post processing
ioctls. Also the get method didnt copy enable status if algorithm
Change-Id: I28e9028b9aa09eaf746add0edf0ad52c0db1fad1
Signed-off-by: Guillaume Denneulin <guillaumex.denneulin@intel.com>
[fixed comit log and checkpatch errors in patch -Vinod]
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:34 +0000 (16:18 +0100)]
ASoC: sst_platform: eliminate "Control path in use error"
Music stops for a while after press Pause/Resume several times when effect
enabled
This patch removes the DROP operation during prepare.
Change-Id: I4aa4787424df6a512ee50691f34bc5d96ae5c602
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:33 +0000 (16:18 +0100)]
ASoC: sn95031: enable penwell osc_clk0 for vibra operations
osc_clk0 of penwell is connected to PLLIN of MSIC.
Currently osc_clk0 is enabled only when either voice
call or music playback is active.
Enable the osc_clk0 of penwell during vibra/haptics
use cases. Enabling the osc_clk0 is achieved through
sending a command to the SCU firmware
Change-Id: I8d73e7517eaa34cf8752ab65138bffebed500abd
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Jeeja [Thu, 6 Oct 2011 15:18:33 +0000 (16:18 +0100)]
intel_sst: Ensure LPE is in stalled before downloading Firmware
The FW download fail error occurs mainly when the copy of LPE FW code
and data from audio driver to the DSP IRAM/DRAM is not successful or
encounters error.But there is no mechanism in driver to know if the
memcpy_toio has failed or not.
This patch ensures LPE is in stalled state before copying the firmware
Change-Id: I9a4ed7fbddbfac9140daaa53b949e76729d104a5
Signed-off-by: Jeeja <jeeja.kp@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:33 +0000 (16:18 +0100)]
ASoC: sst_platform: sn95031: Support for BCU event handling
Audio driver was not handling the BCU events
This patch handles the BCU event for IHF speakers
The impact is that, when the audio driver gets an Over current interrupt
it restores the IHF audio volume back to the original level.
Change-Id: I8eb94b37e5104c731dd630c1ce041d7581af0924
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:33 +0000 (16:18 +0100)]
ASoC: sn95031: enable the DMIC bias
this patch enables the digital mic bias when the digital mics are in use
Change-Id: I5283b7369d3610f0fafcbdb4d869055f0caeddb8
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:32 +0000 (16:18 +0100)]
ASoC: sn95031: mfld_machine: Fix for jack detection failure for the first time
If headset is plugged into the jack during board boot up, the following
scenario of routing playback fails, i.e from headset to IHF and then to
Headset.
This patch fixes the issue, by handling all the jack interrupts from msic,
and also by initializing the jack_interrupt_status to 0 if the codec value
is NULL.
Change-Id: I96d04b29fe89ee2d399c979bd112f222d46969a2
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:31 +0000 (16:18 +0100)]
ASoC: sn95031: sst_platform: disable the pcm2 in platform close
Sometimes call ringtone is not heard, when headset is connected.
Root cause is PCM2 turned off when audio rail is switched off and
then it's not enabled again.
By disabling the PCM2 when all streams are idle fixes the problem.
Even if audio rail power cycles, PCM2 will remain to be active.
Change-Id: Ic3f8ce5ea150bbdc988e43f507d09b8a5828a083
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:29 +0000 (16:18 +0100)]
ASoC: sn95031: Fix the number of options for Vibra controls
The VibraX On and Off times were incorrectly given 32 entries whereas hardware
describes only 16 entries.
This patch fixes the options to 16 entries only
Change-Id: I83d7cef9a6fb7584d2c8f9fc2efef18104447d95
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:30 +0000 (16:18 +0100)]
intel_sst: fix voice call regression
The pnw_osc_clk patch 10839 caused the voice call to break as this patch will
switch off the clock falsely even when any call is made for closing, the check
is wrongly made for idle detection.
This patch fixes by correcting teh check and fixing this issue
Change-Id: Iad54c8ea83d6c630a34439bd3c97010915641f99
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Fabien Barthes [Thu, 6 Oct 2011 15:18:29 +0000 (16:18 +0100)]
intel_sst: ASoC: sst_platform: Ensure that Penwell osc_clk0 in ON during voice call
During voice call, SST driver is in suspend mode and ensure that osc_clk0 is
turned off. This clock is input to MSIC PLL
In order to enable voice call, the switching needs a clock source The audio
processing chip for voice call also needs this clock, so we should keep this
ON during voice call
This patch adds a function in sst driver to enable and disable the osc_clk0 and
it is done for voice and sst suspend.
Change-Id: Icc9f01c1a3780367f459cd50eb7f604a2a203027
Signed-off-by: Fabien Barthes <fabienx.barthes@intel.com>
Vaibhav Agarwal [Thu, 6 Oct 2011 15:18:29 +0000 (16:18 +0100)]
ASoC: sn95031: sst_platform: Restore MSIC Audio PLLSRC to PLLIN after the voice call
Music playback is slow when switches from Voicecall. Also, some noise can be
observed after the phone call from the speaker.
For voice call, audio driver switches the PLLSRC to PCM1BLCK. This needs to be
switched back to PLLIN to enable the switching from voice call to music
playback.
This patch modifies PLL depending on the source.
Change-Id: Id7977c4672380f9e4c3017e576ac20f4fbc76eee
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@intel.com>
Abhay [Thu, 6 Oct 2011 15:18:29 +0000 (16:18 +0100)]
ASoC: sn95031: sst_platform: intel_sst: fix errors reported by klocwork
Variables in audio driver code need to be freed properly to avoid possible memory leaks.
Also the unchecked return of variables from called functions may cause out of bound errors
like in case of array indexes.
This patch fixes these errors (as pointed by the klocwork )in sst driver and ASoC code by
freeing the memory of unused variables and checking on the returned value by called function
to array index to avoid posible array out of bound runtime error.
Change-Id: I1710889976e0d257ba2e7bede338cc2f056ae095
Signed-off-by: Abhay <abhay.joshi@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:28 +0000 (16:18 +0100)]
ASoC: sn95032: Fix the audio voltage rail configuration
The audio rail should be configured for Power save mode, as well as AOAC should
be set to power set mode. The off should be set for both configs as well
This patch configures the ON and OFF values as 0x2D and 0x24 respectively for
all audio rails
Change-Id: Ibc0e0d7409ec0508d168d992334981b02904ab7f
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:28 +0000 (16:18 +0100)]
intel_sst: Restore the csr value after S3 and S0i3 states
The csr value is lost during S3 and the value was not restored
back completely after system resume.So, audio playback fails after
resume from S3
This patch stores the original value of csr before S3 and restores
it back on resume.
Change-Id: I80afeb939e4753f2baf05a0ad91b33ab4dc013a5
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Vaibhav Agarwal [Thu, 6 Oct 2011 15:18:28 +0000 (16:18 +0100)]
ASoC: sst_platform: check to ensure voice and music mutually exclusive
Voice call operates at 48khz and Music playback operates at 44.1khz.
Due to limitation in MSIC hardware, simultaneous voice and music
playback is not supported. MSIC does not support simultaneously
operating two PCM ports at different family of frequencies.
This patch adds a fix in audio driver to make sure that either
music playback or voice call is active at a given point.
Change-Id: Ia8e9a0e788c3d1ebc2588a69e612bf7f70ac6028
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:27 +0000 (16:18 +0100)]
ASoC: sn95031: inte_sst: Fix for spurious long press event report bug
headset long press button, trigger too many long-press interrupts
and fault short-press interrupt.
This issue was found to be a hardware bug, and the workaround is implemented in
audio driver.when the button in the headset is pressed(long press i.e for more
than 2 seconds) and released, rain of long press interrupts followed by a
short press/long press event is observed after the button release.
This patch fixes the issue of spurious long press event report, followed by a
short press event, for every single long press, as a result of this patch only
one long press event will be reported for every long press.
Change-Id: I56812c9891729aae134559835a10126541e2dabd
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:27 +0000 (16:18 +0100)]
intel_sst: Removal of Legacy pm registeration
Audio driver had legacy pm registerations which is not compliant
with the current RTPM Framework.
Audio driver had legacy_pm registerations in pci_driver structure,
this is no longer used. The suspend and resume call back is moved to
dev_pm_ops structure.Hence during driver registration the legacy pm
methods are not registered.
This patch removes the legacy_pm call back registeration from
the SST Driver.
Change-Id: I5225e1bfc35736efab27fe2562680eca1c0578cc
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Vaibhav Agarwal [Thu, 6 Oct 2011 15:18:27 +0000 (16:18 +0100)]
intel_sst: Replace u64 with __u64 in intel_sst_ioctl.h
The user space applications have __u64 macro defined. So, to make
snd_sst_tuning_params structure definition in sync with user space macro,
u64 should be replaced with __u64
Replaced u64 with __u64 in intel_sst_ioctl.h
Change-Id: I68008a97d027562ea8004fbe1441868cd53e251e
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@intel.com>
Louis Le Gall [Thu, 6 Oct 2011 15:18:27 +0000 (16:18 +0100)]
intel_sst: Enable clk output for SSP0 and SSP1 to allow I2S master mode
Modification in sst driver probe to setup LPE SHIM register CLKCTL
and CSR to authorize SSP0 and SSP1 to output clock and use internal
clock.
Change-Id: I43a3e1ab58b366b1c9a3ff930a48387c2620eb41
Signed-off-by: Louis Le Gall <louis.le.gall@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:26 +0000 (16:18 +0100)]
ASoC: sn95031: mfld_machine: fix jack detection and removal issues
The hardware jack detect was implemented by board designers in such a way that
it relies on the AvP headphones to ground the driver-out signal. This was a
work around to be able to use the older style headset jack. The headset driver
then shorts the FET gate for the plug detect circuit to operate
Offset 0x26C bit 1 should be set high (grounded) at all times until just before
the headset is turned on
This patch fixes this by grounding headset normally. Also the jack interrupt
code reliability is improved by oring new interrupt value not overwriting
Change-Id: I2c01f40def7dfe5c3012a872d24f94c9a62a93a2
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:26 +0000 (16:18 +0100)]
ASoC: mfld_machine: remove the pins assigned to jack
The soc DAPM core turns off the pins associated with the jack when a jack removal
event is sent. We dont want the alsa DAPM to handle policy. Policy should be
decided by user space only
This patch removes the pins associated with jack and thus disabling any changes
done by DAPM while sending jack removal event
This patch thus resolve the issues of buffer timeout as pin and in turn whole
codec is turned off when jack removal event is sent
Change-Id: I1242d90b0bac94db54789c47db3999413d2c7434
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:25 +0000 (16:18 +0100)]
ASoC: sn95031: enable the audio PLLEN bit of MSIC
Audio files plays at faster rate for 44.1khz streams. This is caused
because audio PLL of MSIC is not enabled. Penwell provides 19.2MHz,
which is at base rate of 48Khz. PLL has to be enabled for streams which
are not at 48KHz base rate.
This patch enables the audio PLL for all the use cases which includes
voice and music use cases.
Change-Id: Iccb1b502eaa32fb963f7cf9a013a3ac8f08d7c02
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:25 +0000 (16:18 +0100)]
ASoC: sst_platform: Error handling for stream allocation failure
This patch fixes the error handling for stream allocation failure
in platform driver.
Change-Id: Iadc39a1a027964d410ddf308a78c6578aac3f6fd
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:25 +0000 (16:18 +0100)]
ASoC: sn95031: use GPADC driver to read the mic bias value
This patch enables the codec driver sn95031 to read the mic bias value through
GPADC driver.
Change-Id: Iacd16563ad8fb5cba0bd0784161a2ed0be2e26de
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:25 +0000 (16:18 +0100)]
ASoC: sn95031: set default gain to -2dB in MSIC
When VHS is programmed to 1.2v, the gain beyond -2dB causes
clipping in the output signal. Recommendation is to set the hardware
volume levels -2dB for both HS and IHF paths.
Change-Id: I67acb607f4384c337c4abb3d0eb00442c917301c
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:24 +0000 (16:18 +0100)]
ASoC: sn95031: fix to avoid spurious jack interrupts
When jack insertion is detected, jack detection interrupt is disabled to avoid
spurious interrupts. Jack detection interrupt will be re-enabled when jack
removal is detected.
Change-Id: Ie43a0e881beb03e657e441cd801f5c84ba6768b7
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>