From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796317698; b=dZf+kZedqbHpECFfIbvM8CjHiCgalnsciA2ypWp2IjcGIWcX9Q/oApi4x2Vda2Cm/emE 3TfMA5fgVRVl8nkQhVxEGsrsS1lcb/SryWGdN2qk1TlNTypmuluxb0jUfxCxfu2J/JWix g5O4bfxGEKp+Ei06SPlxnj9a9mo9D4pXUC1HhJJXZ6lfG8TqbVyx94wHMI6HEuuj3pbvb AYDkFy2lsbkAAESXB+wQ1t1lemJLTA+yhEJSH1NQThNKkqv1EIsNpRG5COGJQK5ccIrxO jldfGDJkK/5Vl54Qyqo2sTaVW+V0ltK9nHXtIZ2YyMe0XIfGMBV58AZi/nfjoyskgiw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796317698; 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:MIME-Version: Content-Transfer-Encoding; bh=IJpv+0EOPdAYLuaatL4xU0cVnWKhxNr+EIASDErnV5c=; b=lOCW5k+kHAPRnYg1wCkLPrxsKLIhgPvWHKYHjd/hTH9+uOYavuhr/5XW+r9DhUFsLr65 I1QhMlw4wnWQU2KY+60RKhJBCK23A2atFSlEQ03bbkaLt6cnRzVFPu4rW6/Fu8VlWqKuN 5GIKSSsNIjrVCt15oPne6dUUfauf3Lhj+cplND8piXgiM2FkFs37NsTXYIegywy5a+l2H NjCss1zq1VAGC7bQ4EP2OuUmRswp6wfQAWB7fEx8Acg5FMwKdG3Eb1QKuylVDoTiNnWGG S1zWZ8dNwDkwTQ0iIIqGO0ssYFgCgQkmMlc+m++bEYeB86mGTLoT6mdCKYUwE/Lmhng== 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=tByQKwM6; arc=none smtp.remote-ip=74.125.82.51 Received: from mail-dl1-f51.google.com (mail-dl1-f51.google.com [74.125.82.51]) (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 109DB606A332 for ; Thu, 3 Dec 2026 17:08:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 109DB606A332 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=tByQKwM6 Received: by mail-dl1-f51.google.com with SMTP id a92af1059eb24-1aefd1bf74aso13314c88.1 for ; Thu, 03 Dec 2026 09:08:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796317697; x=1796922497; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=IJpv+0EOPdAYLuaatL4xU0cVnWKhxNr+EIASDErnV5c=; b=tByQKwM6ltAt/fX3u/UvVMMCHqvdb2eCq2M1F2xinhafHwehwtwXbsdtmyMhMuFPkH 0KW3TcOOcAMV4CzyX2cWDJVe5dN4NQ1MZb7ezwpT7E0MAFGtBcZ8OCpZo8V1FJTwclx/ HP1hz4MhUqavEsHeBOukPgu45Ak2nQVUlU5rmysJ02D6ZbdG2cnM5IlnRDIzSMIqU/Uk +h3VYwP0PQZfUUxF8qMvb0rFYd6zlarsdhszcbJ/hRTqaCc49vfAoY4U931ypafe5i8i SRRrXsmWdQqbyvFtJCjp5kcX1reXiZfns0sgIafYXJykns4mLrnium8Qkx02VnDUAe/U 8EFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796317697; x=1796922497; h=content-transfer-encoding:mime-version: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=IJpv+0EOPdAYLuaatL4xU0cVnWKhxNr+EIASDErnV5c=; b=Jrd5pGObDxjNYl5yUBqe2Mi4rAq2pcoP6CoEMKqBxTKZ8Z3qqLWUNXw0rzmvR0d7KA zCx8K60IddWb46HDdRpSgXixDxNe0CVR22symSEiLzD2lwEjN/hAZWraXo3VgHdbLhgc hQzUYsOMt8RIgouMvIAf7AOVXWHWvMXZhu8yk1TGcwZe/1Fch1mTO8PZdxrVEK6+yo4t 1Xsslab7VKJwLCUvgoZjHbEUIHMFhFZDhvnZTxq1dzoS3OB7OZtbZJzejZTySHjXCkdy Tg7PJQZQyf77Fwvvj0OhOQrr1+vlY2SqKuRqrsO7ERfgcdTLkttOYZmcC1Rh0ntpQdtL TihA== X-Forwarded-Encrypted: i=1; AL+hErHs5QeD1f+MzfT+89q2JICgOSsNrtSrCqHqA5SiEn0ggIy5v3CoSrYqcfYkXrV2TfMiTcFoaHy+IEwixSE=@vger.kernel.org X-Gm-Message-State: APuU4Z8w5vfCWRnf7qx2e2CaliAs4QUwNwZr1mgk+hKpUbAobeW7T2fa VHsIgmwdE/OBgo/p/2YLSb4XMHV0w28X398Q0qlacZyEoWbn3HTyIzaW X-Gm-Gg: AZFdTZfIjX4Bbl3vPNQ8l4dr4dSvu5hOajsRjonNPOIEb2iSNZVA8P2i8L0akKwNx2I lgJM2MxGTGu1qujcs36rjd5uGM64Jq0Vpk7D78slYz4vLJ5nhq1N/Lrw96Alh2qT+Zf7GtUzzJY Lkg8mjgx9d2toQnUe9T+3IEOE+hsQH7itpyDhIqUjZ0ZnQEweSCQBonUxU5xB/QqpEd69fNBpfY 3NQWYsXSNNgeo915gKHMz/3uwP2nODizd4dFwDCnngEL2gy64UIVhqRtZ3QR4vEUAt8oPLL/xL/ au/4KaTE7RQOtUkEWpoNB+or7En7OD6S0926/mXfBiWpPw3Gdg0KfJ2Yu9QxQNDebfA2/IXcqrG f2RSeR4p4O9MLdm/8kci6wth3TD0z15iQEGP6y9FQZFVom8SK8TrEX1c8A8HKXi57BoIb/ceyMq do1Skz76+Rh9vqJ8/Oibp7iPMJkHuwpkek+A6cdwNRggjeYvD++WR721ubLBoVVqQEvh+zZFn7m 7RJoQIkajJnqKlRfFVrBAYUjoqsX+X7Eec/zVmTTIowOBXxCh728NGiw+7RVADGgpnwUfB0TdtE dJ8JisfAAMakU1kGsC4wUmT5ooBhb6FTlH4WEuPCIKvwL/b4UUTRaQ9tI5I7MGVQx1R/8up1ow= = X-Received: by 2002:a05:7022:b194:10b0:1b5:d0f7:1ab3 with SMTP id a92af1059eb24-1b5d0f71b38mr1588015c88.1.1796317696932; Thu, 03 Dec 2026 09:08:16 -0800 (PST) Received: from localhost.localdomain ([103.149.158.169]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b5567ff27bsm123486453c88.6.2026.12.03.09.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 09:08:16 -0800 (PST) From: Sreeraj S Kurup To: perex@perex.cz, tiwai@suse.de, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Sreeraj S Kurup Subject: [PATCH 0/3] ALSA: hda: Separate codec read status from response Date: Thu, 3 Dec 2026 17:04:59 +0000 Message-ID: <20261203170741.3873-1-sreekuttan2156239@gmail.com> X-Mailer: git-send-email 2.55.0 X-Mailing-List: linux-kernel@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 Hi, This series improves error handling in the HDA codec command and read APIs. Currently, snd_hdac_make_cmd() returns an unsigned int and uses -1 to indicate an invalid command. Since -1 is converted to 0xffffffff, which can also represent a valid encoded HDA command, callers cannot reliably distinguish an error from a valid command. This series changes snd_hdac_make_cmd() to return an integer status and provide the encoded command through an output parameter. It also updates snd_hdac_codec_read() to return an integer status and provide the codec response through an output parameter. The affected callers in the HDA core and ASoC HDMI codec driver are updated to use the new API and handle errors appropriately. Patch overview: 1. ALSA: hda: core: Fix command creation error handling 2. ALSA: hda: hdmi_chmap: Update HDMI channel map codec read callers 3. ASoC: codecs: hdac_hdmi: Update codec read API callers Patches 2 and 3 depend on the API changes introduced in patch 1. Please let me know if any changes are needed. Thanks, Sreeraj Sreeraj S Kurup (3): ALSA: hda: core: Fix command creation error handling ALSA: hda: hdmi_chmap: Update HDMI channel map codec read callers ASoC: codecs: hdac_hdmi: Update codec read API callers include/sound/hdaudio.h | 2 +- sound/hda/core/device.c | 69 ++++++++++++++++++++++++---------- sound/hda/core/hdmi_chmap.c | 30 ++++++++++++--- sound/soc/codecs/hdac_hdmi.c | 72 +++++++++++++++++++++++------------- 4 files changed, 123 insertions(+), 50 deletions(-) -- 2.55.0