From patchwork Thu Feb 7 12:12:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 2110611 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 444AA3FDF1 for ; Thu, 7 Feb 2013 12:31:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB74FE63AE for ; Thu, 7 Feb 2013 04:31:50 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 42BB8E603B for ; Thu, 7 Feb 2013 03:53:28 -0800 (PST) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MHU001BVMCI4AH0@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 07 Feb 2013 20:53:27 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 85.0C.03918.7B593115; Thu, 07 Feb 2013 20:53:27 +0900 (KST) X-AuditID: cbfee61a-b7f7d6d000000f4e-fe-511395b73fb4 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D4.0C.03918.6B593115; Thu, 07 Feb 2013 20:53:26 +0900 (KST) Received: from chrome-ubuntu.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MHU0090BM8VJG30@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 07 Feb 2013 20:53:26 +0900 (KST) From: Rahul Sharma To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org, linux-fbdev@vger.kernel.org Subject: [RFC PATCH v2 4/5] alsa/soc: add hdmi audio codec based on cdf Date: Thu, 07 Feb 2013 07:12:11 -0500 Message-id: <1360239132-15557-2-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1360239132-15557-1-git-send-email-rahul.sharma@samsung.com> References: <1360239132-15557-1-git-send-email-rahul.sharma@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsWyRsSkSnf7VOFAg/0dvBZXvr5nc2D0uN99 nCmAMYrLJiU1J7MstUjfLoErY/7SnewFR7Mr2vbwNzC+iuxi5OSQEDCRODPpGxuELSZx4d56 IJuLQ0hgKaPE6pMnGWGKLk65wQqRmM4o8b/rBTuEs5FJYsbV02BVbAK6ErMPPgOzRQRqJOZ+ 3QE2illgH6PEzOab7CAJYQF3iZVvp7OC2CwCqhLXr71hArF5BTwkPnx/yg6xTk7iw55HYDan gKfEtZ33WUBsIaCaKd3dTCBDJQQus0n8+rSKGWKQgMS3yYeAijiAErISmw4wQ8yRlDi44gbL BEbhBYwMqxhFUwuSC4qT0nMN9YoTc4tL89L1kvNzNzECw/D0v2dSOxhXNlgcYhTgYFTi4b2x VChQiDWxrLgy9xCjBAezkgjvyRrhQCHelMTKqtSi/Pii0pzU4kOMyUDLJzJLiSbnA2MkryTe 0NjE3NTY1NLIyMzUlDRhJXFexlNPAoQE0hNLUrNTUwtSi2C2MHFwSjUwek/SSzDzXC1RY/VJ ue7Gn4Kdx57dqzrAzbF2S9uExV8OGFfGzv9c4TN50hIpg2zHj3NZes9tCjhpvdjToKj7Q+Tp tVt3sZZGMv978EHr8dv/pZFlK678sJ2l69Z4pe7jsqczDU5ka/8Jmz3hhcmLRJcNd1sEanWS 5i+yDn9VvpiBZfMapa8lO5VYijMSDbWYi4oTAUhQFWCHAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRmVeSWpSXmKPExsVy+t9jQd1tU4UDDTYuNra48vU9mwOjx/3u 40wBjFENjDYZqYkpqUUKqXnJ+SmZeem2St7B8c7xpmYGhrqGlhbmSgp5ibmptkouPgG6bpk5 QGOVFMoSc0qBQgGJxcVK+naYJoSGuOlawDRG6PqGBMH1GBmggYQ1jBnzl+5kLziaXdG2h7+B 8VVkFyMnh4SAicTFKTdYIWwxiQv31rN1MXJxCAlMZ5T43/WCHcLZyCQx4+ppRpAqNgFdidkH n4HZIgI1EnO/7gDrYBbYxygxs/kmO0hCWMBdYuXb6WBjWQRUJa5fe8MEYvMKeEh8+P6UHWKd nMSHPY/AbE4BT4lrO++zgNhCQDVTuruZJjDyLmBkWMUomlqQXFCclJ5rqFecmFtcmpeul5yf u4kRHOTPpHYwrmywOMQowMGoxMN7Y6lQoBBrYllxZe4hRgkOZiUR3pM1woFCvCmJlVWpRfnx RaU5qcWHGJOBrprILCWanA+MwLySeENjE3NTY1NLEwsTM0vShJXEeRlPPQkQEkhPLEnNTk0t SC2C2cLEwSnVwLhcZqqVjVs5r2r5O0Gp4FUG/d8LThswNuxrdEvc0bKlpttV4guLOE9ay5yi 7bsiYgWbH/W4brkQvXZ6tHAFwz+OunOh0sff3HpnsN/80nI7+Yr+oPmqjcFnrv6Lz5OJndl7 TWS7YnLMP2enVOnlB++Z3zoU8NY3TzZo432JKJnrKm6STtO3KLEUZyQaajEXFScCAJnLjpG2 AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Thu, 07 Feb 2013 04:25:49 -0800 Cc: broonie@opensource.wolfsonmicro.com, joshi@samsung.com, kyungmin.park@samsung.com, tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org V2: - DAPM and JACK control to hdmi codec. This patch registers hdmi-audio codec to the ALSA framework. This is the second client to the hdmi panel. Once notified by the CDF Core it proceeds towards audio setting and audio control. It also subscribes for hpd notification to implement hpd related audio requirements. Signed-off-by: Rahul Sharma --- sound/soc/codecs/Kconfig | 3 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/exynos_hdmi_audio.c | 424 +++++++++++++++++++++++++++++++++++ 3 files changed, 429 insertions(+) create mode 100644 sound/soc/codecs/exynos_hdmi_audio.c diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 3a84782..d3e0874 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -512,3 +512,6 @@ config SND_SOC_ML26124 config SND_SOC_TPA6130A2 tristate + +config SND_SOC_EXYNOS_HDMI_CODEC + tristate diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index f6e8e36..388da28 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -115,6 +115,7 @@ snd-soc-wm9705-objs := wm9705.o snd-soc-wm9712-objs := wm9712.o snd-soc-wm9713-objs := wm9713.o snd-soc-wm-hubs-objs := wm_hubs.o +snd-soc-exynos-hdmi-audio-objs := exynos_hdmi_audio.o # Amp snd-soc-max9877-objs := max9877.o @@ -236,6 +237,7 @@ obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o obj-$(CONFIG_SND_SOC_WM_ADSP) += snd-soc-wm-adsp.o obj-$(CONFIG_SND_SOC_WM_HUBS) += snd-soc-wm-hubs.o +obj-$(CONFIG_SND_SOC_EXYNOS_HDMI_CODEC) += snd-soc-exynos-hdmi-audio.o # Amp obj-$(CONFIG_SND_SOC_MAX9877) += snd-soc-max9877.o diff --git a/sound/soc/codecs/exynos_hdmi_audio.c b/sound/soc/codecs/exynos_hdmi_audio.c new file mode 100644 index 0000000..e2cf94c --- /dev/null +++ b/sound/soc/codecs/exynos_hdmi_audio.c @@ -0,0 +1,424 @@ +/* + * ALSA SoC codec driver for HDMI audio on Samsung Exynos processors. + * Copyright (C) 2013 Samsung corp. + * Author: Rahul Sharma + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ +#include +#include +#include +#include + +#include +#include +#include +#include + +#include