Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4384967pxy; Tue, 27 Apr 2021 03:56:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXArF0DFOqUHFGln7cLXZ8iYDb6MACu2U2HO1Q7llERVzvDqH/uDUuhoLDovTx/PgqLhx7 X-Received: by 2002:a17:907:3f22:: with SMTP id hq34mr22284508ejc.535.1619520992268; Tue, 27 Apr 2021 03:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619520992; cv=none; d=google.com; s=arc-20160816; b=NVCiy7IeS5E47JONKkHDqIHfJUXmLt2hlJMoUUpfvgwWKM5JDs7gLb6S+7/Txufjnb PqHa4CxunM0E+p2VMojLvVeqcpH0ZyfNanrY5MTqgNGBw70UvydpUK6Jqcvb8eBAQplr QfSwUY/Z7jjPYnV1hmGm8yPjyRNmCHzvA5KIEo8gI9VS4ZZp1xo8NIZszyNmd6DFTIb2 SoksDYZ8PMi2nsCzGtGKnXWgQV2t5N0aAUvwFjoco7z8YF4WjVQGfHP0liT7mqQ+Ohb9 iL1aRcANVOHsRVstn5pfiIy0mjHgRJGdtK2f6w4CV/CapE3UvhVTPfFA3yc68vYlr5N3 rQyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=hqU3dsRMXWkZT0y15vhU365xelykdNoVQF/ZZxetDuM=; b=ppDDySEgZ040iLY0SwY8uHetMlQ5dSexyb25yGhtl/fCn66e+RfkYQ4wgZdJawwN+8 wrAuzEKLmJ1xSzHP4lhX1x6IbI3mak/uMSvveW6JFXe16vsFO5mQkRxSEU2EDzFRdIYz VXNPkHUE1DAL9bjtsm0kVaBRdWd3hYs8abLbTDAnhVEKNGzKfVaSrW0a0mUEDnQKbeBA v3b+gDT1yCmouGjsfs3x8mCLGrnI2GTdaH14aC9sG8LeUj7z07wnzkTnc7hzqFS8ngDq nEHEkEnyfxgaDZHhLPNz0gSDu39J3K+ILasKzUzWs8tI21JmPlIhhAShfKDu25vm//To L9zw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si2522643eda.90.2021.04.27.03.56.08; Tue, 27 Apr 2021 03:56:32 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235723AbhD0Kzr (ORCPT + 99 others); Tue, 27 Apr 2021 06:55:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:46480 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230341AbhD0Kzq (ORCPT ); Tue, 27 Apr 2021 06:55:46 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 72BB7B019; Tue, 27 Apr 2021 10:55:02 +0000 (UTC) Date: Tue, 27 Apr 2021 12:55:02 +0200 Message-ID: From: Takashi Iwai To: Shengjiu Wang Cc: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, broonie@kernel.org Subject: Re: [PATCH 1/2] ALSA: pcm: Add support for 705.6KHz and 768KHz sample rate In-Reply-To: <1619519663-10406-1-git-send-email-shengjiu.wang@nxp.com> References: <1619519663-10406-1-git-send-email-shengjiu.wang@nxp.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Apr 2021 12:34:22 +0200, Shengjiu Wang wrote: > > 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 How many devices require it for now? I don't want to extend the core definitions blindly unless those rates are really commonly used. You can add those specific rates in the codec driver instead. thanks, Takashi > --- > 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 >