Commit Graph

31 Commits

Author SHA1 Message Date
Helen Zeng 674f54bfe8 ASoC: msm: Turn on/off the clock before/after accessing afe mux register
Currently, HLOS configures afe mux registers with the assumption
that AHB clock is always-on.
To save more power on msmzirc target, turn on the clock before configuring
mux registers, turn off the clock after finishing configuration.

Change-Id: Ide3e7fafefcbe985de3eda00f2ec20a5d2c48d58
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
2014-11-13 10:12:27 -08:00
Jay Wang f9eaeb3a96 ASoC: msm: Add support for AFE RTAC
Implement AFE get and set parameter interfaces. These new
interfaces are used to support AFE real-time calibration
through QACT tool as part of AANC tuning process.

Change-Id: Ieba57a9a79fae3906fb3cb7f59b00d221ad07738
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
2014-06-04 17:01:31 -07:00
Ben Romberger cb9b89a9b9 ASoC: msm: qdsp6v2: Update clients to use new audio cal driver
Update all kernel driver calibration clients to use
new msm_audio_cal audio calibration driver. Remove
old msm_audio_acdb calibration driver.

Change-Id: Ie38c566c5c39546972042257b083cdcf55f08e85
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2014-05-20 14:48:33 -07:00
Asish Bhattacharya 20f37820d6 ASoC: msm: rename Backend and afe port to SD1 nomenclature
The combination of New AFE port and new backend added can be
used for multiple use cases and hence rename to more appropriate
nomenclature.

CRs-Fixed: 659928
Change-Id: Ibe7086be20abbb0aff894dd5033575a87a3a93b9
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2014-05-13 11:49:07 +05:30
Santosh Mardi 117bec6cd7 ASoC: msm: add support to enable codec core clock through AFE
Clock gating is enabled on the modem to enable the codec digital
core clock, need to send request to AFE to vote for the digital
core clock through APR.

Change-Id: Ie548b3a19ee4fa2437ee0705e498dd709d004992
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2014-03-12 01:55:47 +05:30
Asish Bhattacharya 47b7ce9810 ASoC: msm8x10: add support to split SD0/1 as two seperate BE
SD0 and SD1 are driven by single DMA channel. this makes it
impossible for any audio session to be sent to SD1 output
without mixing with SD0 data contents.

Allow user to route audio to a new AFE PORT introduced to
send data to SD1 without mixing with SD0 contents. The user
however needs to group the ports before opening any of the
AFE ports.

Change-Id: Icadc0f87fffc29575f069b6124dee3cf9d8a9fcd
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2014-02-27 12:05:49 +05:30
Venkat Sudhir 0d3af5821a ASoC: msm: Add support for Multisession ADSP SVA
SVA feature is used for user voice recognition and
activation. SVA can support multiple session on ADSP.
Curently upto 8 session are supported for SVA. This
change adds support for multiple sessions for SVA
in audio driver.

Change-Id: I76ee45b9224bae64ed92ef15e90237d498787666
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
2014-02-13 11:23:54 -08:00
Gopikrishnaiah Anandan e1aeb57aa0 ASoC: msm: Cleanup of msm audio drivers
Kernel has defined printk format specifiers and typedefs
for datatypes.
Using the format strings will remove need for typecasting.
This change cleans up audio msm drivers to use the kernel
defined data types and format specifiers for printk.

Change-Id: If6827137f1bfad802cb61aaa9d3e814b45124894
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2014-02-07 12:44:06 -08:00
Aravind Kumar 2edd513e65 ASoC: msm: spdif rx driver changes
New hardware for spdif rx has been added in mpq8092.
The changes register the platform driver and dai driver
for spdif rx. Add support in afe for the dai driver
to send clock configuration, channel status configuration
and spdif port configuration information and start the
spdif rx port. The changes enable PCM Audio playback
over spdif rx.

Change-Id: I70a30c8485a0abb1d248fe509d5b66a926997f88
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2014-01-19 02:12:36 +05:30
Jay Wang 0b6364c9a1 ASoC: msm: Correct the AFE port mapping
Add index mapping for AUDIO_PORT_ID_I2S_RX port id

Change-Id: I28e03c34e45e0dacfa6140e60d1a7450faccc3e4
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
2013-12-18 16:08:08 -08:00
Vidyakumar Athota b5ce4b64e7 ASoC: apq8084: Add Incall recording feature support
APQ8084 uses external modem for voice calls and is communicated
with modem through slimbus. Add incall recording support which
uses slimbus6 logical port to record.

Change-Id: I3e73121e79b5e6673e3933cd05b8367921a8e5e7
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2013-11-11 10:12:13 -08:00
Ben Romberger 6fa1d2c185 ASoC: msm: Unmap all ACDB memory with Q6 when ACDB driver closed
Call into all Q6 drivers to unmap all memory being used by Q6.

Change-Id: I971564bc80373877559679a95aab5529637d29a1
CRs-fixed: 505503
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2013-09-04 17:29:22 -07:00
Vicky Sehrawat 6ccff2dfdc ASoC: msm: Add support for incall music delivery
Add mixer controls, pseudoport IDs
to support incall music delivery on port 8002.
Change the implementation to start playback only
on the specified session and port.

Change-Id: I318b7df24d2beb8eaa0f65e7089ebf46471c2049
Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
2013-09-04 17:06:14 -07:00
Kiran Kandi b667668875 ASoC: msm: qdsp6v2: Fix bugs in listen client and server
Correct LSM idx in APR sevices table. Free memory allocated for
snd_model when not needed. Unlock mutex before locking same mutex
again in the same thread.

CRs-Fixed: 487983
Change-Id: I392321cddfd53746f63955993801f523e17330f5
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
2013-09-04 16:48:30 -07:00
Banajit Goswami a2b886de11 ASoC: msm8974: use newer AFE port IDs for Primary AUXPCM
For newer chipsets (MSM8974, MSM8226 etc.) AFE Port IDs are
changed. Use the new AFE_PORT_ID for AUXPCM Rx and Tx

Change-Id: I1c88023229ffa1b0c311aa69efce4a71e764d400
Signed-off-by: Banajit Goswami <bgoswa@codeaurora.org>
2013-09-04 16:25:44 -07:00
Gopikrishnaiah Anandan 1ea9b2a33d ASoC: msm: qdsp6v2: Add support for disabling VI mux
Change adds support for disabling the VI feedback
MUX. VI feeback mux will be disabled when TX path
of speaker processing is shutdown.

Change-Id: I9d03b109e894eba5195cbae8de32a77798e7bcf0
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2013-09-04 16:25:41 -07:00
Banajit Goswami 4e3f1ecb14 ASoC: msm: qdsp6v2: Add support for Secondary AUXPCM
Adding routing, mixer commands, AFE support for secondary AUXPCM
for MSM8974 Secondary AUXPCM can support Playback, Recording, Voice
call through VoLTE, Voip, etc. Also, added support for AFE, ADM etc.
for ADSP related functionalities.

Change-Id: Ia27688613a085d9d67b2e8e63f892e9993df66d1
Signed-off-by: Banajit Goswami <bgoswa@codeaurora.org>
2013-09-04 16:17:43 -07:00
Damir Didjusto 7da87bc890 ASoC: wcd9xxx: Add Q6 support for AANC
Add AANC commands for Q6 Adaptive AANC algorithm. Read
the AANC calibration data from ACDB and send it to DSP.

Change-Id: I59be2ed8cf3667f118adfe5843be14012ccccc2a
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
2013-09-04 16:14:27 -07:00
Joonwoo Park de53039214 ASoC: msm: qdsp6v2: Add hardware Mic Activity Detection support
The hardware MIC Activity Detection(MAD) is audio codec hardware's
feature that transmit microphone's signal to QDSP through slimbus.
This audio signal is used by QDSP for listen service.

Change-Id: I309e5e077dfb8944d87508f7ee0fcc0a3bc59ded
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-09-04 16:09:51 -07:00
Gopikrishnaiah Anandan 3d5a942bf1 ASoC: msm: qdsp6v2: Afe support for speaker protection
For feedback speaker protection feature afe driver
sends the RX and TX speaker calibration or processing
parameters to DSP. Change exposes get/set interface
to exchange speaker protection parameters.

Change-Id: Ie3e17e9e8aec611e7937bc520e5bde4214c24b3c
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2013-09-04 16:08:05 -07:00
Fred Oh 86bced4a28 ASoC: msm: Add support for primary MI2S changes
8x10 helicon codec uses MI2S instead of slimbus.
Add support for primary MI2S changes.

Change-Id: I52bdffe0affbb1ab84fccd4e2bfa4b0f67f90c58
Signed-off-by: Fred Oh <fred@codeaurora.org>
2013-09-04 15:55:05 -07:00
Phani Kumar Uppalapati 26ec46f54b ASoC: msm: Fix issues with concurrent playback in proxy driver
Change to make the memory map handles session specific. Otherwise,
when system tones on, and try playback with proxy port, they tend to
use the same memory map handles though they are two different sessions.

Change-Id: I32dfaa6f17e1a75dcd6b477cc61bcf3dc6b3478e
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
2013-09-04 15:53:29 -07:00
Venkat Sudhir e9052c0997 ASoC: msm: Add support DTMF generation and detection
Add support to generate and detect DTMF tones using DSP's
audio front end(AFE). Add DTMF platform driver, update the
routing table to enable routing of DTMF FE to the BEs in
ASoC. This driver is added to support version 2 of CPU
and AFE driver.

Change-Id: I389287f58182493a714336436561a401c5c6c6e7
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
2013-09-04 15:51:33 -07:00
Venkat Sudhir 5b9565881f ASoC: msm: Add support for lpass clock in AFE driver
MI2S,I2S and PCM clocks are controlled by AFE module
in ADSP. Application processor will configure and enable
OSR clock, bit clock before using the interface. Previously
these clocks were controlled by clock drivers, now LPASS
clocks are moved to AFE in ADSP. AFE driver in kernel
provides API to configure these clocks in ADSP.

Change-Id: I75f03b43e16a904a18477468d8ada88b63619aac
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
2013-09-04 15:49:27 -07:00
Venkat Sudhir 68ab6020ef ASoC: msm: Add secondary MI2S support in cpu driver
Add support for secondary MI2S interface in qdsp6v2
cpu driver. Secondary MI2S block in ADSP will be
configured for audio purpose.

Change-Id: I930548e3abc2fafc5ab8d853fb2b92cc1c60b026
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
2013-09-04 15:47:11 -07:00
Kiran Kandi 94865c61a7 ASoC: msm8974: Add Support for Quaternary MI2S CPU DIA
Quaternary MI2S block has 4 serial data lines. They can be configured
to either Rx or TX direction. RX and TX paths can share same bit clock
and word select.

Change-Id: Ia963c34840935d931ba6348485b1c13fcec3ad87
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
2013-09-04 15:39:36 -07:00
Venkat Sudhir 81ce5f57cd ASoC: msm: Add support for MI2S in cpu driver
Add support for MI2S interface in qdsp6v2 cpu driver.
These changes add support for primary MI2S interface
in CPU driver. Primary MI2S block in ADSP will be
configured to use for all Audio purpose.

Change-Id: Ia0676a8ec3168cece4bdccdc6315a0bbfc140973
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
2013-09-04 15:36:29 -07:00
Phani Kumar Uppalapati 3ad58b0d26 ASoC: msm8974: Add support for BT SCO and BT A2DP playback
Add support for BT SCO and BT A2DP playback for 8974 target.
Backend dai links for BT SCO and RT Proxy are added as part
of this change. Update RT Proxy driver with the ION memory
map changes. Also, update afe port start to handle BT SCO
and RT Proxy ports.

Change-Id: I2eab536b9cd6a1b576a88931d6fc413fe42281a2
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
2013-09-04 15:22:53 -07:00
Phani Kumar Uppalapati 11fb7e9b87 ASoC: msm8974: fall back to have AFE port started at prepare
After upgrading to kernel 3.4, there is 5 second delay
at the closing of PCM playback. The delay is due to missing
EOS from QDSP6 audio session manager causing pcm close function
of PCM platform driver to wait for 5 seconds. The root cause
for missing EOS is that ALSA dynmic PCM shutdown sequence has
changed. Now, trigger stop is called on the back-end DAI-LINK.
Furthermore, back-end trigger stop is called before front-end
trigger stop. Since sink stops rendering data, data at source
will never get consumed. EOS event will not arrive. As trigger
operation has to be atomic, it is very difficult to guarantee
sequence on shutting down various modules in QDSP6. The decision
is to abandon starting and stopping QDSP6 AFE port in trigger
function. This decision is considered acceptable as playback
and capture over SLIMBUS is no longer subject to strict sequence
which Q6 AFE port must be started after CODEC configuration.

Change-Id: Ief351168b08d5cca0a76405834cf3d6aa14a3941
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
2013-09-04 15:18:18 -07:00
Joonwoo Park 57494185ad msm: q6dspv2: Add slimbus data path support
Register slimbus CPU dai link to support slimbus data path.

Change-Id: I3584306ac1e0ad6561a19cecfe71f2a63aadafa9
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-09-04 15:04:49 -07:00
Patrick Lai c43676b7da sound: Add MSM sound drivers
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-09-04 14:53:52 -07:00