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>
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>
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>
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>
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>
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>
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>
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>
* 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
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>
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>
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>
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>
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>
-Reduce the playback buffer size from 4096 to 2048.
Change-Id: I3a6e67ebd141a41875ee293a5ccdb959e17deb17
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>