Received: by 10.192.165.148 with SMTP id m20csp1275795imm; Wed, 25 Apr 2018 15:54:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx48nS0YHI+K6bLwGm7wxUduYMcOOmNyP78EZWNBwadPwEaix41cfJWLtfq4RLkB6D0MXAo8v X-Received: by 10.101.102.143 with SMTP id b15mr24464988pgw.183.1524696886109; Wed, 25 Apr 2018 15:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524696886; cv=none; d=google.com; s=arc-20160816; b=SSsTwdY9yfleHPib0N3MmAMoxloqCEaUh0tBRnFt++Box6hU5Mcl13zxaqqOCparUk uLBs33RsqNvIaBUpQMRhxh0wRf8I7eOaNBTZrRgCQLUifZvTvB7nQxMl/twDD2wVzOlU U+1c50VhFy9yWC+k0D7HcLajEw/WBUZy2viyqa8bPW7O4d/ZlMdO36Fuii3BUXlFwfHX TuXmPbA2Xi8yyJsWgLVNk7oY1ZjCkkM0CHThkXDA3+KYbjZgUur3LlILWpjbqfruyCwD xXyN3Or4uADqqpmeUJpO2hCSkfx9BEjp/3CKJrduCh3KFqeB9mysWnr2yxsS7yK+x1Q+ mAxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=xAUqOeYgDWHpwHMdnnz9hTyGLwc06JIK6VyDHjwWGD4=; b=z+4HNUI1KrJVn0EqX16OEjWpYGAk0O7c6MSJwcQyqt1M6abgK4fIThGY8FkpxH5tkq 6HqnIIyRHb23MLXz3+Dt9UCZFgXzlL6cIsmyhgwb1S+ivP/3PlOeAnsySCVcWQ6JEaKL GZ3jG/5fEc5Z0UiZtESbA3C4FxcD4TrOe6ewsbwVvBKXhtFezsXEEFcOLEbhOks02BBN YRco+E85ju9bzVJEOg/fvy1sR+OxFvxcP6xN1fAERRQg6YLkr/J0BuZ+8pKK1ZJ/y8oc 4oZZvajuhLPZPa1AFJ0wNJgp9poBJp57ui/9NTZgvODCvszTUBo9WQ69+t344Y05tmEL ldvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ffefzYDv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11si10818275pgv.661.2018.04.25.15.54.31; Wed, 25 Apr 2018 15:54:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ffefzYDv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753949AbeDYWx0 (ORCPT + 99 others); Wed, 25 Apr 2018 18:53:26 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:46359 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752661AbeDYWxZ (ORCPT ); Wed, 25 Apr 2018 18:53:25 -0400 Received: by mail-oi0-f67.google.com with SMTP id y15-v6so14414689oia.13 for ; Wed, 25 Apr 2018 15:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xAUqOeYgDWHpwHMdnnz9hTyGLwc06JIK6VyDHjwWGD4=; b=ffefzYDvMM69179+nNqicy5PUw4eHUfV8r37tvfk3OtCGgCRiP1xShfxkQLKnMjkUk wE1MtQds++igX/4p6umBQ99RvZ1UbAovqNOkEgfYeDXjvk+VryK6mBPefGQGdRT5iNTT lDg13ymf24hcN+o9qYzghUDFdGihCyBn/WlTRtS005ZKWLJJKO8e8iKbwtmGrA3jRlwL 6JrcEPbXaHt3HWoxb+728zNLCe4etC+iDLpMu17dsuEPdzeavrZaIU+QHxf8dtg4oVy1 A5nGNhBigcrU9RlZ8PySy33GuSIglS6f4SaJscCFclPjBCX3301l1saFInqC5nXKXl5e qpSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xAUqOeYgDWHpwHMdnnz9hTyGLwc06JIK6VyDHjwWGD4=; b=o/qfLoaj7lKZWxomrzEnK4rEICTmlVdDBNh11Co+roDV1yv1pmvsxJO6a1nLE9axAz /dJ13pOHAthHY8rswq0p4ESwKt+xPowEf43YnGCzMnsGBOtheG33uykXgFvY+itwGkY2 UQdxXFDbIDzMZDLLf2cck5d0Bql3PfHer4PuTAUowo5wt6G+T7SCGfPap+Z9GntYg5PE uxdlYgGbjtYca9FeVVKf7O9d72+pp/Fx040ZbkjqWTZazFh7bCy8oE+nSAT/rXVa0UaB +DPr1dFCNzlQJN/xrcbj6+nDM7apYBGLItHPE0mo1qa0JE57vSSTMl+dJye/nbD7aovz L8GA== X-Gm-Message-State: ALQs6tBOWTW6kRj6jyGU6V0QENcWh6hFEVeookO8Yh8o0azVv4YCOonc zjHbiZJgXcbzdMWzcRUR615scAtVLnroOJsbKl8= X-Received: by 2002:aca:bc06:: with SMTP id m6-v6mr19749052oif.313.1524696804647; Wed, 25 Apr 2018 15:53:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2c03:0:0:0:0:0 with HTTP; Wed, 25 Apr 2018 15:53:24 -0700 (PDT) In-Reply-To: <20180424172445.31928-4-jorge.sanjuan@codethink.co.uk> References: <20180420170327.31569-1-jorge.sanjuan@codethink.co.uk> <20180424172445.31928-1-jorge.sanjuan@codethink.co.uk> <20180424172445.31928-4-jorge.sanjuan@codethink.co.uk> From: Ruslan Bilovol Date: Thu, 26 Apr 2018 01:53:24 +0300 Message-ID: Subject: Re: [alsa-devel] [PATCH v2 3/4] ALSA: usb-audio: Use Class Specific EP for UAC3 devices. To: Jorge Sanjuan Cc: Takashi Iwai , Greg Kroah-Hartman , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018 at 8:24 PM, Jorge Sanjuan wrote: > bmAtributes offset doesn't exist in the UAC3 CS_EP descriptor. > Hence, checking for pitch control as if it was UAC2 doesn't make > any sense. Use the defined UAC3 offsets instead. > > Signed-off-by: Jorge Sanjuan Reviewed-by: Ruslan Bilovol > --- > sound/usb/stream.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/sound/usb/stream.c b/sound/usb/stream.c > index 956be9f7c72a..5ed334575fc7 100644 > --- a/sound/usb/stream.c > +++ b/sound/usb/stream.c > @@ -576,7 +576,7 @@ static int parse_uac_endpoint_attributes(struct snd_usb_audio *chip, > > if (protocol == UAC_VERSION_1) { > attributes = csep->bmAttributes; > - } else { > + } else if (protocol == UAC_VERSION_2) { > struct uac2_iso_endpoint_descriptor *csep2 = > (struct uac2_iso_endpoint_descriptor *) csep; > > @@ -585,6 +585,13 @@ static int parse_uac_endpoint_attributes(struct snd_usb_audio *chip, > /* emulate the endpoint attributes of a v1 device */ > if (csep2->bmControls & UAC2_CONTROL_PITCH) > attributes |= UAC_EP_CS_ATTR_PITCH_CONTROL; > + } else { /* UAC_VERSION_3 */ > + struct uac3_iso_endpoint_descriptor *csep3 = > + (struct uac3_iso_endpoint_descriptor *) csep; > + > + /* emulate the endpoint attributes of a v1 device */ > + if (le32_to_cpu(csep3->bmControls) & UAC2_CONTROL_PITCH) > + attributes |= UAC_EP_CS_ATTR_PITCH_CONTROL; > } > > return attributes; > -- > 2.11.0 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel