Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4381743pxy; Tue, 27 Apr 2021 03:50:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+miaGJ66rE93i7vEmfBcPa1vpRzHLIx8uziK0fDBFeFAarczfw9g1gtmDyd8H4oo+chFe X-Received: by 2002:a17:902:9008:b029:e6:f37a:2183 with SMTP id a8-20020a1709029008b02900e6f37a2183mr23711494plp.49.1619520644690; Tue, 27 Apr 2021 03:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619520644; cv=none; d=google.com; s=arc-20160816; b=QYEHo5mQgg2kczeACm5RzkBbFbpcOU8iwbDXe0k9dqR2Re5YM9vdVrA4DKPAJKaoFN Btv0zt7A1RpTqECVxx9fvjFOVA6qDyz77G6d7nEFCZSwVtJkrExqYkJcFXl1APj4ojy2 ijMdajhDaQaBfa60j5ipZaXZvSP+uf0DpoYRcrHYdAauRsD5gy8k2v4GLHblb6IXyCdI SaQjrYDFR6/vH3EwyEEJruVLNaKqiUKEb7G3GjafeT85Pdnnbdlt+8iuqHQA0ZLiSI8l MUxDvQwxIyUqtx11kBkQCBB9rFglEzuEL4GBi+WkI01F2AfcRzvwOSJ53zpQeoAQWsG8 3PVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:to:from; bh=2+Mq8eE8ImIO7wNBy231MhvsBg82ElLGvWK6lq5WOoA=; b=hYEZkmlAEalxAD0m1WhBXt9wkGR0WSw5SgQdxv9IWstHr+OnA/YdK4ef0eERUMcWe1 /hMLMeI4HgjBrUaYXKWkISkmqRvnMP+5agNWtTA0plJ3UXLleY0pjWzchtN4LhN4LJwF V1E2A1bkATMVetJjasrH9Q5MGbjNyNhzptYyvWI9dUNd5ngCEt9D7BF2ZStTVfmy1gz4 aIe5V+mNdpcW38ZGkVmh4XsYZTmVisYOLcokowKew0vAOEyWSCZ3Ist6tV2JN5kzd4/j Xxf/nThymJ6JR4vwCX8AEDZbxyer4AQDAxHMz5uC14WIEpwaY506U8udSxH4ynQbjQYh b44w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l8si8210093plt.46.2021.04.27.03.50.31; Tue, 27 Apr 2021 03:50:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235504AbhD0Kuj (ORCPT + 99 others); Tue, 27 Apr 2021 06:50:39 -0400 Received: from inva020.nxp.com ([92.121.34.13]:51900 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230365AbhD0Kui (ORCPT ); Tue, 27 Apr 2021 06:50:38 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id B56251A164A; Tue, 27 Apr 2021 12:49:54 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6DDC51A0A59; Tue, 27 Apr 2021 12:49:52 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 3F03E4029D; Tue, 27 Apr 2021 12:49:49 +0200 (CEST) From: Shengjiu Wang To: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, broonie@kernel.org Subject: [PATCH 1/2] ALSA: pcm: Add support for 705.6KHz and 768KHz sample rate Date: Tue, 27 Apr 2021 18:34:22 +0800 Message-Id: <1619519663-10406-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some high resolution codecs support 705.6KHz and 768KHz rates. So extend supported sample rate to 768kHz in pcm.h. Signed-off-by: Shengjiu Wang --- include/sound/pcm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 2e1200d17d0c..88056824ffec 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -121,6 +121,8 @@ struct snd_pcm_ops { #define SNDRV_PCM_RATE_192000 (1<<12) /* 192000Hz */ #define SNDRV_PCM_RATE_352800 (1<<13) /* 352800Hz */ #define SNDRV_PCM_RATE_384000 (1<<14) /* 384000Hz */ +#define SNDRV_PCM_RATE_705600 (1<<15) /* 705600Hz */ +#define SNDRV_PCM_RATE_768000 (1<<16) /* 768000Hz */ #define SNDRV_PCM_RATE_CONTINUOUS (1<<30) /* continuous range */ #define SNDRV_PCM_RATE_KNOT (1<<31) /* supports more non-continuos rates */ @@ -136,6 +138,9 @@ struct snd_pcm_ops { #define SNDRV_PCM_RATE_8000_384000 (SNDRV_PCM_RATE_8000_192000|\ SNDRV_PCM_RATE_352800|\ SNDRV_PCM_RATE_384000) +#define SNDRV_PCM_RATE_8000_768000 (SNDRV_PCM_RATE_8000_768000|\ + SNDRV_PCM_RATE_705600|\ + SNDRV_PCM_RATE_768000) #define _SNDRV_PCM_FMTBIT(fmt) (1ULL << (__force int)SNDRV_PCM_FORMAT_##fmt) #define SNDRV_PCM_FMTBIT_S8 _SNDRV_PCM_FMTBIT(S8) #define SNDRV_PCM_FMTBIT_U8 _SNDRV_PCM_FMTBIT(U8) -- 2.27.0