Upload empty commit
msm_fb: HDMI: Fix for HW reset issue on HDCP Reauth

On HDCP reauthentication, the HDCP link status register does not
get cleared unless the HDMI app clock is deasserted and asserted.
Stale values in the link status registers can potentially lead to
the HDCP HW block getting locked up resulting in a device reset.

Change-Id: I4952c64d4087e4303cbc75dbb61f66510b0a0798
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: hdmi: Give proper buffer size

Need to give proper buffer size for snprintf function calls.

CRs-Fixed: 378343
Change-Id: Ia4df74c9871b26255572bb3ba226317c3076b5b6
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: hdmi: Fix parsing of audio capabilities

Fix bugs in the parsing of the Audio Data Blocks and the
Speaker Allocation Data Blocks in the EDID data.

Change-Id: I666cf82d149c8ebb02d3bca3a053e494890870c0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm_fb: hdmi: Add support for HDMI Audio caps

Add sysfs nodes to export the data contained in the
audio data block and the speaker allocation data block
from the EDID of a connected HDMI sink.

Change-Id: Ie558e930cc5790965d46eb2c30156a23643fa1f7
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm_fb: HDMI: Add module parameter to disable HDCP

This change adds a module parameter that can be used
to disable HDCP at runtime by specifying hdmi_msm.hdcp=0
on the fastboot command line.

Change-Id: Ifad5da9fcb86fb4ed663a5ef2bb14fe4dafd241e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: HDMI: Driver changes to support HDCP module parameter

This change removes the need to use HDCP feature flags in the
HDMI driver and adds the necessary support to configure HDCP
feature based on a module parameter.

Change-Id: Ie0eacc5b447230927cfdedfcb979c22d60e81981
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: HDMI: Remove HDCP Kernelconfig

Remove the kernel config parameter for HDCP since enabling or
disabling HDCP will now be controlled using a corresponding
module parameter.

Change-Id: Iae23b8fa66ca75d99423547e77f850f3c86615ee
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: hdmi: Proper update of ACR CTRL Register

While changing the audio sampling rate, the older data in
the control register needs to cleaned before writing in
new data to avoid mixed or wrong data writing.

CRs-Fixed: 405772
Change-Id: I95d0807ea8cf544e4a0c8caed00de6cd60352efa
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: hdmi: black out pipes on unset

For HDMI as primary case, we need to blackout the pipes
when they are unset so that any residue is not visible
on the DTV during suspend.

Change-Id: I2bf36f1002dd185c26fe6c4291977737daa73ae1
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: HDMI: Cleanup HPD software debouncing logic

Implement Hot Plug Detect (HPD) software debouncing by
disabling the HPD interrupt until we finish processing
a previous HPD interrupt.

CRs-Fixed: 412575
Change-Id: Ia2c83f3446d09fe5bf6c6a1c4e6a9eb54ff465d6
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: dtv: Serve device off in a separate thread

DTV device should not be powered down until the audio engine has
shutdown. This change moves dtv audio off sequence to a separate
thread so that framebuffer close system call does not get blocked.

CRs-Fixed: 412575
Change-Id: I246a9e58f1367e653913773696510f375abf3d3a
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: HDMI: Cleanup HDMI audio off sequence

HDMI core should not be powered down until the audio engine has
shutdown transmitting packets to the HDMI core. This change
increases the time for which the driver waits for the audio
engine to turn off.

CRs-Fixed: 412575
Change-Id: Ie11ab6c8140f7289f74da4877c9acf9b8cd4a838
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: HDMI: Add support for HDMI audio switch device node

Add support for audio switch node in the HDMI driver that would
be used to notify audio userspace components of the availability
of an HDMI device.

CRs-Fixed: 412575
Change-Id: Idc41caf234810db52af9fcc89d2ed4ecbcaafc3b
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: HDMI: Cleanup of HDMI switch device notifications

HDMI switch device is used to notify userspace components of the
availabilty of a connected HDMI sink. These notification should
only be sent whenever HDMI cable is connected or disconnected.
This patch removes all the redundant notifications.

CRs-Fixed: 412575
Change-Id: Ia5e60690a87569fce5d61a9af75d446648443e9b
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: HDMI: Turn on HDMI core only for supported resolution

Upon receiving the notification of an HDMI cable connection,
turn on HDMI core only if the default video resolution is
supported by the sink. Otherwise, HDMI core would be turned
on at a later time when it is configured with a supported
resolution by the userspace.

CRs-Fixed: 412575
Change-Id: I67cfb09bafa39646839877a66cd94f193c127a76
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
ASoC: msm: qdsp6: Fixed the issue unmap command is sent incorrectly

When session CLOSE command is sent right before session RUN command
is acknowledged, callback function can mistakenly think that
the next received acknowledgement is for CLOSE command instead of
RUN command. This triggers driver to send memory unmap command to
the Q6 while it is still processing the CLOSE command. Eventually,
this leads to an invalid memory access and causes Q6 crash.

Change-Id: Ib5d560fbcb7e8ced79cc1075a9f6bea3b55a86b6
CRs-Fixed: 377281
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
msm: Asoc: LPA: Fix pause and next clip play issue

- When paused and press next button to play next song,
sometimes CMD_EOS fails to get Ack from LPASS and
is wait timeout for 5sec causing delay for next
playback start.
- In the failure case, even before trigger start
of driver is done,LPA driver receives pcm_close.
In this case, though EOS is issued, it is not
getting honored from LPASS.
- If trigger start not happen in LPA driver,
avoid CMD_EOS to LPASS as it will not be handled.

CRs-Fixed: 368519, 366926
Change-Id: Ib5ff21925bb44849b27ed4709b72efcccf412b5d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
ASoC: msm: qdsp6: Fixed the volume command timeout issue

QDSP6 can send out of sequence response and this breaks
the no wait command tracking logic. It results the wait
command response gets ignored and causes the wait time out.
To resolve the issue, each response needs to be checked
to determine if the response is for no wait or wait command.

CRs-Fixed: 402768
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
Change-Id: I772f9e6d1d58186d67a3543dfc3b0d545dd8a73d
ASoC: msm: Fix for a seekbar issue during audio playback.

Issue is that when seek happens several times during audio playback,
and at some point last buffer write done event from DSP is received,
an ioctl drain is issued, which will set pending_buffer flag to 0,
In the mean time before drain finishes a seek comes, which issues
a flush on all the buffers and try to resume the playback again.
Now because the pending_buffer flag is set to 0, CMD_RUN will return
without any further writes to DSP. As a result no audio buffers are
reaching the DSP and hence no audio is getting played.
Make a fix is to set pending_buffer flag to 1 whenever playback is resumed
after seek.

Change-Id: I89812332f14e0682be28445ad1f15564f129ae11
Signed-off-by: Mingming Yin <mingming@codeaurora.org>