mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
ASoC: renesas: fsi: Move fsi_stream_is_working()
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. Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260609113836.45079-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
859efe92b0
commit
c9e05e2fa0
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user