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
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
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
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>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
- 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
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>
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
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
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
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
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
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
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