kernel/kernel-mfld-blackbay.git
12 years agommc: SDHCI: fix the issue related with SD card insert/remove
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>
12 years agommc: SDHCI: add some additional messages for SDHCI driver to dump
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>
12 years agommc: SDHCI: The driver should not put the device into a low-power state
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>
12 years agommc: Add SD Status register to debugfs
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>
12 years agommc: export the speed class info of SD card to sysfs
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>
12 years agommc: core_sdhci: emmc mutex support for medfield
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>
12 years agommc: core: Remove the wakelock.
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>
12 years agoconfig: enable watchdog driver
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>
12 years agofix touch screen for k30
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>
12 years agoenable some SFI tracing in the early startup
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>
12 years agoturn on power button driver so we can wake up the phone after the display trys to...
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>
12 years agoenable kernrel compont building using android tool chain
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>
12 years agofix up old touch screen implementation
mgross [Thu, 27 Oct 2011 23:50:20 +0000 (16:50 -0700)]
fix up old touch screen implementation

Change-Id: Ib7fe714a770f5295d43a1b40dca40b3abd8a4a16

12 years agofixup configs
mgross [Wed, 26 Oct 2011 23:17:20 +0000 (16:17 -0700)]
fixup configs

Change-Id: I53114a6086aa5083185d0ede156e33a6b9044fc0

12 years agoforklift of touch screen from
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

12 years agoUpdates for drm change in K3.0. The fb fix gets local display working but HDMI will...
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

12 years agofix ttm io space initialization busted in video tare out
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

12 years agoRemoved video decode and encode through kernel config for 3.0 port
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

12 years agoStarting point for ddk 1.7 upgrade to kernel 3.0
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

12 years agoADC: fix MSIC GPADC platform device registration issue.
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>
12 years agosfi: Kill the IRQ as id hack
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>
12 years agoSFI tables reside in RAM and should not be modified once they are written.
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>
12 years agox86/mrst: add platform support for MSIC MFD driver
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>
12 years agomfd: add Intel MSIC driver
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>
12 years agogpadc: add reg dump after timeout
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>
12 years agogpadc: fix battery temp accuracy
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>
12 years agogpadc: optimize driver initialization
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>
12 years agogpadc: read sample result in one loop
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>
12 years agogpadc: fix logic err of last addr checking
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>
12 years agogpadc: update the calibration algorithm
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>
12 years agogpadc: fix sample result error
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>
12 years agogpadc: system does not enter S3 after incoming call
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>
12 years agogpadc: prevent CPU from S0i3 when ADC is active
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>
12 years agoThe coulomb count interrupt is not used by kernel driver. It needs to be
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>
12 years agogpadc: add gpadc driver support
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

12 years agoASoC: core: fix few -Wunused-but-set-variable warnings
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>
12 years agoASoC: add set_params function in codec driver
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>
12 years agoa1026: import speech processor code
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>
12 years agointel_sst: fix -Wtype-limits warnings
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>
12 years agointel_sst: drop sst_get_sfreq()/get_wdsize
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>
12 years agointel_sst: fix -Wunused-but-set-variable warnings
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>
12 years agointel_sst: add missed static qualifiers
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>
12 years agointel_sst: remove old intelmid driver
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>
12 years agointel_sst: error handling in alloc stream, when the firmware timeout happens
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>
12 years agoASoC: mfld_machine: disable dmic2, dmic4 and dmic 6
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>
12 years agoASoC: sn95031: Avoiding spurious OC interrupts and reduction of delay in OC Interrupt...
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>
12 years agointel_sst: changes for get tuning parameter interface
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>
12 years agointel_sst: Removal of pmic_state instance from sst driver
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>
12 years agointel_sst: Fixes the wrong debug trace in intel_sst_app_interface
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>
12 years agoASoC: sst_platform: Fix the range of playback and capture parameters
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>
12 years agoASoC: mfld_machine: prevent the deadlock in interrupt handler of machine driver
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>
12 years agoASoC: mfld_machine: Enabled PM Functionality Audio codec driver
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>
12 years agoASoC: sn95031: intel_sst: Fixes delay in powering up PLL and firmware download
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>
12 years agointel_sst: Allow automatic DMA LLI for I2S SSP
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>
12 years agoASoC: sn95031: msic pcm1 is configured to short sync mode when not in use
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>
12 years agointel_sst: fix post processing ioctl header and size management
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>
12 years agoASoC: sst_platform: eliminate "Control path in use error"
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>
12 years agoASoC: sn95031: enable penwell osc_clk0 for vibra operations
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>
12 years agointel_sst: Ensure LPE is in stalled before downloading Firmware
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>
12 years agoASoC: sst_platform: sn95031: Support for BCU event handling
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>
12 years agoASoC: sn95031: enable the DMIC bias
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>
12 years agoASoC: sn95031: mfld_machine: Fix for jack detection failure for the first time
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>
12 years agoASoC: sn95031: sst_platform: disable the pcm2 in platform close
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>
12 years agoASoC: sn95031: Fix the number of options for Vibra controls
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>
12 years agointel_sst: fix voice call regression
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>
12 years agointel_sst: ASoC: sst_platform: Ensure that Penwell osc_clk0 in ON during voice call
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>
12 years agoASoC: sn95031: sst_platform: Restore MSIC Audio PLLSRC to PLLIN after the voice call
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>
12 years agoASoC: sn95031: sst_platform: intel_sst: fix errors reported by klocwork
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>
12 years agoASoC: sn95032: Fix the audio voltage rail configuration
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>
12 years agointel_sst: Restore the csr value after S3 and S0i3 states
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>
12 years agoASoC: sst_platform: check to ensure voice and music mutually exclusive
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>
12 years agoASoC: sn95031: inte_sst: Fix for spurious long press event report bug
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>
12 years agointel_sst: Removal of Legacy pm registeration
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>
12 years agointel_sst: Replace u64 with __u64 in intel_sst_ioctl.h
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>
12 years agointel_sst: Enable clk output for SSP0 and SSP1 to allow I2S master mode
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>
12 years agoASoC: sn95031: mfld_machine: fix jack detection and removal issues
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>
12 years agoASoC: mfld_machine: remove the pins assigned to jack
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>
12 years agoASoC: sn95031: enable the audio PLLEN bit of MSIC
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>
12 years agoASoC: sst_platform: Error handling for stream allocation failure
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>
12 years agoASoC: sn95031: use GPADC driver to read the mic bias value
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>
12 years agoASoC: sn95031: set default gain to -2dB in MSIC
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>
12 years agoASoC: sn95031: fix to avoid spurious jack interrupts
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>
12 years agointel_sst: mono to stereo capture support in driver
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:24 +0000 (16:18 +0100)]
intel_sst: mono to stereo capture support in driver

