All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geraldo Nascimento <geraldogabriel@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: William Overton <willovertonuk@gmail.com>,
	ALSA-devel <alsa-devel@alsa-project.org>,
	Olivia Mackintosh <livvy@base.nu>
Subject: Re: [PATCH] ALSA: usb-audio: Reorder snd_djm_devices entries
Date: Fri, 3 Dec 2021 20:58:53 -0300	[thread overview]
Message-ID: <YaqvPbmEGZth/0Ag@geday> (raw)
In-Reply-To: <s5hsfv9stbw.wl-tiwai@suse.de>

On Fri, Dec 03, 2021 at 02:37:07PM +0100, Takashi Iwai wrote:
> On Thu, 02 Dec 2021 21:55:51 +0100,
> Geraldo Nascimento wrote:
> > 
> > Olivia Mackintosh has posted to alsa-devel reporting that
> > there's a potential bug that could break mixer quirks for Pioneer
> > devices introduced by 6d27788160362a7ee6c0d317636fe4b1ddbe59a7
> > "ALSA: usb-audio: Add support for the Pioneer DJM 750MK2
> > Mixer/Soundcard".
> > 
> > This happened because the DJM 750 MK2 was added last to the Pioneer DJM
> > device table index and defined as 0x4 but was added to snd_djm_devices[]
> > just after the DJM 750 (MK1) entry instead of last, after the DJM 900
> > NXS2. This escaped review.
> > 
> > Let's reorder the entries in snd_djm_devices[] so they match the Pioneer
> > DJM device table index #define's.
> > 
> > Reported-by: Olivia Mackintosh <livvy@base.nu>
> > Signed-off-by: Geraldo Nascimento <geraldogabriel@gmail.com>
>

Hi, Takashi

> Thanks the patch.

My pleasure.

> 
> The code change is OK, but better to use more explicit form in C99
> style initialization, something like below.

I'll send v2 of the patch with C99-style designators as you have
suggested.

> 
> Could you check whether this works?

That's the problem, I don't own any DJM mixer, someone else needs to
test this.

Thanks,
Geraldo Nascimento

> 
> 
> thanks,
> 
> Takashi
> 
> --- a/sound/usb/mixer_quirks.c
> +++ b/sound/usb/mixer_quirks.c
> @@ -3016,11 +3016,11 @@ static const struct snd_djm_ctl snd_djm_ctls_750mk2[] = {
>  
>  
>  static const struct snd_djm_device snd_djm_devices[] = {
> -	SND_DJM_DEVICE(250mk2),
> -	SND_DJM_DEVICE(750),
> -	SND_DJM_DEVICE(750mk2),
> -	SND_DJM_DEVICE(850),
> -	SND_DJM_DEVICE(900nxs2)
> +	[SND_DJM_250MK2_IDX] =	SND_DJM_DEVICE(250mk2),
> +	[SND_DJM_750_IDX] =	SND_DJM_DEVICE(750),
> +	[SND_DJM_850_IDX] =	SND_DJM_DEVICE(850),
> +	[SND_DJM_900NXS2_IDX] =	SND_DJM_DEVICE(900nxs2),
> +	[SND_DJM_750MK2_IDX] =	SND_DJM_DEVICE(750mk2),
>  };
>  
>

      reply	other threads:[~2021-12-04  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 20:55 [PATCH] ALSA: usb-audio: Reorder snd_djm_devices entries Geraldo Nascimento
2021-12-03 13:37 ` Takashi Iwai
2021-12-03 23:58   ` 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=YaqvPbmEGZth/0Ag@geday \
    --to=geraldogabriel@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=livvy@base.nu \
    --cc=tiwai@suse.de \
    --cc=willovertonuk@gmail.com \
    /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.