Commit 3b86ec63 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: firewire-lib: replace in_interrupt() with in_softirq()

Tasklet is used to handle isochronous context of 1394 OHCI. The explicit
usage of in_softirq() may be preferable than in_interrupt().
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611083425.61204-1-o-takashi@sakamocchi.jpSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent be471fe3
...@@ -49,7 +49,7 @@ TRACE_EVENT(amdtp_packet, ...@@ -49,7 +49,7 @@ TRACE_EVENT(amdtp_packet,
__entry->data_blocks = data_blocks; __entry->data_blocks = data_blocks;
__entry->data_block_counter = data_block_counter, __entry->data_block_counter = data_block_counter,
__entry->packet_index = packet_index; __entry->packet_index = packet_index;
__entry->irq = !!in_interrupt(); __entry->irq = !!in_softirq();
__entry->index = index; __entry->index = index;
), ),
TP_printk( TP_printk(
......
...@@ -610,7 +610,7 @@ static void update_pcm_pointers(struct amdtp_stream *s, ...@@ -610,7 +610,7 @@ static void update_pcm_pointers(struct amdtp_stream *s,
// buffer associated to PCM substream to process PCM frames in the buffer, instead // buffer associated to PCM substream to process PCM frames in the buffer, instead
// of receiving notification of period elapsed by poll wait. // of receiving notification of period elapsed by poll wait.
if (!pcm->runtime->no_period_wakeup) { if (!pcm->runtime->no_period_wakeup) {
if (in_interrupt()) { if (in_softirq()) {
// In software IRQ context for 1394 OHCI. // In software IRQ context for 1394 OHCI.
snd_pcm_period_elapsed(pcm); snd_pcm_period_elapsed(pcm);
} else { } else {
...@@ -1026,7 +1026,7 @@ static void generate_pkt_descs(struct amdtp_stream *s, const __be32 *ctx_header, ...@@ -1026,7 +1026,7 @@ static void generate_pkt_descs(struct amdtp_stream *s, const __be32 *ctx_header,
static inline void cancel_stream(struct amdtp_stream *s) static inline void cancel_stream(struct amdtp_stream *s)
{ {
s->packet_index = -1; s->packet_index = -1;
if (in_interrupt()) if (in_softirq())
amdtp_stream_pcm_abort(s); amdtp_stream_pcm_abort(s);
WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN); WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
} }
...@@ -1738,7 +1738,7 @@ unsigned long amdtp_domain_stream_pcm_pointer(struct amdtp_domain *d, ...@@ -1738,7 +1738,7 @@ unsigned long amdtp_domain_stream_pcm_pointer(struct amdtp_domain *d,
if (irq_target && amdtp_stream_running(irq_target)) { if (irq_target && amdtp_stream_running(irq_target)) {
// In software IRQ context, the call causes dead-lock to disable the tasklet // In software IRQ context, the call causes dead-lock to disable the tasklet
// synchronously. // synchronously.
if (!in_interrupt()) if (!in_softirq())
fw_iso_context_flush_completions(irq_target->context); fw_iso_context_flush_completions(irq_target->context);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment