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: 2110211 Return-Path: X-Original-To: patchwork-linux-media@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 72B993FCD5 for ; Thu, 7 Feb 2013 11:53:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758024Ab3BGLxa (ORCPT ); Thu, 7 Feb 2013 06:53:30 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:10348 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757845Ab3BGLx2 (ORCPT ); Thu, 7 Feb 2013 06:53:28 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MHU007ADMCKBPX0@mailout2.samsung.com>; Thu, 07 Feb 2013 20:53:27 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 9D.16.03880.7B593115; Thu, 07 Feb 2013 20:53:27 +0900 (KST) X-AuditID: cbfee61b-b7fb06d000000f28-af-511395b7ad4f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 6C.16.03880.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>; 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 Cc: tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com, broonie@opensource.wolfsonmicro.com, inki.dae@samsung.com, kyungmin.park@samsung.com, r.sh.open@gmail.com, joshi@samsung.com 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+NgFvrGLMWRmVeSWpSXmKPExsWyRsSkWnf7VOFAg6nveSxO9H1gtejZsJXV gcnj8ya5AMYoLpuU1JzMstQifbsEroz5S3eyFxzNrmjbw9/A+Cqyi5GDQ0LARKLlvHMXIyeQ KSZx4d56ti5GLg4hgaWMEkuX/GSFSJhILJ4+EcwWEpjOKHGyJxSiqJdJ4uqSNhaQBJuArsTs g88YQWwRgRqJuV93gE1iFtjHKDGz+SY7SEJYwF1i5dvpYJNYBFQlrl97wwRi8wp4SHz4/pQd YpucxIc9j8BsTgFPiWs777NAbPaQmNLdzQQyVELgNptE/50dTBCDBCS+TT7EAvGOrMSmA8wQ cyQlDq64wTKBUXgBI8MqRtHUguSC4qT0XCO94sTc4tK8dL3k/NxNjMBQPP3vmfQOxlUNFocY BTgYlXh4by4VChRiTSwrrsw9xCjBwawkwnuyRjhQiDclsbIqtSg/vqg0J7X4EGMy0PKJzFKi yfnAOMkriTc0NjE3NTa1NDIyMzUlTVhJnJfx1JMAIYH0xJLU7NTUgtQimC1MHJxSDYxrL/o+ Ny1l2vTc+YGQwYbquW0WX6IeHxXfFy6+ovDW2TC3L3sOBXZ9FVhxkEXxa5pWBcNKGcMNFvJu hgVSclun83IviWl05M2+1SZ26WDME4dFcSsahXYd85t35FdxlMO8Q1bnrBRVt+07w1jgMZ8j SidhfcKVOQ3LjKtXRZzUNtsRfHnq5ZNKLMUZiYZazEXFiQCOtAgBiQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRmVeSWpSXmKPExsVy+t9jQd1tU4UDDR6tNLM40feB1aJnw1ZW ByaPz5vkAhijGhhtMlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1DS0tzJUU8hJzU22VXHwC dN0yc4BGKymUJeaUAoUCEouLlfTtME0IDXHTtYBpjND1DQmC6zEyQAMJaxgz5i/dyV5wNLui bQ9/A+OryC5GTg4JAROJxdMnskLYYhIX7q1nA7GFBKYzSpzsCe1i5AKye5kkri5pYwFJsAno Ssw++IwRxBYRqJGY+3UHG0gRs8A+RomZzTfZQRLCAu4SK99OB5vKIqAqcf3aGyYQm1fAQ+LD 96fsENvkJD7seQRmcwp4SlzbeZ8FYrOHxJTubqYJjLwLGBlWMYqmFiQXFCel5xrpFSfmFpfm pesl5+duYgSH+jPpHYyrGiwOMQpwMCrx8N5cKhQoxJpYVlyZe4hRgoNZSYT3ZI1woBBvSmJl VWpRfnxRaU5q8SHGZKCrJjJLiSbnA+MwryTe0NjE3NTY1NLEwsTMkjRhJXFexlNPAoQE0hNL UrNTUwtSi2C2MHFwSjUwhu5aqGyuZfCPr2zK7iMHv3p8yBaIT+dgaNXeInpYOJ7BtKR05ha2 FQsinqxJPbbF48ZVUe/zNw1m6bRyVhiKKR87wixdIXK/ovXBoqbu/h61yWt7TAxs18vnWa5m LDb5euDDZmX1iklrwtdP3vnlxlTVlsc1Dz/mt3AypU9lkj0mcMhSqr1YiaU4I9FQi7moOBEA 06f8KLkCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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