alsa: fix infinite loop with Intel HDMI LPE
The Intel HDMI LPE driver works in a peculiar way when the HDMI cable is
not plugged in: any written audio is immediately discarded and underrun
is reported. That resulted in an infinite loop, because PulseAudio tried
to keep the buffer filled, which was futile since the written audio was
immediately consumed/discarded.
This patch adds special handling for the LPE driver: if the active port
of the sink is unavailable, the sink suspends itself. A new suspend
cause is added: PA_SUSPEND_UNAVAILABLE.
Change-Id: I440b50d4a3804d1a6f6e7cd9d036a1a4230c02eb
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=100488
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>