From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21FE73E0C4E; Sat, 28 Feb 2026 17:41:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300475; cv=none; b=IhJUfxUyiOHnIMR87FggNu4B7zmwjreBcSa3GcNMVd8EHvmRZfyG08VP3PoEqKgO5EU9cpjPeCYFL/Uthjf/UdGroQc+gi3rKSWpeIecRXyS7SKRibJ/aGhly6/siU+IkRH1wfk0cPRiWy1HNcjmFdONNLxt9iMe95hbU1SutEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300475; c=relaxed/simple; bh=uTqbPw591zXdfTsTtnbae2IXUOtbUZZJRiNlboZWmbM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f40Gla8ApYYwPQ+S8tHn2sYXUoWNxablvPbAI7ew5IgiKTKBg8udUUGtMHLCEfgZ8mfXoWnvGtybW/27FRxtgQb4eAsvpHEOUdd7YiiSvvgc/UwW1pH9IdPHRI6Im87nrKZR0Wz1EliGdfGIZhKajiu3GIewEk9lWp3S9v8tgTQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fJW379T+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fJW379T+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 148B1C19423; Sat, 28 Feb 2026 17:41:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300475; bh=uTqbPw591zXdfTsTtnbae2IXUOtbUZZJRiNlboZWmbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fJW379T+jO89UxQsw7oRR9Ng8M/khIEFYqJnoM3ooUc4GxOLzzvgaYHubNI0iDOT/ g9yCDjuBUBfel7eZeBnPEb18xpdCayou6GyLmxUx/jyglB8FwV8fDblggwWIHHWKjt d7Cd5rnnE5xSjQh6WTz9cD6zqrbrM4S5nsWRaDopbJgbZLRw2FbF4mzd2LypeCE1gl LV9mXG5qvjrEC1JxLnOCszf0sT3NZRcDYsxGaiL6R3mGFJdsplrirtcOUfX2A17Mkw s/Flp+bCiag5I8/5JzHJxco3mMXF9O/fMPG/AYsoIVdsxGD6Rq9gIDv+Haxr2xNc5y OLxwXCMsprB7w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Peter Ujfalusi , Seppo Ingalsuo , Ranjani Sridharan , Bard Liao , Kai Vehmanen , Mark Brown , Sasha Levin Subject: [PATCH 6.19 513/844] ASoC: SOF: ipc4-control: If there is no data do not send bytes update Date: Sat, 28 Feb 2026 12:27:06 -0500 Message-ID: <20260228173244.1509663-514-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Peter Ujfalusi [ Upstream commit 2fa74713744dc5e908fff851c20f5f89fd665fb7 ] When the bytes control have no data (payload) then there is no need to send an IPC message as there is nothing to send. Fixes: a062c8899fed ("ASoC: SOF: ipc4-control: Add support for bytes control get and put") Cc: stable@vger.kernel.org Signed-off-by: Peter Ujfalusi Reviewed-by: Seppo Ingalsuo Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Link: https://patch.msgid.link/20251217143945.2667-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sof/ipc4-control.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/ipc4-control.c b/sound/soc/sof/ipc4-control.c index 976a4794d6100..0a05f66ec7d92 100644 --- a/sound/soc/sof/ipc4-control.c +++ b/sound/soc/sof/ipc4-control.c @@ -412,8 +412,16 @@ static int sof_ipc4_set_get_bytes_data(struct snd_sof_dev *sdev, int ret = 0; /* Send the new data to the firmware only if it is powered up */ - if (set && !pm_runtime_active(sdev->dev)) - return 0; + if (set) { + if (!pm_runtime_active(sdev->dev)) + return 0; + + if (!data->size) { + dev_dbg(sdev->dev, "%s: No data to be sent.\n", + scontrol->name); + return 0; + } + } msg->extension = SOF_IPC4_MOD_EXT_MSG_PARAM_ID(data->type); -- 2.51.0