Commit Graph

223 Commits

Author SHA1 Message Date
LuK1337 d354864125 Import T813XXU2BQD1 kernel source changes
Change-Id: I029a632786a1e30cb0067755d16b55a583c7b235
2017-04-22 16:30:03 +02:00
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00
Laxminath Kasam 227ec1921d ASoC: msm: Update machine driver with AVS 2.7 support
Update machine driver AFE API calls compatible
with adsp version AVS 2.6 and AVS 2.7
Update of mclk flag in suspend call.

Change-Id: Id0b300bcf585895cc659a1882710d825d0e7a808
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Divya Narayanan Poojary <dnaray@codeaurora.org>
2016-11-15 10:56:47 +05:30
Rohit kumar 275037e9ea ASoC: msm8x16-wcd: Remove 20ms sleep in rx chain PMD
Removed 20ms delay in RX chain PMD as it is not required.
This improves device switch and tear down latency.

CRs-Fixed: 1070432
Change-Id: Id6996dff163f390a662f628da710d8bb238f7fca
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
2016-10-18 21:00:28 -07:00
Xiaojun Sang 5c5b851abe ASoC: soc: change audio drivers to use %pK
Change all audio driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.

CRs-Fixed: 1052832
Change-Id: I9ff5cf06b019c566973eb609bf5d37969b98d31d
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2016-09-26 01:40:40 -07:00
Pradosh Das 571b43a792 Merge commit '4742aa9efad673157273b07095ac1070dd2f02ea' into HEAD
Conflicts:
        drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c
        sound/soc/msm/msm8952-slimbus.c

Change-Id: If4516c52837e61afda301496b9053cb44ea59dd9
Signed-off-by: Pradosh Das <prados@codeaurora.org>
2016-07-26 12:02:09 +05:30
Manish Dewangan 0915628790 ASoC: msm8x16-wcd: add support for packed 24 bit.
Changes to support packed 24 bit (SNDRV_PCM_FORMAT_S24_3LE)

CRs-Fixed: 1011048
Change-Id: I2e72305bdbece822381b56a8a0c0cc9c7b8b0f0b
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
2016-06-03 04:06:10 -07:00
Laxminath Kasam 86b7482e23 ASoC: msm8x16-wcd: Fix SSR mute issue on speaker
restore the cache values back of last state applied
in SSR recovery using snd_soc_cache_sync API. So
hardware codec configuration will be in sync with
userspace settings. And avoid any race condition
between the userspace updating dapm widgets and
SSR recovery updating any register value.

Change-Id: Ie2a986b5c6827b02aa3d5919cc69e7363155c45e
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2016-04-11 05:42:49 -07:00
Santosh Mardi 960f83a1a9 ASoC: msm8x16: update boost config register
For the targets not using boost and boost pin is kept
floating there will be high change that VDD_A53 will be
grounded and MSM will not be responsive

After discussing with PMIC systems team SBL team came up
with the work around to configure the boost register to some
pre defined values so that the issue is not reproduced.

As part of the codec init sequence the codec driver will
reset the analog part of the codec and as part of this sequence
the cofiguration done by the SBL will be defaulted.

This change will restore the 0x1C6 register if it has been configured
by SBL

Change-Id: I1a58b665b01e70bbb21b06665a8fb422d77a5ee7
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-03-07 21:24:40 -08:00
Laxminath Kasam 4469042b92 ASoC: msm8x16-wcd: Fix hph pop in switching usecase
In device switch from bongo speaker to HPH, observe
pop in headset. Since the PA select bit is changed
to HPH before DAC disable when tearing down bongo
speaker, this can result in pop in headset. Move
the PA selection bit to be changed to HPH after
PA and DAC disable.

Change-Id: Idb4f96f03880563e4bb81b98f623b6b05f27da8e
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-11-26 21:37:29 -08:00
Laxminath Kasam 17434fcd1e ASoC: msm8x16-wcd: Fix SSR mute on speaker for internal codec
When SSR triggered on speaker in internal codec,
sometimes dapm fails to mark dapm widget dirty after SSR
for specific clips and speaker codec widgets fail
to powerup. As this widget associated with SPK DAC register
which is also changed in driver when SSR power down and
powerup, resulting in timing issue when this register
being read by DAPM. Change the routing to tie up the
speaker codec widgets path with virtual mux switch
and DAC widgets.

