Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3944268imm; Mon, 30 Jul 2018 06:14:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc8ahhZh8i4RWyYk1no21tK2+gG+sqo6OqgiKRvl30d/XcJtWWYYyVubUaaJtw4zydzF4ce X-Received: by 2002:a62:4f5b:: with SMTP id d88-v6mr17889100pfb.225.1532956450980; Mon, 30 Jul 2018 06:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532956450; cv=none; d=google.com; s=arc-20160816; b=A1KZS32gJph9LmiCJ6wleKLGW529sHFHNtgppxgjBTYy+SayAmc5qU5u1WiedDAsDW U+2k/mLDtup9GATeGaJ38NDAbXgfqf8QCViq7s3o3FEDCAmKiKjEuVy5H332z2q4ynrj AdXWxHEHUaX1w98RRT6kJJJ18qRVC1hiNc2BjO43RrCXodmTAktj6k622u4+DmA7avHO dtYTCE00CIZISJc7gW0ekEh1gIadIx56ttJSHnbeU/aFjHmwNMluIxjqnXI3UhcJUsSE onNtYQtTSbH4AZCBPWr30xm2nJCnPO0V0qBW3obd8eOxOEmJCUFMcGJ6781Wx8AC9D+4 rBlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=2G9FlZ4g9vBoU07grKrZsPsOmlJMeGss9bWgroXRO4o=; b=rG65lwGHNt2FRGcq67MB2iD29YmV/O4LBBLQEB2Xf1ZKELUMC/O5UWyY5sqy3rimBk mshMYOVVG3H9cx/9r+pyOk1yXvdg4hFjE1s5N03zjq2v6Z0QmpZHdWxPwv5bC2TMmK8r b33WlVtlQXGG3bMyb6LQ8/nWkPVGGUw0AliV/oookB7i/DA9U8ioVKxYPqAOXalEDh3h nTVfp9kUYCUM/qDb1tgcuv3W0OXlDPDFVleY+L8zsClwK5T3fOwPuZtSX3loammHY2M+ kLFKXPZ7U3bl1BqncEa9NEjpC+v7gA+wT6xKCMxzULhTbUHQYe1x6+PgxJ4aYJpeKc5Q rA8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 d1-v6si9646137pgo.337.2018.07.30.06.13.55; Mon, 30 Jul 2018 06:14:10 -0700 (PDT) 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; 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 S1729283AbeG3OsE (ORCPT + 99 others); Mon, 30 Jul 2018 10:48:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:53582 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726710AbeG3OsE (ORCPT ); Mon, 30 Jul 2018 10:48:04 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6781AAD9F; Mon, 30 Jul 2018 13:13:06 +0000 (UTC) Date: Mon, 30 Jul 2018 15:13:06 +0200 Message-ID: From: Takashi Iwai To: Jorge Sanjuan Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/4] ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks In-Reply-To: <20180730092336.18741-5-jorge.sanjuan@codethink.co.uk> References: <20180719112215.4219-1-jorge.sanjuan@codethink.co.uk> <20180730092336.18741-1-jorge.sanjuan@codethink.co.uk> <20180730092336.18741-5-jorge.sanjuan@codethink.co.uk> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/26 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 Jul 2018 11:23:36 +0200, Jorge Sanjuan wrote: > > Make use of UAC3 Power Domains associated to an Audio Streaming > path within the PCM's logic. This means, when there is no audio > being transferred (pcm is closed), the host will set the Power Domain > associated to that substream to state D1. When audio is being transferred > (from hw_params onwards), the Power Domain will be set to D0 state. > > This is the way the host lets the device know which Terminal > is going to be actively used and it is for the device to > manage its own internal resources on that UAC3 Power Domain. > > Note the resume method now sets the Power Domain to D1 state as > resuming the device doesn't mean audio streaming will occur. I guess we need the power state transition to D0 also in prepare callback. The recovery from suspend doesn't need hw_params call but just prepare -> trigger. One could think of implementing into the trigger, but since the transition needs some delay, prepare callback would be a better choice, as it seems. thanks, Takashi