[alsa-devel] [PATCH v2 0/2] amidi: fix handling of ignored messages

Takashi Sakamoto o-takashi at sakamocchi.jp
Sun Aug 14 12:19:46 CEST 2016


On Aug 13 2016 23:40, Clemens Ladisch wrote:
> Clemens Ladisch (2):
>       amidi: ignore not only Active Sensing but also Clock bytes
>       amidi: fix timeout handling
> 
> v2: fix short_options
> 
>  amidi/amidi.1 |   19 ++++++++---
>  amidi/amidi.c |   84 ++++++++++++++++++++++++++++++++++++++------------
>  2 files changed, 79 insertions(+), 24 deletions(-)

Reviewd-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
Tested-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>

I tested these patches with loopbacked MIDI interface and this program.
Then, This command finishes as expected.
$ ./amidi -p hw:1,0,0 -d -t 5

-------- 8< --------

#include <stdio.h>
#include <stdlib.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <stdint.h>
#include <unistd.h>

int main(void)
{
        int fd;
        uint8_t buf = 0xfe;

        fd = open("/dev/snd/midiC1D0", O_WRONLY);
        if (fd < 0) {
                return EXIT_FAILURE;
        }

        while (write(fd, &buf, sizeof(buf)) > 0)
                ;

        close(fd);

        return EXIT_FAILURE;
}

-------- 8< --------


Regards

Takashi Sakamoto


More information about the Alsa-devel mailing list