Revert "ALSA: hdsp: Break infinite MIDI input flush loop"
This reverts commit a27cc2ac6c
.
This commit is contained in:
parent
f6fecb09e8
commit
cb4985654a
2 changed files with 4 additions and 8 deletions
|
@ -1303,10 +1303,8 @@ static int snd_hdsp_midi_output_possible (struct hdsp *hdsp, int id)
|
||||||
|
|
||||||
static void snd_hdsp_flush_midi_input (struct hdsp *hdsp, int id)
|
static void snd_hdsp_flush_midi_input (struct hdsp *hdsp, int id)
|
||||||
{
|
{
|
||||||
int count = 256;
|
while (snd_hdsp_midi_input_available (hdsp, id))
|
||||||
|
snd_hdsp_midi_read_byte (hdsp, id);
|
||||||
while (snd_hdsp_midi_input_available(hdsp, id) && --count)
|
|
||||||
snd_hdsp_midi_read_byte(hdsp, id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_hdsp_midi_output_write (struct hdsp_midi *hmidi)
|
static int snd_hdsp_midi_output_write (struct hdsp_midi *hmidi)
|
||||||
|
|
|
@ -1839,10 +1839,8 @@ static inline int snd_hdspm_midi_output_possible (struct hdspm *hdspm, int id)
|
||||||
|
|
||||||
static void snd_hdspm_flush_midi_input(struct hdspm *hdspm, int id)
|
static void snd_hdspm_flush_midi_input(struct hdspm *hdspm, int id)
|
||||||
{
|
{
|
||||||
int count = 256;
|
while (snd_hdspm_midi_input_available (hdspm, id))
|
||||||
|
snd_hdspm_midi_read_byte (hdspm, id);
|
||||||
while (snd_hdspm_midi_input_available(hdspm, id) && --count)
|
|
||||||
snd_hdspm_midi_read_byte(hdspm, id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_hdspm_midi_output_write (struct hdspm_midi *hmidi)
|
static int snd_hdspm_midi_output_write (struct hdspm_midi *hmidi)
|
||||||
|
|
Loading…
Add table
Reference in a new issue