All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geraldo Nascimento <geraldogabriel@gmail.com>
To: Stefan Sauer <st.kost@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: [PATCH] ALSA: seq: virmidi: Add a drain operation
Date: Fri, 7 Jan 2022 17:37:06 -0300	[thread overview]
Message-ID: <Ydikcgcmwfk05Eic@geday> (raw)
In-Reply-To: <20220105204717.12175-1-st.kost@gmail.com>

On Wed, Jan 05, 2022 at 09:47:17PM +0100, Stefan Sauer wrote:
> If a driver does not supply a drain operation for outputs, a default code
> path will execute msleep(50). Especially for a virtual midi device
> this severely limmits the throughput.
> 
> This implementation for the virtual midi driver simply flushes the output
> workqueue.
> 
> Signed-off-by: Stefan Sauer <st.kost@gmail.com>

Hi, Stefan,

Thanks for the patch!

However it seems you forgot to Cc: Takashi Iwai.

Cc:ing him now so he takes notice.

Thank you,
Geraldo Nascimento
> ---
>  sound/core/seq/seq_virmidi.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
> index 4abc38c70cae..f5cae49500c8 100644
> --- a/sound/core/seq/seq_virmidi.c
> +++ b/sound/core/seq/seq_virmidi.c
> @@ -262,6 +262,16 @@ static int snd_virmidi_output_close(struct snd_rawmidi_substream *substream)
>  	return 0;
>  }
>  
> +/*
> + * drain output work queue
> + */
> +static void snd_virmidi_output_drain(struct snd_rawmidi_substream *substream)
> +{
> +	struct snd_virmidi *vmidi = substream->runtime->private_data;
> +
> +	flush_work(&vmidi->output_work);
> +}
> +
>  /*
>   * subscribe callback - allow output to rawmidi device
>   */
> @@ -336,6 +346,7 @@ static const struct snd_rawmidi_ops snd_virmidi_output_ops = {
>  	.open = snd_virmidi_output_open,
>  	.close = snd_virmidi_output_close,
>  	.trigger = snd_virmidi_output_trigger,
> +	.drain = snd_virmidi_output_drain,
>  };
>  
>  /*
> -- 
> 2.34.1
> 

      reply	other threads:[~2022-01-07 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01 11:49 slow snd_rawmidi_drain() for VirMidi devcies Stefan Sauer
2022-01-04 15:54 ` Takashi Iwai
2022-01-05 13:39   ` Stefan Sauer
2022-01-05 14:13     ` Takashi Iwai
2022-01-05 19:53       ` Stefan Sauer
2022-01-05 20:20         ` Takashi Iwai
2022-01-05 20:47 ` [PATCH] ALSA: seq: virmidi: Add a drain operation Stefan Sauer
2022-01-07 20:37   ` Geraldo Nascimento [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ydikcgcmwfk05Eic@geday \
    --to=geraldogabriel@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=st.kost@gmail.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.