Commit graph

332 commits

Author SHA1 Message Date
Cong Tang
2b6adc8ba1 ASoC: add support to configure TDM dai clk attribute and clk freq
TDM dai driver supports optional clk attribute configuration and
clk freq update. To configure TDM interface as PCM mode, the clk
attribute should be Q6AFE_LPASS_CLK_ATTRIBUTE_INVERT_COUPLE_NO.
Implement set_sysclk callback function to update Quaternary TDM
RX and TX clk freq.

Change-Id: I41edaa8d99325e9582e04ddb81a6ad5b5e4435bc
Signed-off-by: Cong Tang <congt@codeaurora.org>
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2017-09-13 17:42:16 -07:00
Siena Richard
2d0102dd44 dsp: allocate contiguous memory for version information
Allocate contiguous memory for version information instead of splitting
it across the stack and heap to centralize memory and improve
readability.

CRs-Fixed: 2104576
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Change-Id: Id7b5942522da6312da57bfef3d3c0b55934fe1d7
2017-09-13 11:15:43 -07:00
Xiaoyu Ye
1cb5ce084c ASoC: msm: qdsp6v2: add support to enable 4-channel QUAT TDM recording
Add the corresponding 'cap_mask' to support 4 slots configuration in
CPU DAI driver to enable 4-channel QUAT TDM recording feature on SDM845.

Change-Id: I137d874b00fadde7513ab6c843f61becc74feac1
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2017-09-12 18:30:03 -07:00
Xiaoyu Ye
a6b2a53173 ASoC: sdm845: add support to enable QUAT TDM TX path
Add support to update QUAT TDM TX HW parameters and
back end DAI link ops to enable QUAT TDM recording
feature on SDM845.

Change-Id: If0fccafaf563f9453559a45a59300a5bec75f449
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2017-09-12 18:03:50 -07:00
Tanya Dixit
861a8fa60c dsp: fix no recovery after SSR/PDR
Add apr_reset for q6core service to enable glink channel
to close and open properly after SSR.

CRs-Fixed: 2099312
Change-Id: Ia023cdb19a6a9dc7fae3e5c28ab51ddd92d37527
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2017-09-12 15:50:47 +05:30
Vidyakumar Athota
60871bde94 ipc: initialize glink link state
There is a chance that glink channel memory pointer is used
after free if WDSP_REG_PKT and WDSP_CMD_PKT are received at
the same time from different threads. Fix this issue by
initializing glink link state to GLINK_LINK_STATE_DOWN.
Also limit error logs to avoid watchdog timeout issues.

Change-Id: I07c4e6f12eb057405eb59f1c0d04b890fa964ce8
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2017-09-11 14:26:19 -07:00
Aditya Bavanari
245361df38 dsp: fix 2nd channel mute in VPRx out for Stereo EC ref
In Stereo EC reference, mute is observed in VPRx output
of 2nd channel when only speaker device uses custom MFC topology.

When handset and speaker use the same custom topology, issue is not
observed. Because when DSP VPRx module creates the
custom topology with handset configuration (1 channel and
center channel mapping) and device switch to speaker occurs
MFC conversion from center to left and right channels is successful.

But in case where handset uses default topology, when device
switch to speaker occurs, VPRx creates the custom topology
with speaker configuration(2 channels and left mapping). So,
when MFC config is received, only left->left mapping is done which
leads to mute in right channel.

Fix is to send the channel mixer configuration to MFC module
so that both left->left and left->right mapping is done.

CRs-Fixed: 2102374
Change-Id: If9be09866615e6623e78f48b9841eb068c825992
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-09-11 23:02:33 +05:30
Aditya Bavanari
f0cb90b1f7 dsp: assign channel mapping for Quad Mic use case
Assign channel mapping for Quad Mic voice use case
in channel info command during voice setup
as DSP requires channel mapping to be sent with
default values.

CRs-Fixed: 2097341
Change-Id: I661f845c26f8639e5e8dffa430ecc8cb3b3e8780
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-09-11 23:02:26 +05:30
Asish Bhattacharya
73f4dfff20 autoconf: enabled HDMI for sdm670
Fix compilation of kernel for sdm670.

Change-Id: Ice7768e280a924043b7aafb4d8f7e9fdc051134b
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2017-09-11 18:31:50 +05:30
Laxminath Kasam
0713e26a7d autoconf: update config to support DLKM audio for WCD/WSA
To support DLKM audio for WCD/WSA drivers on SDM845,
update conf file to install as module(.ko) for required configs.

CRs-Fixed: 2082310
Change-Id: I359799ac8c8ac050fce1eac8741837004f9f6a0b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-09-11 15:16:23 +05:30
Laxminath Kasam
da488bf1ff asoc: remove unused audio files
Update to remove unused driver files
from techpack audio.

CRs-Fixed: 2105780
Change-Id: I1dcf1c6e75838863eee0556f7919068dfc47772d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-09-11 15:16:14 +05:30
yidongh
98526effb3 asoc: initialize L/R/C gain for both mono/stereo playback
When there's a dynamic channel change from mono to stereo,
volume burst is observed because center channel gain for
stereo is not initialized. Initialize center channel gain
for both mono and stereo playback.

CRs-Fixed: 2095081
Change-Id: I02254b5696a17e2792ea26a2265ab01326f5cf9e
Signed-off-by: Yidong Huang <yidongh@codeaurora.org>
2017-09-10 19:47:23 -07:00
Vikram Panduranga
72863154a8 ASoC: add SLIM_7_TX routing for Multimedia10
Add missing FE to BE link for Multimedia10.

Change-Id: Ibf9a80c942107b1f68b5954b21f87d4f7494b1fc
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2017-09-08 16:44:08 -07:00
Xiaoyu Ye
e908ba91db ASoC: wcd-spi: initialize local variable 'status'
Variable 'status' is used without initialization.
Initialize it to the right value.

Change-Id: I7f43d8905d8192e5f308e9fd00a52eb531f2f698
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2017-09-08 11:34:45 -07:00
Karthikeyan Mani
5eaced6d70 ASoC: codecs: wcd934x: Fix slimbus overflow
Remove MCLK_CONTROL and FS_CNT_CONTROL from
the list of volatile registers so that regmap
sync happens for these registers when coming
out of power collapse. These clock registers
need to be synced otherwise codec state is not
restored correctly after power collapse.

CRs-fixed: 2053506
Change-Id: I9b5385a357f9ad05ad085603410704e916e3985e
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2017-09-07 10:36:06 -07:00
Preetam Singh Ranawat
5402849018 dsp: add CELT encoder support
Add CELT encoder support to enable audio broadcast over split a2dp.

Change-Id: If0d927913c5e525ff1cebf857323ab70be2122a1
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
2017-09-06 03:58:45 -07:00
Laxminath Kasam
8f7ccc2e6f audio-lnx: Add latest snapshot for audio drivers.
Propagate the changes based on latest snapshot
for audio kernel source tree at below cutoff of
kernel msm-4.9 -
(040750bfa78 -
 "Revert "ARM: dts: msm: Add DT node for aop-qmp
  clock controller on SDM845 v2"")

CRs-Fixed: 2104096
Change-Id: I0927c40b3a188dbf892e7ec4c1c7810953724929
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-09-04 20:12:56 +05:30
Shiv Maliyappanahalli
8b3bdea209 asoc: codecs: fix compilation error for wcd codec
The previous commit fb24ad8485a assigns obj-y with
msm_hdmi_codec_rx.o instead of appending, thus giving
compilation error as previously assigned object files
are removed.
Fix by appending obj-y with msm_hdmi_codec_rx.o instead
of assigning.

Change-Id: I7c5ea5627e2e1888e3fc0b53a6650ab64b9a29a8
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2017-08-31 18:19:03 -07:00
Shiv Maliyappanahalli
24d1c0878a asoc: codecs: add object to compile audio hdmi codec driver
HDMI codec driver is not compiling as the corresponding object
file is not set in the makefile.
Add object file to SND_SOC_MSM_HDMI_CODEC_RX config.

Change-Id: I6068f551db357e5bfa73ff5b51014347f38b925c
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2017-08-31 15:48:28 -07:00
Asish Bhattacharya
13a66c87f4 autoconf: sdm845: add conf to enable display port
Add audio configurations to enable audio functionality
over DisplayPort on sdm845.

Change-Id: If8b5f6c25bca08a61b951cb97167e9ead7271dd3
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2017-08-31 15:46:11 -07:00
Laxminath Kasam
38070be30b audio-lnx: Add latest snapshot for audio drivers.
Propagate the changes based on latest snapshot
for audio kernel source tree at below cutoff of
kernel msm-4.9 -

(aed56b2df75 - "drm/msm/sde: update te vsync enable sequence change")

Change-Id: I7ed5102146986b81e5cb9ca55432360b3549b60c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-24 03:53:42 -07:00
Laxminath Kasam
8c87858751 autoconf: Add conf file support for sdm670 audio
Add new conf files to support sdm670 audio.
Also update sdm845 to support required configs.

Change-Id: I3b0ac16d80bba10a3226dbe5c1b39c64b5780ac9
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:13 -06:00
Laxminath Kasam
7e057cf8cd audio-lnx: Enable compilation for sdm670 audio
Enable compilation for sdm670 audio. Update
for both internal and external codecs.

Change-Id: I030837a2c0180a5a31d0ab786ad5de607027050f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:13 -06:00
Asish Bhattacharya
34504581a0 audio-lnx: Add snapshot of audio drivers from below commit.
(1996ec83a45: "ARM: dts: msm: Reduce CNOC bus voting for
        USB slave on SDM845")

This change is to migrate latest snapshot of kernel drivers.

Change-Id: I84669db544773d3ce9d2d5dff0ab6943bd7d8ff9
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2017-08-18 16:56:12 -06:00
Laxminath Kasam
71ca58e195 autoconf: Enable config for wdsp-glink/avtimer
Enable the configs for WCD DSP Glink and avtimer drivers.
Remove the CDSP Loader config as it is not audio related.

Change-Id: Ic6101e106c1e1d91bece6f53d1572507570b6b6f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:12 -06:00
Laxminath Kasam
d1f3619bef audio-lnx: Propagate changes from kernel for wdsp-glink/avtimer
Pick the WDSP-Glink and avtimer drivers from 4.9 kernel
at below cutoff -

(80be7d6a313 - "msm: ADSPRPC: Fix for NULL pointer dereference")

This changes are done to migrate wdsp-glink/avtimer drivers
to this new audio kernel techpack.
Also remove the CDSP loader from techpack audio as it is
non-audio related.

Change-Id: I4f55429c5cbcd24920fdcb8eb2fe3aec02af320e
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:12 -06:00
Laxminath Kasam
605b42f92c audio-lnx: Rename folders to new flat structure.
Kernel audio drivers can be categorised into below folders.
asoc - ALSA based drivers,
asoc/codecs - codec drivers,
ipc - APR IPC communication drivers,
dsp - DSP low level drivers/Audio ION/ADSP Loader,
dsp/codecs - Native encoders and decoders,
soc - SoC based drivers(pinctrl/regmap/soundwire)

Restructure drivers to above folder format.
Include directories also follow above format.

Change-Id: I8fa0857baaacd47db126fb5c1f1f5ed7e886dbc0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:12 -06:00
Asish Bhattacharya
84f7f73144 audio-lnx: Add latest snapshot for audio drivers.
Propagate the changes based on latest snapshot
for audio kernel source tree.

Change-Id: I15cdbf2651ee8bf70a56b08013e1fbce16859d9b
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2017-08-18 16:56:09 -06:00
Asish Bhattacharya
366f750416 audio-lnx: Propagate changes from kernel for msm_sdw/hdmi
Add snapshot for msm_sdw codec/hdmi codec drivers for SDM targets.
The code is migrated from msm-4.9 kernel at the below cutoff -

(8efe4a8d64f: "ARM: dts: msm: add rotator vbif memtype
		setting to sdm845")

This changes are done to migrate msm_sdw/hdmi codec drivers
to this new audio kernel techpack.

Change-Id: Ia807b87a7c67957512a6b38cc62ae9cb5223c8b2
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2017-08-18 16:56:09 -06:00
Laxminath Kasam
3d0e01d5be autoconf: config file support for audio techpack for sdm845
New conf files are required to enable config for
audio techpack. Add respective files for SDM845.
This provides required config to compile required files
for SDM845 audio.

Change-Id: Ic93d0df0da03d7f891267994380729602ce64c65
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:09 -06:00
Asish Bhattacharya
8e2277f79f audio-lnx: Initial change for techpack of audio drivers.
Add snapshot for audio drivers for SDM targets. The code is
migrated from msm-4.9 kernel at the below cutoff -

(74ff856e8d6: "net: ipc_router: Add dynamic enable/disable
wakeup source feature")

This changes are done for new techpack addition
for audio kernel. Migrate all audio kernel drivers
to this techpack.

Change-Id: I33d580af3ba86a5cb777583efc5d4cdaf2882d93
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2017-08-18 16:56:08 -06:00
Git User
5ff0cfa736 Initial empty repository 2017-08-18 12:27:00 -07:00