From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f176.google.com (mail-dy1-f176.google.com [74.125.82.176]) (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 A871C284883 for ; Sat, 11 Apr 2026 04:54:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775883281; cv=none; b=V9xr31+Ht7YoLfoXpOzT91EKUxnBdPyinGznR65x+Ec6qdMTURnz2BfmSSoE96bK6EYbn18LyO+5jYKUNkh2zIcKYAn5XHDwExZpqQse8YT0BkqAJ6fJ56eDEtzB4NnH/j98iZE1KfOVl9+HSAFrbSdL3U2FIwCjMaTNXs1hvwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775883281; c=relaxed/simple; bh=/6x6AUmNK18hoaugSCgmrIJZxi+Q7GR/56X47uyaEOg=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=KhgDNT1NloP81BjgqDMVAshwoexGQhRXMugXuYxtf8cXQAQJ+JHPsSq+EWj05k7DQo4KrT82qH8tWs7Q8bXj5B0wmuY3Zq3K8Ej8gNhnPVPALKbGdgJ2syulZ69tFI12hnXDJ6dYtWeeREQxq96hWqQ7aB277Nyg3DqlcymUeW4= 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=rU05r43r; arc=none smtp.client-ip=74.125.82.176 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="rU05r43r" Received: by mail-dy1-f176.google.com with SMTP id 5a478bee46e88-2c156c4a9efso3949462eec.1 for ; Fri, 10 Apr 2026 21:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775883278; x=1776488078; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=OOxHvQlp7lc2XE8a+0cTOjTpwROQLigGh80AWYw1kdc=; b=rU05r43rygHV4ml+KMt3+GWeKDa7pNHT/InXBzdF+S2VXVEraRysIZZOyfufAwAmfH bG0Invd25Qg+GElAaJHE1i959i0DOz2O8IRIqO8ObwkDU8ESzdDs9mleQjZ8aF1rY5h4 oipc1PhZNVz0KPAKPWErdWTORVMjEga4nusAt5QRMn1wEvmethCbl9S3PtuApXjFjZEA 0ZVDz3aHGHHog3gVd6POmou6fjqNzwz6B+/A2WgusMGfS5qTgsHCvcnjc0TIwKQfY2Ua UoCRLRTxcabUIzWgMAvCzubDGz/exIvv8RS2VzmhyWtoGPWeXKo9d8wVTk63eetTEu4F Yi0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775883278; x=1776488078; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OOxHvQlp7lc2XE8a+0cTOjTpwROQLigGh80AWYw1kdc=; b=mVW9uh4NAZS5S9Rn5obFsao1myh1ABvW9t4XRYxVyHxTN8/xTApwJMWZCGcvLzLWON 8wXJz/EO4phWOck6PbZ+0gsR/1svByRSO6YSmpaDHBRoNnIanLwXS7yJzbMnjyqbvr2O Y09c9T/z6vhgTmMmdWb04wsrm2HzZWhbd4Wf7Sm1073ylV7w8LyrShbT73u2rAkeXlew L8y7j2yf8wTfQ5mDwFi/gYwXMbRN35b0Ro5WpmwBH8h7ijjTmbHzAL+WhLVziIDS5q2s KME766s7WtKPBjgwvm7Awl563V2Faul8QafSkdBJ/iHmpvTHPIB4m9gOICYGZrOzYV+Q 7Nug== X-Forwarded-Encrypted: i=1; AJvYcCWiaSXIMiS6X8PnqOLeXa3Mwj+ee36tcJ2Op7DRzyyx3HrdTjcesFRqPCyqZ3bzrBymfcCMmVeaYHWm2HM=@vger.kernel.org X-Gm-Message-State: AOJu0Yx9TY0jHVdNtSUWhYW7XQLYmZq3/EJo7MRzqWwGMjrPO2NK3Mnq RJfoXS5TzB8P/GT66dgb0YaqfZqQZ9k6mfsvpzXsJ98thCI4cdGDMe+W X-Gm-Gg: AeBDiev9eA68a37mawRW7kiHxLcDXljUeAzGf0lA6J3tr5v2l40yMG3K/zKbT+0hlBf SjR7kuCc1rm4pyHMiqO8M+Fo48UTpvZa6W/mvqSsybQF11sZo+Qi7HQ3KXb0zb5xpQOjMGW5uer UFNS60LIgPdLasKfjM7kkjkfXxyvlq+xX4sCrDI46DPWHEJW96xjqlDH8oqAKYuGCAAtspesYxb nnZteqMj6GATJ4fPDorZWP7Ygyj0MisTyF1grPCq225ziuRudPEpndyGW4gjuh9c1PMAPDzV0vE O7W+wDSbf5Kjf0OMxs2iX4QqAYjZQaqQihw2mXhFC7/fnKfzUX2jwDIL7ahr91z++kOpilq94f6 BSI9KR1FY2FtId/2jlrfbyKCrt/x78WDur3ct9knGrIfXup/BBUyKZwv2dw3bzDPp/06d+KcYZx kq43M+mbUg4yBhqPnwQ07j2Ytk68Z4gomFSnH1GIaRlFe4QWVOtA0MvSM39vXoQjr4eDuqqq4// hyp X-Received: by 2002:a05:693c:2c84:b0:2c5:d833:a4f3 with SMTP id 5a478bee46e88-2d58907b4admr3614838eec.18.1775883277634; Fri, 10 Apr 2026 21:54:37 -0700 (PDT) Received: from [192.168.1.18] (177-4-160-195.user3p.v-tal.net.br. [177.4.160.195]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2d561bde68bsm7378754eec.17.2026.04.10.21.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2026 21:54:37 -0700 (PDT) From: =?utf-8?q?C=C3=A1ssio_Gabriel?= Subject: [PATCH 0/2] ALSA: sscape: add suspend/resume support Date: Sat, 11 Apr 2026 01:54:28 -0300 Message-Id: <20260411-alsa-sscape-pm-v1-0-3058d988783a@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 X-B4-Tracking: v=1; b=H4sIAAAAAAAC/yXMSwqDQBBF0a1IjVPQfjDiViSDtnwmFaI2XYkI4 t7tJMMzuHcnQ1QYtdlOEauaLnNCfslIHn6+g3VIpsIVtavclf3LPJuJD+AwcVU2TV6LjBBQikL EqNtv2N3+tk//hLy/FzqOEyOsAldyAAAA X-Change-ID: 20260407-alsa-sscape-pm-438816ccfece To: Takashi Iwai , Jaroslav Kysela Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?C=C3=A1ssio_Gabriel?= X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1730; i=cassiogabrielcontato@gmail.com; h=from:subject:message-id; bh=/6x6AUmNK18hoaugSCgmrIJZxi+Q7GR/56X47uyaEOg=; b=owGbwMvMwCV2IdZeKur/u2bG02pJDJk3r3Bd5TT8GFB+2fUXQ4beN3beuXLe324XPv5/T52/9 j2nRH5hRykLgxgXg6yYIsvqpEWWe7oeXK2PW+EBM4eVCWQIAxenAExkVQEjw3cenUPxi08dtCv4 n/u8avfvJeJvFK8ln975LPAIt4SJgBwjw62Vdo+T192OSkvlixLjOvDoD3Mv18RnmZJdNwL4LPd zsAIA X-Developer-Key: i=cassiogabrielcontato@gmail.com; a=openpgp; fpr=AB62A239BC8AE0D57F5EA848D05D3F1A5AFFEE83 The SoundScape driver does more during probe than a plain WSS bring-up. It programs board-specific gate-array routing and, on non-VIVO boards, loads MIDI firmware and restores MIDI state before the MPU-401 side is usable. The driver still lacks suspend and resume callbacks, so that probe-time state is not restored after a system sleep cycle. Generic WSS power management is not sufficient here because it only restores codec state. SoundScape resume also needs to restore the board routing, and on non-VIVO boards it needs to reinitialize the MIDI side when it was successfully enabled at probe time. - Patch 1 stores the resolved per-card resources in struct soundscape, factors the board reinitialization path into a helper, and reuses the MIDI state programming sequence. - Patch 2 adds ISA and ISA-PnP PM callbacks, reapplies the board configuration on resume, restores the non-VIVO MIDI firmware and MIDI state when applicable, and keeps the WSS side available even if MIDI restoration fails. The board restore path also replays the OPUS AD1845 activation step used during detection so that resume matches the existing bring-up sequence more closely. Signed-off-by: Cássio Gabriel --- Cássio Gabriel (2): ALSA: sscape: Cache per-card resources for board reinitialization ALSA: sscape: Add suspend and resume support sound/isa/sscape.c | 303 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 218 insertions(+), 85 deletions(-) --- base-commit: ddd3315ee2dab1d547f99fcd90a3f533d6688730 change-id: 20260407-alsa-sscape-pm-438816ccfece Best regards, -- Cássio Gabriel