Skip to content

Commit 9981b20

Browse files
takaswietiwai
authored andcommitted
ALSA: firewire-lib: fix the context to call snd_pcm_stop_xrun()
In the workqueue to queue wake-up event, isochronous context is not processed, thus it's useless to check context for the workqueue to switch status of runtime for PCM substream to XRUN. On the other hand, in software IRQ context of 1394 OHCI, it's needed. This commit fixes the bug introduced when tasklet was replaced with workqueue. Cc: <[email protected]> Fixes: 2b3d298 ("ALSA: firewire: Replace tasklet with work") Signed-off-by: Takashi Sakamoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent dfb0640 commit 9981b20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/firewire/amdtp-stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ static void generate_pkt_descs(struct amdtp_stream *s, struct pkt_desc *descs,
804804
static inline void cancel_stream(struct amdtp_stream *s)
805805
{
806806
s->packet_index = -1;
807-
if (current_work() == &s->period_work)
807+
if (in_interrupt())
808808
amdtp_stream_pcm_abort(s);
809809
WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
810810
}

0 commit comments

Comments
 (0)