From patchwork Sat Oct 10 18:59:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Milner X-Patchwork-Id: 7367831 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8E984BEEA4 for ; Sat, 10 Oct 2015 18:59:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C14AB20909 for ; Sat, 10 Oct 2015 18:59:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 48161206B0 for ; Sat, 10 Oct 2015 18:59:27 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A1260260544; Sat, 10 Oct 2015 20:59:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 79A0826052B; Sat, 10 Oct 2015 20:59:17 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 12451260537; Sat, 10 Oct 2015 20:59:16 +0200 (CEST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by alsa0.perex.cz (Postfix) with ESMTP id F021126052B for ; Sat, 10 Oct 2015 20:59:08 +0200 (CEST) Received: by wiclk2 with SMTP id lk2so108078304wic.0 for ; Sat, 10 Oct 2015 11:59:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:from:to:cc:subject:date; bh=9iz7aiYkAz8GG5UUA2+d20fyR3xphWrLGMgUvRT2d2I=; b=a+JGebf9II7WvRXbXKlymsMckimsLibTy744VYehs4i4j83fTkCPtG8dNaUVgewM8k a5Or+2hwkD8gWvj3qHeG2BvNcPkHuGohUlngBJv6FwaU4qhVtiBL+dIHgAMn3m0EtOmR fZS0h3Aki23EF3UPEV6OzdvEENnGK3tr2LB/1ccc3Tfkm1wDUMG5lz1cxt3uGhcONnSS DP01w/0PrrktzhcqlCnex50haVbww3b6F6xImyY+z1tmO06d3TdAmIYmexSFyu2vX+R4 x3vnjDhnYrZr9Vr1BMfINg0WwHApkib7O6p5F2GWRQxNl2pcYSLSvRAU6oCc+sH09Czt Esrw== X-Gm-Message-State: ALoCoQly2pk1B6XD9Qy0CJB8kaYgizuXPAzkFgIGR2yxWNhxrBm12poC88/PJmcNqGpTfByWqRQb X-Received: by 10.180.81.228 with SMTP id d4mr6148705wiy.38.1444503548626; Sat, 10 Oct 2015 11:59:08 -0700 (PDT) Received: from KAMDesktop.superlative.org (grenville1.superlative.org. [81.187.25.35]) by smtp.gmail.com with ESMTPSA id ka10sm9517478wjc.30.2015.10.10.11.59.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 10 Oct 2015 11:59:07 -0700 (PDT) Message-ID: <56195ffb.8ac9c20a.97c1e.ffffff8a@mx.google.com> X-Google-Original-Message-ID: <1444503541-17018-1-git-send-email-me> From: maillist@superlative.org X-Google-Original-From: me To: patch@alsa-project.org Date: Sat, 10 Oct 2015 19:59:01 +0100 X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, "Keith A. Milner" , "Keith A. Milner" Subject: [alsa-devel] [PATCH 1/1] Allow any MIDI endpoint to drive use of interrupt transfer on Roland devices X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Keith A. Milner" Signed-off-by: Keith A. Milner diff --git a/sound/usb/midi.c b/sound/usb/midi.c index b901f46..52b8c72 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c @@ -1860,9 +1860,14 @@ static void snd_usbmidi_switch_roland_altsetting(struct snd_usb_midi* umidi) hostif = &intf->altsetting[1]; intfd = get_iface_desc(hostif); + /* If either or both of the endpoints support interrupt transfer, + * then use the alternate setting + */ if (intfd->bNumEndpoints != 2 || - (get_endpoint(hostif, 0)->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK || - (get_endpoint(hostif, 1)->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_INT) + !((get_endpoint(hostif, 0)->bmAttributes + & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT || + (get_endpoint(hostif, 1)->bmAttributes + & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) return; snd_printdd(KERN_INFO "switching to altsetting %d with int ep\n",