WLAN subsystem: Sysctl support for key TCP/IP parameters

It has been observed that default values for some of key tcp/ip
parameters are affecting the tput/performance of the system. Hence
extending configuration capabilities to TCP/Ip stack through
sysctl interface

CRs-Fixed: 507581

Change-Id: Ibaf821fcac9fba6448c5c23aef9d72946808e3cf
Signed-off-by: Kiran Kumar Lokere <klokere@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: wcd9xxx: Enable headset in high performance

Invoke class AB sequence for headset path dynamically based on
module parameter. Change enables headset path in high performance
mode when module parameter is set to one.

Change-Id: If92d5c8516fbd903a9585785dba47c800be63dbc
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: wcd9xxx: Distortion in HPH LO combo device

Follow Class H sequence for headset, lineout and ear concurrency as per
the class H HW design sequence to avoid signal clipping.

CRs-Fixed: 602408,618992
Change-Id: I517a5df98708f7292111e5cf71ffcf6ef8c4b870
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: wcd9xxx: Set HPH PA register to volatile

Set HPH PA register to volatile to make sure the register will be
updated with proper bits during bringup.

CRs-Fixed: 625324
Change-Id: I8334a66644dca536f0bcfef562b7f64372a47d32
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: wcd9xxx: Change in sequence of HPH Rx path

Change HPH Rx path sequence to enable Rx clock and reset Rx interpolator
path before HPH DACs enable to avoid pop during bringup of device path.

CRs-Fixed: 616383
Change-Id: If2beefc300e11908e87c90f0ab0fab0bfaf968b1
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: wcd9xxx: Enable headset in high performance

Invoke class AB mode for headset path when sample rate
is set to 192KHz and bit width is set to 24. Change enables
headset path in Ultra High Quality Audio(UHQA)mode.

Change-Id: I6cd05952114b88602fc9dcc883d83a39214311b9
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: wcd9320: Add HD2 tuning coefficients for HPH path

Add 2nd Harmonic Distortion (HD2) tuning coefficients
for HPH path. HD2 coefficients get turned ON during HPH
enable and turned OFF during path tear down. Enabling HD2
coefficients would increase the Headphone PA efficiency during
audio playback.

Change-Id: I24bc053e6401d5b8f45dc62d88c7fe6a5ba01447
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
asoc: wcd9320: Use class AB headphone path for high-res formats

 * The class AB path is less efficient, but has a lower noise floor.
 * Enable this path for 24-bit or high (>96KHz) sample rate, as this
   tradeoff is worth it with lossless, high resolution music.

Change-Id: I0bf4e6f366e987f17d86b4e967e3bc8b40d86ed3
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: wcd9xxx: Changes for High performance mode

Add changes for high performance audio playback on headset
for better audio quality during 192KHz/24bit audio playback.

CRs-Fixed: 706322
Change-Id: Ie79293f24114d5d81a610186d24b44b1550dae9c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: wcd9320: Change compander parameter for 192Khz playback

Update the meter rate parameter for compander in order to achieve
better performance with Compander support for headphone, lineout
and speaker paths for 192 KHz sampling rate. Update the static gain
offset accordingly depending on the buck voltage requested.

CRs-fixed: 481501
Change-Id: I4bb3c41e1042ba9327a21bf9375541d36487484e
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: qdsp6v2: Update pcm media format block to use correct stream id

Repeat mode is not working in pcm offload path. When two streams
are used in a single session pcm format block should be sent
specific to each stream. Data sent on stream 2 is ignored by DSP
because pcm format block is always sent on stream 1. Fix is to
update pcm media format block to use correct stream id before
data is sent to DSP.

CRs-Fixed: 673510
Change-Id: Id9369f9927fbd301ed6020ea9e35942b54305610
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Add check for NULL pointer and buffer overflow

Changes to add check for NULL pointer before they
get dereferenced and check for buffer overflows
to ensure out of bound indexes of arrays are not
accessed.

CRs-fixed: 628847 628850
Change-Id: I3fcebe07a7f9e7ff480857480fa0df2ada017c69
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: qdsp6v2: Update supported sample rates

Compress driver supports 96Khz and 192Khz sample rates. Change updates
the supported frequencies in the compress driver.

Change-Id: I4093f18ca36259dc8f159b38a452108d2d6d142a
CRs-fixed: 653510
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
[SCSI] async: introduce 'async_domain' type

This is in preparation for teaching async_synchronize_full() to sync all
pending async work, and not just on the async_running domain.  This
conversion is functionally equivalent, just embedding the existing list
in a new async_domain type.

The .registered attribute is used in a later patch to distinguish
between domains that want to be flushed by async_synchronize_full()
versus those that only expect async_synchronize_{full|cookie}_domain to
be used for flushing.

Change-Id: I9ab0a06052d05da47c0a3d7f3ebc55e3968aa3cc
[jejb: add async.h to scsi_priv.h for struct async_domain]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>

Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: Cold start latency reduction

This patch parallelizes FE (front end) and BE (back end)
when playback/capture path is set up. FE's and BE's which can
be parallelized should be indicated in corresponding machine file.
All the operations can be started asynchronously provided the usecase
supports asynchronous operation.
Parallelizing reduces the startup latency as both FE and BE opeations
run in parallel.

Change-Id: I9eeaf500b6d90d4def0adc1bdd6c219e49f676c7
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm8974: Machine driver async ops change

Asoc framework supports parallelization of operations
which reduces the startup latency. Machine driver will
specify which usecases support parallelization. This
change updates the machine driver to enable the parallelization.

Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Change-Id: I5b26bfb6f8b7a3c128b4c853400b10e70ecccb25
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoc: msm: Add check for compressed capture format

- Only AMRWB format is supported in compress capture
  path, use default codec.id(SND_AUDIOCODEC_AMRWB) if
  request codec id is invalid.
- Use fixed band mode and dtx mode since these are the
  only supported parameters for AMRWB format

Change-Id: I45a48952a5833c3e85588b515d38d311064cd7fb
Signed-off-by: Mingming Yin <mingming@codeaurora.org>
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Do not set volume to zero during session open

Setting stream volume to 0 will cause problem when user
starts playback from aplay. The previous volume which is
set gets overwritten with 0 when the playback starts. To
avoid this user space can control the volume setting at
the start of the playback.

Change-Id: I3776bb7ffd390ff0cfb56462bebb60a9163a7796
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: Add check for NULL pointer and buffer overflow

Changes to add check for NULL pointer before they
get dereferenced and check for buffer overflows
to ensure out of bound indexes of arrays are not
accessed.

CRs-fixed: 628847 628850
Change-Id: I3fcebe07a7f9e7ff480857480fa0df2ada017c69
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: msm: EOS timeout now based on audio data

The timeout value, in relation to waiting for the
EOS command completion message from ADSP, is now
based on the time it will take the ADSP to stream
the remaining audio buffers.

Change-Id: I76fa7d97b91052afd8884aab40bc5df040951be5
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>