From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6B0D48C3E3 for ; Wed, 12 Aug 2026 21:29:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786570175; cv=none; b=T9NeVBcjkYBHA4Ifg8wWrydFDhYZcYVBYj2KUrXxVNw+jg5hT9uSR1TNiVSbHaZBQ2hxqr82A9/VsvbWpXFLvpY6od/Wvguobuu+LoAKNhcN5TwYB7JqSEmTRQEcEg3jQZu+PmVSMEh6Pcbz1/PWW8F06wvLlFT+Hik7toC5qWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786570175; c=relaxed/simple; bh=4T5T0MQ6AkshbH+QGrHPozTGAoEFhJsve10CPrr0Ob8=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=FvfNLfAaRQqyihNJRSAhFpUzP6VEZIc2TL54aKR8ITxy1/Nop63MiErhvzjDSAvaVCoxBTm2Gk+NLLMlrSyDT7YQeAOlf9U4KuaLaTMQ6PrnIHpVjc7dhm4ufzFhJ8iccINlCVUn/F6aVphCLDISBRyLnTLR+30JQAJqqLtdNDw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=F2VZfB8T; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F2VZfB8T" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5aeb24c0807so1079255e87.0 for ; Wed, 12 Aug 2026 14:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786570172; x=1787174972; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:subject:cc:to:from:message-id:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Y/BYKF84+irYO74EPPjBQDmGzxNhpd/vZTionbVxeCc=; b=F2VZfB8TB+ZrRTiB8PPVAR0UsQPFN2L6tEpe40AzEc7f50Iik4DexCoJ0sslCox2Pu PYiM3QP60vpgf7WeJ3gHW2MK2iAAIUI9qQKJrI/G5Nj430ChFzusRhzfYStb4kyf1WvI 8gQlQF7P1mvBK5kzEepmV9iI2zS54K+0YAZ7HT/xxQbF9bcdk3Ky/7RaLMbSDZxhrOJu n7vIY+qpL8ASkz+rIZPqqgU8lOR7aOXlq/6JL9IRBJPkHdh9G0ouVCdG3c091430SS+o OCR4a0zzOtzzuAR9wxZ4wIZQ62aNEf+VoczkIEkGeaT6K/jGbEZs/a/yQriQlFyIl+i1 u8dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786570172; x=1787174972; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:subject:cc:to:from:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Y/BYKF84+irYO74EPPjBQDmGzxNhpd/vZTionbVxeCc=; b=HF6ImO9nEvlq3CJKqd0oaeEq7J0NEm8/AEwChEP4OlveWKImx5L8um8aCgjbwWbpwz jYQqG8RZupMfnK9KTNdHhKmbtrTd28vo2Z9KhTS2rLUacXxxDU7eoGtHeP/VAhxlB/di 5NTmCDFJNksyYWlnE/bt4d94I+IL7+gF0qEuXnMASSGDi15CA5omnQdVOS2h+CYUvjrk poQy7YsYqkjuEzn/AH3BTcyOL8s5NwBxYJHYNQIqpcCz0napvaN+1hFfy1jC/8wIgB3w tn4UycIec2yWRm3csXbbDJH9DzZ+9HdzR/2/NPQn7NqUgfWdISU0tA7Id86f6KqOrjXt B8TA== X-Forwarded-Encrypted: i=1; AHgh+Rp7PL3AhzwRjdw5JlWHz13q8acOMTx3yCO6iSRVCXE80fLIxaYubZpXlC900kEgyPJhsouaIbRVmHVGXa4=@vger.kernel.org X-Gm-Message-State: AOJu0YwN1V2bwz61leytYzGrQ4QkfTpY5Zd3xMoIMHil6dBi0wnbhbz1 D64yh8KLdEOviObvL5KCTGnTTzTmVxmYObwuqZ3iRorhUoPOk3V/+4wt X-Gm-Gg: AR+sD12kYXk47y0hXCqP/87kDpetfCpb6aGgQ5RsTlUyS4S8uxEqsaR8duXk4d4c+Y7 idchhez7PRK2V9caT8isS0fLeDYdR6MXkVG3qptPv3c1gybBEiuFaSN3sSD2vKGH8i6HBWW0nsx Rq7DJOK9WNl5ViudMHuYGyjJdv2UCVdhXczHcac+r377G0dI0LwK+cQi1eMUrGJyiWvvfGzXn7o TqOExGqyihs89bisONMWZYDblaA66LjNeOUkIM4MVzArEwg5XbH1Rm2+8j7oTuyWAbhmI7/xcN5 gJtqpW6H2XVileG253QY69N7APUXXOySbr4yzgDQ54BnATZOOSStyRLL8fjtm0GVHuGvhXksgJS 7nWiako23oDdr9G/VtPHtKwgxmWpI/uGv1qq1pGQq+DLF43s7Aa9DrxSwys0OrQpgiG2MOVgPT0 861vpcGCNRXY9m2k4JVYAPGyAtcHv5GdJystjK1Lj/iCJDqkrIuTFE1ZViB74TlpEQIMFsQxZ48 h451KUKwOdz1L27SKJednQ= X-Received: by 2002:ac2:5b05:0:b0:5b1:5f8f:bc1e with SMTP id 2adb3069b0e04-5b453f4493dmr64421e87.3.1786570171382; Wed, 12 Aug 2026 14:29:31 -0700 (PDT) Received: from localhost (host-80-73-162-2.rev.as20985.net. [80.73.162.2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b4539ea6fcsm70229e87.32.2026.08.12.14.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 14:29:31 -0700 (PDT) Date: Thu, 13 Aug 2026 00:29:27 +0300 Message-ID: <0df69e3405cbb059f5e1d7326eeddf4f@gmail.com> From: Andrey Golovko To: "Holalu Yogendra, Niranjan" , Pierre-Louis Bossart Cc: Shenghao Ding , Kevin Lu , Baojun Xu , Sen Wang , Mark Brown , Liam Girdwood , Vinod Koul , Bard Liao , Vijendar Mukunda , Mario Limonciello , Antoine Monnet , Robin Everaars , Ville Saarinen , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: ASoC: tas2783-sdw: port prepare never completes after S0i3, no audio and no error (AMD ACP7.0, ASUS ProArt PX13) In-Reply-To: <20260812192500.7714-1-andrey.golovko@gmail.com> References: <20260812192500.7714-1-andrey.golovko@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Answering my own question from a few hours ago, since I said I would report back on option (a) and the answer turned out to be more definite than I expected: (a) cannot work, and (b) is enough on its own. A patch is posted here: https://lore.kernel.org/all/20260813001500.9218-1-andrey.golovko@gmail.com/ (a) does not work, and not by a small margin ============================================ I built a kernel with SNDRV_PCM_INFO_RESUME dropped from the SoundWire DMA PCMs and nothing else changed. Still silent after resume. The register state says why: DPn_PrepareStatus 0x1 / 0x2 still not prepared ChannelEn now in bank 1 so the stream really was re-prepared PDE23 req=0x3 act=0x3 So dropping the flag did make userspace stop trying to resume the stream in place: the port was prepared afresh, the bank flipped, PrepareCtrl was written. It just did not help, because after resume userspace calls snd_pcm_prepare(), which reaches .prepare and sdw_prepare_stream() and never hw_params() again -- ALSA only requires hw_params() after hw_free(). The Function power-up lives in tas_sdw_hw_params(), so it is skipped on every recovery path, flag or no flag. That is worth stating plainly because it kills a whole family of fixes: no PCM capability flag and no change of userspace behaviour can put the power-up back, as long as it sits on a callback that recovery does not re-run. (b) is enough ============= The patch powers PDE23 up in tas_port_prep(), in the PRE_PREP case, immediately before the PrepareCtrl write that function already does. The dependency is thereby satisfied on every path that prepares a port, which is what the hardware actually requires. No ACP change is involved: the tested kernel does not carry the INFO_RESUME patch. Same machine, s2idle for 8 min 51 s with 526 s of S0i3 residency, px13-audio-restore workaround service disabled: PDE23 req=0x0 act=0x0 DPn_PrepareStatus 0x0 / 0x0 audio after resume, with no user intervention at all Two remarks =========== Niranjan, Shenghao -- the hw_free() path still writes PS3, and with this patch the power-up now happens in port prepare while the power-down stays in hw_free(). That asymmetry works, but if you would rather have the power-down move to the POST_DEPREP case for symmetry, say so and I will respin. I left it alone because hw_free() is also the point where the stream is removed from the slave, and I did not want to change the power-down timing while fixing the power-up. Pierre-Louis, my question about simple_ch_prep_sm from the previous mail stands, and this result sharpens it: the failure was silent for months only because the core skips the NOT_PREPARED poll for this codec. Had it polled, sdw_prep_deprep_slave_port() would have printed "Chn prep failed for port 1" on the first resume. Whatever happens to this patch, TI may want to reconsider that property. Thanks, Andrey