From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9279C433E2 for ; Tue, 8 Sep 2020 18:31:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E6432080A for ; Tue, 8 Sep 2020 18:31:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599589889; bh=XibpxUXKtdPgpIppnroMGGynUeiWiMx4IxYa45nNryw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=I+FAEPYfuAWuPX/CltV8uK44F6eUVTs/geL0bNP2SNyBtMO8M8IW4RBIZYrG7kVTg an7eOnxP2G4MPvP7kCr3aQWGBM5Mm/SGpRM0CvjF/tk58YamZY9Kj5AMs2MCxVfmYW 6F45qF/iKpNFVlkxVoR/jlndKRG0RTXjVO57scrM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731814AbgIHSbR (ORCPT ); Tue, 8 Sep 2020 14:31:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:56082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731378AbgIHQJf (ORCPT ); Tue, 8 Sep 2020 12:09:35 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62AD12463D; Tue, 8 Sep 2020 15:49:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580196; bh=XibpxUXKtdPgpIppnroMGGynUeiWiMx4IxYa45nNryw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b+z7Q58IonQ6xHE53YfKCJkYwabWMcRp5MfOgKNt84G6mkeutT4thOZ4Nk9OIVux4 uQuRw8E7rmMiHquoFUQl8jSiKdnBmzID/KIIHZJpo3ErQ8AD8DqyTaxHq3D2NIb8wt pPr50EIyuKvUnsQ1eeXF3kv81nay/KZ7D/oRF6AQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai Vehmanen , Takashi Iwai Subject: [PATCH 4.19 68/88] ALSA: hda/hdmi: always check pin power status in i915 pin fixup Date: Tue, 8 Sep 2020 17:26:09 +0200 Message-Id: <20200908152224.556583149@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152221.082184905@linuxfoundation.org> References: <20200908152221.082184905@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kai Vehmanen commit 858e0ad9301d1270c02b5aca97537d2d6ee9dd68 upstream. When system is suspended with active audio playback to HDMI/DP, two alternative sequences can happen at resume: a) monitor is detected first and ALSA prepare follows normal stream setup sequence, or b) ALSA prepare is called first, but monitor is not yet detected, so PCM is restarted without a pin, In case of (b), on i915 systems, haswell_verify_D0() is not called at resume and the pin power state may be incorrect. Result is lack of audio after resume with no error reported back to user-space. Fix the problem by always verifying converter and pin state in the i915_pin_cvt_fixup(). BugLink: https://github.com/thesofproject/linux/issues/2388 Signed-off-by: Kai Vehmanen Cc: Link: https://lore.kernel.org/r/20200826170306.701566-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2574,6 +2574,7 @@ static void i915_pin_cvt_fixup(struct hd hda_nid_t cvt_nid) { if (per_pin) { + haswell_verify_D0(codec, per_pin->cvt_nid, per_pin->pin_nid); snd_hda_set_dev_select(codec, per_pin->pin_nid, per_pin->dev_id); intel_verify_pin_cvt_connect(codec, per_pin);