From patchwork Thu Mar 7 12:43:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastien Guiriec X-Patchwork-Id: 2231401 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id F103C3FCF6 for ; Thu, 7 Mar 2013 12:44:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753945Ab3CGMoO (ORCPT ); Thu, 7 Mar 2013 07:44:14 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:59370 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787Ab3CGMoN (ORCPT ); Thu, 7 Mar 2013 07:44:13 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r27Chw1M025662; Thu, 7 Mar 2013 06:43:58 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r27ChwTi002571; Thu, 7 Mar 2013 06:43:58 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Thu, 7 Mar 2013 06:43:58 -0600 Received: from unb0919150.emea.dhcp.ti.com (unb0919150.emea.dhcp.ti.com [137.167.110.144]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r27ChstQ028567; Thu, 7 Mar 2013 06:43:57 -0600 From: Sebastien Guiriec To: Sebastien Guiriec , Peter Ujfalusi , Liam Girdwood , Mark Brown , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Jarkko Nikula , Tony Lindgren CC: , Subject: [PATCH 1/5] ASoC: omap-pcm: Move to generic DMA for DT binding Date: Thu, 7 Mar 2013 13:43:20 +0100 Message-ID: <1362660204-27074-2-git-send-email-s-guiriec@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362660204-27074-1-git-send-email-s-guiriec@ti.com> References: <1362660204-27074-1-git-send-email-s-guiriec@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Update in order to use OMAP DMA DT binding for OMAP2+. In case of DT boot snd_dmaengine_generic_pcm_open function is used. Signed-off-by: Sebastien Guiriec --- sound/soc/omap/omap-pcm.c | 12 ++++++++++-- sound/soc/omap/omap-pcm.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index c722c2e..df01a95 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -176,13 +176,21 @@ static int omap_pcm_open(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct omap_pcm_dma_data *dma_data; + int ret; snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware); dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); - return snd_dmaengine_pcm_open(substream, omap_dma_filter_fn, - &dma_data->dma_req); + if (rtd->cpu_dai->dev->of_node) + ret = snd_dmaengine_generic_pcm_open(substream, + rtd->cpu_dai->dev, + dma_data->dma_name); + else + ret = snd_dmaengine_pcm_open(substream, omap_dma_filter_fn, + &dma_data->dma_req); + + return ret; } static int omap_pcm_close(struct snd_pcm_substream *substream) diff --git a/sound/soc/omap/omap-pcm.h b/sound/soc/omap/omap-pcm.h index cabe74c..06faa38 100644 --- a/sound/soc/omap/omap-pcm.h +++ b/sound/soc/omap/omap-pcm.h @@ -29,6 +29,7 @@ struct snd_pcm_substream; struct omap_pcm_dma_data { char *name; /* stream identifier */ + char *dma_name; /* DMA request name */ int dma_req; /* DMA request line */ unsigned long port_addr; /* transmit/receive register */ void (*set_threshold)(struct snd_pcm_substream *substream);