Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 619ffe59 authored by Banajit Goswami's avatar Banajit Goswami
Browse files

ASoC: msm-hdmi-codec-rx: update return value for error case



Once HDMI cable is inserted, the sequence in which the
cable status is updated inside HDMI core driver is-
  1. Bootup HDMI core h/w and update status to 1
  2. Update cable status to 1
When user space tries to start a new audio session,
HDMI codec driver will query into HDMI core driver
to know the cable insert status. HDMI core driver can
return 3 different cable insert status as below based
on HDMI core and cable status-
 ---------------------------------------------------------
 | Cable insert status | HDMI Core status | Cable status |
 | from HDMI core drv  |                  |              |
 ---------------------------------------------------------
 |  Error              | 0 (HDMI core OFF)| 0            |
 ---------------------------------------------------------
 |  0                  | 1 (HDMI core ON) | 0 (No cable) |
 ---------------------------------------------------------
 |  1                  | 1 (HDMI core ON) | 1 (cable     |
 |                     |                  |   Present)   |
 ---------------------------------------------------------

As per the current design, HDMI codec driver returns EAGAIN
to ALSA layer, when cable insert status is returned as "0"
from HDMI core driver. This causes ALSA layer to put the
task in sleep, and hence causes the UI application to wait.
This UI wait can feel like system hang and might result in
user rebooting the system.
This change updates the HDMI codec driver to return ENODEV
(instead of EAGAIN) to ALSA layer, when HDMI core driver
returns cable insert status as "0", to avoid any such system
hang issue.

CRs-Fixed: 752999
Change-Id: Ie19990deb2b4edd8619defc5ce9ec42a99afa009
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
parent 512860c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment