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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 5C85816256E1 for ; Mon, 30 Jul 2018 16:12:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D03E20890 for ; Mon, 30 Jul 2018 16:12:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D03E20890 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728713AbeG3RsV (ORCPT ); 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