Hi,
This patchset is based on an idea addressed in this thread: http://mailman.alsa-project.org/pipermail/alsa-devel/2016-February/104589.ht...
For packet-oriented drivers such as USB Audio Device class, message transmission can fail due to data bus issue. In this case, corresponding rawmidi runtime should be closed. Although, current ALSA rawmidi core has no mechanism to help applications/drivers to handle this situation.
This commit adds a helper functions for this aim.
Takashi Sakamoto (2): ALSA: rawmidi: handle error state for broken logical channel ALSA: rawmidi: add a helper to set runtime error
include/sound/rawmidi.h | 3 ++ sound/core/rawmidi.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 84 insertions(+), 5 deletions(-)