Change-Id: I691fed56818a099dc3893eedad6fcd7f9bc61107
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-11-03 21:16:43 -08:00
Linux Build Service Account c4f288bb48 Merge "ASoC: wcd-mbhc: update mbhc register correctly" 2015-10-29 23:33:06 -07:00
Phani Kumar Uppalapati 0c343cfa79 ASoC: wcd-mbhc: update mbhc register correctly
Update mbhc register table entry for moisture detection
to be zero for the targets which do not support moisture
detection. This prevents any impact due to moisture
detection.

Change-Id: I3e026e288788700ea2328ccbd12f79f5c40642ac
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-10-27 05:02:13 -07:00
Simmi Pateriya 4580bb3250 ASoC: msm8x16-wcd: update impedance detection
Update impedance detection sequence for cajon as per
the new method provided by hardware team.

Change-Id: Iab021752cb5e56bb64776c41bec6825cb4a0d0db
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-10-26 23:58:04 -07:00
Manish Kumar a758500713 Merge commit '831758491e32b1ecf11eaa6ad95abd3b6194e0a9' into private_redfox64_mbr.
Conflicts:
	drivers/platform/msm/ipa/ipa.c
	drivers/platform/msm/ipa/ipa_i.h
	sound/soc/codecs/msm8x16-wcd.c
	sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c
	sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.h

Change-Id: Ifd9c90daff861461bf20c3d27ef061eeee2a5daf
Signed-off-by: Manish Kumar <manishku@codeaurora.org>
2015-09-22 17:42:38 +05:30
Linux Build Service Account 5cc765a890 Merge "ASoC: wcd: enable mbhc interrupts after SSR" 2015-09-14 08:57:33 -07:00
Simmi Pateriya c16d5c560b ASoC: wcd: enable mbhc interrupts after SSR
After ssr mbhc interrupts need to be enabled for mbhc
to work. If mbhc_init is not called, there are no
interrupts enabled. Call the api so that mbhc is
initialized properly.

Change-Id: I64ba4b8de50da2b527e20c90f99c79c49fabfed3
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-09-12 00:13:35 -07:00
Simmi Pateriya dea18e96c9 ASoC: wcd: enable mbhc interrupts after SSR
After ssr mbhc interrupts need to be enabled for mbhc
to work. If mbhc_init is not called, there are no
interrupts enabled. Call the api so that mbhc is
initialized properly.

Change-Id: I64ba4b8de50da2b527e20c90f99c79c49fabfed3
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-09-12 00:13:32 -07:00
Laxminath Kasam 37cee28a55 ASoC: msm8x16-wcd: add boost and hph updates for cajon 2.0
In cajon 2.0, as per latest qcrg FSM toggle is required
at powerup. Also update boost mode sequences for speaker.
For combo usecase, HPH turn on is not ensuring MCLK bits
are set before NCP or PA enable. Make changes to turn on
MCLK bits first at HPH powerup sequence always.

Change-Id: Icf858b83be0bdd6890335eaee6b33cc74fd189d3
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-09-10 21:06:02 +05:30
Linux Build Service Account 95317388d6 Merge "ASoC: wcd: Do not enable pulldown when headset is inserted" 2015-08-31 20:29:15 -07:00
Simmi Pateriya 94f63b9626 ASoC: wcd: Do not enable pulldown when headset is inserted
If pulldown is enabled when headset is inserted, issues
such as no button press or fake interrupts during extension
cable usecase are seen. Do not enable pulldown when headset
is kept inserted.

Change-Id: I586376a806e8f3495fc94b7a8f4af62a59f17bbe
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-08-29 05:48:05 -07:00
Simmi Pateriya b3bbdeb4c8 ASoC: wcd: Do not enable pulldown when headset is inserted
If pulldown is enabled when headset is inserted, issues
such as no button press or fake interrupts during extension
cable usecase are seen. Do not enable pulldown when headset
is kept inserted.

Change-Id: I586376a806e8f3495fc94b7a8f4af62a59f17bbe
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-08-29 05:47:56 -07:00
Simmi Pateriya 0d6088f271 ASoC: msm8x16-wcd: add codec reset control register in default
If there is no boot up sound, the register to bring codec
out of reset is not updated which in turn impact mbhc
functionality, so no detection happens unless any audio
is played.

CRs-fixed: 885738
Change-Id: I36862f9aa6cfa90801e739586e3b371f219f3473
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-08-29 05:47:44 -07:00
Yadav Anamika 7099faa8db Merge 79477f89b2 on remote branch.
Change-Id: I7815410b9662cb5a39f24cb041736591c6f52bfa
Signed-off-by: Yadav Anamika <anamik@codeaurora.org>
Conflicts:
	sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c
	sound/soc/msm/qdsp6v2/q6afe.c
