Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5186801ybv; Tue, 11 Feb 2020 10:48:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxiBG0pnd5bHX1m53B8UDftqdVi3KSvA5s9/aGTJVpgUAtrzf+ZCPIfQm4cD6yOMF78dbCB X-Received: by 2002:a54:488d:: with SMTP id r13mr3631040oic.115.1581446889826; Tue, 11 Feb 2020 10:48:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581446889; cv=none; d=google.com; s=arc-20160816; b=I0YZ9EKAR9CPmpWf0J5r0a21o1jWvTWTJkcCIX+0ndM/THl7mY8IfmBE4PKhC7YhP+ 5rv/YPQ7UPI+g3rnUAgVEwW3O1vOG1VekOWDX+4uko0byYCLFGttkiF2ZbUaBznqqBbz aEOP2KiH/YQVBGZgrR2aWFl0c2i9BosJTVXVv/h/n0D0Cau+8VA8kb4YgwIzNjWd/ntk Zsso+hHdNWQOE4QffN2tBxyc8kbcTWCth66iCVpEyTTS55oXvPL+3fbbsUYgnE6g81yF 6J8CgO6NqP8tYA0kweF1R2qunW7t01naOm7WytA/KAOKVBRI/hTgx8klYzRO4mMi8K73 i2Ew== 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:mime-version :message-id:date:subject:cc:to:from; bh=8vKDSqnHXMxM6UbZpMgqezFGV7iFRtf6ymNXpe/ujkk=; b=laCAeLjVwa2m+jlLzyp3omC8gRtJjQtvQ0dBiWcJMPQOMoUV3zH6NNXqxzjDTvqOmS jc/vspNxPRGyIhHCTM+xPJ4hFnOJoZqwmfWBXrE+0gleXLbkvg8cuKMi6WGWuJPYQpkL p0omV4yZscXRMmZwn/3CKEnBvaeZ6/LTE9qHIuPl/MHNNFsppLXN5Bsh9CW05k7xdw5S R8j9mxAghHVbcrL89VHAhUTcWXL4vvm22aRs8p5U4DWRAIYp/g99vbwFvnGzMD5wBgcY 6zxFGCSrwTgbFX5k5pM1YaJPpxi2/ri5yo3WDaehviWz+7h1CCjlLnVO9L0dX5VH2lRW UvAg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19si2039889oii.54.2020.02.11.10.47.57; Tue, 11 Feb 2020 10:48:09 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729054AbgBKQWi (ORCPT + 99 others); Tue, 11 Feb 2020 11:22:38 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:37254 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728222AbgBKQWh (ORCPT ); Tue, 11 Feb 2020 11:22:37 -0500 Received: by mail-qt1-f194.google.com with SMTP id w47so8367285qtk.4; Tue, 11 Feb 2020 08:22:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8vKDSqnHXMxM6UbZpMgqezFGV7iFRtf6ymNXpe/ujkk=; b=Hc6Hz7OqJzPL7sRwAcwm8QOlAlpiB840p+7ZPAUZmlWZ9rTTkNMZx0++qtypqwipRr cW+Bx8qqgqfsROW+yJBa0XPTT7x80h6KY9QL4JG0I89l4K5C7VghBMJ6tm4vvfBJwiGn jyZA6brpc7HZcGSc2gaH5/YMuAE0M/R41o5oabXL0dUXnWpPLEZ7LZGLk2zL73qFq19s taZg++R9/60EQk0mpvmzanwp3LS7pZGRlufwgYFXktc4eY0Zgd8HHAh6j9gIOs2KGk20 j1h/kggHT1n8yiQACufAkzyMiTS/yRoFpaR3yX0RnvvuCidNjfyFyPgnTEt46A4IBOiL omGw== X-Gm-Message-State: APjAAAVujYpJl1FaGZ3/WmiTzbLmtQVxfEqOQGUD+HXRbI/gHjVKQqWG SY6Lu5T14cE9FtQt3kBgBb8= X-Received: by 2002:aed:38c2:: with SMTP id k60mr3178211qte.375.1581438156499; Tue, 11 Feb 2020 08:22:36 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id v10sm2312403qtq.58.2020.02.11.08.22.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 08:22:36 -0800 (PST) From: Arvind Sankar To: Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: usb-audio: Apply sample rate quirk for Audioengine D1 Date: Tue, 11 Feb 2020 11:22:35 -0500 Message-Id: <20200211162235.1639889-1-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Audioengine D1 (0x2912:0x30c8) does support reading the sample rate, but it returns the rate in byte-reversed order. When setting sampling rate, the driver produces these warning messages: [168840.944226] usb 3-2.2: current rate 4500480 is different from the runtime rate 44100 [168854.930414] usb 3-2.2: current rate 8436480 is different from the runtime rate 48000 [168905.185825] usb 3-2.1.2: current rate 30465 is different from the runtime rate 96000 As can be seen from the hexadecimal conversion, the current rate read back is byte-reversed from the rate that was set. 44100 == 0x00ac44, 4500480 == 0x44ac00 48000 == 0x00bb80, 8436480 == 0x80bb00 96000 == 0x017700, 30465 == 0x007701 Rather than implementing a new quirk to reverse the order, just skip checking the rate to avoid spamming the log. Signed-off-by: Arvind Sankar --- sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 3a5242e383b2..7f558f4b4520 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1440,6 +1440,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip) case USB_ID(0x1395, 0x740a): /* Sennheiser DECT */ case USB_ID(0x1901, 0x0191): /* GE B850V3 CP2114 audio interface */ case USB_ID(0x21b4, 0x0081): /* AudioQuest DragonFly */ + case USB_ID(0x2912, 0x30c8): /* Audioengine D1 */ return true; } -- 2.24.1