ALSA: x86: Don't set PCM state to DISCONNECTED
authorTakashi Iwai <tiwai@suse.de>
Tue, 31 Jan 2017 06:30:20 +0000 (07:30 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 3 Feb 2017 15:20:41 +0000 (16:20 +0100)
Theoretically setting the state to SNDRV_PCM_STATE_DISCONNECTED is
correct.  But, unfortunately, PA gets confused by this action, and it
won't re-probe the device after HDMI/DP is re-plugged.  (It reprobes
only when the card itself is recreated.)

As a workaround, set SNDRV_PCM_STATE_SETUP instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/x86/intel_hdmi_audio_if.c

index 9ae242d62eb28bd0b4afd7cac7bceda4fa0f1a13..30b4b25acb24b9b27d5b10daedd408c007fb0974 100644 (file)
@@ -464,7 +464,7 @@ int had_process_hot_unplug(struct snd_intelhad *intelhaddata)
                spin_unlock_irqrestore(&intelhaddata->had_spinlock, flag_irqs);
                pr_debug("%s: unlock -> sending pcm_stop -> lock\n", __func__);
                snd_pcm_stop(intelhaddata->stream_info.had_substream,
-                               SNDRV_PCM_STATE_DISCONNECTED);
+                               SNDRV_PCM_STATE_SETUP);
                spin_lock_irqsave(&intelhaddata->had_spinlock, flag_irqs);
        }