summaryrefslogtreecommitdiffstats
path: root/sound/x86
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-02-15 22:11:13 +0100
committerTakashi Iwai <tiwai@suse.de>2017-02-16 09:22:44 +0100
commitb1ef30e5ed17a417fc78eaff12da28f9a1c2efcc (patch)
treeaf4256a10783e0c7c6658268e6412b9f0d8fe75d /sound/x86
parentALSA: x86: Minor code rearrangement (diff)
downloadlinux-b1ef30e5ed17a417fc78eaff12da28f9a1c2efcc.tar.xz
linux-b1ef30e5ed17a417fc78eaff12da28f9a1c2efcc.zip
ALSA: x86: Don't bail out from PCM ops when disconnected
Currently the driver returns -ENODEV when the monitor is disconnected. But PA alsa module doesn't like this and it starts playing Juliet, kills itself as if it were a fatal tragedy. Since we protect the whole read/write at disconnection, just allow the PCM accesses even during disconnection. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86')
-rw-r--r--sound/x86/intel_hdmi_audio.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index dd3baabd1e82..360cff35b239 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1054,13 +1054,6 @@ static int had_pcm_open(struct snd_pcm_substream *substream)
pm_runtime_get_sync(intelhaddata->dev);
- if (!intelhaddata->connected) {
- dev_dbg(intelhaddata->dev, "%s: HDMI cable plugged-out\n",
- __func__);
- retval = -ENODEV;
- goto error;
- }
-
/* set the runtime hw parameter with local snd_pcm_hardware struct */
runtime->hw = had_pcm_hardware;
@@ -1186,14 +1179,6 @@ static int had_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
case SNDRV_PCM_TRIGGER_RESUME:
- /* Disable local INTRs till register prgmng is done */
- if (!intelhaddata->connected) {
- dev_dbg(intelhaddata->dev,
- "_START: HDMI cable plugged-out\n");
- retval = -ENODEV;
- break;
- }
-
/* Enable Audio */
had_ack_irqs(intelhaddata); /* FIXME: do we need this? */
had_enable_audio(intelhaddata, true);
@@ -1227,13 +1212,6 @@ static int had_pcm_prepare(struct snd_pcm_substream *substream)
intelhaddata = snd_pcm_substream_chip(substream);
runtime = substream->runtime;
- if (!intelhaddata->connected) {
- dev_dbg(intelhaddata->dev, "%s: HDMI cable plugged-out\n",
- __func__);
- retval = -ENODEV;
- goto prep_end;
- }
-
dev_dbg(intelhaddata->dev, "period_size=%d\n",
(int)frames_to_bytes(runtime, runtime->period_size));
dev_dbg(intelhaddata->dev, "periods=%d\n", runtime->periods);