Commit Graph
136 Commits
Author SHA1 Message Date
Monica Mabuchi 3305c03ba4 restrict compilation for snd_soc_tfa9874
Restrict compilation of snd_soc_tfa9874 only for products
that uses this driver: surf and Ocean

Change-Id: Ia742617777ef1478627b5c4441199e043455974e
Reviewed-on: https://gerrit.mot.com/1731673
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Nelson Guedes Paulo Junior <npaulo@motorola.com>
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
2020-08-25 13:13:14 -05:00
Gilberto Gambugge f3325baae2 tas2562: fix build failure
Fixing the misleading indentation build failure

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Build error:
motorola/kernel/modules/sound/soc/codecs/tas2562-regmap.c:658:3: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

NO_PROP_NEEDED: <only applies to bo>

Change-Id: Ifde783bd51eba163fe96e181b5a9dca62c0d0ff4
Reviewed-on: https://gerrit.mot.com/1722676
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-08-19 13:55:05 -05:00
zhouwl 764634ffd0 ASoC: aw882xx: set speaker default impedance value
According to Astro audio calibration statistical data in ODM
Ontim factory, set 7.3 as speaker default impedance value.
If aw_cali.bin is not exist, use 7.3ohm for aw882xx speaker
protection algorithm.

NO_PROP_NEEDED: aw882xx doesn't use in bq-shm2018 products.

Change-Id: Icc2b8cd24b2fd6547b8244a6c987122c1648d7c1
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1582361
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-05-27 06:09:23 -05:00
zhouwl bc6d75f62e ASoC: implement ICN control in TAS2562
implement ICN control in TAS2562 kernel driver.
ICN enable = Receiver Configuration

Change-Id: I1ea32675096d6da77ea57bdb2c178872bf1b8947
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1549428
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-05-06 22:36:17 -05:00
zhouwl 70e81e8fd0 ASoC: add aw882xx volume ramp function
add volume fade in/fade out function for resolving loudspeaker
POP noise, causes by switching profile when audio stream type
is changing.

NO_PROP_NEEDED: aw882xx doesn't use in bq-shm2018 products.

Change-Id: I15329b8666eca10ad8993cab78fe7788e9f36de7
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1541858
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
2020-04-28 21:30:32 -05:00
zhouwl bd7a9af5f2 ASoC: aw882xx:correct a property variate in parse dt
this sysctrl property has been defined in Astro dtsi,
it will not cause any mistake, but need to correct.

NO_PROP_NEEDED: aw882xx doesn't use in bq-shm2018 products.

Change-Id: Ie1359731cd12636f83b0335c4d67be14c03d567c
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1539509
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-04-22 03:39:35 -05:00
zhouwl 6204f33cd5 ASoC: aw882xx driver update
This is Awinic official release, the key change is i2c_read function,
use i2c_transfer to replace the old one, add thread_lock to protect
i2c operation safety, in order to resolve a potential no sound risk
after supporting different audio scenarios feature.

NO_PROP_NEEDED: aw882xx doesn't use in bq-shm2018 products.

Change-Id: I3daeb35c6a349c65bdb723d7f12430634abbf8f2
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1537490
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
2020-04-20 00:47:25 -05:00
zhouwl 76c1100992 ASoC: monitor key registers in aw882xx
In Astro, aw882xx doesnt work correctly and causes speaker has
no sound, after checking resgiters dump,0x04 bit6 I2SEN, 
0x06 bit12 I2SRXEN is not right 
Driver never set these two bits after init done, I don't why
it happens, monitor these 2 registers, correct them if any
readback value is wrong.

Change-Id: I2837d706c7c4836879a483a9d12371664b2614f5
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1532728
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-04-12 21:23:02 -05:00
zhouwl 2427f2ad26 ASoC: upgrade Aw882xx driver to v0.1.8
This version drvier supports different audio stream use
its own audio effect profile, audio source divides into
music, ring, voice and notification usecase.

