Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5537697ybi; Tue, 30 Jul 2019 22:58:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvbYaQ6thP0h98YcLvTf33xdhEUbBmy1Quu1Rs8P350xkvMdfKfAT1COhpVFPvh/BrHpQ0 X-Received: by 2002:a63:ec13:: with SMTP id j19mr30814795pgh.369.1564552732848; Tue, 30 Jul 2019 22:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564552732; cv=none; d=google.com; s=arc-20160816; b=SsJvfplWQbpI8BZ8yQVmduDMN0ukeMEueQOGZQPxUdZP4b0Vc1jOrTjwR8RyDnsmG4 8M+/VQTSnnhDwRUNPh1cZb8CTqxIAWy0JxQQdqdGPC8kNEidlpNe7pa9COZTCm3lOBra oguDAlb55WtoeM6jLOqega9xdnMpgLRsR8quntedRwNNpO0X8+Nkumn17qPAWhcUmOfL o+Nu0DfOm5l1d+aGYCvWJxVfmsXAIW4awSFhNRUHYfwZhCf3GVtpLpKBNlE50K2+SENf bR5b+TX7AkJ15B9CJMxamNgCV5AdcIGsWu0fjEfDu6BOrS/dJnvxjNMr+9TdhWoecbzJ Tz2g== 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=mqsobQAwsORzeV7AvPi2cWpwJQI6b4ySYqzKbTYmCEV4HeWfRhHSHwRdBRjdcurVY4 UhBNkVwIdG+1KJ+Zd50t24BUHWaAcurv2SiwkSgjN8fynPrwXAkfa/0JgaHlg7GUd7L4 2T/0EQVg0WeFQ46SLj6aTVzZSMK+RMruQaUDacWM193/PlAMpWcSMdMWZ1sw6AxCaH50 2G8dGcwEKV+jkUndctckTktuhBWFX6vPlcmuCv4QKBvRGc5eGum2YS8uwZ1ssQywYUgE 7W8HrvcDHjpxpGScK4E89yqendG9uRp3IX3DrRxw3ZmV+1ITPdhuFy7tbR7HfQQPZ8He I31A== 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 u20si28572558plq.421.2019.07.30.22.58.37; Tue, 30 Jul 2019 22:58:52 -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 S1727109AbfGaFkS (ORCPT + 99 others); Wed, 31 Jul 2019 01:40:18 -0400 Received: from mail-sz.amlogic.com ([211.162.65.117]:48516 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727049AbfGaFkP (ORCPT ); Wed, 31 Jul 2019 01:40:15 -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 13:40:48 +0800 From: chunguo feng To: CC: , , , , , , , , , Subject: [PATCH] ASoC: max98383: add 88200 and 96000 sampling rate support Date: Wed, 31 Jul 2019 13:40:03 +0800 Message-ID: <20190731054003.16076-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