From patchwork Mon May 12 09:12:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 4157401 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 10D9BBFF02 for ; Mon, 12 May 2014 09:14:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2795220260 for ; Mon, 12 May 2014 09:14:30 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id DDB322022A for ; Mon, 12 May 2014 09:14:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7C1E2265131; Mon, 12 May 2014 11:14:08 +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 B0C4B265015; Mon, 12 May 2014 11:12:53 +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 4F22E264FF9; Mon, 12 May 2014 11:12:50 +0200 (CEST) Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by alsa0.perex.cz (Postfix) with ESMTP id 10C8B264F0A for ; Mon, 12 May 2014 11:12:40 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s4C9CeYf019199; Mon, 12 May 2014 04:12:40 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4C9Ce9I001315; Mon, 12 May 2014 04:12:40 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Mon, 12 May 2014 04:12:39 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4C9Cd1n005078; Mon, 12 May 2014 04:12:39 -0500 From: Jyri Sarha To: , , , Date: Mon, 12 May 2014 12:12:13 +0300 Message-ID: <6dbb6dbbf299609fa3f527bcd5e41d5648b764d3.1399884780.git.jsarha@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Cc: liam.r.girdwood@linux.intel.com, detheridge@ti.com, broonie@kernel.org, Jyri Sarha , peter.ujfalusi@ti.com, tomi.valkeinen@ti.com, bcousson@baylibre.com Subject: [alsa-devel] [PATCH 02/19] OMAPDSS: hdmi-common: Add hdmi_dss_audio_from_hw_params() 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 Add common function for struct omap_dss_audio initialization from struct snd_pcm_hw_params. Signed-off-by: Jyri Sarha --- drivers/video/fbdev/omap2/dss/hdmi.h | 5 ++ drivers/video/fbdev/omap2/dss/hdmi_common.c | 117 ++++++++++++++++++++++++++- 2 files changed, 121 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/dss/hdmi.h b/drivers/video/fbdev/omap2/dss/hdmi.h index fbee078..65bf072 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi.h +++ b/drivers/video/fbdev/omap2/dss/hdmi.h @@ -433,6 +433,11 @@ int hdmi_parse_lanes_of(struct platform_device *pdev, struct device_node *ep, #if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) || defined(CONFIG_OMAP5_DSS_HDMI_AUDIO) int hdmi_compute_acr(u32 pclk, u32 sample_freq, u32 *n, u32 *cts); +struct snd_pcm_hw_params; +struct snd_soc_dai; +int hdmi_dss_audio_from_hw_params(struct snd_pcm_hw_params *params, + struct omap_dss_audio *dss_audio, + struct snd_soc_dai *dai); int hdmi_wp_audio_enable(struct hdmi_wp_data *wp, bool enable); int hdmi_wp_audio_core_req_enable(struct hdmi_wp_data *wp, bool enable); void hdmi_wp_audio_config_format(struct hdmi_wp_data *wp, diff --git a/drivers/video/fbdev/omap2/dss/hdmi_common.c b/drivers/video/fbdev/omap2/dss/hdmi_common.c index 9a2c39c..85a2407 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi_common.c +++ b/drivers/video/fbdev/omap2/dss/hdmi_common.c @@ -19,6 +19,12 @@ #include #include #include