Commit 987b705b authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: firewire-lib: remove useless operations for kernel preemption

In all of drivers of ALSA firewire stack, the callback of .pointer and
.ack in snd_pcm_ops structure is done in acquired spin_lock of PCM
substream, therefore already under disabled kernel preemption.
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210606025651.29970-1-o-takashi@sakamocchi.jpSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8b6e2193
...@@ -1755,13 +1755,8 @@ unsigned long amdtp_domain_stream_pcm_pointer(struct amdtp_domain *d, ...@@ -1755,13 +1755,8 @@ unsigned long amdtp_domain_stream_pcm_pointer(struct amdtp_domain *d,
// Later, the process context will sometimes schedules software // Later, the process context will sometimes schedules software
// IRQ context of the period_work. Then, no need to flush the // IRQ context of the period_work. Then, no need to flush the
// queue by the same reason as described in the above // queue by the same reason as described in the above
if (current_work() != &s->period_work) { if (current_work() != &s->period_work)
// Queued packet should be processed without any kernel
// preemption to keep latency against bus cycle.
preempt_disable();
fw_iso_context_flush_completions(irq_target->context); fw_iso_context_flush_completions(irq_target->context);
preempt_enable();
}
} }
return READ_ONCE(s->pcm_buffer_pointer); return READ_ONCE(s->pcm_buffer_pointer);
...@@ -1781,13 +1776,8 @@ int amdtp_domain_stream_pcm_ack(struct amdtp_domain *d, struct amdtp_stream *s) ...@@ -1781,13 +1776,8 @@ int amdtp_domain_stream_pcm_ack(struct amdtp_domain *d, struct amdtp_stream *s)
// Process isochronous packets for recent isochronous cycle to handle // Process isochronous packets for recent isochronous cycle to handle
// queued PCM frames. // queued PCM frames.
if (irq_target && amdtp_stream_running(irq_target)) { if (irq_target && amdtp_stream_running(irq_target))
// Queued packet should be processed without any kernel
// preemption to keep latency against bus cycle.
preempt_disable();
fw_iso_context_flush_completions(irq_target->context); fw_iso_context_flush_completions(irq_target->context);
preempt_enable();
}
return 0; return 0;
} }
......
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