Commit Graph

10237 Commits

Author SHA1 Message Date
Linux Build Service Account
0eb39ea844 Merge "ASoC: msm: Use safer version of string copy." into msm-3.0 2011-10-26 17:20:32 -07:00
Linux Build Service Account
9cfca43020 Merge "AsoC: msm: Change hostless mode switch name" into msm-3.0 2011-10-26 15:11:09 -07:00
Bhalchandra Gajare
0b9d4d5da6 ASoC: msm8960: Fix header inclusion for wcd9310.h
CRs-Fixed: 313124
Change-Id: Ife0b46b32ebbef791b9fc8b47bee796f85606174
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2011-10-26 00:15:02 -06:00
Neema Shetty
9ba987d34b ASoC: msm: Use safer version of string copy.
Use strlcpy instead of strncpy as it ensures that the string copied
at the destination is nul-terminated.

Change-Id: I0efe21d3e2561452f0a5a7adf026d485421c2eb3
Signed-off-by: Neema Shetty <nshetty@codeaurora.org>
2011-10-25 20:01:58 -07:00
Ben Romberger
93d4d2db90 msm: audio: qdsp6v2: Change RTAC to remove ADM devices correctly
This creates a separate function in Real-Time Audio
Calibration (RTAC) to remove popp's from all ADM devices.
This also removes popp information from the RTAC remove
ADM device function and calls that function from ADM close.

Change-Id: I6aed7717a789cdbce5ce39b42d945853a7524418
CRs-fixed: 306716
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2011-10-25 17:25:25 -07:00
Sriranjan Srikantam
df509d1e59 AsoC: msm: Change hostless mode switch name
Regular audio playback is failing after kernel 3.0 upgrade
until unless hostless switch is renamed
The hostless mode switch name is currently same as back-end
AIF and new DAPM search logic in kernel 3.0 finds the route
entry for hostless pcm to slimbus Rx backend with "Switch"
as control word first. If switch is not on, it considers as
source and sink are not joined and playback fails
Hence hostless mode switch name had to be renamed to allow
both regular playback and hostless mode playback to work on
3.0 kernel

Change-Id: I3767899110f3d48b8de312fa91c61ce68f15b56b
CRs-Fixed: 313673
Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org>
2011-10-25 15:00:16 -07:00
Linux Build Service Account
27df093386 Merge "ASoC: msm: Add support to play more non continuous sample rates." into msm-3.0 2011-10-25 09:59:25 -07:00
Linux Build Service Account
c6b6149172 Merge "msm: audio: qdsp6v2: Fix for enabling dolby aac decoder." into msm-3.0 2011-10-25 09:59:25 -07:00
Asish Bhattacharya
d69d28451c ASoC: msm: Add support to play more non continuous sample rates.
Support 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
rates for LPA playback.

CRs-Fixed: 310102
Change-Id: I7a1addaac17002eeb107c38dc5902dfff8398127
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2011-10-25 10:32:30 +05:30
Patrick Lai
16261e83de ASoC: wcd9310: append codec loopback paths through IIR1 block
Change-Id: Ibee3cb24a3a2db42654bdc4adf57e4ea339fd83b
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-10-24 21:59:51 -07:00
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
Linux Build Service Account
5e21bfdcab Merge "ASoC: msm8960: Use all external speaker pins." into msm-3.0 2011-10-23 16:41:13 -07:00
Linux Build Service Account
d44c22fd03 Merge "ASOC: msm: allocate buf pointer only if session is valid" into msm-3.0 2011-10-23 16:41:13 -07:00
Santosh Mardi
024010fb02 ASoC: wcd9310: Add kcontrol for high pass filter for tx and rx path
Add kcontrol for HPF cut off frequency and switch to NO_BYPASS and
BYPASS for HPF on TX and RX path.

CRs-Fixed: 308208
Change-Id: I333f144c7351c7163987ea16dfa8b78e91c0b113
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2011-10-21 13:08:26 -06:00
Asish Bhattacharya
49831e4988 ASOC: msm: allocate buf pointer only if session is valid
The event handler may get events even if the buffer is
deallocated already. The access to buff should be done only if
its not deallocated and session valid.

