mbox series

[V3,00/17] Add Scarlett Gen 3 support

Message ID cover.1624379707.git.g@b4.vu
Headers show
Series Add Scarlett Gen 3 support | expand

Message

Geoffrey D. Bennett June 22, 2021, 5 p.m. UTC
This patch series adds a fixed version of Scarlett Gen 3 support on
top of the previous "Refactor Scarlett Gen 2 support" patches 1-15/31.

Two differences from the previous patches 16-31/31:

- Add patch from Takashi fixing scarlett2_add_new_ctl()

- Don't increase MAX_ID_ELEMS

I tested the above changes on the 18i20 Gen 3 and confirmed no crash
with 439 controls and MAX_ID_ELEMS 256.

Geoffrey D. Bennett (16):
  ALSA: usb-audio: scarlett2: Add Gen 3 mixer support
  ALSA: usb-audio: scarlett2: Add support for "input-other" notify
  ALSA: usb-audio: scarlett2: Add Gen 3 MSD mode switch
  ALSA: usb-audio: scarlett2: Move get config above set config
  ALSA: usb-audio: scarlett2: Allow bit-level access to config
  ALSA: usb-audio: scarlett2: Add support for Solo and 2i2 Gen 3
  ALSA: usb-audio: scarlett2: Add "air" switch support
  ALSA: usb-audio: scarlett2: Add phantom power switch support
  ALSA: usb-audio: scarlett2: Add direct monitor support
  ALSA: usb-audio: scarlett2: Label 18i8 Gen 3 line outputs correctly
  ALSA: usb-audio: scarlett2: Split up sw_hw_enum_ctl_put()
  ALSA: usb-audio: scarlett2: Add sw_hw_ctls and mux_ctls
  ALSA: usb-audio: scarlett2: Update mux controls to allow updates
  ALSA: usb-audio: scarlett2: Add speaker switching support
  ALSA: usb-audio: scarlett2: Update get_config to do endian conversion
  ALSA: usb-audio: scarlett2: Add support for the talkback feature

Takashi Iwai (1):
  ALSA: usb-audio: scarlett2: Fix wrong resume call

 sound/usb/mixer.c               |    3 +
 sound/usb/mixer.h               |    1 +
 sound/usb/mixer_quirks.c        |    6 +
 sound/usb/mixer_scarlett_gen2.c | 1804 ++++++++++++++++++++++++++++---
 4 files changed, 1637 insertions(+), 177 deletions(-)

Comments

Takashi Iwai June 22, 2021, 7:42 p.m. UTC | #1
On Tue, 22 Jun 2021 19:00:49 +0200,
Geoffrey D. Bennett wrote:
> 
> From: Takashi Iwai <tiwai@suse.de>
> 
> The current way of the scarlett2 mixer code managing the
> usb_mixer_elem_info object is wrong in two ways: it passes its
> internal index to the head.id field, and the val_type field is
> uninitialized.  This ended up with the wrong execution at the resume
> because a bogus unit id is passed wrongly.  Also, in the later code
> extensions, we'll have more mixer elements, and passing the index will
> overflow the unit id size (of 256).
> 
> This patch corrects those issues.  It introduces a new value type,
> USB_MIXER_BESPOKEN, which indicates a non-standard mixer element, and
> use this type for all scarlett2 mixer elements, as well as
> initializing the fixed unit id 0 for avoiding the overflow.
> 
> Tested-by: Geoffrey D. Bennett <g@b4.vu>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

When submitting a patch, you have to your Signed-off-by line even if
you are no author.  Could you give it?  Just reply with a proper SOB,
then I'll fix manually.


thanks,

