Replacing radio fm drivers with codeaurora base drivers

This is to cherry-pick in a better way the patch from CAF
radio-tavarua: Set FM status before calling FM Shutdown.

FM status is checked in FM shutdown function, based on which Bahama
SYS RESET GPIO is put in Low power mode

Signed-off-by: Rahul Kashyap <rkashyap@codeaurora.org>
radio-tavarua: FM jumps to alternate freq. with AF jump option disabled

When the transmit power of the currently tuned station decreases,
FM Receiver automatically switches to available alternate frequencies,
even though the auto AF jump feature is not enabled

CRs-Fixed: 293773
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Adding private control to configure the RMSSI threshold

This change is to add V4L2 private controls for configuring the
value of RMSSI threshold.

CRs-Fixed: 293328
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Changes for supporting the new FM Search Algorithm.

Added host side changes for supporting the new Bahama FM Searcher
Algorithm. This involves configuring the channel spacing as 100KHz
and enabling the 200KHz enforcer for regions that are 200KHz spaced.

Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Adding V4L2 private control to enable HLSI

This change is to add a new private control to enable the
high-low injection.

Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Added changes to return the RMSSI Delta value

This change involves returning the currently set RMSSI Delta value.

CRs-Fixed: 304534
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio: tavarua: Added place holder for notch filter ioctl

This patch adds place holder for notch filter, to keep
the driver compatible with the framework changes made for IRIS

CRs-fixed: 306856
Signed-off-by: Srinivasa Rao Uppala <uppalas@codeaurora.org>
radio-tavarua: Modified the device count handling mechanism

Replaced the existing mutex lock with atomic increment/decrement
operations for manipulating the device count.

Change-Id: Ic08b3861f06620acbc68b6ca0aea7c622e7027b3
CRs-Fixed: 296214
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Configuring the FM Audio path

This changes ensures that if 'Ananlog' path is enabled
then 'Digital' path is disabled and vice-versa.

Change-Id: I3492471ab69923d29c9912bb1a84784638b38ee1
CRs-Fixed: 304621
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Add private IOCTLs to poke threshold values.

Add V4L2 private IOCTL commands to poke On-channel and
Off-channel detection threshold values.

Change-Id: I299a2ba7c5f25bcb36688ae0f7de7aff255b7d03
CRs-Fixed: 320147
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Perform suspend and resume only when device count is '0'

CRs-Fixed: 321609
Change-Id: Ia377d22d96be7e46c04e80d4b5ba07760ca82d4d
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Add host side support for the new FM Search Algorithm

Change-Id: Iba497b84e525d08fa588bb7f58ff6a238452c47c
CRs-Fixed: 314648
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Add place holders for IRIS specific commands

Change-Id: I4bcf4316b23ce0f9c02815c0bc0d495ee49df51f
CRs-Fixed: 324758
Signed-off-by: Srinivasa Rao Uppala <uppalas@codeaurora.org>
radio-tavarua: Set the lower and upper band limits for all regions

Configure the lower and upper band limits for all regions.

Change-Id: Ie9ceced02be0d3f5b335fb7eb6594d5783823f91
CRs-Fixed: 326007, 325078
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio-tavarua: Modify FM Turn Off Sequence.

Flush the event and work queues prior to queuing READY event.

Change-Id: I95584006d252b2284bf15562edbca50fa5593384
CRs-Fixed: 327151, 326855
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
radio-tavarua: Increase the RT buffer to fit the RT header

Current RDS RT Buffer is not sufficient to accommodate the
RT header and data. Increase the RDS Radio text buffer size to
accomidate the RT header and data.

Change-Id: I742dad912bbe6e360ffeda09f80117d47822fdc5
CRs-Fixed: 328036
Signed-off-by: Srinivasa Rao Uppala <uppalas@codeaurora.org>
radio-tavarua: Add commands to configure the FM Search parameters.

Provide commands to get/set the On channel and Off channel detection
threshold search parameters to optimize the FM search performance.

Change-Id: Id232ffe2d1231fbd44bb34b4b98263434763b7c0
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
radio: radio-tavarua: Re-org code for workqueue

When fm task is killed from task manager rpc failure is seen.
<3>[   72.817162] pmapp_rpc_req_reply: rpc failed! len = -512
<3>[   72.817173] fm_radio_shutdown: voting off failed with :(-512)
RPC failure is because data to be sent from apps, was on behalf of the
current process, but as the process is killed the current->pid given to
rpc is a non-existing pid.
To resolve the issue a valid pid is needed, which can be done by
queueing a work in existing workqueue and wait for completion.

Change-Id: I8181d0a398d79b493b92c899f068f008a8ff2d0f
Signed-off-by: Taniya Das <tdas@codeaurora.org>
radio-tavarua: Send disable event

Send disable event when FM turn off is completed
so that file descriptor can be released safely

CRs-Fixed: 339470
Change-Id: Ib66f4cd79a470498404a07759d730504f6615e33
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>