usage: tinymix "aw882xx_profile_switch" [usecase]

Change-Id: I85b673be9a683f38d9f84d0a8a6ecefcf534f147
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1502547
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-02-24 04:49:41 -06:00
zhouwl aa3a6cf3d8 ASoC: add Awinic aw882xx driver
Astro uses aw882xx chip for driving loudspeaker,
add its driver.

Change-Id: I28273397535050ce50a62ea14d14bb71749fb696
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1476953
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-01-01 05:53:41 -06:00
liaohj 491723adf8 modules:audio:tas2562:Turn off debug macro
There are too many logs at tas25xx driver.
Turn off debug macro to reduce debug info.

Change-Id: Ifaa77c0849b61af1752ecd919a5891bc5511b215
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1474536
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-12-19 20:09:26 -06:00
Hujun Liao 8f491c1f46 Revert "(CR): ASoC: add APIs to access digital volume in tas25xx algo"
we use dcv_pcm as ramping function 
instead of digital volume gain.
when adev_open ,init all control , digital volume gain control will cost about 2s.
delete nouseful digital volume gain control to optimze the init time.

This reverts commit 7e3f682085432db213d8f35d649fef11b8951ff0.

Change-Id: I137fc78b8f934a6f008d30fbed92b2bb3572387d
Reviewed-on: https://gerrit.mot.com/1468340
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-12-09 00:36:03 -06:00
zhouwl af55ab1653 ASoC: tas2562 digital volume
According to CTO-Audio colleagues suggestion, former stereo products,
such as Lake, Doha, volume ramp only takes effect on the top speaker,
the bottom one doesnt need it. In order to align with former products,
they asked me change SofiaRow, left channel is the top one.

Change-Id: I83c16d2b5e3ce2c2c59f6383d892e429873fa90e
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1463746
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-11-29 02:54:25 -06:00
zhouwl 165062903d ASoC: tas2558: add digital volume control
TI TAS2558 provides digital volume control(DVC_PCM),
it ranges from -110dB to +2dB.

Change-Id: Icf44af99d4d22fa8a364bc6f0baa9a6599887b04
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1456965
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-11-19 22:48:12 -06:00
zhouwl 252f409602 ASoC: add APIs to access digital volume in tas25xx algo
In order to implement speaker volume ramp feature, Ti ask us to
adjust the digital volume in algorithm, add API functions.

Change-Id: I3e27bf5be4c11bc79a06fc9dd286f7e3dd75dfea
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1450740
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-11-13 19:55:42 -06:00
liaohj 10de9bfaa9 tas2562:fix complie fail.
sofia_row:audio:add ti2558 brown protection function
fix complie fail.

Change-Id: I872af492dcb1a576d0316ed57e65e664a50d0e75
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1450637
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-11-07 01:00:11 -06:00
liaohj fb5e35ab7b audio:ti2558:add brown protection function
add ti2558 brown protection function
1. currently just have limit voltage setting:
a.ti,lim_th_max is the start limit voltage, when
voltage less than the voltate,
smart pa will decrease gain step by step.
b.ti,lim_th_min is the immediately limit voltage,
when voltage less than the voltage,
smart pa will decrease the min gain .

ti,lim_th_max & ti,lim_th_min defined at product dts.

2.how to enable.
we can set TAS2562 BROWNOUT PROTECT ENABLE On to mixerpaths.

3.when HW test the voltage ,we will set in dts and enable by mixer_paths.

4.If HW need to adjust the min gain, need add more code .
if there are the request ,need to achieve in the future.

fix some no function.
1.fix tas2562_codec_read & tas2562_codec_write no function.

2.fix Amp Output Level no useful.

Change-Id: I6e4be083063f009246d3a4a478c22fa6aee8467f
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1435926
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-11-06 23:59:45 -06:00
liaohj 1929a78679 tas25xx_algo:add protection for tas25xx_set_profile
- fix StsHostTestCases - android.security.sts.Poc17_06#testPocCVE_2017_7369
- when sts test,  the profile_id is negative value.
  as <3>[   61.218757]  tas25xx_set_profile profile_id=-2147479279,param_id=0
   need to add protection.

Change-Id: Ia8eb4dc7a1a7ae869e3a254ed3cd0fa6b329c04b
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1431155
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-10-02 02:31:06 -05:00
liaohj 6afcdf496b :ti2558 :disable smart pa irq pin pullup
1.disable smart pa irq pin pullup
- for smart pa irq pin, need defalut pullup
- currently,smart pa internal pull up and ap side donot pull up.
- it is ok for smart pa interrupt,but because gpio 100 is for boot config
- pin,so when warm reset, smart pa internal pull up will cause to
- enter 9008,no ramdump.
- change to ap side irq pin pullup,and ti2558 do not internal pullup.
2.fix right speaker no interrupt.

Change-Id: I823c10d7354c4a37014d879542fc2c7937600996
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1418606
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-09-10 03:37:18 -05:00
zhouwl e834c89ab5 ASoC: add tas25xx speaker protection for Rav
Enable CONFIG_TAS25XX_ALGO macro, add TI tas25xx speaker
protection algorithm for Rav.

Change-Id: I9205267a0705dc547c3b6537b139ad8cd8474cd1
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1406322
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-20 14:14:44 +00:00
liaohj 65875f2e75 audio:add macro for ti2558 spk protection code
add macro for ti2558 spk protection code
avoid android P projects compile fail.

Change-Id: I637cde4523f9d9d91d0b261cbbd24cec745a3471
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1406276
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-20 13:35:37 +00:00
liaohj 636b9f2ed8 audio:add ti2558 speaker protection
add ti2558 speaker protection related code.
add ko in kbuild for sofiar

Change-Id: I6c7aa5c53bff4724a4fc3d2a6df07433c7ee71a6
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1405309
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-20 09:15:49 +00:00
zhouwl 4ac97a9223 ASoC: tsa2558 customization for Rav
Rav uses single tas2558, TDM RX time slot need to set as stereo
downmix (L+R)/2.
Verify reset2 gpio before use it, otherwise, kernel log will
print error.

Change-Id: I9481301195b2f365c36d62cff86ea499e22673ca
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1400626
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-12 08:20:36 +00:00
liaohj 720af089a6 sound/codecs:add ti2558 driver
sofiar use smart pa ti2558,
add kernel drivers.

Change-Id: I02b490c17e96224d2fd9510d3e214900a4172b4a
Reviewed-on: https://gerrit.mot.com/1396120
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuesheng Huang <huangys@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-05 03:36:21 +00:00
liaohj bf99337c22 modules:tfa98xx:delete time printk
cherrypick from (CR)
- fix compile fail.
  error: 'start_time' may be used uninitialized in this function
  [-Werror=maybe-uninitialized]
- just printk start time. delete it.

Change-Id: I846597f1227e958b1360d0cfd61756a67e56c9a1
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1260694
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Minghui Wei <weimh1@motorola.com>
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit b9b7b207c4b80f8e99ecbd0dcf0573525dc88a66)
Reviewed-on: https://gerrit.mot.com/1393913
Reviewed-by: Hujun Liao <liaohj@motorola.com>
2019-07-30 08:31:46 +00:00
huangys 5fe048dccc ASoC: move cirrus playback driver to QC audio-kernel
This driver is hard to share on all QC platform. But this project
is hoped to common for as most as product. Move it to QC audio kernel.
It's seperated on different QC platform.

Change-Id: I37202e87bf6174be7aa015ae9566d34739ed7d87
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1370172
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2019-06-14 03:27:39 -05:00
guoyf2 35ff849a25 NXP patch to fix earpiece no sound issue
NXP patch to fix (CR)

Issue description:
No sound issue has been found in handheld mode
in one of Moto Projects, SurfNa project(tfa9871,
driver code Ver6.5.0). About 1/600 chance

root cause:
If set SBSL=1, the AMPE usually can be AMPE=1 automatically.
But sometimes can’t be set AMPE=1 by itself.
So AMPE must be set to 1 manually in code.
Dependency on automatic AMPE setting is not a wise way.
In driver 6.5.0, there’s no code to set AMPE during profile switch,
but boot up sequence has already been added.

Solution:
Add AMPE=1 operation in profile switching


Change-Id: I3de27e826d39c93f2d011d0f9d8fe9877e8efc89
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1358094
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-05-21 04:28:12 -05:00
Yunfei Guo af366d4dc6 Revert "(CR): SurfNA: Add NXP smartpa log"
This reverts commit 1e4c87d6ebc458a1f40a5b7dbff7d1fa9e1a1001.

Change-Id: I6fa7f78125fdc72cd41d4ba35d96a04ebbb37c8c
Reviewed-on: https://gerrit.mot.com/1357969
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Submit-Approved: Jira Key
2019-05-21 02:50:51 -05:00
Yunfei Guo 52d301d6de Revert "(CR):SurfNA: earpiece no sound"
This reverts commit 21c63bd2b7406151248931be4991e86d5dba3c53.

Change-Id: I7ee0c40c0494d5a2a580091e6a9f270677961629
Reviewed-on: https://gerrit.mot.com/1357966
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-05-21 02:46:02 -05:00
huangys 1e7204e942 audio: remove Cirrus code to vendor/cirrus/audio/dlkm
Cirrus has their own code release branch. and these branches are
not compatible each other. audio team can't branch off motorola
kernel modules

Note: cs4012 and msm-cirrus-playback had not beeen moved away.

Change-Id: Ib14bf3c5a5cfaa9c363a59c4ba0f871e11e9c92a
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1350673
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2019-05-20 21:39:12 -05:00
guoyf2 1f58f0b219 SurfNA: earpiece no sound
root cause:
incorrect NXP AMPE reg value when power on

fix:
if AMPE==0 and PWDN ==0, force set AMPE value to 1

Change-Id: Ib7605261b76cac3238b5fa23a7d74a091f0b5ffd
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1356869
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-05-18 09:27:44 -05:00
Paul Handrigan 7168b79a8f ASoC: cs47l90: Add kcontrol for Noise Generator Rate
Add a kcontorl for the Noise Generator sample rate select.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: If4dc2ec707e679da23e31740bf071d3e1f7d311a
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
SLTApproved: Slta Waiver
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1354957
2019-05-16 12:42:29 -05:00
Paul Handrigan a70d8bf90b ASoC: wm_adsp: Change fw name from device id to name.
Change the device id of a part to the device name.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: I6ca0f03da34bffe4025b49d5e1913b03c4b9a70e
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Tested-by: Jira Key
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1354956
2019-05-16 12:42:25 -05:00
Vlad Karpovich 1caf80753a ASoC: wm_adsp: Add capacities to AOU fw definition
Enable compressed stream support.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: Ia83014ba21abc6d12aa84629e3d111f2c8eb6467
Signed-off-by: Vlad Karpovich <Vlad.Karpovich@cirrus.com>
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
SLTApproved: Slta Waiver
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1354955
2019-05-16 12:42:21 -05:00
Paul Handrigan 39e81e99d3 ASoC: wm_adsp: Change kcontrol for AoU and AoU concurrent
Change the dsp firmware control to switch AoU and AoU concurrent
firmware.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: I8822e02f8b4aa229dee187c89297f43e4c111e0f
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Tested-by: Jira Key
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1354954
2019-05-16 12:42:18 -05:00
Paul Handrigan 8ace5a94b0 ASoC: madera: Add rate select for Noise Generator
Add enum to select the rate for the Noise Generator.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: I056bc0eb204d5f3feef61ee7066cc5b4c59427a6
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1354953
2019-05-16 12:42:16 -05:00
guoyf2 5bd115ed69 SurfNA: Add NXP smartpa log
Add NXP smartpa profile log


Change-Id: Ie1880208b091e225b2055090f2b1b6075e7e79a1
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1353959
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Submit-Approved: Jira Key
2019-05-14 05:02:43 -05:00
liaohj 02b0f7c724 modules:tfa98xx: send tfa cal just on speaker mode.
- send tfa cal just on speaker mode.
  if set tfa cal on handset mode, algorithm no ready,
  afe_callback will return fail
  and set this_afe.status to 1,
  once other modules want to get the status at the same time,
  will get the fail status.
  the call on handset screne,
  open capture pcm low probality to get the status
  at the same time, so open capture pcm fail,cause call no sound.
  so send tfa cal just on speaker mode.
  nxp smart pa is bypass on handset mode.

Change-Id: Ib977fc68d48931d8617ec4339dc5494da9986ca4
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1339597
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-04-20 20:29:43 -05:00
guoyf2 591b409bee Add NXP rpc_send delay time for 8937/8940
NXP smartPA new algorithm for 8937/8940 need to set
rpc_send delay time to 5ms.

Change-Id: I79ec1c1493f8b32f562bbc7e8a78f64e62e3ef6a
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1310382
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
2019-02-21 20:07:00 -06:00
Jarrett Simerson 6ae97ce49d ASoC: cs35l41: smart amplifier silicon errata fix
Fix for smart amplifier silicon errata that creates non-deterministic
PLL phase lock with relation to word clock resulting in erroneous
signal output timing. This is the root cause of high-rate AoU falsing.

PROPAGATED_From: (CR)

Change-Id: I292310ba06d90b0e927dd7c60c347078d9b04186
Signed-off-by: Yoon (Seungyoon) Lee <w22905@motorola.com>
Reviewed-on: https://gerrit.mot.com/1269866
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1302826
2019-02-04 12:12:01 -06:00
Li Xu d21ad27df5 ASoC: cs35l41: Modify GPIO GLOBAL_EN control
Due to integrated circuit limitation,
use firmware to control GLOBAL_EN register bit
based on received GPI input.

If enabled, firmware, upon receiving GPI value,
will control GLOBAL_EN register bit accordingly.

Cirrus-JIRA-fixed: MMI-942, MMI-953
PROPAGATED_From: (CR)

Mot-CRs-fixed: (CR)
Change-Id: Ied87df36bf3f3914b419d472df7d095e8b1a2fbf
Signed-off-by: Li Xu <li.xu@cirrus.com>
Reviewed-on: https://gerrit.mot.com/1269398
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Patrick Gries <patgries@motorola.com>
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1302827
2019-02-04 12:11:55 -06:00
Vlad.Karpovich b777edbce7 ASoC: madera: Add slimbus TX channel.
Rearrange Madera codec slim bus map to use channel 131
as 4th channel for an audio capture.

Mot-CRs-fixed: (CR)
Change-Id: I6917ad47f3b33e655ff28304cb360e5ec2a17145
Signed-off-by: Vlad.Karpovich <Vlad.Karpovich@cirrus.com>
Reviewed-on: https://gerrit.mot.com/1151551
Reviewed-on: https://gerrit.mot.com/1291626
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Reviewed-by: Vitor Queiroz Albuquerque <vitoralb@motorola.com>
Submit-Approved: Jira Key
2019-01-09 12:42:43 -06:00
Yoon (Seungyoon) Lee e50396c203 modules: cspl: add mixer to switch Rx port for factory
Olson factory SW runs headset test over SLIMBus Rx5 on tinymix interface
but kernel driver can't control Cirrus SE module correctly since Rx port
is different with default case, which is SLIMBus Rx1.

As long as factory SW uses tinymix instead of AudioHAL interface, factory
should switch Rx port to control Cirrus SE module correctly.

Change-Id: I71111f30abc58d45ae8bcd4d0398b2e9dfa71d5b
Signed-off-by: Yoon (Seungyoon) Lee <w22905@motorola.com>
Reviewed-on: https://gerrit.mot.com/1284255
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key
2018-12-17 15:55:31 -06:00
lixp5 2d3acf4413 ASoC: cs35l41: Add a file node for TCMD to read CS35L41_GPIO_STATUS1
TCMD needs to check the connectivity of the CDC_LP_GATE line by reading GPIO1 status,
and CS35L41_GPIO_STATUS1 indicates the status of GPIO1.

Change-Id: I4a563cc228a455f9995fc92bfcf4b11cdfd6136b
Reviewed-on: https://gerrit.mot.com/1274600
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key
2018-12-04 19:28:17 -06:00
guoyf2 b0219ff89b fix tfa NULL ptr memory exception
For "NXP Volume" and "NXP mode" mixer, we need
to increase nr_controls.

Change-Id: I93e8a8d62908d8c8681fa10ff7efc3e96922b996
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1276325
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Jianguo Liu <liujg6@motorola.com>
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Submit-Approved: Jira Key
2018-11-30 04:05:57 -06:00
zhouwl e05f1c5aa2 ASoC: tfa987x: add volume control command
add mixer control for setting output volume, this method changes
TFADSP_FWK_Unmute, primary channel gain.

Change-Id: I70a29d017413e63cba92985f8e093f477774f850
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1272169
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Jonathan Eklund <jeklund@motorola.com>
Reviewed-by: Joseph Dwyer <josephdwyer@motorola.com>
2018-11-29 08:50:04 -06:00
Wen Xie ac89b6f56d Channel row : audio: add TI smartpa algorithm
channel: support two tas2560 bin files
-tas2560_TI_row.bin for Channel ROW with smart pa;
-tas2560_TI_na.bin for Channel NA;

-add ti,spk_type_id to distinguish row and na bin files;
-close debug log.

Change-Id: I8ae7805db2e92c807b34f841dd1268db96ba6163
Signed-off-by: Wen Xie <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1274052
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2018-11-28 20:44:56 -06:00
zhouwl bcf3c95f50 ASoC: tfa987x: NXP volume control
Because this digital volume adjustment only has 21dB space,
it can't meet SOP-0289 requirements, remove this function,
let's use QCom codec digital gain for ramping tuning.

Change-Id: I90ecc9778bffe218704c71236223666e6af3d4cb
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1266429
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhihong Kang <kangzh@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2018-11-08 01:10:28 -06:00
liaohj aa7f58c635 modules:taf987x:donnot send calib value for receiver.
- for receiver ,bypass smart pa, donnot send calib value to adsp ,

Change-Id: Iffce317be46c65921ab2d158e06f314637e9be9f
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1265703
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2018-11-07 04:13:04 -06:00
Li Xu b33af28110 ASoC: cs35l41: Use polling for mail box
Use polling instead of interrupt for DSP mail box
acknowledgement.

With interrupt method, the amount of time for mail box
acknowledgement can vary, and sometimes long.

This is because interrupt handler reads all interrupt
status registers and masks, which can take long time,
especially on slow I2C bus.

Use polling to directly check for DSP mail box
acknowledgement reduces variability in amount of time
needed, because only 1 register is read.

Cirrus-JIRA-fixed: MMI-912
Change-Id: I21a223bbfdccb3593c61c7d04ae8355f2734c7a9
Signed-off-by: Li Xu <li-xu@outlook.com>
Signed-off-by: Yoon (Seungyoon) Lee <w22905@motorola.com>
Reviewed-on: https://gerrit.mot.com/1259695
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key
2018-10-23 14:49:44 -05:00