Commit graph

24154 commits

Author SHA1 Message Date
Bhalchandra Gajare
f5c0c7a00b ASoC: wcd-dsp-mgr: handle codec down and up events
It is possible that codec hardware can be reset in case of subsystem
restart scenarios. It is required to reset the codec DSP as well in
such cases to make sure the DSP is in usable state after the codec
hardware is reset. Change adds support to handle codec down and up
events and perform the necessary reset on codec DSP.

Change-Id: I79502c043f5e16947c895aab7cd584d72ad1a7dc
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-11 15:38:32 -07:00
Bhalchandra Gajare
d0b17cbf01 ASoC: wcd-dsp-mgr: rename wdsp_intr_handler to wdsp_signal_handler
The wdsp_intr_handler is not really processing interrupts in interrupt
context, rather assumes that the caller is not in interrupt context and
performs calls that may sleep. Rename the function in order to avoid
confusion. Interrupt handlers can still call this function as long as
they are in threaded interrupt context and are okay to sleep.

Change-Id: Ia2803d6ca021d505ed2e711e676cbd701b11c492
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-11 15:35:40 -07:00
Bhalchandra Gajare
93b43a172c ASoC: wcd-spi: Move one time initializations to component bind
One time initializations like regmap and debugfs init are currently
done in the init function. But, in case of subsystem restart, the
driver can get de-initialized and then initialized again. This causes
the debugfs and regmap entries to get removed and added again during
subsystem restart cases. Avoid this by moving all the one time
initialization of the driver to component bind.

Change-Id: Ideed297fde016b0623616be64875be094e688981
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-11 15:31:46 -07:00
Linux Build Service Account
4e8d48bcbc Merge "ASoC: msm: fix lowlatency playback and FM concurrency issue" 2016-10-11 01:17:08 -07:00
Walter Yang
3b29155a55 ASoC: msm: create backend dailink for wcd934x MAD
To support ADSP SVA on wcd934x, dedicated backend dailink needs
to be created. Add the dailink associating the specific cpu dai
and the MAD codec dai.

CRs-Fixed: 1070327
Change-Id: I4152d81e4e951216a8ecdd93562eb1740dbb962c
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2016-10-09 19:43:51 -07:00
Linux Build Service Account
36e5723b82 Merge "ASoC: msm: qdsp6v2: support for configurable bit format for AFE encoder" 2016-10-07 01:17:33 -07:00
Linux Build Service Account
b02e3335dd Merge "ASoC: msmcobalt: Update machine driver to support 32 bit format" 2016-10-06 19:45:47 -07:00
Linux Build Service Account
e0f034f4c0 Merge "ASoc: msm: Enable support for 32 bit format and 384Khz" 2016-10-06 19:45:46 -07:00
Linux Build Service Account
6a97dc2b55 Merge "ASoC: msm: qdsp6v2: add support for latest version of media format command" 2016-10-06 19:45:46 -07:00
Vidyakumar Athota
0de1b37d17 ASoC: msm: fix lowlatency playback and FM concurrency issue
Lowlatency playback is failed to start when FM is going on because
of wrong channel count in backend DAI. Channels are overwritten because
of afe loopback port mixer caching variable(port_sessions) overflow.
Fix this issue by creating an array to track all the loopback
connections.

