Commit Graph

940 Commits

Author SHA1 Message Date
Joonwoo Park
a909e1258f ASoC: jack: Add API report sock jack without DAPM sync
Currently snd_soc_jack_report() always acquires codec->mutex and
synchronize DAPM widgets.  This automation is helpful if jack has defined
widget.  However if codec driver doesn't have defined jack widget and
non-jack widget wants to synchronize with report_sock_jack's thread which
is usually irq handler, it can make dead-lock as all DAPM widget
call-backs are called after codec->mutex acquisition.
Add new API snd_soc_jack_report_no_dapm() so codec driver can have ability
of control DAPM synchronization part of snd_soc_jack_report()

Change-Id: Ifc6054cd8b6d8a6b52517cf84baca1e3949e09fe
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2012-03-19 19:32:14 -07:00
Neema Shetty
3c9d286936 ASoC: msm: Add support for voice over Bluetooth
Add support for Slimbus channels between external modem and APQ.
These channels transfer voice packets to/from the modem to the
BT stack on APQ.

Change-Id: I48bd5248104719574fbc6cf52edfb92cff79bff9
Signed-off-by: Neema Shetty <nshetty@codeaurora.org>
2012-03-17 02:04:01 -07:00
Swaminathan Sathappan
bdc5508dbc ASoc-msm: Modify ASM drivers to invoke ION APIs
Create ION client and allocate buffers based on
the client handle and free the buffers when no
more needed

Change-Id: I00be9dbd3e8f5eff286d8f1bc0d61656866bf360
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
2012-03-02 13:10:02 -08:00
Bharath Ramachandramurthy
9c79f13b0e ASoc: msm: Add support for slimbus shared channel.
Previously, DSP used to setup the data path towards the
codec via slimbus. Now, the data path setup is broken into
two parts - one half of the path setup between apps to slimbus
and the other half from DSP. This configuration mode is
required to reduce overflow or underflow errors. Also this is
required to handle a configuration where mdm can talk
directly to codec.

Change-Id: Ic9f20b8a2f8a8eb355c07565ec80ec947a7a7337
Signed-off-by: Bharath Ramachandramurthy <bramacha@codeaurora.org>
2012-02-12 13:48:19 -08:00
Kiran Kandi
5e809b01da ASoC: msm: HDMI PCM 6 channel support
HDMI 1.3 supports Multi channel PCM up to 8 channels with sample
size of 16/20/24 bits and sample rate of 32, 44.1, 48, 96, 176.4,
192K. This patch add supports for 6 channel PCM at 48K sample rate
with sample size of 16 bits.

Change-Id: Id09f1f9d7ef2e2444c8c1b661bfc5b3b4c1e66a6
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
2012-02-10 15:32:36 -08:00
Linux Build Service Account
1484f46cd1 Merge changes I9b4acae8,Ic0e2a529,Ib37f8545 into msm-3.0
* changes:
  ASoC: wcd9310: Use calibrated threshold
  ASoC: wcd9310: Introduce MBHC multi button support
  ALSA: Define more sound jack types
2012-01-27 02:51:38 -08:00
Asish Bhattacharya
8664b25449 ASoC: msm: Add timestamp support for compressed audio
The timestamp would be used by applications for AVSYNC purpose.

Change-Id: I416c38e82fbd51b58df119c0122bcd629ccd88fd
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2012-01-27 03:54:58 +05:30
Joonwoo Park
f1bebfb790 ALSA: Define more sound jack types
Define more sound jack types to be able to report additional buttons.

Change-Id: Ib37f854550cc147d90231352bc7d6b03316f60f5
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2012-01-25 22:09:04 -08:00
Ben Romberger
b760323c5c ASoc: msm: Add support for adie RX & TX calibration
Add support for adie RX & TX calibration. This calibration
is used for RMC and speaker protection. A non-blocking
function was created for AFE memory map since it is now
being called from an atomic process and the acdb driver
was changed to use to use atomic variables.

Change-Id: Id6c6ca7a303ef5ee5d23a9932e910e6a7a08805d
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2012-01-20 17:10:55 -08:00
Jayasena Sangaraboina
e1c5493f0a ASoC: msm: use flag hwparam_set to enable backend dai hw_params
Issue - backend dai prepare fails with concurrent LPA and non-LPA
sessions during stability tests. Since front end dai reference
count gets incremented for both sessions and backend dai hw_params
doesnt get invoked. This results NULL pointer in backend dai hw_params.
Fix - use the flag hwparam_set to ensure backend dai hw_parmas is
invoked properly.

Change-Id: Id08628e67d0f8ccf284c0e07a801aa8fc47bd8aa
CRs-fixed: 326458
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
2012-01-16 19:13:55 -07:00
Kuirong Wang
274f21ac19 ASOC: msm: Add the MI2S CPU driver.
Add MI2S CPU driver which configures QDSP6 AFE to start MI2S port.

Change-Id: Idc12325d83607d60e66636c3fba052204905a629
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2012-01-09 14:47:36 -07:00
Jayasena Sangaraboina
0fc197d3da ASoC: qdsp6: Set proper sampling rate for Fluencepro topology
The sampling rate of Fluencepro topology is either 16K or 8K.
Therefore, we need to reduce the ADM sampling rate to 16K during
recording with Fluencepro topology.

Change-Id: I0a558c359dbfd62aa35c05dbadba57b3e3820d21
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
2012-01-02 07:23:30 -07:00
Helen Zeng
0705a5f7ea ASoC: msm: Add incall music delivery support
Add one backend DAI, and add one mixer control to route playback stream
to the new backend DAI. Start/stop playback commands will be sent to CVD
if starting/stopping playback, after voice call is established.

Change-Id: I334f1894ac0800e6a71fa7e20ac634b1b05cc414
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
2011-12-21 06:47:08 -07:00
Pierre-Louis Bossart
4b065d49b1 added G723 and G729
Change-Id: Id9b8570c92abc4d7f77d5f09464df91bf76c3ddd
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2011-11-22 11:56:44 +05:30
Vinod Koul
f15a95cedd Fixes for 1. fixes for comments recieved on alsa-devel
2. cosmetic edits
	s/period/fragment
	corrected comments
	fixed parameters and descriptors
3. More cosmetic edits and checkpatch fixes

Squash the commits

Change-Id: I6c849673d58e8c8314c0d1e48f55c7660dcca54c
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2011-11-22 11:56:44 +05:30
Vinod Koul
c78fe9c5e4 compress: add API header and driver header files
This patch adds the header files for ioctl definations and header file for
driver APIs for lower level device drivers to use

Change-Id: I9d35b1a34aab0aaee8f8b3cd3d9fad1c2d633158
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2011-11-22 11:56:44 +05:30
Vinod Koul
12ac0b5695 compress: add compress parameter definations
The patch adds the various definations used to define the encoder and decoder
parameters

Change-Id: Iaf4cced5e4a89ecb92337e2f9cf45b62c23945e7
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2011-11-22 11:56:43 +05:30
Linux Build Service Account
94583edbd4 Merge "ALSA: add headphone over current switches" into msm-3.0 2011-11-10 16:32:29 -08:00
Baruch Eruchimovitch
e9cbfc1780 msm: qdsp6v2: ultrasound: Add Ultrasound framework(USF) into msm8960
The USF driver manages ultrasound data path between QDSP6 and
user space based daemons, calculating input events upon the
ultrasound data.

Change-Id: I087227f0b9a224bc6633be3ccb76be463d90640c
Signed-off-by: Baruch Eruchimovitch <baruche@codeaurora.org>
2011-11-10 10:24:45 +02:00
Deepa Madiregama
6a3a01ae8e msm: 8660: audio: HDMI: Fix the HDMI DMA stop issue
LPA_IF dma channel is disabled without checking the per count value.
Because of this dma channel is not functional after few iterations
of continuous playback. Fix this issue by checking the dma per count
value to stop before disabling the LPA_IF dma channel.

Change-Id: Ie9e9a9337ca2c4b76cebd99cd3eb98137be85b89
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
2011-11-09 06:54:40 -07:00
Ben Romberger
61754dc690 ASoc: msm: Add ASM function q6asm_get_audio_client
Add function to get the ASM audio client from a session
ID. Allow the ability to get audio client information
used by the ASM interface when only a session ID is
available.

Change-Id: Id9be30954c1a839648194c4a0120cccd341afae4
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2011-11-07 15:09:25 -08:00
Patrick Lai
ac510b92be ALSA: add headphone over current switches
Some CODECs monitor current drawn by headphone power amplifer.
If current consumed goes over pre-defined threshold, CODEC would
communicate to host processor. Then, CODEC driver would propagate
the event so user-space application can react accordingly.
Add support to propagate over current events for both
left headphone and right headphone through ALSA jack framework.