Takashi
Geoffrey D. Bennett June 23, 2021, 1:03 a.m. UTC | #2
On Tue, Jun 22, 2021 at 09:42:10PM +0200, Takashi Iwai wrote:
> On Tue, 22 Jun 2021 19:00:49 +0200,
> Geoffrey D. Bennett wrote:
> > 
> > From: Takashi Iwai <tiwai@suse.de>
> > 
> > The current way of the scarlett2 mixer code managing the
> > usb_mixer_elem_info object is wrong in two ways: it passes its
> > internal index to the head.id field, and the val_type field is
> > uninitialized.  This ended up with the wrong execution at the resume
> > because a bogus unit id is passed wrongly.  Also, in the later code
> > extensions, we'll have more mixer elements, and passing the index will
> > overflow the unit id size (of 256).
> > 
> > This patch corrects those issues.  It introduces a new value type,
> > USB_MIXER_BESPOKEN, which indicates a non-standard mixer element, and
> > use this type for all scarlett2 mixer elements, as well as
> > initializing the fixed unit id 0 for avoiding the overflow.
> > 
> > Tested-by: Geoffrey D. Bennett <g@b4.vu>
> > Cc: <stable@vger.kernel.org>
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> 
> When submitting a patch, you have to your Signed-off-by line even if
> you are no author.  Could you give it?  Just reply with a proper SOB,
> then I'll fix manually.

Of course. You know how many times I've read
Documentation/process/submitting-patches.rst ? Not enough for it to
sink in, apparently :). Please append my SOB:

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>

Thanks,
Geoffrey.
Takashi Iwai June 23, 2021, 6:39 a.m. UTC | #3
On Wed, 23 Jun 2021 03:03:27 +0200,
Geoffrey D. Bennett wrote:
> 
> On Tue, Jun 22, 2021 at 09:42:10PM +0200, Takashi Iwai wrote:
> > On Tue, 22 Jun 2021 19:00:49 +0200,
> > Geoffrey D. Bennett wrote:
> > > 
> > > From: Takashi Iwai <tiwai@suse.de>
> > > 
> > > The current way of the scarlett2 mixer code managing the
> > > usb_mixer_elem_info object is wrong in two ways: it passes its
> > > internal index to the head.id field, and the val_type field is
> > > uninitialized.  This ended up with the wrong execution at the resume
> > > because a bogus unit id is passed wrongly.  Also, in the later code
> > > extensions, we'll have more mixer elements, and passing the index will
> > > overflow the unit id size (of 256).
> > > 
> > > This patch corrects those issues.  It introduces a new value type,
> > > USB_MIXER_BESPOKEN, which indicates a non-standard mixer element, and
> > > use this type for all scarlett2 mixer elements, as well as
> > > initializing the fixed unit id 0 for avoiding the overflow.
> > > 
> > > Tested-by: Geoffrey D. Bennett <g@b4.vu>
> > > Cc: <stable@vger.kernel.org>
> > > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > 
> > When submitting a patch, you have to your Signed-off-by line even if
> > you are no author.  Could you give it?  Just reply with a proper SOB,
> > then I'll fix manually.
> 
> Of course. You know how many times I've read
> Documentation/process/submitting-patches.rst ? Not enough for it to
> sink in, apparently :). Please append my SOB:
> 
> Signed-off-by: Geoffrey D. Bennett <g@b4.vu>

OK, now all patches have been merged.


Thanks!

Takashi
Hin-Tak Leung June 25, 2021, 2:09 a.m. UTC | #4
On Wednesday, 23 June 2021, 07:39:48 BST, Takashi Iwai <tiwai@suse.de> wrote:


> > Of course. You know how many times I've read
> > Documentation/process/submitting-patches.rst ? Not enough for it to
> > sink in, apparently :). Please append my SOB:
> > 
> > Signed-off-by: Geoffrey D. Bennett <g@b4.vu>

> OK, now all patches have been merged.

To avoid this kind of problems, many years ago, I have had (see 'man git-config' for details):

 git config format.signoff true

set in my local kernel dev repo clone. This way "git format-patch ..." would automatically add my sign-off for anything I "git format-patch" of . It is easier to remove the line if not needed, or just ignore the line if irrelevant, than to add the line every time. I did that to a few repos which explicitly requires signoff's. (wine is another one).



Back to this series of patches, I think it is appropriate to add
 Acked-by: Hin-Tak <htl10@users.sourceforge.net>

or 'Cc: ' as I was involved in packaging and adapting the patch series as for dkms / out-of-tree build for testing, so that I get e-mails, etc if it gets moved about / back-ported, though I was not involved in actually testing /using the patch series.

Regards,
Hin-Tak