Change-Id: I47b875df7eae671f8b59ecc76f61ed7fc7147f0e
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-10-06 17:33:08 -07:00
Linux Build Service Account
35b02c5e6a Merge "ASoC: soc: change audio drivers to use %pK" 2016-10-06 12:26:10 -07:00
Linux Build Service Account
b80c3a0a3a Merge "ASoC: msmcobalt: Add support for TDM" 2016-10-06 12:26:07 -07:00
Linux Build Service Account
a0e79f8e03 Merge "ASoC: wcd934x-dsp-cntl: add support for subsystem restart" 2016-10-06 12:26:02 -07:00
Linux Build Service Account
a06fab4885 Merge "ASoC: wcd-dsp-mgr: set status before broadcasting post events" 2016-10-06 12:26:02 -07:00
Linux Build Service Account
4de50ebd05 Merge "ASoC: msm: qdsp6v2: Remove 48khz constraint" 2016-10-06 12:25:47 -07:00
Linux Build Service Account
61e4c072da Merge "ARM: dts: msm: connect MADINPUT with MCLK on msmcobalt" 2016-10-06 12:25:45 -07:00
Linux Build Service Account
1109a2ed58 Merge "ASoC: wcd-mbhc: increase hs_vref to 1.6v for wcd9335 codec" 2016-10-06 12:25:44 -07:00
Linux Build Service Account
cde2fda56d Merge "arm/arm64: Kconfig: Add support to use the CLK_QCOM for MSMfalcon" 2016-10-06 01:07:20 -07:00
Linux Build Service Account
7b6f74a97a Merge "ASoC: msm: qdsp6v2: Update device mapping for 7 channel" 2016-10-06 01:07:12 -07:00
Taniya Das
e5335ad216 arm/arm64: Kconfig: Add support to use the CLK_QCOM for MSMfalcon
MSMfalcon requires to use COMMON_CLK and COMMON_CLK_QCOM as the clock
framework. Fix the following for CLK_QCOM
 - Add new configs for common clock framework.
 - Remove compilation of audio-ext for COMMON_CLK.
 - Remove ARCH hamster and cobalt from falcon defconfig.
 - Remove ARCH falcon from cobalt defconfig.

Change-Id: I560d62f9698ddf73848186a6740632735d574b0f
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-10-06 10:17:35 +05:30
Ashish Jain
c88c6f97ce ASoC: msmcobalt: Update machine driver to support 32 bit format
Update msmcobalt machine driver to support S32LE format.
Also add support of 384Khz for USB_AUDIO_RX.

Change-Id: I576bd9c3c776ad5c24a15adf1447a9206dc61b89
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
2016-10-05 08:33:01 -07:00
Ashish Jain
eb6adca118 ASoc: msm: Enable support for 32 bit format and 384Khz
Add support for 32 bit data format (SNDRV_PCM_FORMAT_S32_LE)
and sampling rate of 384Khz. Also update platform drivers
to use latest version of pcm media format command
ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V4.

Change-Id: I6b7ea860a398a7e4dd5f7e23ac3906ff0c6f2b3e
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
2016-10-05 08:32:45 -07:00
Ashish Jain
5a60bc56b0 ASoC: msm: qdsp6v2: add support for latest version of media format command
Add support for ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V4
command. This command adds support to playback/record 32 bit data
in 32 bit word and also provides a way to inform DSP about the
endianness of the data.

Change-Id: I3b013bedde8ccfa97a02e255e237df0cf2de13b8
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
2016-10-05 08:32:02 -07:00
Naresh Tanniru
ce3c3a600a ASoC: msm: qdsp6v2: support for configurable bit format for AFE encoder
Add support for configurable bit width for AFE encoder.
Add new mixer ctl to set for usecases which enables
configuring different input/output bit format
on AFE for usecases such as APTXHD encoder for 24bit input
and 16bit output.

Change-Id: I62326a097cbd71a3ec2b93a0120284d8f71f5d57
Signed-off-by: Naresh Tanniru <ntanniru@codeaurora.org>
2016-10-05 06:27:08 -07:00
Bhalchandra Gajare
f37c2edcc6 ASoC: wcd-dsp-mgr: set status before broadcasting post events
During image download, the status is set after post download events
are broadcasted. This could possibly lead to race condition if other
drivers requested to boot the dsp before the status was set. Change
makes sure the wdsp status is set prior to broadcasting post download
events to avoid possible race conditions.

CRs-fixed: 1071949
Change-Id: If3ec6202b4729b24ee839c3a8aa4edf2482d6e59
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 18:04:46 -07:00
Bhalchandra Gajare
eee490259b ASoC: wcd934x-dsp-cntl: add support for subsystem restart
When the codec DSP is crashed / unresponsive, in order to recover
from the crash, it is required to shutdown and restart the DSP.
Add support for subsystem restart feature to recover from crashes.

CRs-fixed: 1071949
Change-Id: Ibe1918cbf525c41d8fa82fc772b3afe20cac6eb7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 12:43:12 -07:00
Bhalchandra Gajare
acaf2a7f79 ASoC: wcd-spi: fix clock disable
Currently, the clock request is performed during init and the clock
is kept on assuming that there will be code download event followed
by init. This assumption may not always be true and might cause the
clock to be enabled when it is really not needed. Change fixes clock
disable such that clock is disabled right after init and re-enabled
again if code download event is raised.

CRs-fixed: 1071949
Change-Id: Icc415e911653012726e5b81b4fc09199560d5691
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 12:43:02 -07:00
Bhalchandra Gajare
d728aa9031 ASoC: wcd-dsp-mgr: add support for subsystem restart
It is possible that wcd codec DSP can crash or become unresponsive.
During such case, an error interrupt is generated by the codec. Add
support in manager driver to handle this interrupt and perform
subsystem restart to shutdown and reboot the DSP so that the DSP
can be recovered from the crash.

CRs-fixed: 1071949
Change-Id: I4662b5120bf7f731e399a27d8a613e2f3b648b00
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 12:42:44 -07:00
Bhalchandra Gajare
67436f2353 ASoC: wcd934x-dsp-cntl: add ramdump support
Add support to collect the codec memory dumps when any fatal
interrupt is raised from the DSP indicating the DSP is either
unresponsive/crashed. The memory dumps are only collected if
the debugfs node 'ramdump_enable' is set to true since ramdump
collection is debug only support.

Change-Id: I805ec63d125770b869cac892db8cf56f45510d6d
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 11:07:16 -07:00
Bhalchandra Gajare
4e3222f33a ASoC: wcd-spi: add support to read requested section of memory
It is possible that the manager driver may try to read codec memory
section through the wcd-spi driver. Add support in the wcd-spi driver
to handle the WDSP_EVENT_READ_SECTION event and perform reading of
the requested memory section.

Change-Id: If7fb228dc15cb47079c8a791443c4d12c29eeb9c
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 11:06:59 -07:00
Bhalchandra Gajare
aaa95b0cb5 ASoC: wcd-dsp-mgr: add support for collecting memory dumps
The codec driver is notified through interrupt whenever the
DSP in codec is unresponsive/crashed. In such cases, collecting
dumps of the codec memory is useful in debugging the issues.
Change adds support in the wcd dsp manager driver to collect
the memory dumps upon notification of error interrupt.

Change-Id: Ib91cd4fc1476ee1a9ec448cde1a083070443f726
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 11:06:42 -07:00
Bhalchandra Gajare
1e2d8b2132 ASoC: wcd-dsp-mgr: add argument to the interrupt handler callback
Currently, when manager driver interrupt handler callback is called,
there is no way for the caller to provide any data information along
with the type of interrupt. Change adds argument to the interrupt
handler so that callers can use this to pass agreed data when an
interrupt occurs.

Change-Id: I1c049227875a802491e21998c13c0bcd8eab7de6
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 10:49:57 -07:00
Linux Build Service Account
7a81402490 Merge "ASoC: msm: Update the error handling when APR sends packet failed" 2016-10-03 10:34:57 -07:00
Linux Build Service Account
1221a4694b Merge "ASoC: msm: qdsp6v2: add routing map for multimedia6" 2016-10-03 05:54:41 -07:00
Linux Build Service Account
0c1bf6e64e Merge "ASoC: soc: change audio cpe drivers to use %pK" 2016-09-30 18:24:04 -07:00
Linux Build Service Account
36b28a7842 Merge "ASoC: wcd934x: Add support for HPH surge recovery" 2016-09-30 18:23:59 -07:00
Linux Build Service Account
e33b7f64d3 Merge "ASoC: wcd934x: Use correct API for force enable micbias" 2016-09-30 18:23:58 -07:00
Linux Build Service Account
d556394bb8 Merge "ASoC: wcd934x: send TX/RX PGD register CFG to AFE" 2016-09-30 18:23:57 -07:00
Linux Build Service Account
cb9f10e366 Merge "ASoC: wcd934x: add decimator 5 and 6 volume controls" 2016-09-30 18:23:57 -07:00
Linux Build Service Account
9aa659eeb2 Merge "ASoC: wcd934x: Add support for digital core power collapse" 2016-09-30 18:23:44 -07:00
Linux Build Service Account
a19c18eb4e Merge "ASoC: msm: limit audiosphere driver logics to legacy soc" 2016-09-30 18:23:35 -07:00
Linux Build Service Account
3c3421d8e0 Merge "ASoC: wsa881x: Avoid removing of already deleted timer object" 2016-09-30 18:23:34 -07:00
Walter Yang
872457b287 ASoC: wcd-mbhc: increase hs_vref to 1.6v for wcd9335 codec
Currently hs_vref is set to 1.5v and causes mic voltage
to go above 1.5v during audio playback at maximum volume.
Increase the threshold to 1.6v to avoid getting fake plug
removal.

CRs-Fixed: 1066750
Change-Id: I7e5788eda609821792718a276e6fe5fa97e68a4a
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2016-09-30 17:16:41 -07:00
Josh Kirsch
93e6c93d67 ASoC: msmcobalt: Add support for TDM
Add support for audio over TDM in msmcobalt.
Time-division multiplexing (TDM) is a method of
transmitting data in the time domain. This can
be used to support data rates that exceed that of
the transmitted signal or to have up to 8 channel
support on a bus that normally supports less in
the frequency domain.

CRs-fixed: 1070768
Change-Id: I20998435591c44d2ca1a7b6bd5eacac2af0611f6
Signed-off-by: Josh Kirsch <jkirsch@codeaurora.org>
2016-09-30 14:04:49 -07:00
Josh Kirsch
45c40de8cb ASoC: msm: qdsp6v2: Remove 48khz constraint
Remove 48khz constraint for TDM use cases. This
change is needed to support more sampling rates for
TDM use cases.

CRs-fixed: 1073307
Change-Id: Ic42b2f9e7441ffb4e1bfe8211f85aadb72c22ed3
Signed-off-by: Josh Kirsch <jkirsch@codeaurora.org>
2016-09-30 12:31:27 -07:00
Kuirong Wang
cbd3e0cb06 ASoC: msm: Update the error handling when APR sends packet failed
Update the error handling when APR sends packet failed so that audio
driver can perform proper error recovery.

CRs-Fixed: 1050605
Change-Id: I6210e244e6299ec747836f40d03e92c15c6e53ee
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2016-09-30 10:56:00 -07:00
Xiaojun Sang
0e29472b1c 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-30 15:41:24 +05:30
Xiaojun Sang
20a18f9828 ASoC: soc: change audio cpe drivers to use %pK
Change cpe 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: I741d9e5c5b415011348e862c3f1ee4fe28c3969f
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2016-09-29 23:02:33 -07:00
Walter Yang
3653c5fdb5 ASoC: wcd934x: send TX/RX PGD register CFG to AFE
AFE requires TX/RX PGD register CFG info based on different wcd
codecs. Send this info when AFE configs are set at initialization.

Change-Id: I0da3d41fe8c1d03baacf2f2a9d2e141c9721981b
CRs-Fixed: 877188
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2016-09-29 22:16:30 -07:00
Vidyakumar Athota
3c4d75c367 ASoC: wcd934x: add decimator 5 and 6 volume controls
Decimator 5 and 6 volume controls are missing in wcd934x
codec. Add missing decimator volume controls.

Change-Id: I86f4f7bd2e337f7cc404ba7fb7905d18f67e604c
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-09-29 19:26:12 -07:00