Change-Id: Ieef36f070a4478a5a80ec4c8b0cc81464abd75ad
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-11-07 14:33:45 -08:00
Linux Build Service Account
9ebffbfbeb Merge "ASoc: msm: Add support for multiple inputs to kcontrol" into msm-3.0 2011-11-04 17:57:03 -07:00
Ben Romberger
8f1dc4c732 ASoc: msm: Add support for multiple inputs to kcontrol
Adds the macro SOC_SINGLE_MULTI_EXT which allows the user
to pass the number of integer inputs accepted by the control.

Change-Id: I75009672568d1e0979ecd577031e72bd87f310d2
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2011-11-04 11:22:18 -07:00
Alex Wong
2caeecc1fa msm: audio: qdsp6v2: Add support for other voice and mp3 codec
Added below support
-MP3 decode
-Voice decode(AMRNB\EVRC\QCELP\AMRWB)
-AMRWB encode

Change-Id: If62c869fb485ebb3f4e5cdfcb8fed743707434e9
Signed-off-by: Alex Wong <waiw@codeaurora.org>
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
Signed-off-by: Rajesha Kini <rkini@codeaurora.org>
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
2011-11-01 20:40:02 +05:30
Bharath Ramachandramurthy
4f71d50364 msm: audio: qdsp6v2: Fix for enabling dolby aac decoder.
Previously, dolby aac decoder was enabled by disabling
legacy aac decoder. This change should correct it.

Change-Id: I0b46a444701585921c546c6668a0bc0c8e63ec50
Signed-off-by: Bharath Ramachandramurthy <bramacha@codeaurora.org>
2011-10-24 18:58:41 +05:30
Sidipotu Ashok
be2a817b1f msm: audio: qdsp6v2: Enabling dolby pulse aac codec.
Enable dolby pulse codec, to be used for decoding multi stream
aac content.

Change-Id: Ia936f25820c062112e9838230511e20db2472726
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
2011-10-21 11:05:52 +05:30
Patrick Lai
cf999117fc ASoC: msm: Move ADM management out of QDSP6 CPU driver
Audio hardware path can be started not only for audio playback/capture
but also voice call. ADM COPP is created through Q6ADM driver
when AFE port is started. For voice call use case, creating
ADM COPP in DSP wastes unnecessary memory resource. To create
ADM COPP only for audio playback/capture case, management logic
is moved to pcm routing driver which has information about session
ID of MultiMedia streams and state of audio back-ends. With this
information, pcm routing driver decides to start/stop ADM COPP.

Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-10-05 10:37:23 -07:00
Bhalchandra Gajare
0e795c44c1 ASoC: msm8960: Add support for AUX PCM Interface
Auxiliary PCM Interface is external PCM interface on msm that
can be used instead of internal codec as a way to connect an
external codec to the msm.

Enable support for AUX PCM. Current setting on PCM interface is,
2.048 MHz bit clock, mono stream, 8Khz sample rate, with MSM in
master mode. AUX PCM uses GPIO's to interface with external
codec device.

Adds platform data for cpu dai since cpu dai needs to know
which clock on MSM to use, clock rate to use and other
configuration parameters.

Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2011-10-03 16:21:23 -07:00
Deepa Madiregama
55cbf78935 msm: audio: qdsp6v2: Add decoder unification changes
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
2011-10-03 16:21:12 -07:00
Sriranjan Srikantam
5285a21f33 ASoC: msm8960: Enable soft volume and soft pause features
Add support for soft volume and soft pause commands and
enable the features to avoid glitch or pop during volume
change and pause-resume sequence

Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org>
2011-10-03 16:20:51 -07:00
Laxminath Kasam
32657ec8c4 ASoC: msm8960: Initial commit for ALSA Audio RT Proxy Driver.
To support the RTPorts Playback and Capture,new platform
driver msm-pcm-afe is added. Two FE's each for playback
and capture are added. Four BE's are added - two for each
port acting as playback and capture. Corresponding mixer
controls are also updated.

Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2011-10-03 16:19:58 -07:00
Neema Shetty
feea77447c ASoC: msm: Change voice routing controls.
Change voice routing controls to contain back-end DAI and front-end
DAI information.

