alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jassi Brar <jassisinghbrar@gmail.com>
To: balbi@ti.com
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
	Linux USB Mailing List <linux-usb@vger.kernel.org>,
	clemens@ladisch.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sound: usb: mixer: increase control transfer timeout
Date: Mon, 29 Aug 2011 19:04:18 +0530	[thread overview]
Message-ID: <CABb+yY2yLTrGHOF2UuFZb1bB7SC7ahfUaznsT-1L3RUXyfdOUA@mail.gmail.com> (raw)
In-Reply-To: <20110829130014.GB13925@legolas.emea.dhcp.ti.com>

On Mon, Aug 29, 2011 at 6:30 PM, Felipe Balbi <balbi@ti.com> wrote:
> Hi,
>
> On Mon, Aug 29, 2011 at 06:07:30PM +0530, Jassi Brar wrote:
>> On Mon, Aug 29, 2011 at 6:01 PM, Felipe Balbi <balbi@ti.com> wrote:
>> > 100ms might not be enough for slower devices. Increasing
>> > timeout to 1000ms doesn't seem like overkill.
>> >
>> > Signed-off-by: Felipe Balbi <balbi@ti.com>
>> > ---
>> >
>> > Changes since v1:
>> >  . Increase all 100ms timeout to 1000ms
>> >
>> >  sound/usb/mixer.c        |    4 ++--
>> >  sound/usb/mixer_quirks.c |   10 +++++-----
>> >  2 files changed, 7 insertions(+), 7 deletions(-)
>> >
>> > diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
>> > index cdd19d7..1c9d443 100644
>> > --- a/sound/usb/mixer.c
>> > +++ b/sound/usb/mixer.c
>> > @@ -296,7 +296,7 @@ static int get_ctl_value_v1(struct usb_mixer_elem_info *cval, int request, int v
>> >                if (snd_usb_ctl_msg(chip->dev, usb_rcvctrlpipe(chip->dev, 0), request,
>> >                                    USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
>> >                                    validx, snd_usb_ctrl_intf(chip) | (cval->id << 8),
>> > -                                   buf, val_len, 100) >= val_len) {
>> > +                                   buf, val_len, 1000) >= val_len) {
>> >                        *value_ret = convert_signed_value(cval, snd_usb_combine_bytes(buf, val_len));
>> >                        snd_usb_autosuspend(cval->mixer->chip);
>> >                        return 0;
>> > @@ -445,7 +445,7 @@ int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
>> >                                    usb_sndctrlpipe(chip->dev, 0), request,
>> >                                    USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT,
>> >                                    validx, snd_usb_ctrl_intf(chip) | (cval->id << 8),
>> > -                                   buf, val_len, 100) >= 0) {
>> > +                                   buf, val_len, 1000) >= 0) {
>> >                        snd_usb_autosuspend(chip);
>> >                        return 0;
>> >                }
>> > diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
>> > index 3d0f487..7c41399 100644
>> > --- a/sound/usb/mixer_quirks.c
>> > +++ b/sound/usb/mixer_quirks.c
>> > @@ -190,18 +190,18 @@ static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
>> >                err = snd_usb_ctl_msg(mixer->chip->dev,
>> >                              usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
>> >                              USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
>> > -                             !value, 0, NULL, 0, 100);
>> > +                             !value, 0, NULL, 0, 1000);
>> >        /* USB X-Fi S51 Pro */
>> >        if (mixer->chip->usb_id == USB_ID(0x041e, 0x30df))
>> >                err = snd_usb_ctl_msg(mixer->chip->dev,
>> >                              usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
>> >                              USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
>> > -                             !value, 0, NULL, 0, 100);
>> > +                             !value, 0, NULL, 0, 1000);
>> >        else
>> >                err = snd_usb_ctl_msg(mixer->chip->dev,
>> >                              usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
>> >                              USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
>> > -                             value, index + 2, NULL, 0, 100);
>> > +                             value, index + 2, NULL, 0, 1000);
>> >        if (err < 0)
>> >                return err;
>> >        mixer->audigy2nx_leds[index] = value;
>> > @@ -299,7 +299,7 @@ static void snd_audigy2nx_proc_read(struct snd_info_entry *entry,
>> >                                      usb_rcvctrlpipe(mixer->chip->dev, 0),
>> >                                      UAC_GET_MEM, USB_DIR_IN | USB_TYPE_CLASS |
>> >                                      USB_RECIP_INTERFACE, 0,
>> > -                                     jacks[i].unitid << 8, buf, 3, 100);
>> > +                                     jacks[i].unitid << 8, buf, 3, 1000);
>> >                if (err == 3 && (buf[0] == 3 || buf[0] == 6))
>> >                        snd_iprintf(buffer, "%02x %02x\n", buf[1], buf[2]);
>> >                else
>> > @@ -332,7 +332,7 @@ static int snd_xonar_u1_switch_put(struct snd_kcontrol *kcontrol,
>> >        err = snd_usb_ctl_msg(mixer->chip->dev,
>> >                              usb_sndctrlpipe(mixer->chip->dev, 0), 0x08,
>> >                              USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
>> > -                             50, 0, &new_status, 1, 100);
>> > +                             50, 0, &new_status, 1, 1000);
>>
>> How about also converting to use a local define for timeout value ?
>
> should it be part of another patch ? The current code has no defines at
> all and $SUBJECT is just changing what's currently there to another
> value.

Can't speak for maintainers, but personally I'd prefer a single patch with two
points in changelog. The change is trivial enough.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2011-08-29 13:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 11:10 [PATCH] sound: usb: mixer: increase control transfer timeout Felipe Balbi
     [not found] ` <1314616226-15942-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2011-08-29 11:16   ` Sebastian Andrzej Siewior
     [not found]     ` <20110829111607.GB21556-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-08-29 11:19       ` Felipe Balbi
2011-08-29 11:58 ` Clemens Ladisch
     [not found]   ` <4E5B7EE7.6070103-P6GI/4k7KOmELgA04lAiVw@public.gmane.org>
2011-08-29 12:23     ` Felipe Balbi
2011-08-29 12:31       ` [PATCH v2] " Felipe Balbi
2011-08-29 12:37         ` Jassi Brar
     [not found]           ` <CABb+yY15qrszsbJSGGFra7mrVRO_oQPUhNT=U7TNpyoYikABPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-29 13:00             ` Felipe Balbi
2011-08-29 13:34               ` Jassi Brar [this message]
2011-08-29 14:05           ` Clemens Ladisch
     [not found]             ` <4E5B9CB0.4090708-P6GI/4k7KOmELgA04lAiVw@public.gmane.org>
2011-08-29 14:22               ` Jassi Brar
2011-09-12 10:57                 ` Takashi Iwai
2011-09-16  6:25 ` [PATCH] " Takashi Iwai
2011-09-26  8:49   ` Felipe Balbi
2011-09-27  6:52     ` Clemens Ladisch

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=CABb+yY2yLTrGHOF2UuFZb1bB7SC7ahfUaznsT-1L3RUXyfdOUA@mail.gmail.com \
    --to=jassisinghbrar@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=balbi@ti.com \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).