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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Vinod Koul [Thu, 6 Oct 2011 15:18:19 +0000 (16:18 +0100)]
ASoC: mfld_machine: fix the asoc sound card list initialzation
This initilzates the sound card soc list initialization
Change-Id: Iaa529d6437658598975bb3aa39806ab477ab0191
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:18 +0000 (16:18 +0100)]
intel_sst: 16-Bit and 44.1 frequency support
This patch includes the audio driver support for 16 bit and 44.1
frequency only.
Change-Id: I425edbd3ad620403d1b9350ae03f7a6a452fbc5e
Signed-off-by: Dharageswari.R <<dharageswari.r@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Dharageswari R [Thu, 6 Oct 2011 15:18:18 +0000 (16:18 +0100)]
x86, mrst: add ASoC platform devices and audio resources
This patch makes LPE to run with 50MHz with SCU FW support.
Change-Id: I92ab06da7c22b123f084302b01a467e6221d4d48
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Feng Tang [Fri, 8 Jul 2011 08:59:26 +0000 (09:59 +0100)]
sst: avoid unnecessary firmware reloading for MRST
SST HW on MRST doesn't need to reload the firmware during suspend/resume
cycle, so remove the extra workload. This also fix a bug that the firmware
sample rate can't be modified when there is no active playback/capture
stream.
Change-Id: If8159e1100824b5d96afec9952d5f9960d365f4c
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lu Guanqun [Fri, 8 Jul 2011 08:59:10 +0000 (09:59 +0100)]
sst: report correct jack event
The status of jack event is compared bitwise:
[in sound/core/jack.c:snd_jack_report()]
for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) {
int testbit = 1 << i;
if (jack->type & testbit)
input_report_switch(jack->input_dev,
jack_switch_types[i],
status & testbit);
}
So in order to report the correct events, 3 should be passed instead of 1.
Change-Id: I8a0d8c959340fab44acd11ed46dc4c763a493b36
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Liam Girdwood [Tue, 7 Jun 2011 15:08:33 +0000 (16:08 +0100)]
ASoC: core - Optimise and refactor pcm_new() to pass only rtd
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI.
Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains
card, pcm and DAI along with other members too that are useful too.
Change-Id: I46fa671e8ccca581475699366b687461435ac5aa
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Andre Bartke [Tue, 31 May 2011 19:03:56 +0000 (21:03 +0200)]
staging: intel_sst: Fix memory leak
In case of an error stream_bufs is not freed here.
Change-Id: I048acbc8761f7cb718752cf4215ab64553042e08
Signed-off-by: Andre Bartke <andre.bartke@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fei Yang [Tue, 25 Oct 2011 00:12:16 +0000 (17:12 -0700)]
WATCHDOG: Enable intel_scu_watchdog driver, otherwise the firmware would
reset the cpu approximately every 75s. This is a copy from UMG K35 kernel
tree, up to the following commit
commit
8ec47127745d548a591db2308f58a5ceeb4599c9
Author: mgross <mark.gross@intel.com>
Date: Tue Oct 4 12:24:20 2011 -0700
watchdog: detect spining in kernel and treat them as softlock ups
BZ: 10041
Updated watch dog to detect soft lock ups and provide WARN data to help
debug soft lock ups in drivers that don't wedge the system so much that
the watch dog stops getting kicked.
The works by computing the amount of system time between the SCU warning
interupt and the SOFT_LOCK_TIMEOUT which is 10 seconds. If the system
time on any cpu is within 10ms of the duration of the sample time (about
10 sec in jiffies) then we assume that CPU has a driver wedge and needs
to be reset. It calls panic to get the trace data logged to the emmc
panic area.
Change-Id: I2b4a5bff99bae86f7431f28d161b57973774ea0a
Reviewed-on: http://android.intel.com:8080/20482
Reviewed-by: Allyn, Mark A <mark.a.allyn@intel.com>
Tested-by: Allyn, Mark A <mark.a.allyn@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: Mangalampalli, Jayant <jayant.mangalampalli@intel.com>
Change-Id: Ib91d869741681ffb0190a2b57056192705b03687
Signed-off-by: Fei Yang <fei.yang@intel.com>
sathya [Tue, 25 Oct 2011 01:38:14 +0000 (18:38 -0700)]
hsu with pm
Change-Id: Iae0bd31900f9d8987ec48ecd04835b02003efaae
Chuanxiao Dong [Fri, 21 Oct 2011 01:53:53 +0000 (09:53 +0800)]
mmc: core: remove mmc bus legacy suspend/resume method
BZ: 4379
MMC bus suspend/resume was using legacy method. In system entering
S3 patch, the suspend/resume function cannot be called since MMC
bus also implemented the new suspend/resume method. So if dev_pm_ops
is defined but .suspend/.resume callbacks are not, then mmc_queue will
not be suspended/resumed
This patch will remove the legacy suspend/resume method and change to
use the new method totally.
Change-Id: I1dea4901910874f853fcb4e4c412e91df47a34d0
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Chuanxiao Dong [Thu, 20 Oct 2011 10:54:15 +0000 (18:54 +0800)]
mmc: core: resolve dead lock problem in pm_notify
BZ 2106
when pm_suspend() is called, in mmc_pm_notify() it will call mmc_claim_host(),
in host->bus_ops->remove(host), that is mmc_sd_remove(), at last it will
call mmc_cleanup_queue(), suspend thread will wait the mmcqd/2 thread to stop,
but in mmcqd/2 thread, mmc_blk_issue_rw_rq() will call mmc_clain_host(),
mmcqd/2 thread will wait in mmc_clain_host(), it will cause dead lock.
Change-Id: I05462d71066c4182ab01934fe64a87957ab47c6a
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Chuanxiao Dong [Thu, 20 Oct 2011 10:51:36 +0000 (18:51 +0800)]
mmc: remove legacy PM method for MFLD SDHCI host driver
BZ 1707
PCI core only prefer one of legacy PM and new PM. And we need to implement
runtime pm, we have already been using new PM method, so remove the legacy PM
method.
Change-Id: I67e042f283005e1b136d22735998b3be10dd5ce9
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Chuanxiao Dong [Thu, 20 Oct 2011 10:00:25 +0000 (18:00 +0800)]
REVERTME: mmc: sdhci: set SD_CD_PIN alternate function
With runtime pm enabled, SD detection should be enabled by
changing GPIO_ANO_69 alternate function to be normal.
This configuration cannot be done kernel. This should be done
by IFWI in very earlier state.
So the final change should be in IFWI(e.g. xml setting file) but
not in kernel. Before IFWI is ready, we keep this HACK.
Change-Id: Ief20c3aa686c62d41389afb7aed4bf1aad950889
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Chuanxiao Dong [Thu, 20 Oct 2011 09:36:53 +0000 (17:36 +0800)]
mmc: core: calculate the max_discard_to for all mmc card
To support erase/trim feature, MFLD host need a suitable
max_discard_sectors. Currently, if not enable ERASE_GROUP_DEF,
then driver will choose pref_erase which is not suitable for
MFLD host.
MFLD host still need driver to calculate a correct max_discard_sectors
but not directly use pref_erase. This patch will help to do so
Change-Id: I29a82bfcefa948e7e698a2170e30a2639bf954c3
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Adrian Hunter [Mon, 3 Oct 2011 12:33:34 +0000 (15:33 +0300)]
mmc: sdhci-pci: add runtime pm support
Ths patch allows runtime PM for sdhci-pci, runtime suspending after
inactivity of 50ms and ensuring runtime resume before SDHC registers
are accessed. During runtime suspend, interrupts are masked.
The host controller state is restored at runtime resume.
For Medfield, the host controller's card detect mechanism is
supplanted by an always-on GPIO which provides for card detect wake-up.
Change-Id: I0c054e7591f017b81f6efe3637ed870ae8253910
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Chuanxiao Dong [Wed, 19 Oct 2011 10:28:34 +0000 (18:28 +0800)]
mmc: core: move->request() call from atomic context
mmc_request_done() is sometimes called from interrupt or other atomic
context. Mostly all mmc_request_done() does is complete(), however it
contains code to retry on error, which uses ->request(). As the error
path is certainly not performance critical, this may be moved to the
waiting function mmc_wait_for_req_done().
This allows ->request() to use runtime PM get_sync() and guarantee it
is never in an atomic context.
Change-Id: I9a13ec8f6d41b7fef8497dd7c2e794bb32585cd6
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Adrian Hunter [Fri, 23 Sep 2011 09:48:21 +0000 (12:48 +0300)]
mmc: block: support no access to boot partitions
Intel Medfield platform blocks access to eMMC boot partitions which
results in switch errors. Since there is no access, mmcboot0/1
devices should not be created. Add a host capability to reflect that.
Change-Id: I95d4c3788e8890d117b58bd36a449e2d9e35dd68
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Mon, 29 Aug 2011 13:42:15 +0000 (16:42 +0300)]
mmc: block: add eMMC hardware reset support
For cards that support hardware reset (just eMMC), try a reset and
retry before returning an I/O error. However this is not done for
ECC errors and is never done twice for the same operation type
(READ, WRITE, DISCARD, SECURE DISCARD) until that type of operation
again succeeds.
Change-Id: I779d4d49a868a41bb058f58dc558a06934658b53
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Mon, 29 Aug 2011 13:42:13 +0000 (16:42 +0300)]
mmc: sdhci-pci: add eMMC hardware reset support
Implement eMMC hardware reset for Medfield.
Change-Id: If76373ca36d63d19ae64c9a7303be511c75dec0d
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Mon, 29 Aug 2011 13:42:12 +0000 (16:42 +0300)]
mmc: sdhci: add eMMC hardware reset support
Add an SDHCI operation for hardware reset and connect it to the
host controller operation.
Change-Id: I5d855aa804f09d9faccf9da799551e1abb079a5e
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Mon, 29 Aug 2011 13:42:11 +0000 (16:42 +0300)]
mmc: core: add eMMC hardware reset support
eMMC's may have a hardware reset line. This patch provides a
host controller operation to implement hardware reset and
a function to reset and reinitialize the card. Also, for MMC,
the reset is always performed before initialization.
The host must set the new host capability MMC_CAP_HW_RESET
to enable hardware reset.
Change-Id: I7658376627faf36f1e02e98df1ef9cc414e5b2cd
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Chuanxiao Dong [Wed, 19 Oct 2011 09:53:23 +0000 (17:53 +0800)]
Revert "sdhci: Add runtime pm support for sdhci-pci"
This reverts commit
58b9f466b5a0f6d4324c433d2e450d7a4a92a697.
Change-Id: I1e990a7774820343d0aee445b5e649bb78c37d8f
Chuanxiao Dong [Wed, 19 Oct 2011 09:48:15 +0000 (17:48 +0800)]
Revert "sdhci: correct clk_gate runtime_pm init"
This reverts commit
e82e08ed17110e6ab73fc9c5b9a74cd93e2a6c37.
Change-Id: I2f2e612b6e4e03937f73e0d4406830ff802a0f65
Chuanxiao Dong [Wed, 19 Oct 2011 09:47:54 +0000 (17:47 +0800)]
Revert "mmc: sdhci: don't try to do anything during power off"
This reverts commit
80b9b1a37fb230dd03716669ee24c5ad0631880f.
Change-Id: Icb1f392eb2b667f4b9c77315233b9a4708a327b5
Chuanxiao Dong [Wed, 19 Oct 2011 09:47:35 +0000 (17:47 +0800)]
Revert "MMC: Merge two patches from UMG 2.6.35"
This reverts commit
c435aacac11c4c54e45ad25a8dea6d81d7f5e835.
Change-Id: Icc5525c3d432868c2e36e2d0cc639c7919f8b953
German Monroy [Mon, 17 Oct 2011 23:32:28 +0000 (16:32 -0700)]
config: enable optimize inlining
without this... android's init process crashes!!!
Need to find out why
Change-Id: I722dee36a86944cf9d39681a84a0fdb81b933e62
German Monroy [Thu, 13 Oct 2011 19:51:52 +0000 (12:51 -0700)]
merge of related commits
config: bring from Mark and Fei's commit
dc0d78f4
config: non relocatable + start addresses
Change - Id: I35f8dcdd5805b3724bb1cc4387662c638791bdee
config: enable adb, disable eth gadget
Change - Id: I03c9ad343af9bb164c8d0190f6fb4d5773e5960c
Change-Id: I7b0e05aa0abb64ba5bd4ff1c5324bbc9e02044e2
German Monroy [Fri, 30 Sep 2011 00:39:30 +0000 (17:39 -0700)]
merge of reated changes
kernel build: add Android makefile
So that this kernel can be compiled together with the rest of Android
(i.e. build automatically creates boot.bin)
Change-Id: I7f59d0d17ed267e101f0cee2f75a5893de5cfbcb
kbuild: add a make defoldconfig make option
The oldconfig option is asking user to choose when new config options are defined in KConfig files, and not in .config
This prevents automatic builds.
This make target will use default values for all options not specified in .config
xxChange - Id: I713a5cc248130056441060dccfcb492ad0d8acb5
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Change-Id: I5f12ca9bc66ba7ac54bc205319c23d2875c0ea6f