Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp927736imm; Fri, 11 May 2018 08:27:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqPQwo34gjaqzm2CmGdyh3VsvPl1WJzbkoHxuy4DUaDwuli62StvmueOYn6WaBPRO9DW+s/ X-Received: by 2002:a65:6341:: with SMTP id p1-v6mr4768278pgv.85.1526052434898; Fri, 11 May 2018 08:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526052434; cv=none; d=google.com; s=arc-20160816; b=xzHqMIo06FNimhl6UcWG2BPT+7TOt1c11LwsHP7tQhrNR9Z/E1/KK2MImXr51iYGuP THPRO9MEHtpR86VjxoOEb4gUyuWHKId8PFVhX0Cmruh2YNWs2Ywh4ZhcbbfEeFCSN5yF ul5QPjbGb0eVf7fcDBskDUVJ7tbsF5/jLQaZy1yVGJI6uzX1nvKGFg3wji6cpoGTera5 dsdVQA0eoXLB00laIYc87ArFnwTCeXCvlsnqzVaR/aP/3upAaCZC/twM8B84C1+dG2Mt sG6FZSaHh8va8FIeH8j8SFxfkn2EUkeIqHGmGt3jXy9CGTNEM/mUWHDps6x0WMiiIGzW 29Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=WOSDtYMvQMrEs6RxWF/J9G/9gfWAbmu2JZP89cFqh7U=; b=01mIsrMn8bkH1MNVIHydfE8CGAD73IEHqy1GBblGz8gRaYlnrjq/2izB4Wyttnhx8o JBmOBmERAKnzp5GDz6Wim0+SOKE0kUiUevuFT0iE6pdT9nI5Ktt3XPA34nbms7FVsSv8 hW0GoOC0D8JBsDgHbV6jCZSuZtIypBbHhgjgXmOFUdZc3OtoniAJjpAtwBdRoZV+tEPP 0zJ5fxh2LnsnAZt6IzsHlY+SDLBxb/6GH0LlMNEK8B7otYFTpocsaMOUCiU3uhcvuFFf F+YiRYrBuL10LDpeUZgFYUjwYWylH0Ye8n9VcJhHNxkxd9+Z8UviEqqBov171rqLKYBO 9NpQ== 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 b12-v6si3488543plr.42.2018.05.11.08.27.00; Fri, 11 May 2018 08:27:14 -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 S1751926AbeEKP0X (ORCPT + 99 others); Fri, 11 May 2018 11:26:23 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:51709 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbeEKPZu (ORCPT ); Fri, 11 May 2018 11:25:50 -0400 Received: from 167-98-27-229.cust-167.exponential-e.net ([167.98.27.229] helo=ct-lt-1121.codethink.co.uk) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1fH9vY-0002XF-3O; Fri, 11 May 2018 16:25:48 +0100 From: Jorge Sanjuan To: tiwai@suse.com Cc: alsa-devel@alsa-project.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ruslan.bilovol@gmail.com, Jorge Sanjuan Subject: [PATCH v4 4/4] ALSA: usb-audio: UAC3: Parse Input Terminal number of channels. Date: Fri, 11 May 2018 16:25:37 +0100 Message-Id: <20180511152537.32267-5-jorge.sanjuan@codethink.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180511152537.32267-1-jorge.sanjuan@codethink.co.uk> References: <20180420170327.31569-1-jorge.sanjuan@codethink.co.uk> <20180511152537.32267-1-jorge.sanjuan@codethink.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); - /* 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); -- 2.11.0