Received: by 10.192.165.148 with SMTP id m20csp2130192imm; Thu, 26 Apr 2018 06:33:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Ka7hxRsfL1reGOVOtVI+BnIJbAh/douJiRYNSrA5tgYvKWqvV56g9fhalvnaFzYV3dJ90 X-Received: by 10.98.10.72 with SMTP id s69mr32239190pfi.134.1524749628667; Thu, 26 Apr 2018 06:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524749628; cv=none; d=google.com; s=arc-20160816; b=ub4WK5cH/KdIxX/Valv/JTSaX9V+DsqNmFiFvkG+V/16cjrv9ej4XYeGD5ahqA3ynW CKtpSsrnQqMq6hLFMDnTq8f6DGipPdop9z4iMZJbWHqNw3HGohHUrQsf7cY64JocoH4v 4ECov2Ch1HMxFNpoUaFxYQuXg0Dngfogt+ZRXEjeU/RVlbzTGrNwHEyJWIJx9KT90Gx7 tLaboGQw2omg20vwcVaF8/c29YmyIv1sZNOiRC8glfYPeCrvXcNVmgDz1V3d3zQvvjr6 Ggmm0p2stOnc2LC0Is/Ftp0rVP30DVgB3K4Eh4DwgikU2e1uINKqZ+xNpFlYTdODXhc5 wAvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature:dkim-filter :arc-authentication-results; bh=Lg+laDfthcMAXbI9Vxwc1BwCGN7SyiYjVzzeZQgBj8Y=; b=Q4eubxLgH+Y1TAW2sIh/myCKxnVOJ0tiL3dOxlLLehVL0a4+Oqb/sLAhFMVudjApMH szCZzzt7Mi+ZDlUw9bkjTBC9HCmOZsSIYYK5oc6s/HHo6RHMn4nw/5tJBvpX6KaTa91q fOq4rbNksIWMgag6aa+Tde28JqYWo3Oq2Gysz64ruiCvROhdfu7yOSj5juRSOUHDwu8k ZiSsM5DGUgWfYiT+gNwq/vxkWrmskFkEWd1Mgz+jbzEmnnl7LtQhSrAl9Z2RVqMc23Mv 0Nq2vFQzix5AVEzs7EKQIcaimqhdtCQlMN86FugM96/GKZtS5P/hQIabOzM1xFkrdj+w AFyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@perex.cz header.s=default header.b=YoGnVO1U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u186si10347515pgc.67.2018.04.26.06.33.33; Thu, 26 Apr 2018 06:33:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@perex.cz header.s=default header.b=YoGnVO1U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755844AbeDZNbL (ORCPT + 99 others); Thu, 26 Apr 2018 09:31:11 -0400 Received: from mail1.perex.cz ([77.48.224.245]:60900 "EHLO mail1.perex.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754847AbeDZNbK (ORCPT ); Thu, 26 Apr 2018 09:31:10 -0400 Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id E41D7A0042; Thu, 26 Apr 2018 15:31:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz E41D7A0042 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1524749467; bh=Lg+laDfthcMAXbI9Vxwc1BwCGN7SyiYjVzzeZQgBj8Y=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=YoGnVO1UMERVc5tLqTuk6O10Rvl8St/UxE5elUQjjmYXYBfO6GKgK7K16Wxr7NSpc u1FDDYLo+uHWq1hqzUfQ3epGdV+9Hcg6PvXreq6WB+J3ZuJvONosZr/IVrfI40OGZ6 dau8muqDYpkpeNec1KwypmUD+46edlc9TGkoaD1s= Received: from p50.perex-int.cz (unknown [192.168.100.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Thu, 26 Apr 2018 15:30:58 +0200 (CEST) Subject: Re: [PATCH 0/4] ALSA: Fix year 2038 issue for sound subsystem, alternative To: Arnd Bergmann , y2038@lists.linaro.org, linux-kernel@vger.kernel.org Cc: tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, o-takashi@sakamocchi.jp, alsa-devel@alsa-project.org, Baolin Wang References: <20180426124422.2921744-1-arnd@arndb.de> From: Jaroslav Kysela Message-ID: <6aa760e5-390a-b7ba-62f1-dc01308031fa@perex.cz> Date: Thu, 26 Apr 2018 15:30:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180426124422.2921744-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dne 26.4.2018 v 14:44 Arnd Bergmann napsal(a): > I've tried the suggestion from Jaroslaw, doing a minimal change to the > UAPI headers to keep the existing binary interface. As he predicted, > this is a much simpler set of kernel changes, but we will pay for that > with added complexity in alsa-lib. > > The first two patches in this series are taken from Baolin's patch > set, with a small bugfix folded in to avoid a compile-time regression. > > The other two patches are to redefine the UAPI and to deprecate > the support for CLOCK_REALTIME time stamps, which we can no longer > allow with user space that we expect to survive beyond 2038. > > Overall, I'd still be happier with Baolin's approach since it allows > us to keep compatiblity with CLOCK_REALTIME users and requires > fewer changes in user space, but this would work as well. Hi Arnd, Thanks for your work. I proposed a bit different implementation. Example: struct snd_example { struct snd_native_timespec tstamp; .... u64 tstamp_sec64; /* use the reserved[] array for this */ }; So tstamp contains the current 32-bit tv_sec/tv_nsec and the full 64-bit value is in tstamp_sec64. In this way, we can transfer any type of the timespec64 values and it's backward compatible to retain the binary compatibility. The protocol versions should be increased to let the userspace know about the new 64-bit fields. The timer read protocol must be updated, because the stream will change, so I am fine to add new ioctl (like originally proposed). The alsa-lib defines timespec only if posix defines are not set so glibc's time.h does not define the timespec structure - it may be improved. Jaroslav > > Arnd > > Cc: Jaroslav Kysela > Cc: tiwai@suse.com > Cc: lgirdwood@gmail.com > Cc: broonie@kernel.org > Cc: o-takashi@sakamocchi.jp > Cc: y2038@lists.linaro.org > Cc: alsa-devel@alsa-project.org > Cc: linux-kernel@vger.kernel.org > Cc: Baolin Wang > > Arnd Bergmann (2): > ALSA: replace timespec types in uapi headers > ALSA: Deprecate CLOCK_REALTIME timestamps > > Baolin Wang (2): > ALSA: Replace timespec with timespec64 > ALSA: Avoid using timespec for struct snd_ctl_elem_value > > include/sound/asound.h | 8 +++++ > include/sound/pcm.h | 22 +++++++----- > include/sound/timer.h | 4 +-- > include/uapi/sound/asound.h | 53 +++++++++++++++++++++-------- > sound/core/Kconfig | 11 ++++++ > sound/core/compat.h | 11 ++++++ > sound/core/pcm.c | 3 ++ > sound/core/pcm_compat.c | 70 ++++++++++++++++++++++----------------- > sound/core/pcm_lib.c | 36 ++++++++++++-------- > sound/core/pcm_native.c | 25 ++++++++++---- > sound/core/rawmidi_compat.c | 12 +++---- > sound/core/timer.c | 28 ++++++++-------- > sound/core/timer_compat.c | 4 ++- > sound/pci/hda/hda_controller.c | 14 +++++--- > sound/soc/intel/skylake/skl-pcm.c | 4 +-- > 15 files changed, 203 insertions(+), 102 deletions(-) > create mode 100644 sound/core/compat.h > -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc.