summaryrefslogtreecommitdiff
path: root/drivers/soundwire
AgeCommit message (Collapse)Author
2017-03-22ASoC: swr-wcd: Reduce latency for cold start on speakerLaxminath Kasam
In SDM660 WSA speaker using MSM over soundwire version, observe high cold start latency. As interrupt is disabled, broadcast ack is not received which results in 200ms higher latency. Reduce latency impact by blocking only for 10ms for MSM over soundwire version. Change-Id: Ic0e659d7c443c1462aba4da2f8bf9471031d02d2 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-02-01soundwire: Add support to disable smart boost data portSudheer Papothi
Soundwire does not have usecase with smart boost disabled. This results in data port collisions when smart boost port is disabled from mixer control which results in noise during audio playback. Add usecase and port configurations with smart boost disabled. Change-Id: I014e438b3e5810508f8b52716684cbb9608822ac Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-09-21soundwire: Add support for usecases without companderLaxminath Kasam
Some of the usecases without compander and with smart boost, VI sense are added in soundwire controller driver. Change-Id: Ia380ee6ad4584c29feb80fdc3b9247dd11e64a3e Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2016-08-16Merge "ASoC: soundwire: fix out of boundary access issues"Linux Build Service Account
2016-08-14ASoC: soundwire: fix out of boundary access issuesVidyakumar Athota
In soundwire read/write commands, register value is defined as 8 bit but it is accessed through 32 bit pointer which may cause out of boundary memory access. Fix this issue by typecast appropriately. BUG: KASan: out of bounds access in swrm_read+0x1dc/0x30c at addr ffffffc089871880 Write of size 4 by task kworker/u8:5/236 ==addr ffffffc089871880 [<ffffffc00081d174>] swrm_read+0x1d8/0x30c [<ffffffc000819808>] swr_read+0x5c/0x74 [<ffffffc000741e58>] regmap_swr_read+0xd8/0x11c [<ffffffc00073a350>] _regmap_raw_read+0x210/0x314 [<ffffffc00073a4b0>] _regmap_bus_read+0x5c/0xb4 [<ffffffc000739548>] _regmap_read+0xe0/0x1ec [<ffffffc0007396b8>] regmap_read+0x64/0xa8 [<ffffffc000dc9dd4>] snd_soc_component_read+0x34/0x70 [<ffffffc000dc9f44>] snd_soc_read+0x6c/0x94 Memory state around the buggy address: ffffffc089871780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffffffc089871800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc Change-Id: I3c56dffb4ca197e8fc23d54a44282a60254dd001 Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-08-10swr-wcd-ctrl: set pointer to null after kfreeMeng Wang
In soundwire control drivers, some pointers are not set as NULL after the memory is freed, which will leave many dangling pointers. Set them to NULL explicitly to avoid potential risk. CRs-Fixed: 997062 Change-Id: I18bd73397173187f87af28c78564835eed6d6a10 Signed-off-by: Meng Wang <mwang@codeaurora.org>
2016-06-13soundwire: Fix NULL pointer dereferencePhani Kumar Uppalapati
Fix NULL pointer dereference in soundwire master controller driver. CRs-fixed: 1018329 Change-Id: I716401adda144ac0c03520f747694eaa50ea8e51 Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-05-20swr-wcd-ctrl: Ensure soundwire banks are always in syncPhani Kumar Uppalapati
Copy speaker configuration from active to inactive bank and perform bank switch operation while speaker channels are getting enabled or disabled. This will make sure that soundwire banks are always in sync and allow independent control of speaker channels. CRs-fixed: 1007465 Change-Id: Ic1653194c22fa5669b1c04fd9630158633fb00a5 Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-05-20swr-wcd-ctrl: Handle soundwire slave device ungroupPhani Kumar Uppalapati
Handle soundwire slave devices ungroup in master controller. Set the group device id to 0 when soundwire slave devices request ungroup for independent control. CRs-fixed: 1007465 Change-Id: I4f1b39dac949aa3f6aa3abb12ff0310fb0e98d1c Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-05-20soundwire: Add API to ungroup soundwire slave devicesPhani Kumar Uppalapati
Add soundwire API to remove the soundwire slave devices from group so that the devices can be controlled independently as required. CRs-fixed: 1007465 Change-Id: Ibca3e33c0e85629ae5ce121e75526f4786d6408a Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-05-20soundwire: Add support for 48x2 frame structurePhani Kumar Uppalapati
Add support for 48x2 frame structure in soundwire so that when slave device data path is not enabled, all control messaging will happen with 48x2 frame. Soundwire slave devices send an explicit request to enable data path which in turn change the frame structure to 48x16. CRs-fixed: 996586 Change-Id: Ia4329ac982eb2a29a2b925897cd87ca9711c30e3 Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-05-06soundwire: Add API to control slave device data pathPhani Kumar Uppalapati
Add soundwire API to control slave device data path enable or disable. This gives slave device drivers more flexibility for data path control during device path enablement. CRs-fixed: 996586 Change-Id: Ic0ab015098035418458a5ba7c2ffad9df20f933c Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23soundwire: Avoid runtime suspend after device path bringupSudheer Papothi
There is a possible race condition that runtime suspend is being called after device path bringup. To avoid this race condition, add a mutex lock during device path bringup to serialize runtime suspend and resume. CRs-Fixed: 967442 Change-Id: I268a25b05799c66fc019e19e46939286e54fb514 Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23soundwire: set the group id based on number of channelsSudheer Papothi
Set the group id to default when number of channels are less than or equal to one. This change will configure the group id correctly during device switch scenarios. CRs-Fixed: 961023 Change-Id: I2cb4447b36fef111ed1f9b8991b3882b8d57f6a7 Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23soundwire: Fix NULL pointer check while setting group IDSudheer Papothi
Fix NULL pointer check while setting group ID to avoid dereferening of the pointer. CRs-Fixed: 971240 Change-Id: Ic5aae901244e7b2b96a894d265a6cc5c119f0367 Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23soundwire: Add slave synchronization configurationSudheer Papothi
Slave synchronization is needed to sync frame shape consisting of different ports with different sample rates. Change sets the slave synchronization based on the frame shape. Change-Id: Iae726555b3c158394662c590d1ebc781ff7f54f5 Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23soundwire: Use broadcast command for device configurationSudheer Papothi
Use soundwire broadcast command for configuration of all slave devices simultaneously. This change improves latency during slave devices configuration. Change-Id: Ie2985e444e4aa1128856dc6ae372f8f4cca943de Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23soundwire: Add support to use group id for slave devicesSudheer Papothi
Devices with the same group id or broadcast command can be configured simultaneously. This will help improve the latency during device configuration. Add support to use group id for slave device configuration. Change-Id: I5e86e61a0b5223de6c6471f3f342fe1f387d81ef Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23soundwire: Disable ports in both banks after playback usecaseSudheer Papothi
Soundwire hardware has two banks for configuring soundwire slave ports. After playback is stopped, disable soundwire slave ports in both banks to avoid any port collisions during the start of next playback on other slave device. Change-Id: I5cfd1d985a1ca5fd7b4020d7e14697642f207501 Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23ASoC: Audio codec driver changes for kernel 4.4Sudheer Papothi
Audio codec driver changes for kernel 4.4. Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23ASoC: wcd: Add Audio codec drivers for MSM targetsSudheer Papothi
Add snapshot of audio codec drivers for MSM targets. The code is migrated from msm-3.18 kernel at the below commit/AU level- AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056 (e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1) (Promotion of kernel.lnx.3.18-151201.) Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>