From patchwork Thu Jan 23 20:17:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Glaser X-Patchwork-Id: 193777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCA01C2D0DB for ; Thu, 23 Jan 2020 20:33:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 510BD21D7D for ; Thu, 23 Jan 2020 20:33:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="fwOmzrKz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 510BD21D7D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=tarent.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A247F1669; Thu, 23 Jan 2020 21:33:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A247F1669 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1579811635; bh=g1YSURGQ7jCuAQTwIGY5roLPR3oarbI8AGbx0/9snas=; h=In-Reply-To:References:To:From:Date:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fwOmzrKzpw3ZJZuE4CvaEJ+Xk1oHcAI/c2stbktseu2LbbOI3CKVhXh0nFXsbbujD uhqh0vQlZs5hfzEJ3iqS2rxSdeQU89CUmIF+9yNC85ukqFxbS6QHUowb4O6YAIuBTd 9Gsp1qwQZNAS4LfK/ecK1G1HV8tBlZNDu1CSsOtU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1AAADF80112; Thu, 23 Jan 2020 21:33:05 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5FB9EF801D9; Thu, 23 Jan 2020 21:33:03 +0100 (CET) Received: from herc.mirbsd.org (herc.mirbsd.org [IPv6:2001:470:1f15:10c:202:b3ff:feb7:54e8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EFB1EF800BA for ; Thu, 23 Jan 2020 21:32:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EFB1EF800BA Received: from herc.mirbsd.org (tg@localhost [IPv6:::1]) by herc.mirbsd.org (8.14.9/8.14.5) with ESMTP id 00NKWOvr002047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 Jan 2020 20:32:26 GMT Received: (from tg@localhost) by herc.mirbsd.org (8.14.9/8.14.5/Submit) id 00NKWMar023632; Thu, 23 Jan 2020 20:32:22 GMT Message-Id: <202001232032.00NKWMar023632@herc.mirbsd.org> X-Authentication-Warning: herc.mirbsd.org: tg set sender to t.glaser@tarent.de using -f In-Reply-To: References: <157133531799.6063.9249463816269134459.reportbug@tglase.lan.tarent.de> To: alsa-devel@alsa-project.org From: mirabilos Date: Thu, 23 Jan 2020 21:17:34 +0100 Cc: 870396@bugs.debian.org Subject: [alsa-devel] [PATCH 1/3] pcm: ensure amd64-specific asm code is not used on x32 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" This fixes segfaults on x32 systems. Signed-off-by: mirabilos --- src/pcm/pcm_dmix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c index d533f40c..407f644d 100644 --- a/src/pcm/pcm_dmix.c +++ b/src/pcm/pcm_dmix.c @@ -142,7 +142,7 @@ static void dmix_server_free(snd_pcm_direct_t *dmix) #include "pcm_dmix_generic.c" #if defined(__i386__) #include "pcm_dmix_i386.c" -#elif defined(__x86_64__) +#elif defined(__x86_64__) && !defined(__ILP32__) #include "pcm_dmix_x86_64.c" #else #ifndef DOC_HIDDEN From patchwork Thu Jan 23 20:21:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thorsten Glaser X-Patchwork-Id: 193776 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CC0FC2D0DB for ; Thu, 23 Jan 2020 20:35:39 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC96921D7D for ; Thu, 23 Jan 2020 20:35:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="VDo2hDof" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC96921D7D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=tarent.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 39C6F169E; Thu, 23 Jan 2020 21:34:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 39C6F169E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1579811737; bh=WTdfiP7+9LyKrCnOQQ1640TKkcHAR1jE6UjXpU8BjsI=; h=In-Reply-To:References:To:From:Date:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VDo2hDofW1Q5t0e5oP1KRfMPUZhCOIvVsGG421PQmDxvavDr6p36Febey8CoBmjOz F9v6/KDhToRHkUfZCM9dy2kXgpv9gLTNCccaHBGuwOIFVs3zF3vso8xu88+CP+J5F/ V9c8KUBF6aHD62ZPhfQP2rvMMJtmaHkw7y4X8Ngs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D4FCCF80272; Thu, 23 Jan 2020 21:33:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6FF54F800BA; Thu, 23 Jan 2020 21:33:13 +0100 (CET) Received: from herc.mirbsd.org (herc.mirbsd.org [IPv6:2001:470:1f15:10c:202:b3ff:feb7:54e8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1C7ABF800BA for ; Thu, 23 Jan 2020 21:33:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1C7ABF800BA Received: from herc.mirbsd.org (tg@localhost [IPv6:::1]) by herc.mirbsd.org (8.14.9/8.14.5) with ESMTP id 00NKWWeX016306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 Jan 2020 20:32:34 GMT Received: (from tg@localhost) by herc.mirbsd.org (8.14.9/8.14.5/Submit) id 00NKWWwd018015; Thu, 23 Jan 2020 20:32:32 GMT Message-Id: <202001232032.00NKWWwd018015@herc.mirbsd.org> X-Authentication-Warning: herc.mirbsd.org: tg set sender to t.glaser@tarent.de using -f In-Reply-To: References: <157133531799.6063.9249463816269134459.reportbug@tglase.lan.tarent.de> To: alsa-devel@alsa-project.org MIME-Version: 1.0 From: mirabilos Date: Thu, 23 Jan 2020 21:21:21 +0100 MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by herc.mirbsd.org id 00NKWWwd018015 Cc: 870396@bugs.debian.org Subject: [alsa-devel] [PATCH 3/3] test: explicitly cast time types to types printf can handle X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Also (as requested by Takashi Iwai), convert timediff() to time_t, as it’s the proper return type. Signed-off-by: mirabilos --- test/latency.c | 10 +++++----- test/queue_timer.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/latency.c b/test/latency.c index 298bab8a..cf39d319 100644 --- a/test/latency.c +++ b/test/latency.c @@ -325,7 +325,7 @@ void setscheduler(void) printf("!!!Scheduler set to Round Robin with priority %i FAILED!!!\n", sched_param.sched_priority); } -long timediff(snd_timestamp_t t1, snd_timestamp_t t2) +time_t timediff(snd_timestamp_t t1, snd_timestamp_t t2) { signed long l; @@ -683,12 +683,12 @@ int main(int argc, char *argv[]) snd_pcm_nonblock(phandle, !block ? 1 : 0); if (ok) { #if 1 - printf("Playback time = %li.%i, Record time = %li.%i, diff = %li\n", - p_tstamp.tv_sec, + printf("Playback time = %lli.%i, Record time = %lli.%i, diff = %lli\n", + (long long)p_tstamp.tv_sec, (int)p_tstamp.tv_usec, - c_tstamp.tv_sec, + (long long)c_tstamp.tv_sec, (int)c_tstamp.tv_usec, - timediff(p_tstamp, c_tstamp)); + (long long)timediff(p_tstamp, c_tstamp)); #endif break; } diff --git a/test/queue_timer.c b/test/queue_timer.c index c4ffb192..c5ce5866 100644 --- a/test/queue_timer.c +++ b/test/queue_timer.c @@ -99,11 +99,11 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) normalize(&diffdiff); prevdiff = diff; - fprintf(stderr, " real time: %12ld sec %8ld usec\nqueue time: %12ld sec %8ld usec\n diff: %12ld sec %8ld usec\n diffdiff: %12ld sec %8ld usec\n", - tv.tv_sec, tv.tv_usec, - (long)rtime->tv_sec, (long)rtime->tv_nsec / 1000, - diff.tv_sec, diff.tv_usec, - (long)diffdiff.tv_sec, (long)diffdiff.tv_usec); + fprintf(stderr, " real time: %12lld sec %8ld usec\nqueue time: %12lld sec %8ld usec\n diff: %12lld sec %8ld usec\n diffdiff: %12lld sec %8ld usec\n", + (long long)tv.tv_sec, (long)tv.tv_usec, + (long long)rtime->tv_sec, (long)rtime->tv_nsec / 1000, + (long long)diff.tv_sec, (long)diff.tv_usec, + (long long)diffdiff.tv_sec, (long)diffdiff.tv_usec); if (diffdiff.tv_usec > 5000 || diffdiff.tv_usec < -5000) {