mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
media: rockchip: hdmirx: report audio off event
For hdmirx controllers, audio interface always act as master And will make system wait a long time for audio data, Here report a audio off event to audio stream, Then applications can exit immediately Signed-off-by: Shunhua Lan <lsh@rock-chips.com> Change-Id: Ia8b458d5a45f8c84f17dfd10cf8bdae8d6a6016d
This commit is contained in:
@@ -2877,9 +2877,9 @@ static int hdmirx_audio_startup(struct device *dev, void *data)
|
||||
{
|
||||
struct rk_hdmirx_dev *hdmirx_dev = dev_get_drvdata(dev);
|
||||
|
||||
if (tx_5v_power_present(hdmirx_dev))
|
||||
if (tx_5v_power_present(hdmirx_dev) && hdmirx_dev->audio_present)
|
||||
return 0;
|
||||
dev_err(dev, "%s: device is no connected\n", __func__);
|
||||
dev_err(dev, "%s: device is no connected or audio is off\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -3051,6 +3051,7 @@ static void hdmirx_delayed_work_audio(struct work_struct *work)
|
||||
if (cur_state != 0) {
|
||||
if (!hdmirx_dev->audio_present) {
|
||||
dev_info(hdmirx_dev->dev, "audio on");
|
||||
hdmirx_audio_handle_plugged_change(hdmirx_dev, 1);
|
||||
hdmirx_dev->audio_present = true;
|
||||
}
|
||||
if (cur_state - init_state > 16 && cur_state - pre_state > 0)
|
||||
@@ -3060,6 +3061,7 @@ static void hdmirx_delayed_work_audio(struct work_struct *work)
|
||||
} else {
|
||||
if (hdmirx_dev->audio_present) {
|
||||
dev_info(hdmirx_dev->dev, "audio off");
|
||||
hdmirx_audio_handle_plugged_change(hdmirx_dev, 0);
|
||||
hdmirx_dev->audio_present = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user