From patchwork Wed Nov 29 10:55:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Sanjuan X-Patchwork-Id: 10081841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0DF3660234 for ; Wed, 29 Nov 2017 10:55:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FF021FF83 for ; Wed, 29 Nov 2017 10:55:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 047162973F; Wed, 29 Nov 2017 10:55:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C4611FF83 for ; Wed, 29 Nov 2017 10:55:55 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id ECEFD2678A9; Wed, 29 Nov 2017 11:55:43 +0100 (CET) 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 665632678A5; Wed, 29 Nov 2017 11:55:40 +0100 (CET) Received: from imap1.codethink.co.uk (imap1.codethink.co.uk [176.9.8.82]) by alsa0.perex.cz (Postfix) with ESMTP id BFC3B26788E for ; Wed, 29 Nov 2017 11:55:36 +0100 (CET) Received: from [167.98.27.226] (helo=devhw0) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1eK01i-0002Yv-AY; Wed, 29 Nov 2017 10:55:38 +0000 Received: from jorgesanjuan by devhw0 with local (Exim 4.89) (envelope-from ) id 1eK01f-00041d-VX; Wed, 29 Nov 2017 10:55:36 +0000 From: Jorge Sanjuan To: alsa-devel@alsa-project.org Date: Wed, 29 Nov 2017 10:55:29 +0000 Message-Id: <20171129105532.15420-4-jorge.sanjuan@codethink.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171129105532.15420-1-jorge.sanjuan@codethink.co.uk> References: <20171129105532.15420-1-jorge.sanjuan@codethink.co.uk> Cc: linux-kernel@lists.codethink.co.uk, Jorge Sanjuan Subject: [alsa-devel] [PATCH 3/6] ALSA: usb: ADC3. Do not set sample rate for BADD configuration. 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 BADD configuration is fixed to 48KHz for all AudioStreaming interfaces. Signed-off-by: Jorge Sanjuan --- sound/usb/clock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/usb/clock.c b/sound/usb/clock.c index 04361d79b163..c7f4ca4cdcd4 100644 --- a/sound/usb/clock.c +++ b/sound/usb/clock.c @@ -605,7 +605,11 @@ int snd_usb_init_sample_rate(struct snd_usb_audio *chip, int iface, case UAC_VERSION_2: case UAC_VERSION_3: - return set_sample_rate_v2v3(chip, iface, alts, fmt, rate); + if (chip->badd_profile > UAC3_FUNCTION_SUBCLASS_FULL_ADC_3_0) + return 0; + else + return set_sample_rate_v2v3(chip, iface, + alts, fmt, rate); } }