From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 C4BDE3314C2 for ; Tue, 9 Jun 2026 01:31:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780968709; cv=none; b=jWflfoHQp5Ccs2wXYyJyyCy1kKHeZm0wRUDmJaiOaBH9VcPAqS0zmqlOHN+bkzUFuzdYranCbeAKywaS3atqSHR8CKQmZZjpMyaF+lFyyJ0oZ48+NJbLte7r6sbFtI38GvfOBDqeIG+WTyjoG5hf/SI9S/0wfXQf+V1J2FchBZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780968709; c=relaxed/simple; bh=oC1QnOKW0S6EDRIYnPdhZj48Z/Xdn4sI0vTlEt02IuI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ox06g/YDOzQjcAq/wVh7rhkrWQ8h2R9XSuL5k30UqagwPvvPSCSw5/gorIRpHQrzXzYKI0P/TnACioM+lJjKjrS75e3mzjs1Y++5JQhBkj8oyEkjXp2qBERj8iJ6ls7Fs39XHsqCHCT7go7xa/CBDvGqSJo8lO24lQ6ijaICDj0= 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=UtzDV/aL; arc=none smtp.client-ip=209.85.214.175 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="UtzDV/aL" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2c0c2d8b95bso35008215ad.1 for ; Mon, 08 Jun 2026 18:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780968705; x=1781573505; 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; bh=+UciuXuF9SkzGOJuh2s5ETTsCy+oZl/O5D36E7r4WTE=; b=UtzDV/aL38plP6UGt/h5evMelh4zlTBLdErl9NxT+E/4BqmRP8IjGldQ2fiwWnsc+X FRIa4OXEdUhTB8VmYCpW4WIw4VzoHoCLX3SwXQ0O7lbgymFCnKeNVxQdbvrQeAl+0vpM 0p+EhYctSNBkNprY5vjWJPMWZhujKpnEanI6Vi8H5Sn4HZ1xU3sa2u85corWrVFau7xL +lwUChiE3r30At/mAFK37NOxL/slXWX3wor4fKkJqhsJFOMDzY5kQ5ztLX7z+zDcIuEQ 1SN+toqaqB+9QUzF4S8KAWekcF7IfumZAKP6O5lcystgdQFVl/XqJ+3awWTsyC9qF9Il 6RiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780968705; x=1781573505; 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; bh=+UciuXuF9SkzGOJuh2s5ETTsCy+oZl/O5D36E7r4WTE=; b=Jv3oTJSO0hON7jJeFY7p/OzLjqVEoh6FvqIDbaQn2VaT+LnMWbW8Fz+0aJeSCs+QyA 3qk7y1wu3pz4m7NjBxaTW5mtT97PFcbJYuXtipIBGOsmNXtqrUGq1rLiQGP9nITjnqZ6 xrSaf2XvkqRfyt20CEk2+EtI6YpSLPfN49uSHOLgiYwmKSBLsRM7GvDxVwlHMgyWSJ+p lMGUC2C5N9iB+8keZU+wx8wTN3Exlpp6+q5LFCiUfmdfyC2H4fSe6CGBcFFBTQVTz+l2 9pRnKHou6Xyi9OeE6mbpcJv68iE+m53qRI+Skeg6DNezLi24lcXXx6EZfvqLUgJhGtCq z9TA== X-Forwarded-Encrypted: i=1; AFNElJ9jOFUnnYHL+i3tuKhzLtU1p9XBhkxOfgGRbmEyR768Z+pTfP116vgWxg+IkTVJ0X86j9bOUnanc9DMCPQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yyqn3U2R4fs4rm7+Y8xMtPL8Wt2f/yNsY8UO5xlAVeXI/lGuGbN 7RDKEbHCwQSmuybSB5m2/y4nK4K8joAYZ8C7jfAj1AoFQSZtrJIkdnkq X-Gm-Gg: Acq92OGoOl5CJ82DIZPjPXmqUhlDZUrX3QH6sKKs/7lOHoyqHX8ySP91vnuFBzFPnhA xDkr+nNlP3PWU9yNB1xZ/5fOaLW4UmvRBIJ5jzMGX1XGrq/0FGh9gNl96CyWEghhr0wO7IvBM8Y i3FNvi5fJ5ebt1HNmF1ITiC82gyyN7ffSPHji0WoiO6E1v8t8NsY++9iVbyZbwF1eoEvhocgM4Z tAFzJqt/0H+q4ZX4KGIPQ34oJJc+3NEUCHY3si1KGtsTkBdBZxojeCEz5Hwd3A07q1EXZopOynk ZmjWkhbbq2m8bSE1GK2xLRTYv3qA1dnY7zjTrQc9zmOAXG66u4NuWpRj1WJC2nM4O7/3J83XOwi bi8Tcod7k8ZhAfkAIy0Us4Og0OkIYo0q8kQL4X3Ma1461PQSXO4vvfRye3UJhb5Yvid6SEK7UQQ dQpLRPxo5KIcWuct004VVRFWI3o9XPCjG6iHeXc4CxkZJxmsczc3LES58SjN+F9yuXLTlcOPstw s6nkaI= X-Received: by 2002:a17:903:2ac3:b0:2c0:b932:866e with SMTP id d9443c01a7336-2c1e8934f70mr199651325ad.27.1780968704926; Mon, 08 Jun 2026 18:31:44 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c16609e627sm198765335ad.52.2026.06.08.18.31.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2026 18:31:44 -0700 (PDT) From: phucduc.bui@gmail.com To: Kuninori Morimoto , Mark Brown , Geert Uytterhoeven Cc: Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH v5 04/11] ASoC: renesas: fsi: Move fsi_stream_is_working() Date: Tue, 9 Jun 2026 08:31:00 +0700 Message-ID: <20260609013107.5995-5-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260609013107.5995-1-phucduc.bui@gmail.com> References: <20260609013107.5995-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc Move fsi_stream_is_working() before fsi_count_fifo_err(). This prepares for a subsequent patch that needs to check stream status when handling in-flight IRQ handlers. No functional changwqes intended. Suggested-by: Kuninori Morimoto Signed-off-by: bui duc phuc --- sound/soc/renesas/fsi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sound/soc/renesas/fsi.c b/sound/soc/renesas/fsi.c index 800ac40f9680..0bd0e0c8c5a3 100644 --- a/sound/soc/renesas/fsi.c +++ b/sound/soc/renesas/fsi.c @@ -442,6 +442,16 @@ static int fsi_sample2frame(struct fsi_priv *fsi, int samples) return samples / fsi->chan_num; } +static int fsi_stream_is_working(struct fsi_priv *fsi, + struct fsi_stream *io) +{ + struct fsi_master *master = fsi_get_master(fsi); + + guard(spinlock_irqsave)(&master->lock); + + return !!(io->substream && io->substream->runtime); +} + static int fsi_get_current_fifo_samples(struct fsi_priv *fsi, struct fsi_stream *io) { @@ -488,16 +498,6 @@ static inline struct fsi_stream *fsi_stream_get(struct fsi_priv *fsi, return fsi_is_play(substream) ? &fsi->playback : &fsi->capture; } -static int fsi_stream_is_working(struct fsi_priv *fsi, - struct fsi_stream *io) -{ - struct fsi_master *master = fsi_get_master(fsi); - - guard(spinlock_irqsave)(&master->lock); - - return !!(io->substream && io->substream->runtime); -} - static struct fsi_priv *fsi_stream_to_priv(struct fsi_stream *io) { return io->priv; -- 2.43.0