From: "Geoffrey D. Bennett" <g@b4.vu>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH V4] ALSA: usb-audio: Scarlett Gen 2 mixer interface
Date: Wed, 10 Jul 2019 01:54:30 +0930 [thread overview]
Message-ID: <20190709162430.GA25766@b4.vu> (raw)
In-Reply-To: <s5hk1crtinr.wl-tiwai@suse.de>
On Tue, Jul 09, 2019 at 03:57:28PM +0200, Takashi Iwai wrote:
[...]
> > But I tested suspending while the delayed work
> > was waiting and it seemed like the delayed work was cancelled
> > anyway. Probably better to do a flush on suspend though;
>
> The flush would block, hence it wastes lots of time at suspend.
> Ideally the suspend should be performed immediately.
>
> > should this
> > be done through a hook like:
> >
> > diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
> > index 2444737a14b2..1572a89267c6 100644
> > --- a/sound/usb/mixer.c
> > +++ b/sound/usb/mixer.c
> > @@ -3547,6 +3547,8 @@ static int snd_usb_mixer_activate(struct usb_mixer_interface *mixer)
> > int snd_usb_mixer_suspend(struct usb_mixer_interface *mixer)
> > {
> > snd_usb_mixer_inactivate(mixer);
> > + if (mixer->private_suspend)
> > + mixer->private_suspend(mixer);
> > return 0;
> > }
> >
> > diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
> > index fa6e216a06f0..d94c688c65f7 100644
> > --- a/sound/usb/mixer.h
> > +++ b/sound/usb/mixer.h
> > @@ -28,6 +28,7 @@ struct usb_mixer_interface {
> >
> > void *private_data;
> > void (*private_free)(struct usb_mixer_interface *private_data);
> > + void (*private_suspend)(struct usb_mixer_interface *);
> > };
> >
> > #define MAX_CHANNELS 16 /* max logical channels */
> >
> > ...or just keep the existing behaviour where it seems to get
> > cancelled?
>
> I'm fine to add the new suspend/resume callbacks, but maybe the
> corresponding resume would be needed.
Did you mean "wouldn't be needed"?
[...]
> > +static int scarlett_gen2_mixer_enable;
> > +module_param(scarlett_gen2_mixer_enable, int, 0444);
> > +MODULE_PARM_DESC(scarlett_gen2_mixer_enable,
> > + "Focusrite Scarlett Gen 2 Mixer Driver Enable");
>
> Do we need this? If disabling the quirk is really required, it should
> be implemented rather in a generic option, instead.
Actually it would be best to have it disabled by default as I have had
two reports from people who tried this mixer driver and it broke audio
for them.
The failure looks like this... the first vendor-specific USB message
sent to the interface to initialise it results in an error:
e2d87480 3146602314 S Ci:1:007:0 s a1 03 0000 0005 0010 16 <
e2d87480 3152107418 C Ci:1:007:0 -2 0
My mixer driver gives up initialising, and subsequent USB messages
fail:
e2d87480 3152110424 S Ci:1:007:0 s 80 06 0304 0409 00ff 255 <
e2d87480 3152121815 C Ci:1:007:0 -71 0
e2d87480 3152121955 S Ci:1:007:0 s 80 06 0304 0409 0002 2 <
e2d87480 3152131554 C Ci:1:007:0 -71 0
e2d87480 3152133420 S Ci:1:007:0 s 80 06 0305 0409 00ff 255 <
e2d87480 3157224469 C Ci:1:007:0 -2 0
I don't see any way to distinguish between devices that do and don't
work before sending the initialisation message. lsusb -v output is
identical. I need someone to do a USB capture to see what the vendor
driver does differently, but I haven't found someone who can do this
yet.
I have 9 success reports so far and 2 failure reports. I hope that by
getting this driver out to a wider audience I can get the data I need
to make it work in all cases and then we can remove the
scarlett_gen2_mixer_enable quirk and have the driver always enabled.
Thanks for your feedback again. The other things which I didn't
comment on I agree with and will fix.
Regards,
Geoffrey.
next prev parent reply other threads:[~2019-07-09 16:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 13:26 [PATCH V4] ALSA: usb-audio: Scarlett Gen 2 mixer interface Geoffrey D. Bennett
2019-07-09 13:57 ` Takashi Iwai
2019-07-09 16:24 ` Geoffrey D. Bennett [this message]
2019-07-09 17:14 ` Takashi Iwai
2019-07-10 14:06 ` Geoffrey D. Bennett
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=20190709162430.GA25766@b4.vu \
--to=g@b4.vu \
--cc=alsa-devel@alsa-project.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.