Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4398082pxy; Tue, 27 Apr 2021 04:14:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/hMSJ0w+FvBlGga/YR4IHxZ5Hg76UmfVksRWm4KUs9j070juIu71YXK0Zk3kz4rPTsdBy X-Received: by 2002:a17:902:8b86:b029:e5:bef6:56b0 with SMTP id ay6-20020a1709028b86b02900e5bef656b0mr23676061plb.76.1619522085346; Tue, 27 Apr 2021 04:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619522085; cv=none; d=google.com; s=arc-20160816; b=vtTLt3mjRfoUlrkguhp1lzDxtYtYmBjUDA7bnrIJUzULwGa9KoQVeOoYnNe9tUA8Xx adk6200BF9H1qA3WWiBxA5o1MTl9BVDlNlyPTtGRqPBHI27RP3Ti28Ylg0WyNOcvioQi s/mvqqjiI4EaDLWiP2PRXUUCL8rcGHI497b+HhdF5RiofKBgmqSJrIviqeCshONb4VSv BOHTkx+SqUFQHobhh6N32aYj72/z6juB51knclMLVEuP2qnL2/WDxbhl1yr0i7AtFnnS XH+u0Un5u46cTq6E2943T8MB0c/59X+6SiTFi+ebYqoU0uaTU2AVXjmxC6LuhjSgATIm yjaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0hP9KV+QzDMi9Ee3A915nGBhou5oqVpoVswUzp1mehQ=; b=jU/RZ7P9KC95wHAv3UlVCp1Q2qa7wESjxjOvvTPPjmasansbFEJWwFM4YTofWeSAJ5 qEr978gAag06jQCDrouLcs5nfqdAbAInVYJta9bRsWM0M7nI16b/FHyi9PJPd+AYWZtJ 8hPUisoF4oTujkw3LzZeQTJKakU1VRfL7b1jSi/wza3IwkG51uDmLpqgF4bX3KsLOHpI ZWA6hXqBgcrWTDw8ZiZ3ctSObv0n9LiiGtL/GHVPCP+nVxz/AAsNzkZi+cazK7y3RGAh gtG8YxrMu78pkIwzCCglssGmatwytVF/4wXqZSiqYC1DD/B1iE4YB8cSsT18L9eE2hCW ph/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bg8BRGZe; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si20985708plg.24.2021.04.27.04.14.33; Tue, 27 Apr 2021 04:14:45 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bg8BRGZe; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235609AbhD0LN3 (ORCPT + 99 others); Tue, 27 Apr 2021 07:13:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbhD0LN2 (ORCPT ); Tue, 27 Apr 2021 07:13:28 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE1B8C061574 for ; Tue, 27 Apr 2021 04:12:44 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id i12so27950104qke.3 for ; Tue, 27 Apr 2021 04:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0hP9KV+QzDMi9Ee3A915nGBhou5oqVpoVswUzp1mehQ=; b=bg8BRGZeDyUMhxijqaqZ2uEmaDmSiY82LeYiRIRNuBPn3Tyod3SucxVqlvtzvkcc4g 43fRU7nmDwN5gZ8Rt5ZPQZYHJWDdDa2UOSX9heML9Q73tAUEww046ugWvUJ4Ai+NpBOj /pL/ibGJ654F8rgriYQxq+87LoRSaAmio77R2XzGN1G4KBohpX6Ct65Oiz3OGkOsUXzK GpX9eCa9eU1hBRdsto7u8rKTfvh/YbpCRqfina9A7LQBjIAVl55ArmGThHQvOSy7cdOz YNQHW070OAaqsZTb+pndAVPl3739f9egFm+JyjYXYBoRVAcDbpr38vkYPcc8igCpVlCy z3Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0hP9KV+QzDMi9Ee3A915nGBhou5oqVpoVswUzp1mehQ=; b=lVKhA8RN1aR4Hvr0RtvqJ+WORxk4mkpPUl0apb7ZE2urvNge5H5IcfSvq2DIIvlmMb fTjvCAJweUuH17kk+nd6AEg9PwRuFI7Rqz0zBOXjjf1mY6VKZUkNyeMJzb/BqZjykQ2p F3BQvBVHVOW+6dabyxZ7Y7E28ta5+xm2OLA4NMGfIJY5M2zqAi3YbOnEPa9Z3RE3fK/y rKjU3NyaneRhIYoKUvVQ1TkjMqbFU/MuxGnHDPJUchrerdmFe3N8mSrxJC55dXb1PcfK 1c/oPF8wq0uhw07zSZtkwVYGL3gxIa+RHtfXLJ7j0AA4lKRa+scaeJpOgjj0kxz8rrC7 0l9g== X-Gm-Message-State: AOAM5332JZ9YakyzZiRSZPlwDTXm9NeXQjwOEko32lGhn8j4KerdunzR r1BMH6n77n2BzPRliyg1Ep9aHE5zCwSR+nlpIwk= X-Received: by 2002:a05:620a:2903:: with SMTP id m3mr10050569qkp.37.1619521964090; Tue, 27 Apr 2021 04:12:44 -0700 (PDT) MIME-Version: 1.0 References: <1619519663-10406-1-git-send-email-shengjiu.wang@nxp.com> In-Reply-To: From: Shengjiu Wang Date: Tue, 27 Apr 2021 19:12:33 +0800 Message-ID: Subject: Re: [PATCH 1/2] ALSA: pcm: Add support for 705.6KHz and 768KHz sample rate To: Takashi Iwai Cc: Shengjiu Wang , linux-kernel , alsa-devel@alsa-project.org, Mark Brown , Takashi Iwai Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 27, 2021 at 6:56 PM Takashi Iwai wrote: > > 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 have two devices, AK4458, AK5558. > > 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. Ok, this is an option. > > > 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 > >