Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13477803ybl; Sun, 29 Dec 2019 12:51:56 -0800 (PST) X-Google-Smtp-Source: APXvYqx/Ia7BN5sHkp9lMvRMss+L4wumWGSYRS3A4X/v3C/oOZYu1AbSzctx3V5G6SLeHLOhqgPm X-Received: by 2002:a05:6830:1199:: with SMTP id u25mr66361756otq.344.1577652716812; Sun, 29 Dec 2019 12:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652716; cv=none; d=google.com; s=arc-20160816; b=C7qkv1dEss21q6pH9MSLP6fY9IaHlXhvRgFDmikPFwIdmf4B1YMZwVmhrNX2PYuGjE xeg3ZaDUH4HJ578C0F1MmdF/DsC9R5w6T2SJEAi//9lzeY1juFPDaappRYYL2nr7VelG yQuYcWy5aehXQNAYCMoB1YuI/9LAK3RJtns7b1PW0XzaH4N8m7bea5D9MqT3VoOnyElU Q5LC5os0ZlpG/Kl6zSB3OSRweEtqyiq9g+SYjVVcUHJ6md30QSaxCv99TRElwVXgnG9s zzFWINOcYO2nrR9iOIz98thNcsBOR8J55H/mc7s8aq5Iu8+7IyP2dNX+KUQay12DgmqO Rdcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dEKlwQkrS5bagvaAzLjEhCSMj5Rm0t5lAh25+nu5qr8=; b=Y/vrUjzoL9zjtT1shCB4CI26M0VcTGWsdkTGtlr81ieWo1pA0OXLtz3meeMUg8Y4YA 2TXsbpbvWBT+jQt8cMxFdNDWvq/hcCKy8SQnACiCahsdOQZulwliV7krZ0FbG9omXN5C EDBCpCAIwxMy70CBfm1hxwG+rL8aeRXDBsdOm+nn8WUIxUJb4EoebqwdZC4fnpIYRj1y mhXrwJ9kxsSF8VJBcyzr/F2tqpf6RuUD9oMTm8DfVb6qFrHzClzkNqH2bu3g6vjHwe49 7SGaiXUP0JFRjk9PYfpscdarIrm4eT2UAk2okEBF3fF6Lhvc7IU32F/p83iqoxmvZZF/ 8HwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NCGwFR06; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si20010032oic.72.2019.12.29.12.51.46; Sun, 29 Dec 2019 12:51:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NCGwFR06; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732322AbfL2SLf (ORCPT + 99 others); Sun, 29 Dec 2019 13:11:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:49784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730389AbfL2Rm6 (ORCPT ); Sun, 29 Dec 2019 12:42:58 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 EF7F0206A4; Sun, 29 Dec 2019 17:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641377; bh=6B2gptAjSK2wVW8cOj99jBzyAYI7PCi1oglU0UXSJnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NCGwFR06v9Wf0Mii/mLS53VFWaBwbTafFnnCpWsv3BMa8uB1SAVFDbKhVCm9nPL2a RXmAS5YNx2DOjbkOcs1M18tY9cRY/6EN7D/Ywjc7zY0KIvQ05dcZbd3bV0vIAAEa0Z FEayvucXGenE7ijjhPe6s0jiPX0r1/bdQrUQkMtg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.4 040/434] ALSA: hda/ca0132 - Keep power on during processing DSP response Date: Sun, 29 Dec 2019 18:21:33 +0100 Message-Id: <20191229172704.698827055@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@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: Takashi Iwai commit 377bc0cfabce0244632dada19060839ced4e6949 upstream. We need to keep power on while processing the DSP response via unsol event. Each snd_hda_codec_read() call does the power management, so it should work normally, but still it's safer to keep the power up for the whole function. Fixes: a73d511c4867 ("ALSA: hda/ca0132: Add unsol handler for DSP and jack detection") Cc: Link: https://lore.kernel.org/r/20191213085111.22855-2-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_ca0132.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -7588,12 +7588,14 @@ static void ca0132_process_dsp_response( struct ca0132_spec *spec = codec->spec; codec_dbg(codec, "ca0132_process_dsp_response\n"); + snd_hda_power_up_pm(codec); if (spec->wait_scp) { if (dspio_get_response_data(codec) >= 0) spec->wait_scp = 0; } dspio_clear_response_queue(codec); + snd_hda_power_down_pm(codec); } static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb)