All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <coding@diwic.se>
To: Jaroslav Kysela <perex@perex.cz>,
	ALSA development <alsa-devel@alsa-project.org>
Cc: Takashi Iwai <tiwai@suse.de>, stable@vger.kernel.org
Subject: Re: [PATCH] ALSA: rawmidi: introduce SNDRV_RAWMIDI_IOCTL_USER_PVERSION
Date: Mon, 20 Sep 2021 18:42:14 +0200	[thread overview]
Message-ID: <5f2b66ef-01f2-f371-e8af-afa236f10cc5@diwic.se> (raw)
In-Reply-To: <20210920083538.128008-1-perex@perex.cz>


On 2021-09-20 10:35, Jaroslav Kysela wrote:
> The new framing mode causes the user space regression, because
> the alsa-lib code does not initialize the reserved space in
> the params structure when the device is opened.
>
> This change adds SNDRV_RAWMIDI_IOCTL_USER_PVERSION like we
> do for the PCM interface for the protocol acknowledgment.
>
> Cc: David Henningsson <coding@diwic.se>
> Cc: <stable@vger.kernel.org>
> Fixes: 08fdced60ca0 ("ALSA: rawmidi: Add framing mode")
> BugLink: https://github.com/alsa-project/alsa-lib/issues/178
> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
> ---
>   include/sound/rawmidi.h     | 1 +
>   include/uapi/sound/asound.h | 1 +
>   sound/core/rawmidi.c        | 9 +++++++++
>   3 files changed, 11 insertions(+)
>
> diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h
> index 989e1517332d..7a08ed2acd60 100644
> --- a/include/sound/rawmidi.h
> +++ b/include/sound/rawmidi.h
> @@ -98,6 +98,7 @@ struct snd_rawmidi_file {
>   	struct snd_rawmidi *rmidi;
>   	struct snd_rawmidi_substream *input;
>   	struct snd_rawmidi_substream *output;
> +	unsigned int user_pversion;	/* supported protocol version */
>   };
>   
>   struct snd_rawmidi_str {
> diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
> index 1d84ec9db93b..f906e50a7919 100644
> --- a/include/uapi/sound/asound.h
> +++ b/include/uapi/sound/asound.h
> @@ -784,6 +784,7 @@ struct snd_rawmidi_status {
>   
>   #define SNDRV_RAWMIDI_IOCTL_PVERSION	_IOR('W', 0x00, int)
>   #define SNDRV_RAWMIDI_IOCTL_INFO	_IOR('W', 0x01, struct snd_rawmidi_info)
> +#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('A', 0x02, int)

How come it's not 'W' here but 'A' instead?

Looks good otherwise, given a quick glance. It'll need a corresponding 
alsa-lib patch to actually call SNDRV_RAWMIDI_IOCTL_USER_PVERSION.

Thanks for helping to sort this out.

// David


  reply	other threads:[~2021-09-20 22:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20  8:35 [PATCH] ALSA: rawmidi: introduce SNDRV_RAWMIDI_IOCTL_USER_PVERSION Jaroslav Kysela
2021-09-20  8:35 ` Jaroslav Kysela
2021-09-20 16:42 ` David Henningsson [this message]
2021-09-20 17:22   ` Jaroslav Kysela

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=5f2b66ef-01f2-f371-e8af-afa236f10cc5@diwic.se \
    --to=coding@diwic.se \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    --cc=stable@vger.kernel.org \
    --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.