From patchwork Tue Oct 28 11:26:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qais Yousef X-Patchwork-Id: 5175941 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6CE98C11AC for ; Tue, 28 Oct 2014 11:57:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 945FB20211 for ; Tue, 28 Oct 2014 11:57:13 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1253A20172 for ; Tue, 28 Oct 2014 11:57:11 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C840A2657B6; Tue, 28 Oct 2014 12:57:09 +0100 (CET) Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 3F5142602AD; Tue, 28 Oct 2014 12:41:46 +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 EB845260424; Tue, 28 Oct 2014 12:27:58 +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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by alsa0.perex.cz (Postfix) with ESMTP id B4F1026042C for ; Tue, 28 Oct 2014 12:27:34 +0100 (CET) Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 08E44C93B8EF4; Tue, 28 Oct 2014 11:27:31 +0000 (GMT) Received: from KLMAIL02.kl.imgtec.org (10.40.60.222) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 28 Oct 2014 11:27:33 +0000 Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by klmail02.kl.imgtec.org (10.40.60.222) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 28 Oct 2014 11:27:32 +0000 Received: from qyousef-linux.le.imgtec.org (192.168.154.94) by LEMAIL01.le.imgtec.org (192.168.152.62) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 28 Oct 2014 11:27:32 +0000 From: Qais Yousef To: Date: Tue, 28 Oct 2014 11:26:28 +0000 Message-ID: <1414495589-8579-11-git-send-email-qais.yousef@imgtec.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1414495589-8579-1-git-send-email-qais.yousef@imgtec.com> References: <1414495589-8579-1-git-send-email-qais.yousef@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.154.94] X-Mailman-Approved-At: Tue, 28 Oct 2014 12:41:37 +0100 Cc: Greg Kroah-Hartman , alsa-devel@alsa-project.org, Qais Yousef , Arnd Bergmann Subject: [alsa-devel] [PATCH 10/11] drivers: char: axd: add ts interface file 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP ts (time stamp) interface is required when axd is to perform synchronisation. since the time stamp hardware is SoC dependent, this file provides the interface that can be implemented by a different driver to do the necessary time stamp translation to perform synchronisation inside AXD Signed-off-by: Qais Yousef Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: --- drivers/char/axd/axd_ts_driver.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 drivers/char/axd/axd_ts_driver.h diff --git a/drivers/char/axd/axd_ts_driver.h b/drivers/char/axd/axd_ts_driver.h new file mode 100644 index 000000000000..2b99ad4a7adc --- /dev/null +++ b/drivers/char/axd/axd_ts_driver.h @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2014 Imagination Technologies Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * AXD timestamp driver interface. + */ +#include + +/* + * Called at the beginning of a stream to set the fixed reference point in time + * for the stream. This should not be implemented if the reference point should + * not be altered in this way, and is managed through other means. + */ +void __attribute__((weak)) axd_ts_reset(void); + +/* + * Adjusts the provided timestamp from the source to destination formats. + * @return Non-zero for failure. + */ +int __attribute__((weak)) axd_ts_adjust(u64 *ts);