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>
The wcd9310 codec driver which is slimbus slave can access codec
registers when slimbus is suspended.
This can cause register read/write failure.
Fix to make sure slimbus is awake before accessing wcd9310 codec's
registers through slimbus.
CRs-fixed: 331338
Change-Id: Iddbdb1614c18dab4bee4f0cc7951884f34cb7173
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
The driver needs to hold ear/mic mute values in local variable to
support get api.
Change-Id: I6f9bbdfd6a0942f039ed48829048b835813ac68d
CRs-Fixed: 333228
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Unlike Tabla 1.x, Tabla 2.0 codec has different address of micbias 4
registers.
Check hardware version and access proper address when accessing
micbias 4 registers.
CRs-fixed: 330357
Change-Id: I5e12a6b15e82b00d2e238c21d795fdc189ead6a5
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Don't set MBHC register unnecessarily while measuring DCE/STA at boot time.
Fix will give more accurate measurement result.
Change-Id: Ib2681b9d588027f1e035acd46865783260416645
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
ADM management logic has been moved to PCM routing
driver. Clean up CPU driver not to call adm_close
as it would have been called by routing driver.
Change-Id: I520414d2e84c963e9c3b40e2c0d8eb6e3bb0d554
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Add port Mixer to route from AUX PCM TX port to AUX PCM RX in
order to support loopback from TX to RX on AUX PCM Interface
Change-Id: I364bfecca7342c9f358c048b4a6b3e6799f349f0
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Enable use cases that only require AUXPCM ports to be enabled
without further intervention of application processor in term
of feeding or capturing audio data.
Change-Id: I4b503df26b3f78d9bfea0e02e0e602d5f0176fc8
Signed-off-by: Patrick Lai <plai@codeaurora.org>
There are use cases that require AUXPCM ports to be
enabld without application processor feeding
or capturing audio data. Add routing definition to
enable these type of use cases on AUXPCM ports.
Change-Id: If5d80df55e37f67cbab7f8b8e826a50908b87b0b
Signed-off-by: Patrick Lai <plai@codeaurora.org>
The current code enables bandgap/clock block at boot but never
turns off these blocks when not in use. This results in higher
than expected power leakage in idle mode.
Disable bandgap and clock blocks when no audio is playing and
no headset is inserted.
CRs-Fixed: 330961
Change-Id: I1f51d99320ffe03ef1a569349405ad4cbaa9c868
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
pil_get may fail for apq8064 simulator as downloading q6
is done separately. Voice parameters are different for
apq8064 simulator and other machine types, hence setting
those values based on machine type
Change-Id: I6f8b7f1f260218723ca6f34395ccf19666c901ae
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
The timestamp would be used by applications for AVSYNC purpose.
Change-Id: I416c38e82fbd51b58df119c0122bcd629ccd88fd
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Use calibrated threshold rather than hardcoded one to catch MBHC fake
button press interrupt.
Change-Id: I9b4acae81bf7e21f5282a2338269f91d78b14cf3
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
So far wcd9310 driver assumes that any headset button press is headset
button 0 press.
Change driver to measure voltage when button is pressed to discriminate and
notify button's number.
In order to have better detection performance, default measurement
samples are shortened.
CRs-fixed: 327081
Change-Id: Ic0e2a5297974e1858684f0ef2a0b424141ee7464
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
The MBHC parameter nReady is already in calibration data.
However, CODEC driver currently does not make use of nReady value
in calibration data.
Change CODEC driver to use nReady value instead of hard coded value.
Increase default nReady to support capacitance variance on the micbias
line.
Change-Id: I1acb927a64be78574785eb4c67a50b145e5f72de
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
wcd9210 codec MBHC driver has hard-coded codes that assumes MCLK is
always 12.288Mhz.
Make codec driver to use correct value from ACDB data.
Change-Id: I1d1cd5ff4d4331d119e481a1c173625edcaa0fd3
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
There is no need to print port numbers and indices every time the phone
plays a sound. Instead, make these pr_debugs, so that they can still be
turned on for debugging purposes while not clogging normal logs.
Change-Id: Id1a8584ebc3e0160b170820eb4c47c8491388f45
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
Add the secondary I2S RX CPU driver which configures QDSP6 AFE to
start the 2nd I2S RX port.
Change-Id: Ia60eb650124d74070aa510be7b601a9ca02a43aa
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
For scenarios that need changing the clock source to the codec,
the sequence for switching the clock source was not done
correctly, causing the wrong clock to be selected.
If the correct clock is not selected, it is possible that playback
of audio might cause codec overflow issues due to mismatch in
rate at which the codec can consume data and rate at which data is
made availabe to the codec.
Fix the sequence for switching the clock source, this avoids
possible overflow issue during audio playback.
CRs-fixed: 329223
Change-Id: I410a4dd65cc236c28b788bc5b02db5237157ea6b
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
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>
MBHC block requires time for settling aftet resetting.
Give delay after resetting MBHC block.
Also calculate DCE/STA wait more accurately.
Change-Id: Ib3150a921720ed56d6e684281a6f2ae5fe600631
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
The MBHC headset specific calibration data is stored in the filesystem
as a firmware file. Read this data during initializing MBHC and
perform calibration. If this data is not found, fallback to using
default data provided by the machine driver.
Change-Id: I1cabfb2bb19ef379cdce14ed6b1af8a62e34c790
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Add ALSA HDMI hostless front end driver. It is used to configure
AFE to route audio sample from mic input to HDMI output. It is used
for internal loopback, where HOST doesn't send audio sample to the DSP.
Change-Id: I07020075a456795a632be5901c47e3f114a9f534
Signed-off-by: Alex Wong <waiw@codeaurora.org>
-Subsystem restart attempts made back to back
results in crash.
-Accessing Null pointer while subsystem restart
in progress.
-Update the afe_callback function to return
after processing the RESET_EVENTS.
Change-Id: I53f0fecd6079d1788dc7cc5a2587383da9901084
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
- mutex_unlock is missing with some error condition failure cases
which could cause watchdog bark issues.
- Add missing mutex_unlock.
Change-Id: Iceb594462174141449b2f979fbf86a3ab81c45aa
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
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>
- The migration to 16 periods requires in_frame_info stucture
definition to accomodate 16 periods.This resulted in kernel
panic due to invalid memory access.
- kernel panic in copy_to_user is observed in stability runs as
Offset used to track pcm offset in buffer is getting corrupted
and resulting in invalid buffer pointer.
Change-Id: I11000ace40055a043c35a52b38ee8bfb5adb5211
CRs-fixed: 330762
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
FluencePro and surround sound need more than 2 channels in TX path.
Update SLIMBUS_0_TX DAI to support 4 and 3 channels.
Change-Id: Iab87561fbb4972b899970af981f9346ce73ff40d
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
FluencePro and surround sound need more than 2 channels in TX path.
Update Tabla TX DAI to support 4 channels in TX path.
Change-Id: Id5d9a4d2ed7dfb76201409ca32492989c044231c
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
This reverts commit 94a6cd2d7a.
- This fixes the arec overflow issue by increasing period and
buffer sizes. The patch was reverted as the corresponding
user space changes were not mainlined which resulted in
recording issues.
- Re-Revert the patch as the corresponding user space changes are
mainlined.
Change-Id: I86a15fc7053e11e442be5eff1b48c5efb7f50b5e
CRs-fixed: 328294
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
-Reduce the minimum period size for compress audio.
-This allows smooth audio video playback.
Change-Id: I2ba56021fb3f0df5fb3e53cf91baf4b1a5c5690a
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>