Change-Id: I3eac5976db354612cb5550acc2bb67396c8c47fe
CRs-fixed: 311574
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2011-10-21 23:57:31 +05:30
Peter Lohmann
b8203efdb8 ASoC: msm8960: Use all external speaker pins.
Speaker Function control is a master control used for muting
external speakers. After splitting speaker widget to 4 widgets
representing + and - inputs of stereo speaker, speaker function
control should enable and disable all 4 widgets at the same
time.

CRs-fixed: 312165
Change-Id: Ia30b1969467b0f2a6fdf0f9049c75ef363f2be8c
Signed-off-by: Peter Lohmann <plohmann@codeaurora.org>
2011-10-21 10:21:30 -07:00
Linux Build Service Account
6a86cca6b5 Merge "SoC: msm: Audio latency optimization in kernel" into msm-3.0 2011-10-21 03:06:17 -07:00
Linux Build Service Account
f3c6784292 Merge "msm: audio: qdsp6v2: Correct the debug message of latency measurement" into msm-3.0 2011-10-21 03:06:17 -07:00
Peter Lohmann
42d403a453 ASoC: WCD9310: Remove digital mute.
At the end of playback, framework asks CODEC to mute a particular
audio interface through digital mute callback.  In our case, there
is no need to make this function callback available. At the same
time, this cause ADIE loopback not working because earpiece path
is muted. That's why we need to run hostless PCM to have the
framework unmute earpiece path.

CRs-fixed: 309828
Change-Id: I7d5be840644e4892b4f572b3486258b3f7dd3b24
Signed-off-by: Peter Lohmann <plohmann@codeaurora.org>
2011-10-21 01:18:29 -06:00
Linux Build Service Account
a61c8fb9f3 Merge changes Ib8a38874,Iaf3993e8,Ic9a1de50,Ibd0f1029 into msm-3.0
* changes:
  ASoC: WCD9310: Add Calibration voltages for button polling
  ASoC: WCD9310: Use dedicated trigger for insertion and low power removal
  ASoC: WCD9310: Switch micbias to VDDIO to avoid click noise in playback
  ASoC: WCD9310: Include the MBHC mic bias registers in private data
2011-10-20 22:35:31 -07:00
Linux Build Service Account
af2ac1e9be Merge "ASOC: msm8960: Reset irq pointer if trigger start done." into msm-3.0 2011-10-20 22:35:31 -07:00
Linux Build Service Account
5660ae1e5e Merge "ASoC: msm: 8960: make dmic6 micbias arrangement as default" into msm-3.0 2011-10-20 14:33:16 -07:00
Sriranjan Srikantam
74753532b0 msm: audio: qdsp6v2: Correct the debug message of latency measurement
The debug message uses wrong variable value while printing the input
latency values. Fix this bug by correcting the message

Change-Id: Ie5cd75ea101882e98944277a4ee9189ea80176bd
Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org>
2011-10-19 14:47:04 -07:00
Bhalchandra Gajare
30cf484f42 ASoC: WCD9310: Add Calibration voltages for button polling
For accurate button press detection, it is required to program
the MBHC registers with threshold values for microphone voltage.
This enables the MBHC hardware to generate a button press interrupt
only when the microphone voltage is below the programmed thershold

Change-Id: Ib8a38874357e00fe0c797ad40c3da040bbc83cc2
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2011-10-19 12:10:17 -07:00
Bhalchandra Gajare
7fc723301e ASoC: WCD9310: Use dedicated trigger for insertion and low power removal
For insertion / low power removal detection both mic line schmitt
triger and HPH schmitt triger were used. This was causing fake
interrupts being generated.

Add logic to use mic Bias schmitt trigger only for low power removal
detection and HPH schmitt trigger only for insertion detection.

CRs-Fixed: 306965
Change-Id: Iaf3993e85f3f27cc275fbed445005f214905ae47
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2011-10-19 12:09:06 -07:00
Bhalchandra Gajare
d9ebb6cf42 ASoC: WCD9310: Switch micbias to VDDIO to avoid click noise in playback
The microphone bias used for headset microphone is also used for button
polling in case of headset. This causes fluctuation of current on the
headphone path, resulting in a periodic clicking noise.

Switching the microphone bias to VDDIO when headphone playback is in
progress and headset mic recording is not in progress avoids the click
noise problem

Change-Id: Ic9a1de508bbf48703f4e42c12c1cf4d08cad748b
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2011-10-19 12:01:45 -07:00
Bhalchandra Gajare
02d90cd42d ASoC: WCD9310: Include the MBHC mic bias registers in private data
The microphone bias that MBHC uses will be board specific and will
not change once it is decided for the board. Add common function to
compute the commonly used mbhc mic bias registers and save them in
private data so that these do not have to be computed each time.

Change-Id: Ibd0f1029cd8ca663d32e3e2eac0cc76c1e110abe
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2011-10-19 11:43:32 -07:00
Krishnankutty Kolathappilly
1f19897499 SoC: msm: Audio latency optimization in kernel
-Reduce the playback buffer size from 4096 to 2048.

Change-Id: I3a6e67ebd141a41875ee293a5ccdb959e17deb17
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
2011-10-18 19:09:01 -07:00
Linux Build Service Account
4cc9253ff9 Merge "ASoC: wcd9310: add IIR1 input volume controls" into msm-3.0 2011-10-15 20:55:25 -07:00
Patrick Lai
cb7802b3bd ASoC: msm: 8960: make dmic6 micbias arrangement as default
There is digital mic connected to DMIC6 input of tabla only on
CDP and Liquid. Digital mic is powered by micbias 4 on both targets
Move routing entry to common routing table.

Change-Id: Id97d23652ea69691522b97558ba848af13d0ce39
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-10-14 02:23:50 -06:00
Linux Build Service Account
d9609ac708 Merge "ASoC: wcd9310: make ANC2 control registers readable" into msm-3.0 2011-10-14 01:07:55 -07:00
Linux Build Service Account
adad73d37c Merge "ASoC: msm: 8960: set headset plug-type to US by default" into msm-3.0 2011-10-14 01:07:55 -07:00
Asish Bhattacharya
a4a4baa347 ASOC: msm8960: Reset irq pointer if trigger start done.
In case of seek the audio is paused and rerun. the last buffer
might return after the prepare is called. This results in pointer
mismatch.

CRs-Fixed: 311642
Change-Id: I5115737af5d452da57a258f1b0bc87db1c6987a2
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2011-10-14 12:52:41 +05:30
Patrick Lai
2ae0a005e9 ASoC: msm: 8960: set headset plug-type to US by default
New shockwave 2 CDP addressed the undesirable connection which has
US/Europe plug type switch reversed. Machine driver needs to pull
8902 PMIC GPIO 35 low instead of high to default plug-type to US.

Change-Id: I4854c4f9e56b1d1ff255556c535b91193449672e
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-10-11 11:23:24 -07:00
Patrick Lai
2900637157 ASoC: wcd9310: add IIR1 input volume controls
There are four inputs to IIR1. Gain range is between -84
to +40 DB for all 4 inputs. These gain controls would
serve mostly for sidetone gain control purpose.

CRs-fixed: 309261
Change-Id: I44141b07f764f75efc33d3badebb331d0322cdb2
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-10-11 11:01:15 -07:00
Patrick Lai
ddc8eb852c ASoC: wcd9310: make ANC2 control registers readable
Change-Id: Ib2aaa3446ec3abae8fa7826770e268515c75cd14
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-10-11 10:50:01 -07:00
Helen Zeng
0f4c4e2dca ASoC: msm: qdsp6: Print message only when string is not NULL
Solve the crash which may be caused by NULL name in
voc_get_session_id function.

CRs-fixed: 310289
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
2011-10-11 09:59:28 -07:00
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
Bradley Rubin
a66af0dfb5 ASoC: WCD9310: Don't change unnecessary CFILT bits
Only bits 6, 5, and 4 of the CFILT control registers
need to be updated when setting up the microphone
voltage measurement to determine if an inserted
headset has a microphone.

Signed-off-by: Brad Rubin <brubin@codeaurora.org>
Signed-off-by: Peter Lohmann <plohmann@codeaurora.org>
2011-10-05 10:27:45 -07:00
Patrick Lai
e519dd618e ASoC: msm: 8960: make FLUID ANC mic bias arrangement as default
CDP and FLUID, though both support ANC headset, micbias arrangement
for ANC microphones are done differently. To be able to detect CDP
and FLUID, EEPROM must be programmed and it is difficult to enforce.
Instead, the decision is to only test ANC on FLUID and make FLUID
ANC mic bias arrangement as default

Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-10-05 10:27:36 -07:00
Bhalchandra Gajare
9ec83cd011 ASoC: WCD9310: Add route for AMIC3 to Slimbus TX port 8
For stereo recording, AMIC3 needs to be routed to Slimbus TX port 8.
Add the DAPM route to enable stereo recording using AMIC3

CRs-Fixed: 307544
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2011-10-05 10:27:24 -07:00
Kiran Kandi
bf0b1ff86b ASoc: wcd9310: sleep 10 milli sec after HPH PA turn off
There is a pop after HPH PA turn off. wcd9310 specification specifies
40 millie sec sleep after HPH PA turn off, to have pop with in
100 micro volts. On-target testing shows that 10 milli second sleep is
good enough.

Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
2011-10-04 17:14:29 -07:00
Helen Zeng
b73accec42 ASoC: msm: qdsp6: Send disable widevoice command to Q6
MVM will cache the widevoice enable value after ending voice call.
Should send the disable command to MVM if changing widevoice
from enable to disable.

Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
2011-10-04 17:14:26 -07:00
Laxminath Kasam
fa53b9fbfb ASoC: increase timer sensitivity to support variable period size.
Change the timer value to support at usecs range instead of
msecs. This allows to have different period sizes for a
given frequency.

Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2011-10-04 17:14:16 -07:00
Asish Bhattacharya
43e46a32de ASoC: msm8960: Fix correct pointer to first buffer write to dsp.
The driver sends wrong addres for first write to dsp.

CRs-Fixed: 308075
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2011-10-04 17:14:11 -07:00
Kiran Kandi
d2d86b58a6 ASoC: WCD9310: Mixer control for Ear PA Gain.
The gain for EAR PA is not linear. So can not use TLV Mixer control
for setting gain. Only 6dB and 2dB gains are supported, since other
values for gain might cause performance issues.

Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
2011-10-04 17:13:59 -07:00
Ben Romberger
c5d6a37c7f msm: audio: qdsp6v2: Send session ID in RTAC APR packet
This keeps track of the Session ID's used for voice and
sends them in the APR packet for SET & GET PARAMS

Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
CRs-fixed: 308117
2011-10-04 17:13:48 -07:00
Lei Zhou
157c18481b SoC: msm: Add set_fmt callback to support mode change
Add set_fmt callback to Q6-DAI platform driver to allow
configing Q6 LPA-IF switch between I2S slave & master mode.

Signed-off-by: Lei Zhou <leizhou@codeaurora.org>
2011-10-04 17:13:32 -07:00
Lei Zhou
5262b24544 ASoC: msm: Add dragonboard APQ8060 machine driver
APQ8060 machine driver is added to support APQ8060 with ALSA FE/BE
architecture. It provides a glue between APQ8060 platform driver
and WM8903 codec driver.

Signed-off-by: Lei Zhou <leizhou@codeaurora.org>
2011-10-04 09:50:27 -07:00
Bryan Huntsman
1682f24e1e ASoC: msm: rename msm8660 --> lpass
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-10-03 16:21:38 -07:00