Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp470115ybg; Wed, 3 Jun 2020 05:42:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycApdrkxYpoQmBdOKoAs1tBaZS4qpai8pxmA2aYFiJmNNN2jUff58lYDD3sMBYzJJEQrtI X-Received: by 2002:a17:906:653:: with SMTP id t19mr26959252ejb.346.1591188132717; Wed, 03 Jun 2020 05:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591188132; cv=none; d=google.com; s=arc-20160816; b=QMeksX+N5BhndiXp12kIpwaIvTba3cTd9bU9/jTBLSoMenfHd4q+Mfq1elL3oPi0AL FIJST0A7sfASosUkFKav95uUuPHE0pUMUJVteU/Svt5eyvpPQEfPiYgMDNtMEMHJzWer NDBf47uutrcKdIgrTlviEn1mw3V2eh3yRSca2TZmzBlGFP+yrZQlSM7x+ykLWoyo2knG clLd15UJvvVqntkJr+IspCTYPzlUZxtuHiXPXl9+rky4K4o6QiftjV/9pZLNkTv3mkdD SRoWjeYulPyixX8UBMWJ/stmqBck8XvMLR5rWX4z5uP+s8gfKVJ7EcoBZxfreL8a3z3h PLGw== 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 :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=yGhEBSj32ppLHggwGolq9ctveMSRJ1bICjDVz+fhRnY=; b=AZpsgrGkQb/JS/WjKKNnbZ8XJhDqGNBuZaYEJ0oQOQ6J7BY5056tFSbUQg4vA7KDa9 2/EKrnFYy6feyFla3qLBUt0J7wlwTrFRya2P91LNpgaq7wMlFb9KT1A5vAxKhN10McYW iz5M10lvdknkIHOVLqGVkotk9JYdD4SsHlv2urFZGu7762J6CFSrB2J+/fUzopFN2q6x ugBEqh3ite2TCAD6nW+MAKwCn2afSj8RC2Gh/7n43c0Tct0kSyQhL8yU857B/Wq7IrWg pGfz5XAMN5t4OSy/l+Nk7revMNGNs+XF0RiFqMzXjmu3uaUMSNIvrsQGQ/+84xyx3FVb 7hAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hegUAZBR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h2si1034812ejq.305.2020.06.03.05.41.48; Wed, 03 Jun 2020 05:42:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hegUAZBR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726061AbgFCMjd (ORCPT + 99 others); Wed, 3 Jun 2020 08:39:33 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:55287 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725833AbgFCMjc (ORCPT ); Wed, 3 Jun 2020 08:39:32 -0400 X-UUID: 1993c3ddeb4148aa96669f9c1f46b448-20200603 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=yGhEBSj32ppLHggwGolq9ctveMSRJ1bICjDVz+fhRnY=; b=hegUAZBRX2s60lSecAyLBURD/bAzfG67+p2avShJo+0B4ctRdAv243tcJNqGCY4nACX96hujB458lAOTelcceeGRE0seBkA3ed2eTPmVy8khTI38enrjDpJv5jQmLZzn3WfZDEdyWcbZGipcbKOfTqwEq8KCEvl2CoNHafIfEdU=; X-UUID: 1993c3ddeb4148aa96669f9c1f46b448-20200603 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1683903012; Wed, 03 Jun 2020 20:39:26 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 3 Jun 2020 20:39:21 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 3 Jun 2020 20:39:23 +0800 Message-ID: <1591187964.23525.61.camel@mtkswgap22> Subject: Re: [PATCH] sound: usb: pcm: fix incorrect power state when playing sound after PM_AUTO suspend From: Macpaul Lin To: Takashi Iwai CC: , Mediatek WSD Upstream , , , Johan Hovold , Takashi Iwai , Hui Wang , Alexander Tsoy , , Greg Kroah-Hartman , Matthias Brugger , Macpaul Lin , Jaroslav Kysela , Szabolcs =?UTF-8?Q?Sz=C5=91ke?= , , Date: Wed, 3 Jun 2020 20:39:24 +0800 In-Reply-To: References: <1591153515.23525.50.camel@mtkswgap22> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCAyMDIwLTA2LTAzIGF0IDEwOjQ1ICswMjAwLCBUYWthc2hpIEl3YWkgd3JvdGU6DQo+ IE9uIFdlZCwgMDMgSnVuIDIwMjAgMDg6NTQ6NTEgKzAyMDAsDQo+IFRha2FzaGkgS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