CRs-fixed: 304889
Signed-off-by: Neema Shetty <nshetty@codeaurora.org>
2011-10-03 16:19:34 -07:00
Asish Bhattacharya
e505066887 ALSA: tlv - Add tlv.h to include/sound/Kbuild
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2011-10-03 16:18:45 -07:00
Swaminathan Sathappan
b0021cd06f msm: audio: qdsp6v2: Enable soft volume command to avoid noise
Add support for soft volume command and enable it to avoid
noise during volume change sequence

CRs-fixed: 304164
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
2011-10-03 16:17:56 -07:00
Bradley Rubin
572c3b4884 ASoC: Create signed 8-bit volume control register
ALSA currently supports a 16-bit register which contains
two 8-bit two's complement gain values.

This patch modifies the same callback functions as the
above register type to support an 8-bit two's complement
gain register.

Signed-off-by: Brad Rubin <brubin@codeaurora.org>
2011-10-03 16:16:08 -07:00
Ben Romberger
45b351ce75 msm: audio: qdsp6v2: Change config for RTAC
Change config for real-time audio calibration (RTAC)
since it is used by both 8660 and 8960.

Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2011-10-03 16:15:54 -07:00
Jay Wang
9cf59a0fbc ASoC: msm8960: Avoid the mutex access from event handler
Because q6asm_write use mutex to protect the shared data, this API
should not be called from event handler. Instead, calling
q6asm_write_nolock interface.

CRs-fixed: 298006
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
2011-10-03 16:14:35 -07:00
Jay Wang
6a30543b0f ASoC: msm: Register AFE APR during prepare
ALSA trigger function must be atomic. Therefore, removing the AFE APR
registering function to prepare since apr_register uses mutex

CRs-Fixed: 298122
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
2011-10-03 16:14:20 -07:00
Laxminath Kasam
885f510f6f ASOC: msm8x60: support to device_mute is added.
Device mute control is added which can mute the
respective dev_id to volume zero.
msm_device_mute() in user space will use this
control.

CRs-Fixed: 295399
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2011-10-03 10:27:06 -07:00
Swaminathan Sathappan
70765cd7a3 msm: audio: qdsp6v2: Add support for aac dual mono playback
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
2011-10-03 10:26:40 -07:00
Bryan Huntsman
3f2bc4d6eb Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-10-03 09:57:10 -07:00
Liam Girdwood
6e30b2e682 ASoC: core - improve probe/remove ordering
To be SQUASHED

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:06 +02:00
Liam Girdwood
a42d64d51c ASoC: dsp - cleanup struct dsp_link
Refactor out some member resulting in code reduction.
For SQUASH.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:05 +02:00
Liam Girdwood
3f5dc29172 ASoC: dapm - improvements to path finder - SQUASH
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:05 +02:00
Liam Girdwood
a8d99da4ad ASoC: OMAP4 ABE DSP - Add support for the OMAP4 ABE DSP
This patch adds the OMAP4 ABE platform driver. This driver defines and
exports control for the DSP Frontend and Backend routing.

TODO: cleanup

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:02 +02:00
Liam Girdwood
59c96f127c ASoC: dsp - add core support for bespoke trigger()
This allows the DSP core to call a beskope trigger() call
on DAIs and platforms that require it.

TODO: move into DSP patch series.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:01 +02:00
Liam Girdwood
f320fddc26 ASoC: core - add hostless DAI support
Allow DAI's to be hostless so that no PCM data is sent between DAI
and CPU. This allows for power savings as there is no DMA or CPU
interaction required.

TODO: we shouldn't need to allocate a PAGE for a dummy DMA buffer.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:01 +02:00
Liam Girdwood
ad2581ef84 ALSA: pcm - add support for hostless audio
Allow some PCM devices to be hostless, i.e. there is no PCM data transferred
to or from the host CPU. This can be used to minimise power on systems since
the CPU can idle/sleep during the PCM device operation (e.g. a phone call
where the DAI is between a MODEM and DSP)

TODO: cleanup, look at adding a read/write blocker.

Singed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-07-24 21:32:01 +02:00
Liam Girdwood
a8f13d8879 ASoC: core - add dynamic kcontrols
TODO: First phase of dynamic kcontrols. More todo.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:00 +02:00