Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4136466imm; Mon, 30 Jul 2018 09:14:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcyJZNKILb2LzutaTbaFCeUUEYHoR3KTZt5COAbwz2zNeHRpbnu1Hh/7+jYOzaeiyr/B6bf X-Received: by 2002:a63:b91c:: with SMTP id z28-v6mr17026629pge.22.1532967260127; Mon, 30 Jul 2018 09:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532967260; cv=none; d=google.com; s=arc-20160816; b=dlAcVjvEOk8HWa+QmgVjOSI7fP1s4+6lxZR3rucCo9r5JGTFI5mEI/ub4q8Gf719da dMRbVKC37/E7AHrDuEeZY9B4w7dKV+Kz7Vzxp3qrSeDYBUkEoIvjeHFq7VV62uiEN+cs 2lO9wI7h5n31mBsestRG4KBGwGbBtUO2wXUzDflR+sQViZZpro1a0imGT9T3G6paNJXS WJcJxY0VhapovpK33QOx/jA+mFnyN4+/c5m+6ocsd2Kf8e/ThhjKVEdMoL0JeDvDrmYX N5hyHEUfmFu+J1c0jCQS/d2SS/XPet7s9JMo+MuX/euzg/sauh1H3o+JidXWUxICeIp0 77+w== 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=jYyv+t9km/EnJsX/FZvtk73f9UBh6QFc1fPMSPap4Is=; b=LBB6AGZdTrNt8Y9I10dCF5RBJFG5eLVvxKa6vKEP1srIL2+ksZv+Bus8Kg+Bh2RY+9 OxWp1MSdDve4WqhysUFi2CkBDKcxKvAdHuQPheCMWeKg5C8UHGIiOSbN8e5+EdzzJHdC B8JoHoTD8V/wrd13uO9raDsARdN+0uhvmAZQ4kSTeGePX3y4bED0rFo94ILGq5uJmq/D OJGXvtXzgiYLpZ6CDzXHF1TsNWPh9Rfxybz2e/HHEXoN8FeyB2qChKvgcySshodGHNpn Ny4LoeIXYmSKEVSnduOskOgcQqk9w7UGU/R3zx61ZUe/m6AViB5RpKxKO6wScnr3tzGe vbcQ== 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 u3-v6si11544901pgq.354.2018.07.30.09.14.06; Mon, 30 Jul 2018 09:14:20 -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 S1728250AbeG3RsV (ORCPT + 99 others); Mon, 30 Jul 2018 13:48:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:54736 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726668AbeG3RsV (ORCPT ); Mon, 30 Jul 2018 13:48:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C7B50AE8E; Mon, 30 Jul 2018 16:12:39 +0000 (UTC) Date: Mon, 30 Jul 2018 18:12:39 +0200 Message-ID: From: Takashi Iwai To: Jorge 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: <95e003a2-0cc2-6ce1-b330-0a4fa3643386@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> <95e003a2-0cc2-6ce1-b330-0a4fa3643386@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 18:09:38 +0200, Jorge wrote: > > > > On 30/07/18 14:13, Takashi Iwai wrote: > > 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. > > Right! Shouldn't it then be enough to just go to D0 on .prepare? I,e. > Move the state transition from .hw_params to .prepare. Does the power domain transition needed for setting the format, EP, etc done in set_format()? If yes, we need D0 in hw_parmas as well. thanks, Takashi