From: Takashi Iwai Subject: Re: [PATCH 0/3] Revised patch(es) for CLOCK_MONOTONIC_RAW timestamp Date: Wed, 16 Jul 2014 17:53:33 +0200 Message-ID: References: <1404997458-15377-1-git-send-email-tiwai@suse.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 169D8265328 for ; Wed, 16 Jul 2014 17:53:34 +0200 (CEST) Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AEDE6ABA2 for ; Wed, 16 Jul 2014 15:53:33 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 16 Jul 2014 17:15:54 +0200, Takashi Iwai wrote: > > At Mon, 14 Jul 2014 18:19:26 +0200, > Takashi Iwai wrote: > > > > At Thu, 10 Jul 2014 15:04:15 +0200, > > Takashi Iwai wrote: > > > > > > Hi, > > > > > > here is a series of revised kernel patches for adding > > > CLOCK_MONOTONIC_RAW timestamp type. In addition to Mark's original > > > patch, the new field is added to sw_params. > > > > > > The corresponding alsa-lib patches will follow after these. > > > > FWIW, I merged the patches with acks to topic/monotonic branch of > > sound git tree now. It's merged to for-next branch. > > And, now I'll revert the last part, the addition of sw_params again. > > The addition to sw_params field would break the things when used with > an old alsa-lib, because the old alsa-lib sets the field to zero and > it overrides back to the gettimeofday from monotonic. > > Unfortunately, there is no way in the kernel side whether the > user-space calls in the old sw_params or not. We should have a field > or ioctl to set the protocol version the user-space talks, not only > the kernel talks. > > For alsa-lib, we'd just need two new functions that are decoupled from > sw_params, e.g. snd_pcm_{get|set}_timestamp_type(). ... thinking of this again, the less intrusive and future-proof change is rather to add a new field indicating the protocol version from the user-space side. Then kernel evaluates the new fields only when a valid proto number is set there. This will help also any changes in sw_params in future. Patches will follow. Takashi