From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 C202133D6D6 for ; Tue, 9 Jun 2026 01:31:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780968708; cv=none; b=hLpTSS/FHMVTWT/WE6gFkrUfmNWLvEuPZcq6U5jpEn7bAYHvlAzmTAx0HE8z+PmNyxY/CBkM2IHZg01vdHqyRb0D7CJd4K0/WSWRsudppI6Rj5CD1DUX+FYyx7Kd5wYO9JGBa7EMd2Pp1czJGxI43M+AjkMNQEjRLZs6yy6WaE4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780968708; c=relaxed/simple; bh=oC1QnOKW0S6EDRIYnPdhZj48Z/Xdn4sI0vTlEt02IuI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KF4yStnktiKWBuqIbY2BB3IgZjTqLZqeKtleVL+SxX4OngP2S5X8sjcFsFNxegNSpdLNlisLe9iNKOEvr5VK/7QgrvAOwqExKXSNARdKnGprENBwzSQSn1ijSkJHnbdOdZO1dF42N/vpEnTbLOwHuGsm9FQikXjN7TaDr3KAUiQ= 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.179 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-f179.google.com with SMTP id d9443c01a7336-2bf114b0cf9so43521025ad.2 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=T4Unb24qjojhMQPUCJshWtl33TeDbuFje8YSfg9y0FdJZA6zgCmGA59kWKpPOt6/k6 e4P9ybCwlEqA1heM6XhjqyEvLsRdFGzQjRVSjJbE51/eTGYThLC+CevfDsKqrKxpstrx vxgdYiqX7tJCa5VXYi0AaNyGN8k2RacPWVHVnqLh63xiO6uKi2leFHWW7O07/W3rCcni /SQssZIQm77xatZkJPUl/7765+zmuSsBhnqJ0dLcQXROIghOsYOyoivt653Omz65OhVH ocIxQDeYlsEfuUi2G/Xa6R9hDNTQpfUClPTMG2ZG4vUCvKd/Pl2YHMr/08/UhDxdBlIc r6fA== X-Forwarded-Encrypted: i=1; AFNElJ9rcgVQhci9CrOi39MYNCQebYjgjZc48Iy0l8MLg0O0Sq8ppf609DCtrFS5S9CqVGVLgkMSUI9SaFyeNqb3tvwt/w==@vger.kernel.org X-Gm-Message-State: AOJu0YxR2A2zKI+NtcucYnxcoF8cyy5VA+ksFNvnq8gBvLXIoa+6fBMo vcylxNNNoNO0j5geFrpe0UputcHqCpTVqNHJW0Q0Y6O3nvqZ9iAWKQa7 X-Gm-Gg: Acq92OFQOwxc/VjSQ2yXUoaFFbvBGdO4+alIZ5mrIYt8Qd9UV15bw73TbQr//TJaG2V rVG7Gx4dnq9t6T/UDGjanvbkqmn+xnUYYkAYkISu7z1V42yum5J7RQ/52z3Cnt+r9YAdI4FzCk5 MYr13HMpFExY5twsVnEmp4m3Oeoy6OTmQ7DwW9ew8uDJqYvN7m+UgeiWAbPWJkCsM1hbYkkv9RU wa+pnLo6DpiB7elXbpy8Icy99On9GRY8PpEs53xUeRkfppmeUFsr/mQMAbFDWsXLZE0Sxv2TAzE 92AQtXLELQ7/9re/cWlldBNhbN1ha3yhFXRjkvEuhXH1v6S7sG0aLukBCZrlPM6FZoN52h7eiVk BvB5D0cTAdW7+RjIZhOUlit/8NUkh6lHLWWAMYBtyz4+pD3mF6zzReiNO8gVIVFYwZzby+QqJW4 VX3xDngJCByhKeMzyaQjWBvNN681mYKRVJmgR8e5o6XkKgkIPFq17gB0PL/qAUVBPhZFMla4CkN +xBnMU= 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-renesas-soc@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