Commit Graph

1107 Commits

Author SHA1 Message Date
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00
Banajit Goswami b223868cbf mfd: wcd9xxx: avoid slimbus read/write during ADSP reset
During ADSP subsystem restart, all slimbus read/write would fail
as the bus is not available. Avoid codec read/write, until the
slimbus master in ADSP is up.

Change-Id: Iec1933d2625c1cd3dd700b2b3e2ffc7eae64880b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-10-14 02:49:45 -07:00
Santosh Mardi 19d781ac88 drivers: mfd: Move codec reset gpio config to early boot
Codec reset gpio configuration needs to be updated
before slimbus master component is initialized otherwise
codec cannot be enumerated on the bus. Add a new platform
device driver to update the codec reset gpio configuration
to valid state (output, drive-strength) before slimbus
is initialized.

CRs-Fixed: 968161
Change-Id: I7227212e6b846d58196718255aa4b0923352d120
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-02-18 16:54:01 +05:30
Santosh Mardi ced48f7a4a ASoC: wcd9335: update codec driver according to QCRG 22
Update codec driver in compliance with the codec device bring up
and tear down,

Also include the critical fixes in codec driver fixed.

Change-Id: I7a468a40f18315fe8a065f13b05e7410a8d54b4c
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-02-01 22:52:44 +05:30
Yeleswarapu Nagaradhesh 07c2b1c579 ASoC: changes to fix codec nack issue
This change fixes codec HW issues, Slimbus master capability issue
and codec NACK issues caused due to SIDO buck going down abruptly.

Change-Id: I74e94630b2ba4c132d66315ceee5127e05f284c6
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-10-01 09:34:50 -07:00
Phani Kumar Uppalapati e09ec6964c drivers: mfd: Add support for wcd9335 version 2.0
Add support for wcd9335 version 2.0 and update the
register defaults accordingly based on the version.

Change-Id: I33038c1643b83ecd593891688c0ddf4a556b92ee
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-09-04 09:23:48 -07:00
Yeleswarapu Nagaradhesh df029f9d8a ASoC: wcd9335: move regulator optimum calls to codec driver
There are few use cases where apps goes down to suspend
but codec should be in active state. Core driver will not
have knowledge of these usescases and hence move suspend and
resume hooks to codec driver.

Change-Id: If5614dd13f24a80d18f53f194c7be1c5b967a003
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-08-19 03:05:55 -07:00
Yeleswarapu Nagaradhesh 8f7738bdb5 ASoC: wcd: modify codec power down sequence
Modify the codec power down sequence as below
1. Disable regulators.
2. Pull down codec reset GPIO.
3. Wait for 60 msec for codec to stabilise.

Change-Id: I410482561d99365395eea6ec94347e91507fe03a
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-08-06 07:07:00 -07:00
Yeleswarapu Nagaradhesh b9891e31c6 ASoC: wcd: add support for wcd9326 codec
Use efuse register values, to differentiate between
wcd9326 and wcd9335 codecs.

Change-Id: I68e7ae5eb1717dccd0af975670ac3644304996b9
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-07-24 06:12:49 -07:00
Yeleswarapu Nagaradhesh 4ff9349c8b ASoC: wcd: update codec driver to maintain the power states
Modify codec, wsa and core drivers to maintain the power states
and configure the tasha codec and wsa hardware to low power mode
to reduce the power consumption during suspend.

Change-Id: I245c7ee154d0840b8036a99df374fc9392000585
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-07-22 23:07:02 +05:30
Phani Kumar Uppalapati 83e2931130 ASoC: wcd9335: Add support for digital core power collapse.
When no audio use-cases are active, codec digital core
can be put into power collapse to reduce the power consumption
during codec stand-by. Add support to put core into power
collapse and remove out of the collapse when audio use-cases
are triggered.

Change-Id: Ib72b72239712d1b20542950f05b698647edcb9fa
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
2015-07-17 13:51:24 +05:30
Sudheer Papothi 8d290518e6 ASoC: wcd9xxx: Changes for flyback sequence to work on wcd9335
Change sequence of enabling flyback on wcd9335 as per hardware
requirement for flyback to work properly in audio usecase.

Change-Id: I48c24665afc4cb6527cc225ec3fecbc5f883a17d
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2015-07-06 11:30:16 +05:30
Sudheer Papothi e025708f8c drivers: mfd: API to support slimbus bulk register write
Add changes in wcd core driver to support slimbus bulk register
writes API that sends multiple register writes with
one descriptor.

Change-Id: I27fd179f14e03e955f2847e3d2c4249852c14af2
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2015-07-06 11:30:10 +05:30
Phani Kumar Uppalapati d99df6a178 drivers: mfd: Detect and update the wcd9335 version
Add support to detect the wcd9335 codec version and
define macros for wcd9335 1.0 and 1.1 so that codec
driver can use these macros to update the register
configuration.

Change-Id: Ibb497bfb857addb9c7e8db37828c0096979d2c3c
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-06-24 18:17:01 +05:30
Aravind Kumar ad55ed7669 ASoC: msm8976: changes to support tasha
Changes in machine driver to support wcd external
codec tasha. Add dailinks for tasha.

Change-Id: I6d56affc676d04156fe9763c4957a15060692fc0
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-06-01 11:26:57 +05:30
Bhalchandra Gajare 900159f96b mfd: wcd9xxx-slimslave: Cleanup of unused API's
For msm owned master ports, the configuration is done by a separate
driver and hence the master port related API's provided by slimslave are
not used. Remove the unused API's.

Change-Id: I3f6b4ffccce7533250e211441d2f383dc96c8655
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2015-04-28 14:34:26 -07:00
Phani Kumar Uppalapati f8f977770c mfd: wcd9xxx: Update interrupt number for button release
Update enum value for button release IRQ
for wcd9335 codec.

Change-Id: I99d5bbe2e54f1640586b01cf2dea5e7bba30a180
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-04-23 16:07:10 +05:30
Phani Kumar Uppalapati c495a9ab1c mfd: wcd9xxx: Update WCD codec interrupt registers
It is possible that interrupt register addresses
are different depending on the version of the WCD
codec. Currently IRQ driver assumes that these
addresses are same across codecs. Add condition
to check the WCD codec version and update the
interrupt registers accordingly so that IRQ driver
can access the correct set of registers for interrupt
processing.

Change-Id: I65308cd865517b363cbce01c9fe57d5e13373aea
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-04-23 15:37:09 +05:30
Phani Kumar Uppalapati 6c9983fd74 mfd: wcd9xxx: Add wcd9335 config for core drivers
WCD9335 codec uses wcd9xxx core services. Enable codec
config so that wcd9xxx core services like IRQ handling
can be used.

Change-Id: I748bc91199df9e92235349b209d3e2ef496f24e8
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-04-20 11:19:23 -07:00
Phani Kumar Uppalapati 47cdc057ef ASoC: wcd9335: Add wcd9335 codec resource manager driver
WCD9335 Audio Codec has two clock sources MCLK and RCO.
The clock source that gets enabled will depend on the audio
use-case that needs to be run and also proper sequencing
need to be followed when switching b/w these two clock sources.
Add WCD resource manager driver to handle the enablement of
the clock source and their switching.

Change-Id: Iacbdcfdccd0d1a2d33a0019c4d89a20639a20384
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-04-20 11:18:28 -07:00
Phani Kumar Uppalapati 0a48cb5936 ASoC: wcd9335: Add AMIC/DMIC configuration
Add AMIC/DMIC path configuration in wcd9335
audio codec driver for audio capture use-cases.

Change-Id: I4c43a48cfb22a841d89e30f638fd7de61fd5a6f4
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-04-20 04:12:06 -07:00
Phani Kumar Uppalapati eaf665866a ASoC: wcd9335: Add class-H controller for ear and headphone
WCD9335 Audio Codec has Class-H controller on ear,
headphone paths. This controller adjusts the PA supply
by analysing the PCM audio samples. Add driver to
program Class-H Controller on Ear, Headphone paths.

Change-Id: I6c7ccbe4b515369cae3935b94f4ea202342280e0
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-04-18 00:55:21 -07:00
Phani Kumar Uppalapati be2d40ef29 mfd: wcd9335: Update wcd9335 codec register defaults
Update wcd9335 codec register tables with correct
default values.

Change-Id: Ib994fad420afffa1d369ab164584f5f19f8c4712
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-04-09 10:51:32 -07:00
Santosh Mardi 5cadadbd76 ASoC: wcd9335: Add initial driver for WCD9335 Codec
Add codec driver for WCD9335 audio codec. This driver
is an ALSA-compliant and constructs the internal codec
audio paths with DAPM widgets and controls. Provides the
controls to the upper layers to enable and configure
audio paths.

Change-Id: I1c5ec2a7c775153ee6722832cb3a76298979d7f4
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2015-04-08 11:33:35 +05:30
Patrick Lai cdef0aa690 mfd: wcd9xxx-core: add debugfs entry to dump slimslave registers
Currently, there is a debugfs entry defined for peeking one register
at a time. Add another debugfs entry to dump all SLIMBUS slave
register.

Change-Id: Iddf056d68afd3699d9d8d8eef83bd98d03e61fac
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-01-11 11:12:00 -08:00
Bhalchandra Gajare 6d1514aa71 mfd: wcd9xxx-core: Add API to support slimbus clock bandwidth request
Slimbus clock can be scaled for high bandwidth requirements, add API to
support voting for slimbus clock so that individual codec drivers can
use this API.

CRs-fixed: 735296
Change-Id: I5be78b9ce5d0e2b241cecdba5f7ee672d8211461
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2014-10-21 19:16:05 -07:00
Bhalchandra Gajare 0db8515893 mfd: wcd9xxx: Add support for MAD specific DMIC clk rate
MAD (Microphone Activity Detection) block on the codec can use
different Digital MIC (DMIC) clock rate as compared to regular audio
recording use cases. Add support to configure DMIC clock rate specific
to MAD which will be used by codec drivers whenever MAD is active.

CRs-fixed: 692015
Change-Id: Ife73a407c8d1a2d16b9b89df4979395a575f96c2
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2014-09-02 11:20:37 -07:00
Linux Build Service Account 3c4a9994ec Merge "ASoC: wcd9xxx: Changes for High performance mode" 2014-08-15 04:52:00 -07:00
Sudheer Papothi eac4b94d30 ASoC: wcd9xxx: Changes for High performance mode
Add changes for high performance audio playback on headset
for better audio quality during 192KHz/24bit audio playback.

CRs-Fixed: 706322
Change-Id: Ie79293f24114d5d81a610186d24b44b1550dae9c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2014-08-13 02:19:28 +05:30
Aviral Gupta 8ecaf403ff ASoC: wcd9xxx: update the pinctrl for the slimbus based devices
Parse the pinctrl nodes from the dtsi file for the slimbus
based codecs.

Change-Id: I5f03bbeaad608ae0966395e8170ec8a6e64d9bb0
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
2014-08-12 17:37:33 +05:30
Laxminath Kasam fdbcce7bba mfd: wcd9xxx: fix no audio issue due to irq failure
on wcd9306, we have dtsi entry to register interrupts
from 0 to 28. But Tapan codec has num_irq initialised
to 31 causing irq_init to fail.
Correct the macro for TAPAN_NUM_IRQS to resolve the
issue.

Change-Id: Ieadc3fee5c7524e31d1697b23e30665a00564516
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2014-08-01 18:33:05 +05:30
Laxminath Kasam 84abfaf362 ASoC: msm8939: add support for external codec over slimbus
With new sound cards possible to connect over SLIMBUS,
add SLIMBUS as primary BE dai.

Change-Id: I6ebb3744a539f3409caad0565f7a80e6f531cc07
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2014-06-25 14:56:45 +05:30
Linux Build Service Account bed92b2391 Merge "ASoC: wcd9xxx: Add support for MAD Slim master channel API" 2014-06-06 06:05:54 -07:00
Linux Build Service Account 1be968617f Merge "ASoC: msm8x16-wcd: add support for pmic rev 2.0" 2014-06-04 07:06:53 -07:00
Laxminath Kasam 5fcb6a52af ASoC: msm8x16-wcd: add support for pmic rev 2.0
Add register changes as per flatfile for rev 2.0
and maintain backward compatible.

Change-Id: I0060c4369ae66e624ea9d181048449d4e0cdf4f2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2014-05-28 20:44:27 +05:30
Venkat Sudhir 20938dead3 ASoC: wcd9xxx: Add support for MAD Slim master channel API
LAB feature is used in listen to capture PCM data once
the keyword is detected. To get the PCM from codec Apps
processor will enable the Slim master channel. PCM data
can be acquired from this master channel which is further
connected to MAD Tx port in codec. This change implements
and exports API to enable the Slim master channel on Apps
side.

Change-Id: Ibac20acc9e1c5c1afe2833c76de894aaf6b1d646
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2014-05-27 15:31:39 -07:00
Aravind Kumar 2c28ca7a16 ASoC: support external codec for 8916
8916 supports external audio codec (tapan) over I2C\I2S.
Add suport for tapan audio codec and also add pinctrl support
for codec reset GPIO.

Change-Id: I3f2820139c644bd993c17e12e27f7a54f58f692e
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2014-05-26 19:31:41 +05:30
Linux Build Service Account 878893201c Merge "mfd: wcd9xxx: Increase codec max regulators" 2014-05-21 21:24:29 -07:00
Sudheer Papothi 0555c0c1b4 mfd: wcd9xxx: Increase codec max regulators
Increase codec max regulators count by one as wcd9330 codec has
stereo speakers and require an additional on-demand supply.

Change-Id: Ie01b233d555a925687fa5c99363664206cf1b197
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2014-05-17 04:34:23 +05:30
Sudheer Papothi 3289a93cd7 mfd: wcd9xxx: Add wcd9330 config for core drivers
wcd9330 codec uses wcd9xxx core services. Change enables config
to compile core drivers for wcd9330 codec.

Change-Id: Ica75ffa383c5049b0d8f5bb92eacf4e4bf7f82c5
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2014-05-16 08:19:25 +05:30
Linux Build Service Account a0ec602b94 Merge "ASoC: wcd9330: Update codec register defaults based on codec version" 2014-05-13 23:45:32 -07:00
Linux Build Service Account 8a3f8e02a4 Merge "mfd: wcd9xxx: Add support to detect wcd9330 codec version" 2014-05-13 23:45:31 -07:00
Phani Kumar Uppalapati f5310b75f7 ASoC: wcd9330: Update codec register defaults based on codec version
Update wcd9330 codec register default values based on
the version (v1.0 or v2.0) that is detected.

Change-Id: I55d9b3a240a9a9c3ca9a33d96ccb99dca83a2e02
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2014-05-09 19:37:59 -07:00
Phani Kumar Uppalapati 2238405ede mfd: wcd9xxx: Add support to detect wcd9330 codec version
WCD9330 codec hardware has two versions v1.0 and v2.0.
Add support to detect the codec version.

Change-Id: Icd5fbbccc57642bb686593ebacec3dd1fa0b5392
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2014-05-09 19:27:42 -07:00
Kuirong Wang 70f5243391 ASoC: wcd93xx: Remove delay for Slimbus during SSR recovery
When SLIMBUS data channel is to be torn down, CODEC driver
waits for channel removal interrupt from SLIMBUS slave device
with 1 second timeout as measure to prevent system from lock
down in case channel removal interrupt never arrive due to
known reason. When ADSP SSR happen, SLIMBUS would be reset
hence data channel will be gone inherently. Waiting for 1
second will only prolong SSR recovery latency. Update to
avoid the delay after SSR.

Change-Id: Ic6a94ddd1150ba143f4dd33aac1785d7d2ee7653
CRs-fixed: 653504
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2014-04-22 19:27:43 -07:00
Linux Build Service Account 0837b705e7 Merge "ASoC: wcdxxxx: Add check for buffer overflow" 2014-04-04 10:00:21 -07:00
Bhalchandra Gajare ca2824f878 mfd: wcd9xxx: Add support for REPEAT_CHANGE_VALUE
Slimbus supports ability to write upto 16 bytes to the same register as
one transaction on the bus through REPEAT_CHANGE_VALUE slimbus message.
Add support to write codec register with multiple values using
REPEAT_CHANGE_VALUE. Not all sizes from 1 to 16 are supported by such a
message, add support in driver to be able to write all sizes from 1 to
16 by splitting the register writes of unsupported sizes into multiple
writes of supported sizes.

Change-Id: I33fdd983068bc10f65523b2a95f1d7741fa6c486
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2014-04-01 13:53:23 -07:00
Aravind Kumar 2f9678cd2b ASoC: wcdxxxx: Add check for buffer overflow
Current code does not check if the indexes of array
codec_dai being accessed is within the maximum
number of codec dais for a particular codec. The change
adds this check and ensures that indexes outside the
bounds of array are not accessed.

CRs-Fixed: 628865
Change-Id: Ibf81f91b35e43feddc6b03a1239b4d12e04a95da
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2014-03-21 13:02:36 +05:30
Phani Kumar Uppalapati 44b8eeb030 ASoC: wcd9xxx: Add support to detect wcd9330 based on chip version
Add support to detect wcd9330 audio codec by reading the chip
version registers and also update the codec reset control
registers based on the codec type detected.

Change-Id: Ida69413a0e423e9311229200edfbf6f56d4c2759
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2014-03-11 18:07:58 -07:00
Phani Kumar Uppalapati 59278338b1 ASoC: WCD9330: Add initial driver for WCD9330 codec
Add codec driver for WCD9330 audio codec. This driver
is an ALSA-compliant and constructs the internal codec
audio paths with DAPM widgets and controls. Provides the
controls to the upper layers to enable and configure
audio paths.

Change-Id: If0832f3dd7dc671d7a61a43a7a8683106ad84973
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2014-03-11 18:04:33 -07:00