Re: Bug? Strange crash with snd_hdspm and RME RayDAT on MIDI-input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 27 Jan 2023 16:41:42 +0100,
AiO wrote:
> 
> Hello there,
> 
> I've tried to find some insights in a weird problem I have with
> snd_hdspm. I guess it is an error-report/bug-posting.
> 
> Audio-wise everything is super-duper, so don't worry. However... MIDI
> only works outbound from the on-board MIDI interface.
> 
> MIDI-out always works perfectly from the card during normal operations.
> 
> Whenever I connect anything to the MIDI-in and start feeding some
> MIDI-data, it seems ALSA crashes on me. here's a more detailed
> description:
> 
> * I'm running linux-rt 6.0.5.14.realtime1-3-rt #1 SMP PREEMPT_RT (Arch)
> 
> * When i give it a stream of MIDI data on the MIDI-in while playing
>   some audio that application (e.g. mplayer or live inputs) logs:
> 
>   ALSA: poll time out, polled for 1999005 usecs, Retrying with a
>   recovery, retry cnt = 1 (2, 3, 4, 5, and so on)
> 
>   And ALSA seem stuck in looping the last buffer over and over.
> 
> * Nothing in journal, nothing in dmesg tells anything more about it
> 
> What did I run in to?! :)

Possibly it went into the endless loop to flush the MIDI input bytes
where the hardware doesn't return the right value (likely returning
0xff constantly).

Could you check the patch below?


thanks,

Takashi

-- 8< --
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -1838,7 +1838,9 @@ 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)
 {
-	while (snd_hdspm_midi_input_available (hdspm, id))
+	int count;
+
+	for (count = 0; snd_hdspm_midi_input_available(hdspm, id) && count < 256; count++)
 		snd_hdspm_midi_read_byte (hdspm, id);
 }
 



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux