From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794451063; b=DCCCrMfzIWaOyOfw1cHFAttki29MNR0k11LVZzoPgQFlE1stSBvNMkEO68FrR/xVNf/B +EkgzEfvOnRbxMjg3qXIp+HIp7roeVU/nU4ph4bqw4jd1vLnoV4hzz1z4nMUV3W+bUwnv 6lBS/6KAi1Ntwl8j5z6P+l5uLuHW2zYo2eBWR8bUxg7MyspbhhoD+KWieB+vaOGtkL5Lp JY4fuGXCMZEue4zuk9prS/kQkwte27sksf+kaykPOCl+KjWo7hX9zs0qh8iN5j9luxAMk igZfliECIO+I5+GKTbLabA42Fu/oSbCi6LLFcFEq7u2dpujgO7Zuex5OwFVkFJR4baA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794451063; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=0klULBeGwEXi6KGEhap05nYgaZ4KtkuN8mxtS+61Oyg=; b=eHjRqKVjCRfjsZ1ToDg631sJAV6IcMW73z2DdUeQuGePE0z1rSvHnZg8WLudOjBle/lU WJrqpW5DJiyVlnLM8HN8gvDNrVHWeQ3j6uv7+qCBAStvBqGqyTtOelEf/AH1qIYmfgYH3 8u6jgD+jfyJY0JI1ULBY+DycxaJ2WsTWd88Lu5B7qlRTwkl1PSybHrRFDxjvJKmmLnI3i Kh0We6jGowv2788ePh6Pl8/Wy85Y6voRZNZN9dtG/xeL0c0nPNRX02GOvw8S7e2Ie58if FoNBFLd6eIW90cA8Q/eFdTa6DS/aDMWR4FE3rS8JMdaBZJj/YJyEzyMJdIdt4XYWDww== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ZF8+uiqU; arc=none smtp.remote-ip=209.85.160.44 Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C383F606A33D for ; Thu, 12 Nov 2026 02:37:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C383F606A33D 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.a=rsa-sha256 header.s=20260707 header.b=ZF8+uiqU Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-49429181ce9so2243618fac.0 for ; Wed, 11 Nov 2026 18:37:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794451062; x=1795055862; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=0klULBeGwEXi6KGEhap05nYgaZ4KtkuN8mxtS+61Oyg=; b=ZF8+uiqUaUQBvw66vOpM4hLJZ1mYe7AQ05Zfa8iOQ6USx+CXozBaBqvaq3IZ7SA+5h caPTl++oJB5dzZC9R8GR7nZR6T6lPdZaoPOkReiKnD9cmMCLbVg56qg1LniMwwt1Payr Bgo0JcuYcMbN+CZCmbKxblR9dWtwclO58+50uD1UumlsGUvBRuoNEqMMypv9DMDZoccy t6cWu+vPQdqwO0R+crid+Dx1PgCz2wFvJIQaryP8leFWK/L3EB3viY/O3kVm01dlNRr1 XLYaJfkIMH1av+ylE4b6C09SmspDefhML61UQr8xE7oA4WJBSpOiWQxpmNj7j/RvoTEv MAZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794451062; x=1795055862; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=0klULBeGwEXi6KGEhap05nYgaZ4KtkuN8mxtS+61Oyg=; b=RCVNlD7onMfBviDFUuxSsdfh8Ehy+XpnxMeKEkkEcX2gp1L1gvE9l1z+3ZVUgO8tZr fcuwkGCEgtZeZLPYoylm5fARjF7J7kv7sUfzhberok6qePClpZPP3QwPKuzBhEU+FpS5 Erdv3kXHzMrRzOuFH+jPIIBUyxlZWyzmq9FHIHdPCa6D+lMKGG5qL2KxlWU35nk460sw m7Uw0z5O5AqdQ85vhGGlVZNCPIk/nMyTxcGC0lzjV4Tv9LSneOF/B8IA61xW37KkaEo3 3LnWmvUIpnMir0O4b2H9+9fSXQrjX7u3aFtIaybtUZc9526H4EoGZhDXE2KrLYVR4jtB 16nQ== X-Forwarded-Encrypted: i=1; AL+hErEDvEwhtlA3wuuA3FkXV1MZrIumTiR6zX64KRyDBJ1lRlFWNxWMTaYO/GMCRMHJ/F1Umxw3zLYQTCcl0A==@vger.kernel.org X-Gm-Message-State: APuU4Z8NOKBSXWPyIVwHRmhZhvUz12S5eoKCsg57DfMua4yjqnQeI/ZW r6yvHLcgcp0255zBGCgRIuqNUQblr3suUA7g/PgLMwMjdkx6V906uNCB X-Gm-Gg: AYBFou0BkUMivUQ8HrAiEbDeI3d1LRWCHZpCsl2xtpxV99ixZLRXo/hntex9gpm+6cz EUQG6c+/LBeFBngN0Aww9dpe14ONctO2aTnFgisR1UiCajQtOFZKHkgQnS17fCn/qnDxZILmSHP F1IzDnTTDX9bY8Qk5meelkc5gnCt+hbGeNAT/TOtftU3KdddgwRhleyasnoA4zTv1r0m3lXyTTy IyiSZtLcX0mh34eE9KSrDBKpDcQ+Z3PXivR4wVJ2yiVcRv6BpX3V6Ms2t7EcGspAARtUwdtNZ8v mPGEgULl5odXcTkfhqqvxnvDTXVgwQZrTBrluPVaLVh9/eLue21aPRBe3XqJ1gfaJmuhfcM4+vS T7jge5QNqa5GzLr4ILRWQVJ9qrLlFcetTPD+KIdLg4yEHQhw/Wko06tGp7CJMTrE+uY1PgL9/Un FlZMQ736nLkwqk9zB5AJojHYUxa5IF+Dp7lt917qZuPtXjEpX/2RcECA5p5ey3WW327DpmxA6hh OyGbjOVn56aKKKhMMdO6RaJvqwj0TqKjxdqbga3gswsppA/33TGqaLrX8MZOw6jj4RIztuQTgqR /a5ZbLGBbySzEla+6MjaO5mddo9Jnnbi3IpDTVb5wQmzPw== X-Received: by 2002:a05:6871:5825:b0:48f:e3f5:c419 with SMTP id 586e51a60fabf-4ae46cb13a6mr3949691fac.58.1794451061574; Wed, 11 Nov 2026 18:37:41 -0800 (PST) Received: from localhost.localdomain ([2600:1702:4ff0:baa0:5054:ff:fe3d:4ddb]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4ae22f6a1c7sm4327310fac.6.2026.11.11.18.37.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2026 18:37:39 -0800 (PST) From: Will Porter To: Christian Ruppert Cc: Takashi Iwai , Jaroslav Kysela , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Andrews Subject: [RFC PATCH 4/6] ALSA: mixer_audient: Fill the cache on first use Date: Wed, 11 Nov 2026 20:37:18 -0600 Message-ID: <20261112023720.1503814-5-mrwillporter@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261112023720.1503814-1-mrwillporter@gmail.com> References: <20261112023720.1503814-1-mrwillporter@gmail.com> X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The probe reads every channel of a cached control. That is not necessary: a get or put of a channel whose cache bit is clear already reads the device and fills the cache. Remove the probe read of cached controls. A failed first read returns its error to the caller and leaves the cache bit clear, so the next call reads again. This changes behaviour. The probe sends no GET for a cached control: that is 12 fewer requests on the EVO4 and 56 fewer on the iD14 MkI. A failed read no longer logs "cannot read channel" at probe. A put to a channel whose cache bit is clear first sends a GET, then sends a SET only if the value differs. The probe write of the init value of write-only controls stays. Assisted-by: Claude:claude-fable-5-2 Assisted-by: Claude:claude-sonnet-5-5 Signed-off-by: Will Porter --- sound/usb/mixer_audient.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/sound/usb/mixer_audient.c b/sound/usb/mixer_audient.c index 1bc6b4bbd2910..ff7bf518743ee 100644 --- a/sound/usb/mixer_audient.c +++ b/sound/usb/mixer_audient.c @@ -1091,10 +1091,10 @@ static int snd_audient_add_ctrl(struct usb_mixer_interface *mixer, elem->get_cur_broken = 1; /* - * A failed probe transfer must not fail the card: warn and keep the - * control. Its cache bit stays clear, so a cached control reads the - * device again on its next get, and a write-only control shows an - * unknown value until a put succeeds. + * A cached control reads the device on its first get or put. A + * write-only control is written once at probe. A failed probe write + * must not fail the card: warn and keep the control. Its cache bit + * stays clear, so it shows an unknown value until a put succeeds. */ if (ctype->access == SND_AUDIENT_ACCESS_WRITE_ONLY) { int i; @@ -1108,20 +1108,6 @@ static int snd_audient_add_ctrl(struct usb_mixer_interface *mixer, "%s: cannot set channel %d (%d)\n", ctrl->name, i, ret); } - } else if (ctype->access == SND_AUDIENT_ACCESS_CACHED) { - int i; - - for (i = 0; i < ctrl->hwchannels; i++) { - u32 val; - - ret = snd_audient_raw_get_one(elem, ctype, i, - ctrl->val_offs + i, - &val); - if (ret < 0) - usb_audio_warn(mixer->chip, - "%s: cannot read channel %d (%d)\n", - ctrl->name, i, ret); - } } kctl = snd_ctl_new1(&knew, elem); -- 2.47.3