Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5642021ybi; Wed, 31 Jul 2019 00:53:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHueyaFtXTV1H3ksr82WDwjNFo42V/50UJsKJD2asaosIA86IEIrV5OYQUVsNJjcMufhCu X-Received: by 2002:a62:82c2:: with SMTP id w185mr47714717pfd.202.1564559636770; Wed, 31 Jul 2019 00:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564559636; cv=none; d=google.com; s=arc-20160816; b=UIIIgOSMOxKMX3K2h4dfstl3HRKj9RD7K7U5zzB6pQKVC5FcNyIxFChmACsoaLql3g YzIEGAOuD8QZaqKZds0xlL8c2s26Bztu3Bv2QTJMh3TAdnjS0SAj26iyMcjD3tNI0FNK rGPAPIIboiJ2Ds6g+x9OTKvelKMomdyp5QawiNwzZzmp3N3TKiMFfuWJP7ux7utB1Iyt J3JXDWnMr3Um1GPnF6EQgU66e0n7jFuuKWzWoRKu48F17lvyWk0oLGxdFlwn5Z73AyfD /DpDucQaykh5gbVHUjXZeTcysnG0USdOocyZj9cwNYAhPd5iMXUm7+326DJk+dDUsAqX 887Q== 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=FXOyWv9FMU0xMI9d4ZtkmAGA1C4zQRcFb3WuebH17ic=; b=iIDMhSmL3gKETF61BnNMSlxFX6RDxtWyy9EE22n2lsbnm8B7XS2qex4x+GQ+TycmdF EGd2gAZcfKKwaF8OeklPv7gjygwb0Y+sIQrgCcpnZD6CLffm3uQBxYQRuBEc90lN3Lkq QLTv5+LcJgtY65R5uD+zMli3jgb3CPN7TQIq/4toUZvdJrorD1iCfTqa0C7AOk6cbIzP XQKM3fDW6HlafWvynUtKUQWVxA3zGWhJgG21skLOEpMWwV5VBiG7Nn+HC0FImwB35K3w dod6JXXcvSQA9795LZiWAdoor7cFf1sY+ri92ihxfDqWkadwBGRiHPlNrXXKftj0bIYY 9ovQ== 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 j4si19752946pgp.343.2019.07.31.00.53.41; Wed, 31 Jul 2019 00:53:56 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727346AbfGaHmA (ORCPT + 99 others); Wed, 31 Jul 2019 03:42:00 -0400 Received: from mail-sz.amlogic.com ([211.162.65.117]:7260 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbfGaHmA (ORCPT ); Wed, 31 Jul 2019 03:42:00 -0400 Received: from localhost.localdomain (10.28.8.29) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.1591.10; Wed, 31 Jul 2019 15:42:34 +0800 From: chunguo feng To: CC: , , , , , , , , , Subject: [PATCH] ASoC: max98373: add 88200 and 96000 sampling rate support Date: Wed, 31 Jul 2019 15:41:56 +0800 Message-ID: <20190731074156.5620-1-chunguo.feng@amlogic.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.28.8.29] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: fengchunguo 88200 and 96000 sampling rate was not enabled on driver, so can't be played. The error information: max98373 3-0031:rate 96000 not supported max98373 3-0031:ASoC: can't set max98373-aif1 hw params: -22 Signed-off-by: fengchunguo --- sound/soc/codecs/max98373.c | 6 ++++++ sound/soc/codecs/max98373.h | 2 ++ 2 files changed, 8 insertions(+) mode change 100644 => 100755 sound/soc/codecs/max98373.c mode change 100644 => 100755 sound/soc/codecs/max98373.h diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c old mode 100644 new mode 100755 index 528695cd6a1c..8c601a3ebc27 --- a/sound/soc/codecs/max98373.c +++ b/sound/soc/codecs/max98373.c @@ -267,6 +267,12 @@ static int max98373_dai_hw_params(struct snd_pcm_substream *substream, case 48000: sampling_rate = MAX98373_PCM_SR_SET1_SR_48000; break; + case 88200: + sampling_rate = MAX98373_PCM_SR_SET1_SR_88200; + break; + case 96000: + sampling_rate = MAX98373_PCM_SR_SET1_SR_96000; + break; default: dev_err(component->dev, "rate %d not supported\n", params_rate(params)); diff --git a/sound/soc/codecs/max98373.h b/sound/soc/codecs/max98373.h old mode 100644 new mode 100755 index f6a37aa02f26..a59e51355a84 --- a/sound/soc/codecs/max98373.h +++ b/sound/soc/codecs/max98373.h @@ -130,6 +130,8 @@ #define MAX98373_PCM_SR_SET1_SR_32000 (0x6 << 0) #define MAX98373_PCM_SR_SET1_SR_44100 (0x7 << 0) #define MAX98373_PCM_SR_SET1_SR_48000 (0x8 << 0) +#define MAX98373_PCM_SR_SET1_SR_88200 (0x9 << 0) +#define MAX98373_PCM_SR_SET1_SR_96000 (0xA << 0) /* MAX98373_R2028_PCM_SR_SETUP_2 */ #define MAX98373_PCM_SR_SET2_SR_MASK (0xF << 4) -- 2.22.0