Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4063159imm; Mon, 14 May 2018 01:54:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqT2ykPvkM8ltSHeYPhrtvi7XAZPO7TsG86fzqjVqg406KSUABVtPqU5ocuiJ0R6Rz/IS3j X-Received: by 2002:a62:3f81:: with SMTP id z1-v6mr9557691pfj.216.1526288094167; Mon, 14 May 2018 01:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526288094; cv=none; d=google.com; s=arc-20160816; b=Jq6CQTqn/hTy9xDIdnaWVUQlgWnDvUprHWCC11+7yLVvxirdPxX0XhY5jq5gA36hD9 rKH98xyX/zucwKrk4aSy6zYBfPECRcDnJxgn1QMAxjQGeI0URzl81vOhuQE/WR4G9TcP DIvH7WjAFf7CZSDumG/cFdgpA/rgPYfRrC8nZ+ss1gO6IskklO7wNsct5jycqjVeAm86 1Z1v8221eHaAcEoDzx8p4dwfhcHHq777z77I1zaqVMZpozuphmVOw4QQVOOZruxU2w06 hD3wbknsR/oWXmV1i7zZKLmu6FsvA5X+Te4XD4bAS7yoo8a/ASmeMtyygBstJf1ywWPD 6Hxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=ql4i3IQ3SBskgtErOqU9s9UDZGphpQIqIpLI2/18nVo=; b=FzVEkn/0MrkKM0t+xPhmzNxLAFrxXIm7Xgk+TdLfomtbC1wsgZ3ECMSdaZiiNOBuJz fouWVQwtE5q4SAwPJw/Cl1EBKncLY4C8vwxd4KBgLYt1iVb551HTZBWHf+vlxmwJD+60 RL6NkOGYFJl6iVYVBM1vQ4itjNNflaMjP2I1eXu0OtRKyyzdPjZgl20D+Nm1N1zUubzp fp0fAvEQjAdbdE1wqCi8VmBzbZhbh7VM1dRKBjBxFEmlajYVantMOBnmLNSIkxaKBn5E FrAE2uZ9bYCcyh5zjCPrL7xQvxC/lE4SHWHsipwo4eMZV3PVo2hmUZxwCrRGmuTxTkAO KvUQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2-v6si5914405pge.429.2018.05.14.01.54.39; Mon, 14 May 2018 01:54:54 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751780AbeENIy3 (ORCPT + 99 others); Mon, 14 May 2018 04:54:29 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:47937 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750750AbeENIy2 (ORCPT ); Mon, 14 May 2018 04:54:28 -0400 Received: from 167-98-27-229.cust-167.exponential-e.net ([167.98.27.229] helo=[10.24.4.248]) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1fI9FR-0001ov-KA; Mon, 14 May 2018 09:54:25 +0100 Subject: Re: [PATCH v4 4/4] ALSA: usb-audio: UAC3: Parse Input Terminal number of channels. To: tiwai@suse.com Cc: alsa-devel@alsa-project.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ruslan.bilovol@gmail.com References: <20180420170327.31569-1-jorge.sanjuan@codethink.co.uk> <20180511152537.32267-1-jorge.sanjuan@codethink.co.uk> <20180511152537.32267-5-jorge.sanjuan@codethink.co.uk> From: Jorge Message-ID: Date: Mon, 14 May 2018 09:54:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180511152537.32267-5-jorge.sanjuan@codethink.co.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/05/18 16:25, Jorge Sanjuan wrote: > Obtain the number of channels for the Input Terminal from the > Logical Cluster Descriptor. This achieves a useful minimal parsing > of this unit so it can be used in other units in the topology. > > Signed-off-by: Jorge Sanjuan > --- > sound/usb/mixer.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c > index 431f3c319839..19b25fbc7437 100644 > --- a/sound/usb/mixer.c > +++ b/sound/usb/mixer.c > @@ -903,9 +903,9 @@ static int check_input_term(struct mixer_build *state, int id, > * recursion calls */ > term->id = id; > term->type = le16_to_cpu(d->wTerminalType); > + term->channels = get_cluster_channels_v3(state, d->wClusterDescrID); Sorry about this. I just spotted that I should have used the helper function I added to access d->wClusterDescrID `uac3_mixer_unit_wClusterDescrID`. I got the sparse warning for the endianess and realized that. I'll resend this one patch. > > - /* REVISIT: UAC3 IT doesn't have channels/cfg */ > - term->channels = 0; > + /* REVISIT: UAC3 IT doesn't have channels cfg */ > term->chconfig = 0; > > term->name = le16_to_cpu(d->wTerminalDescrStr); >