2015-08-27 15:45:10 +05:30
Linux Build Service Account fcbefe1f88 Merge "ARM: msm: dts: Support Cluster pm notification on MSM8952 & MSM8956." 2015-08-21 08:44:44 -07:00
Simmi Pateriya 154e489545 ASoC: wcd: update sequence for impedance detection
Update register sequence for impedance detection to
work on cajon and for backward compatibility with
previous targets.

Change-Id: I86831be2c36532ce4ac8f8344587309d7ebfb1ac
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-08-19 03:20:34 -07:00
Simmi Pateriya fb6c9d6729 ASoC: msm8x16-wcd: send notifier to mbhc for pre PA off event
MBHC acquires a lock in PRE PA turn off event and releases it in
POST PA off event. The codec driver should send the notification
to mbhc for both these events.

Change-Id: I07278cec1d3b29e27deffea02ff30629f796bdd4
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-08-18 05:32:11 -07:00
Laxminath Kasam 1d34cf1112 ASoC: wcd: add support for dmic3 and dmic4 interfaces used for VISense
In 8952 internal codec, add required dmic3 and dmic4 interface support
used for VI sense capture from WSA analog mode.

Change-Id: I17aac07d0c831148844faece8e034f1e6dc6a8bd
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-08-07 23:09:32 +05:30
Laxminath Kasam 2a914301dd ASoC: msm: fix pop issue on headset+speaker device
Pop is heard on selecting a ringtone when playback is going on.
There is a device switch from headset to headset and speaker device.
The enable sequence of headset has register writes to 0x197 which is
the cause of pop.

Change-Id: Ia189ade975171e7f2e3b1a7f9d6d26dff4cb10ee
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-07-21 23:17:49 -07:00
Laxminath Kasam 2550d4d860 ASoC: wcd: update boost current limit register for cajon 2.0
For cajon 2.0 hardware, change default setting for boost
current limit register with ENABLE_OCPON_PS 6th bit set
to FOLLOW_PS.

CRs-Fixed: 860840
Change-Id: I8474a798c6fe70a47f3c879cacc8b8400b042a89
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-06-29 11:02:10 +05:30
Laxminath Kasam 3312650e75 ASoC: wcd: add CnP fixes for HPH on cajon codec
In 8952 using cajon has CnP failure on some parts.
Update QCRG sequence for turn on and turn off on Cajon.

CRs-Fixed: 855729
Change-Id: I352926d0ed8550014ccb2f1031346eacbd522c52
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-06-21 22:37:10 -07:00
Laxminath Kasam 59da49129b ASoC: wcd: Add support for cajon 2.0 hardware
For cajon 2.0, we have change in sequences for
boost and ear bypass mode. Add required changes
to support from codec driver.

CRs-Fixed: 855722
Change-Id: Ide5722214b0bee65dea541c172b88861fe449ca4
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-06-21 22:37:00 -07:00
Linux Build Service Account 444f6b5601 Merge "ASoC: msm8x16_wcd: change OCP settings" 2015-06-04 17:34:39 -07:00
Yeleswarapu Nagaradhesh 7807f6861b ASoC: msm8x16_wcd: change OCP settings
Change OCP settings as below
OCP_CURR_LIMIT: 280ma
ATTEMPTS: 2

CRs-Fixed: 839497
Change-Id: Ide0774232d877b95e60dc21609123781fd6f5af1
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-06-04 05:14:43 -07:00
Linux Build Service Account 3cb5f1d195 Merge "ASoC: msm8x16-wcd: return error from startup" 2015-06-04 04:37:46 -07:00
Linux Build Service Account e2e0a098e9 Merge "ASoC: msm8x16-wcd: fix no audio in speaker in cajon after ssr" 2015-06-03 18:27:58 -07:00
Aravind Kumar d10748f3af ASoC: msm8x16-wcd: fix no audio in speaker in cajon after ssr
On trigger SSR, audio is not heard on the speaker for cajon
codec.
For the cajon hardware the register set which gets
initialized post SSR didn't have the speaker DAC ctl register.
Hence the whole chain in the DAPM was not established
leading to no audio. Fix by updating the array of the
default registers for cajon codec.

Change-Id: I37efdde6ac10e1026d0657fd0bf64b825f4d91c4
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-06-01 17:52:58 +05:30
Yeleswarapu Nagaradhesh 1006d3a961 ASoC: msm8x16-wcd: return error from startup
If SSR and audio playback/recording occurs simultaneously,
in a rare scenario it can happen that framework initiates
new session. In such scenarios machine driver proceeds further
to setup the MUX configuration which results in un-clocked access
and inturn leads to crash. To resolve this return error from
codec driver which has knowledge on SSR events.

CRs-Fixed: 832098
Change-Id: I3b5d2d786f006e7f0efe94ee4c94f52d05d4f02e
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-05-30 00:01:51 +05:30
Phani Kumar Uppalapati 619c8ed5ed ASoC: wcd-mbhc: Refactor WCD MBHC driver
Refactor WCD MBHC driver so that various wcd
codecs can use the common functionality provided
by the wcd mbhc driver and any codec specific
functionality will be handled by the codec driver.

Change-Id: I9a4a424cd022f7aa08009e5b30b8353fa8784ef9
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-05-29 13:05:30 +05:30
Linux Build Service Account 149bcc9c1d Merge "ASoC: msm8x16-wcd: prevent out of bounds access" 2015-05-13 13:55:29 -07:00
Linux Build Service Account 9b3fd1fe5c Merge "ASoC: wcd: update gain for cajon codec" 2015-05-12 06:46:51 -07:00
Linux Build Service Account aa23d44092 Merge "ASoC:msm8x16-wcd: mask register read value of 0x16 and 0x116" 2015-05-11 14:57:25 -07:00
Aravind Kumar 970d6933e5 ASoC: msm8x16-wcd: prevent out of bounds access
Hardcoding the third argument in strnstr function
is resulting in out of bounds access. Set the third argument
to sizeof the character string passed as the first argument
to prevent out of bounds access.

CRs-Fixed: 832915
Change-Id: I61be88701340e271fd866e0e1801722dbe7d63ac
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-05-11 18:24:13 +05:30
Simmi Pateriya a5502de0a5 ASoC: wcd: Do not use micbias for removal interrupt
From cajon codec onwards, there is no need to keep micbias enabled
for removal interrupt. The hardware issue has been fixed in this
codec.

Change-Id: I810d65556e13a5994e7879eb00c7c67ea951355e
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-05-09 15:20:30 +05:30
Simmi Pateriya 649df8b993 ASoC: wcd: update gain for cajon codec
Set gain as POS_6_DB_DI for headset/headphone with
impedance values more than or equal to 13 ohms. For
loads lower than 13 ohms set gain as POS_1P5_DB_DI.

CRs-Fixed: 829677
Change-Id: Ie7392a38e99c1843ccb31dde4dfdf3bea92f9d13
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-05-05 23:41:55 +05:30
Yeleswarapu Nagaradhesh 7c11ec7441 ASoC:msm8x16-wcd: mask register read value of 0x16 and 0x116
If register is 0x16 or 0x116 mask register read value
as 0, so that SW can disable only the required interrupts.
Which will ensure other interrupts are not effected.

Change-Id: I3d0c24dbd91e781a266ec076db8cfecf6e9c4e60
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-05-02 10:05:17 +05:30
Aravind Kumar ca2d1baba6 ASoC: msm8x16-wcd: update iir gain after updating clock
IIR gain has a pre requisite that clock has to be on
for gain changes to take effect.
Add a dapm event handler to ensure that gain is
updated after clock is turned on.

Change-Id: I893eea483f56f2bcf53a7bc04d281932a49211f7
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-04-23 03:15:02 -07:00
Yeleswarapu Nagaradhesh 9fe98418b2 ASoC: wcd: skip impedance detection after SSR
While recording, if SSR is triggered POP noise is generated
due to disabling of micbias during impedance detection.
So, skip impedance detection after SSR to resolve the POP.

CRs-Fixed: 809007
Change-Id: I0d74d01d7fae8f019fb8b38d54083f1e169e0d64
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-04-14 23:11:59 +05:30
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
Laxminath Kasam 399a770bda ASoC: wsa881x: update bongo clients and routing map
With WSA881x can be connected of left or right
configuration in case of mono speaker, add both
clients and query bongo presence run-time. Also
update route map in codec driver to update the
dapm sequence to wsa.

Change-Id: If2f7176780ee20684bfec18c20b6cd17b9d37e36
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-03-27 14:50:21 +05:30