Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.14] Fix for Pisound's MIDI Input getting blocked for a while in rare cases. #2439

Merged
merged 1 commit into from
Mar 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions sound/soc/bcm/pisound.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ static const char *pisnd_spi_get_version(void);
static int pisnd_midi_init(struct snd_card *card);
static void pisnd_midi_uninit(void);

enum task_e {
TASK_PROCESS = 0,
};

static void pisnd_schedule_process(enum task_e task);

#define PISOUND_LOG_PREFIX "pisound: "

#ifdef PISOUND_DEBUG
Expand Down Expand Up @@ -129,7 +135,7 @@ static void pisnd_input_trigger(struct snd_rawmidi_substream *substream, int up)
{
if (up) {
pisnd_spi_set_callback(pisnd_midi_recv_callback, substream);
pisnd_midi_recv_callback(substream);
pisnd_schedule_process(TASK_PROCESS);
} else {
pisnd_spi_set_callback(NULL, NULL);
}
Expand Down Expand Up @@ -258,10 +264,6 @@ static bool pisnd_spi_has_more(void)
return gpiod_get_value(data_available);
}

enum task_e {
TASK_PROCESS = 0,
};

static void pisnd_schedule_process(enum task_e task)
{
if (pisnd_spi_device != NULL &&
Expand Down