ASoC: msm: Correct the EC reference RX port id for 0x1001

The EC reference RX port id that is being used for
PRIMARY_MI2S_TX is not correct and is set to 0 currently.
Set this to proper RX port id of 0x1000.

Change-Id: Id7a88076f06816adcb50e9cee0b83da10393883f
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
ASoC: wcd9xxx: Do not disable MBHC clock enable signal

MBHC needs clocks enabled which are controlled through
analog enable signal. Do not disable this signal when
adc block is disabled.

CRs-fixed: 540125
Change-Id: Iba1713769fb37b49b7f71596ec0a35b87b0e498c
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: wcd9xxx: Enable MBHC TxFE when micbias is enabled

When micbias is turned ON for audio recording with headset
plugged in, there can be possible noise on the recorded
data due to micbias polling for button detection. To
avoid the noise on audio recording, it is required to
enable the MBHC TxFE (Front-End). Add support to enable
MBHC TxFE when micbias is being enabled for audio recording.

CRs-fixed: 522829
Change-Id: I0689982edab9204aa4f833e59f979f38d6d34418
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9xxx: Enable voltage source for micbias for headset detection

Micbias on some codecs can be sourced from external voltage source.
In order to enable micbias for MBHC calibration, headset type detection,
etc, it is required to enable external voltage source for such codecs to
avoid incorrect headset type detection. Add callback per codec to enable
external voltage source if such a source is present for the codec power
rail.

CRs-fixed: 535909
Change-Id: I91995655b8ad8f36fccd34223d1d8a6e9a413fd7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: WCD9XXX: Add configurable micbias option for headset detection

Micbias is required to perform plug type detection on 3.5mm headset
jack. Some platforms can have the microphone pulled up to micbias using
external on-board pull up resistor or using the pull up resistor
internal to the codec. Add support for headset detection logic to
support configurable option for internal or external micbias.

CRs-fixed: 539445
Change-Id: I9438812f0a924c22932dacc56181cf997625e056
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: msm8x10: Parse the micbias internal property

Micbias can be either internal to the codec or external onboard pull up
resistor. Parse the property from device tree to setup the micbias
appropriately.

CRs-fixed: 539445
Change-Id: I2281b9b98a00d3d4cbfb98f912eaa41274a6c8ee
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ARM: dts: msm: Use internal micbias for headset detection on msm8610

Micbias can be pulled up through internal codec resistor or external
on-board pull up. Add micbias as internal for QRD platform.

CRs-fixed: 539445
Change-Id: I630c3487167be3b61bf00d3cc0d65d37ea9880a0
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9xxx: Add codec specific settings to switch micbias to vddio

Micbias to the codec is sourced from LDO (either internal or external to
the codec). Micbias can also be enabled by switching the micbias to
vddio rail in the codec. The register settings changes between codecs.
Add capability to perform this setting specific to codec.

CRs-fixed: 539445
Change-Id: Ie55784ea990df5eba6ca35a97b431bbf93f0c945
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: msm8x10-wcd: Fix the micbias external capacitor setting

The register setting for external bypass capacitor was not updated as
per the platform data provided. Due to this the appropriate register
setting for external cap mode was not set correctly. Fix the codec
register setting for external bypass capacitor mode.

CRs-fixed: 539445
Change-Id: I9f9bc106faa6908acf48c6ce73342f46ab678df5
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ARM: dts: msm: Add the external capacitor setting for msm8610

Micbias used for audio recording can have on-board external bypass
capacitor. Add these setting for the CDP and MTP platforms for 8610
since these platforms have a external bypass capacitor on the micbias.

CRs-fixed: 539445
Change-Id: Icfd38e853e6e97f37cc1ef8e6aa65612d83b18db
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: msm8x10-wcd: Pull TX2 to micbias whenever micbias is enabled

It is noticed that the headset mic has a buzz whenever micbias is
enabled. To reduce this buzz, always pull up the TX2 (headset)
microphone front end to micbias.

CRs-fixed: 526901
Change-Id: Id007a4c34c68aea0d0e01743d3e7aa8ca09fd5f7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: msm: Add few more Dolby endpoint dependent paramters

While turning Dolby effecrs on and off from its UI app, volume of
levels vary and difference is observed. Dolby requires few more
paramters to be sent based on endpoints for proper tuning.

CRs-Fixed: 503579
Change-Id: Ibae16d417d4df53eb2bf27475ed24fa409af3861
Signed-off-by: Jitendra Singh Naruka <jnaruk@codeaurora.org>
msm: acpuclk-8974: Update voltage tables for Pro variants

Hardware characterization provided updated voltages tables for 8974Pro.
Update acpuclock tables to match latest voltage plan.

Change-Id: I7993717e7bbbc996f24678fc15fe65da590e7af5
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
ARM: dts: msm: update touchscreen properties for skug

As some new properties were added to support all Focaltech models
and support smart firmware update, skug device tree needs to update.

Change-Id: I7af15e7da5fda9caa7cde55bfd65e38c8d1748d4
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
USB: u_ether: Set complete handler before queueing to endpoint

rndis function driver will queue requests for TX endpoints in
tasklet context and interrupt context. While queueing requests
in interrupt context, not setting completion handler before
queueing to TX endpoint. Due to this, there is a chance that
usb request will be queued to USB HW without setting completion
handler. This results in crash when that particular usb request
is completed. Hence mark complete handler before queueing usb
request in interrupt context.

CRs-Fixed: 534958
Change-Id: I4cf235ace13f05f1e7bf2415b8a7dccf09d1115d
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Merge "ARM: dts: msm: update touchscreen properties for skug"
Merge "USB: u_ether: Set complete handler before queueing to endpoint"
Merge "ASoC: msm: Add few more Dolby endpoint dependent paramters"
msm: mdss: access copy of userspace buf only

Copy buffer data from userspace and access only the
pointer to buffer in kernel memory. Copy back this data
back to user space memory once the operation is completed.
This prevents accessing user space virtual address from
driver.

Change-Id: I319bf08055cdf914803c4a35c5a607f92017d9a0
CRs-Fixed: 520129
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
msm: mdss: change SMP allocations for chroma decimation

When decimation is used, the chroma components are not down sampled in
order to prevent quality loss. This means that we need to consider this
extra pixels that are being fetched from memory for buffer latency (SMPs)
and bus bandwidth.

Change-Id: I9f05e4ece9240b787a8e2b3b3f69eec86d68b2b3
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>