From patchwork Fri Apr 17 13:16:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 6230811 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B68C79F2EC for ; Fri, 17 Apr 2015 13:22:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E1D4920035 for ; Fri, 17 Apr 2015 13:22:53 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id BD6222035C for ; Fri, 17 Apr 2015 13:22:52 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id F2069265A7B; Fri, 17 Apr 2015 15:22:46 +0200 (CEST) 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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id AD8BF265913; Fri, 17 Apr 2015 15:21:29 +0200 (CEST) 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 582EC26590E; Fri, 17 Apr 2015 15:21:28 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by alsa0.perex.cz (Postfix) with ESMTP id 73262260587 for ; Fri, 17 Apr 2015 15:21:25 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 17 Apr 2015 06:21:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,594,1422950400"; d="scan'208";a="557666023" Received: from vkoul-udesk3.iind.intel.com ([10.223.84.65]) by orsmga003.jf.intel.com with ESMTP; 17 Apr 2015 06:21:22 -0700 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Fri, 17 Apr 2015 18:46:03 +0530 Message-Id: <1429276567-29007-6-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1429276567-29007-1-git-send-email-vinod.koul@intel.com> References: <1429276567-29007-1-git-send-email-vinod.koul@intel.com> Cc: tiwai@suse.de, patches.audio@intel.com, liam.r.girdwood@linux.intel.com, Vinod Koul , broonie@kernel.org, "Subhransu S. Prusty" Subject: [alsa-devel] [RFC 5/9] ASoC: hda: Add dsp loader ops 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 From: "Subhransu S. Prusty" This will be assigned with the required bus io ops. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul --- include/sound/soc-hda-sst-dsp.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/sound/soc-hda-sst-dsp.h b/include/sound/soc-hda-sst-dsp.h index 4a89c3dda5ab..3d8b0c065002 100644 --- a/include/sound/soc-hda-sst-dsp.h +++ b/include/sound/soc-hda-sst-dsp.h @@ -138,12 +138,28 @@ struct ssth_window { size_t w1_size; }; +struct ssth_dsp_loader_ops { + int (*init)(struct device *dev); + int (*prepare)(struct device *dev, unsigned int format, + unsigned int byte_size, + struct snd_dma_buffer *bufp); + void (*trigger)(struct device *dev, bool start); + + void (*cleanup)(struct device *dev, + struct snd_dma_buffer *dmab); + int (*alloc_dma_buf)(struct device *dev, + struct snd_dma_buffer *dmab, u32 size); + int (*free_dma_buf)(struct device *dev, + struct snd_dma_buffer *dmab); +}; + struct ssth_lib { struct device *dev; struct ssth_ipc *ipc; void __iomem *mmio_base; struct ssth_window window; int irq; + struct ssth_dsp_loader_ops dsp_ops; struct snd_dma_buffer dsp_fw_buf; int sst_state; struct mutex sst_lock;