From patchwork Tue Nov 25 14:44:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Cussins X-Patchwork-Id: 5380061 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C068A9F39D for ; Tue, 25 Nov 2014 14:47:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21246201CE for ; Tue, 25 Nov 2014 14:47:42 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9FA1220117 for ; Tue, 25 Nov 2014 14:47:35 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 204432658A3; Tue, 25 Nov 2014 15:47:34 +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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id E8C2726586A; Tue, 25 Nov 2014 15:47:22 +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 D9C2B265882; Tue, 25 Nov 2014 15:47:20 +0100 (CET) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by alsa0.perex.cz (Postfix) with ESMTP id 8A379265824 for ; Tue, 25 Nov 2014 15:47:14 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C399A20930 for ; Tue, 25 Nov 2014 09:47:13 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 25 Nov 2014 09:47:13 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=eml.cc; h= x-sasl-enc:from:to:cc:subject:date:message-id; s=mesmtp; bh=9fD+ c8D63nd7rbKtFpUWTBf8Brw=; b=Us8ywzz6+B9prfapGNV65igYObzdul1QH8Us SheubslOSmRe7oKFgkAUgm9jIuCseFAgmwozeGy3bt5Hgj/TpPMHuqeCBpTJqlvw uoKB8eBI7sVB1vqnHJFDD/jx2K4GOe0eJRmtA3PsOWmuVIuHyfR7HfPANkf2GX8l YWjTppA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:cc:subject:date :message-id; s=smtpout; bh=9fD+c8D63nd7rbKtFpUWTBf8Brw=; b=YmNGg k8cRZubrcpi+GaIOI6LZWgIVzsJY62xa+5JOv6SW68CgLDMKycznQkFLVfu7+eAy 3SLkjxpHbGPMVF9oki32il9uQPKMnFGRGA26hC1uLzy/mATYSDDazFhzaY/6w/yR ratUfXn1p2yISL5ugj7JJDdH+woMFPZVoaQfGU= X-Sasl-enc: w0mzYkQYQuvUrYL/qhYl9suPCJi/WDV8sQlLj9fi2Ui9 1416926833 Received: from pc695.lan (unknown [217.169.4.223]) by mail.messagingengine.com (Postfix) with ESMTPA id 28997680154; Tue, 25 Nov 2014 09:47:13 -0500 (EST) From: Tim Cussins To: alsa-devel@alsa-project.org Date: Tue, 25 Nov 2014 14:44:54 +0000 Message-Id: <1416926694-25174-1-git-send-email-timcussins@eml.cc> X-Mailer: git-send-email 1.7.10.4 Cc: Tim Cussins Subject: [alsa-devel] [PATCH] alsa-lib: Fix assorted tstamp_type bugs/omissions. 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 Just a couple of quick fixes related to tstamp_type. - snd_pcm_sw_params(): copy tstamp_type field - snd_pcm_tstamp_type_name(): fix argument type - snd_pcm_dump_sw_setup(): fix dumping of tstamp_type field --- src/pcm/pcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 3904256..baa47c7 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -897,6 +897,7 @@ int snd_pcm_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params) if (err < 0) return err; pcm->tstamp_mode = params->tstamp_mode; + pcm->tstamp_type = params->tstamp_type; pcm->period_step = params->period_step; pcm->avail_min = params->avail_min; pcm->period_event = sw_get_period_event(params); @@ -1843,7 +1844,7 @@ const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode) * \param mode PCM tstamp type * \return ascii name of PCM tstamp type setting */ -const char *snd_pcm_tstamp_type_name(snd_pcm_tstamp_t type) +const char *snd_pcm_tstamp_type_name(snd_pcm_tstamp_type_t type) { if (type > SND_PCM_TSTAMP_TYPE_LAST) return NULL; @@ -1924,7 +1925,7 @@ int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, snd_output_t *out) return -EIO; } snd_output_printf(out, " tstamp_mode : %s\n", snd_pcm_tstamp_mode_name(pcm->tstamp_mode)); - snd_output_printf(out, " tstamp_type : %s\n", snd_pcm_tstamp_type_name(pcm->tstamp_mode)); + snd_output_printf(out, " tstamp_type : %s\n", snd_pcm_tstamp_type_name(pcm->tstamp_type)); snd_output_printf(out, " period_step : %d\n", pcm->period_step); snd_output_printf(out, " avail_min : %ld\n", pcm->avail_min); snd_output_printf(out, " period_event : %i\n", pcm->period_event);