Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4831409imm; Mon, 14 May 2018 14:01:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqE+UCCn+9TQLVBlUwHvOHKEYzldaHnWD+kcmiulJ/fmQVzRnZg2EMUKFVMoXDZB4mx6y4O X-Received: by 2002:a62:3f81:: with SMTP id z1-v6mr11987287pfj.216.1526331667655; Mon, 14 May 2018 14:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526331667; cv=none; d=google.com; s=arc-20160816; b=J5av//tviQxvEDUUwM5jF6WktPmVlOKq9m9KNWtmKmmtZ1v2UbHxIft8xaYfFAALZo zaHNpENnV15L2zLMT/GuNd/lJq+qRu9J23T7Nskn5p5i8tiKzWkHOTRpuCi5MDqzpT+4 i79RHO40WN0KH2nFd5UdddgnwnpYBm6fKtPpmXNSSMs4Src1vQLD/8Kw5jrk3eg1VAwL e1FujSfjdor9wr6WDwvmBuLId/kry5sZaHX+dkdWdnWw3xYMpcPTbd/2/CJwlG+8YWBI 7sMRxyj5LYPv7HdEFdq5tBfda3dwj1seO9UXM3Wgo43hyARfR8FPJ5SuavNroT4yLD/N SjdQ== 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=A+3QvxIJc4nNoZszN9PxI/51yfbUuXRKpv4tO14Gh9g=; b=QQkt0pM8fpdRvIOZc0eQKq8ATbWbMEXWtY4IC75ZzveKQSknEzEaLD/dtCOqrtqz+0 Uhlz/xc6mRHKBVEqICsnZjRb2ESRgIwM/V4GrXtUzhUGxv8XJRwSGLC/he+uAVIUeA4C LQ3Qn4YBnvuppmKMTOM4/J5GCDVeInlM4DvceiJ2LpBp6TaYam8xGgTJggAe9ECYmuNb 3Fn7Z0C0wZ/jfys/T35RCCTo9+pEpZFy/6MemowW6Qne62olKT8kzOgHm8ZRA7lGkv0D 3hCfaPdIuopTSaSPKMtqbLrBdstaYu4/ReISOZMjLX4lOF0OYRZXnDKvk8uWQn2OmQbs SYsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gA7+3jjy; 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 e3-v6si4645076pga.487.2018.05.14.14.00.53; Mon, 14 May 2018 14:01:07 -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=gA7+3jjy; 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 S1752600AbeENVAR (ORCPT + 99 others); Mon, 14 May 2018 17:00:17 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33585 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752280AbeENVAN (ORCPT ); Mon, 14 May 2018 17:00:13 -0400 Received: by mail-wr0-f193.google.com with SMTP id o4-v6so13765149wrm.0 for ; Mon, 14 May 2018 14:00:12 -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=A+3QvxIJc4nNoZszN9PxI/51yfbUuXRKpv4tO14Gh9g=; b=gA7+3jjyaCSbS4FZDjiIT2uVqzOMlmGNo79Gt5edKhy8oSaIeVQIfTuPVbPlg2X5C+ txS1xTyEtkRjkSGBdakA1e3p4shUOpUB89WFj/e4ivdLVl09wIcf/ZsUWIUp1opS61fq LPrktsrvKBiXs2IB6MOpIw4zX79knYHmoifqziCxPLoY33hpzjT3nHgFgkbPhCVydF4U wAZCKpBBSGNdrOAVzSe7MZZER8BgjJzrExVIwhH2D6yR2Hqg9/51mavFBdDZusutEcgy gjtp0hsweoZ3JQ/p9hzoBUdX+2l9MIQQEpM94T5KNTpFzIDLUyGvqJhL8db7vl1tR6G2 tPDw== 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=A+3QvxIJc4nNoZszN9PxI/51yfbUuXRKpv4tO14Gh9g=; b=YAwjMMM+f2gS7W4WJLwvl+mMOCwfEQ5i77FocPN6Hhb37gBGigpme0i75DDJ+qzR2J UQwi4zh86GNGtB6LnCuKxNj7QLyEJ51A4OixxB4m5TV44LthesfF2Gyti7ICyRLU4RrC 3y0+TI5EmZvisvauxGgPiyj2V0zDWmkEV3bi/8yiG5RNLihX/tcOCK/oPuJgan1/0GJ/ ygewU92qH1YXEKt3Lv98Sgq8NVqZozDhM0j9N2ImRLpQAJOqLyxSZguKUgU6pSyteOH7 pQnoH2sOqrGWq91fIcvOjsLMHBXK7Gkb60YMrkRTIeqFuy6+M/5PGVQuKOwsMiA+xNif ftNg== X-Gm-Message-State: ALKqPwcymTMz+DOSlU28m/EggE0UrzqEFqHj5n4SLeoggwlx4Aq9iJAJ fkYQrHG9xptg8pZcuYiVW/WDqfNFAyh+0K/Pk4g= X-Received: by 2002:adf:c4a6:: with SMTP id m35-v6mr8360114wrf.103.1526331611659; Mon, 14 May 2018 14:00:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.130.49 with HTTP; Mon, 14 May 2018 14:00:11 -0700 (PDT) In-Reply-To: <20180511152537.32267-3-jorge.sanjuan@codethink.co.uk> References: <20180420170327.31569-1-jorge.sanjuan@codethink.co.uk> <20180511152537.32267-1-jorge.sanjuan@codethink.co.uk> <20180511152537.32267-3-jorge.sanjuan@codethink.co.uk> From: Ruslan Bilovol Date: Tue, 15 May 2018 00:00:11 +0300 Message-ID: Subject: Re: [PATCH v4 2/4] ALSA: usb-audio: Use Class Specific EP for UAC3 devices. To: Jorge Sanjuan Cc: Takashi Iwai , alsa-devel@alsa-project.org, Greg Kroah-Hartman , 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 Fri, May 11, 2018 at 6:25 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. This one I already reviewed in v2 and there is no changes in v4, so still: Reviewed-by: Ruslan Bilovol By the way, this patch is an independent change and can go into v4.17-rcXX, if it's not too late for it. Thanks, Ruslan > > Signed-off-by: Jorge Sanjuan > --- > 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 764be07474a8..6b2924533d8d 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 >