From patchwork Wed Nov 11 16:13:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 7596561 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AA9F1BF90C for ; Wed, 11 Nov 2015 16:15:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5109206D2 for ; Wed, 11 Nov 2015 16:15:19 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7C9EC20699 for ; Wed, 11 Nov 2015 16:15:18 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 652FF260851; Wed, 11 Nov 2015 17:15:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BB3F0260563; Wed, 11 Nov 2015 17:15:09 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 61B2B260563; Wed, 11 Nov 2015 17:15:08 +0100 (CET) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by alsa0.perex.cz (Postfix) with ESMTP id 4DB4726053B; Wed, 11 Nov 2015 17:15:01 +0100 (CET) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id DA4B840011; Wed, 11 Nov 2015 17:15:00 +0100 (CET) Received: from localhost.localdomain (217-210-101-82-no95.business.telia.com [217.210.101.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 57E384000E; Wed, 11 Nov 2015 17:15:00 +0100 (CET) From: Peter Rosin To: patch@alsa-project.org Date: Wed, 11 Nov 2015 17:13:56 +0100 Message-Id: <1447258436-32238-1-git-send-email-peda@lysator.liu.se> X-Mailer: git-send-email 1.7.10.4 X-Virus-Scanned: ClamAV using ClamSMTP Cc: Peter Rosin , alsa-devel@alsa-project.org, Peter Rosin Subject: [alsa-devel] [PATCH] PCM: Support up to 384kHz sample rate. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Peter Rosin Some codecs support it in the kernel (e.g. pcm512x). Signed-off-by: Peter Rosin --- include/pcm_plugin.h | 2 +- src/pcm/pcm_simple.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) I'm not sure it really is this simple, but the things I'm using start to work... Cheers, Peter diff --git a/include/pcm_plugin.h b/include/pcm_plugin.h index eea1d82..958bc89 100644 --- a/include/pcm_plugin.h +++ b/include/pcm_plugin.h @@ -39,7 +39,7 @@ */ #define SND_PCM_PLUGIN_RATE_MIN 4000 /**< minimal rate for the rate plugin */ -#define SND_PCM_PLUGIN_RATE_MAX 192000 /**< maximal rate for the rate plugin */ +#define SND_PCM_PLUGIN_RATE_MAX 384000 /**< maximal rate for the rate plugin */ /* ROUTE_FLOAT should be set to 0 for machines without FP unit - like iPAQ */ #ifdef HAVE_SOFT_FLOAT diff --git a/src/pcm/pcm_simple.c b/src/pcm/pcm_simple.c index ce11083..2fda841 100644 --- a/src/pcm/pcm_simple.c +++ b/src/pcm/pcm_simple.c @@ -173,7 +173,7 @@ int snd_spcm_init(snd_pcm_t *pcm, snd_pcm_sw_params_alloca(&sw_params); assert(pcm); - assert(rate >= 5000 && rate <= 192000); + assert(rate >= 5000 && rate <= 384000); assert(channels >= 1 && channels <= 512); rrate = rate; @@ -233,7 +233,7 @@ int snd_spcm_init_duplex(snd_pcm_t *playback_pcm, assert(playback_pcm); assert(capture_pcm); - assert(rate >= 5000 && rate <= 192000); + assert(rate >= 5000 && rate <= 384000); assert(channels >= 1 && channels <= 512); pcms[0] = playback_pcm;