Middleware detects headset insertion and invokes driver IOCTL
to perform mono to stereo.  Audio driver will send IPC message
to audio firmware to perform the task.

Change-Id: I551ea2f2ef35271ed1186940ea6309dccf8b9241
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
12 years agoASoC: sst_platform: remove hardcoding for voice dai checks
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:24 +0000 (16:18 +0100)]
ASoC: sst_platform: remove hardcoding for voice dai checks

This patch removes hard coded value for checking the
voice dai.  It uses run time data to differentiate the voice dai.

Change-Id: I3064f8e3039014764a23ba4c65e76a40d7f6b10c
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
12 years agoASoC: sn95031: Add headset detection code in new soc dirver
bingx.deng [Thu, 6 Oct 2011 15:18:23 +0000 (16:18 +0100)]
ASoC: sn95031: Add headset detection code in new soc dirver

It use switch driver to report headset insert/remove event.

Change-Id: I482da8d5982acf0c822e99c983e1437140f350d4
Signed-off-by: bingx.deng <bingx.deng@intel.com>
12 years agointel_sst: Fix firmware download failure post S0i3
Dharageswari R [Thu, 6 Oct 2011 15:18:23 +0000 (16:18 +0100)]
intel_sst: Fix firmware download failure post S0i3

This patch saves the csr register value during suspend, restores it back in
resume and fixes the firmware download failure post S0i3

Change-Id: If60b1d209b3e3e3db7c4403387c0d8e5f54111e1
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
12 years agointel_sst: update the driver version
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:23 +0000 (16:18 +0100)]
intel_sst: update the driver version

Change the driver version to 2.0.01.  This driver version implements
dynamically handling OSC_CLK0 during RTPM, in addition to other RTPM changes.

Change-Id: Ib4717e76df16139489d6aa7ff7a99234e6127d7f
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
12 years agoASoC: sn95031: mfld_machine: Enable SPI Vibra controller
Vinod Koul [Thu, 6 Oct 2011 15:18:23 +0000 (16:18 +0100)]
ASoC: sn95031: mfld_machine: Enable SPI Vibra controller

This patch adds the TI codec driver changes for supporting the SPI control mode
for the Vibra devices. The PCM vibra path is also removed.

Change-Id: I838389f6a53a4347a14b22876e83bb6ea301abfa
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
12 years agoASoC: sn95032: hardware volume and mute controls for sn95038 codec driver
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:22 +0000 (16:18 +0100)]
ASoC: sn95032: hardware volume and mute controls for sn95038 codec driver

This patch adds alsa mixer digital volume controls to headphone and spekaer
paths.  Application can control left and right volume individually for each
path.

Change-Id: I514ee1a6f72fde1db53721198a190a17c1150bab
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
12 years agoASoC: sn95031: sst_platform: set_params support in sn95031 codec and sst platorm
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:22 +0000 (16:18 +0100)]
ASoC: sn95031: sst_platform: set_params support in sn95031 codec and sst platorm

This patch configures sn95031 codec to 24 bit word format.
Codec driver implements set_params and platform driver

Change-Id: I303d7550a531903c637fa31be1bf0aa9c9585747
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
12 years agoASoC: sst_platform: intel_sst: Audio fix the runtime PM bug when stop media is called
Vinod Koul [Thu, 6 Oct 2011 15:18:22 +0000 (16:18 +0100)]
ASoC: sst_platform: intel_sst: Audio fix the runtime PM bug when stop media is called

During stop media, the driver usage count remains 1, this cause the device to
not get suspended. This patch ensure that force close of media service which
makes a direct free to call to driver doesnt cause runtime counter to incremenat
and device goes to suspend when idle

Change-Id: I7c01baf04eacffa61a2251972ec336e83c1b433f
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
12 years agoASoC: sn95031: voice call support in codec driver
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:21 +0000 (16:18 +0100)]
ASoC: sn95031: voice call support in codec driver

This patch enables PCM1 port of MSIC.  The codec driver will
have it's own dai, hence there will be new device "Voice" for
this sound card.

Change-Id: Ic21163d2731bd8df10759062687dee952a8b4243
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
12 years agoASoC: sst_platform: intel_sst: fix the runtime pm when stream is kept open
Vinod Koul [Thu, 6 Oct 2011 15:18:21 +0000 (16:18 +0100)]
ASoC: sst_platform: intel_sst: fix the runtime pm when stream is kept open

This patch does intelligent idle detction in driver and suspends LPE when not
in use.

Change-Id: Ib600b6f8b0ad0609cd3bbf3560f7b0754a413fb8
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
12 years agoASoC: mfld_machine: add voice dai support in mfld machine driver
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:21 +0000 (16:18 +0100)]
ASoC: mfld_machine: add voice dai support in mfld machine driver

This patch adds support voice dai in machine driver.

Change-Id: I77356d4eeb7fcca5304fc109cd6d409d0ffc453d
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
12 years agoASoC: sst_platform: voice call support in platform driver
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:21 +0000 (16:18 +0100)]
ASoC: sst_platform: voice call support in platform driver

Voice dai insided the platfor driver is a dummy dai.  It doesn't have
any standard alsa dma capabilities.  Voice dai only supports open, close and
set_params alsa apis.

Change-Id: I508d9ebca777ef3e23659e11b881fa4b52d5de41
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
12 years agointel_sst: control penwell OSC_CLK_OUT0 clock during suspend/resume
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:20 +0000 (16:18 +0100)]
intel_sst: control penwell OSC_CLK_OUT0 clock during suspend/resume

This patch disables/enables the OSC_CLK_OUT0 during suspend/resume.
OSC_CLK_OUT0 is connected to MSIC PLLIN and it needs to be
disabled during audio suspend to get low power numbers.

Change-Id: I83b43cc24e6ff1c21270403b5cc771714f3d8e7c
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
12 years agoASoC: sst_platform: add 16bit, 44.1K support in audio
Vinod Koul [Thu, 6 Oct 2011 15:18:20 +0000 (16:18 +0100)]
ASoC: sst_platform: add 16bit, 44.1K support in audio

Change-Id: Iebb065a2351544f63dcc72e44bf3c8fd945069f8
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
12 years agointel_sst: ASoC: sst_platform: fix the changes required for asoc driver interface...
Vinod Koul [Thu, 6 Oct 2011 15:18:20 +0000 (16:18 +0100)]
intel_sst: ASoC: sst_platform: fix the changes required for asoc driver interface to work

This patch changes the sst driver not to call the old sound card ops during
playback and other operations

Change-Id: If399630e12c8bfd75dbc8a938918a93eacccb2cc
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
12 years agointel_sst: Fix for First audio playback through media player
Dharageswari R [Thu, 6 Oct 2011 15:18:19 +0000 (16:18 +0100)]
intel_sst: Fix for First audio playback through media player

This audio driver fixes the following issue:
Cannot play the music and appear the error of .W/AudioTrack( 1233):
obtainBuffer timed out.

Change-Id: I0f12d74f0f3ecb49fc6928986919308f4b005d73
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
12 years agointel_sst: Addition of pcm delay field
Dharageswari.R [Thu, 6 Oct 2011 15:18:19 +0000 (16:18 +0100)]
intel_sst: Addition of pcm delay field

This audio driver patch includes the addition of pcm_delay field for
the Audio Video sync.

Change-Id: I225a2068737efebf2484b0ea63e3a261e0047141
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>