From patchwork Wed Aug 6 13:52:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 4686441 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 794839F375 for ; Wed, 6 Aug 2014 13:54:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B481B20121 for ; Wed, 6 Aug 2014 13:54:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8451720114 for ; Wed, 6 Aug 2014 13:54:25 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9C89F261A8E; Wed, 6 Aug 2014 15:54:24 +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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 1AE1526162E; Wed, 6 Aug 2014 15:53:03 +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 168D4261683; Wed, 6 Aug 2014 15:53:02 +0200 (CEST) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by alsa0.perex.cz (Postfix) with ESMTP id ADF6026084B for ; Wed, 6 Aug 2014 15:52:53 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s76DqqMs029194 for ; Wed, 6 Aug 2014 08:52:52 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s76Dqqwk023302 for ; Wed, 6 Aug 2014 08:52:52 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 6 Aug 2014 08:52:52 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s76Dqpoq006168 for ; Wed, 6 Aug 2014 08:52:52 -0500 From: Jyri Sarha To: Date: Wed, 6 Aug 2014 16:52:40 +0300 Message-ID: <6809e37af0cd57f89e5f9103ae616d51f3b06e12.1407332062.git.jsarha@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Subject: [alsa-devel] [PATCH 3/9] drm/tilcdc: Add I2S HDMI audio config for tda998x 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 The configuration is needed for HDMI audio. The "swap" and "mirr" parameters have to be correctly set in the configuration in order to have proper colors in the HDMI picture. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_slave.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c b/drivers/gpu/drm/tilcdc/tilcdc_slave.c index 595068b..e43240a 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_slave.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "tilcdc_drv.h" @@ -111,8 +112,29 @@ static const struct drm_encoder_helper_funcs slave_encoder_helper_funcs = { .restore = drm_i2c_encoder_restore, }; +static struct tda998x_encoder_params tda998x_pdata = { + .swap_b = 0x3, + .mirr_b = 0x0, + .swap_a = 0x2, + .mirr_a = 0x0, + .swap_d = 0x1, + .mirr_d = 0x0, + .swap_c = 0x0, + .mirr_c = 0x0, + .swap_f = 0x5, + .mirr_f = 0x0, + .swap_e = 0x4, + .mirr_e = 0x0, + .audio_cfg = 0x3, /* I2S mode */ + .audio_clk_cfg = 1, /* select clock pin */ + .audio_frame[1] = 1, /* channels - 1 */ + .audio_format = AFMT_I2S, + .audio_sample_rate = 48000, +}; + static const struct i2c_board_info info = { - I2C_BOARD_INFO("tda998x", 0x70) + I2C_BOARD_INFO("tda998x", 0x70), + .platform_data = &tda998x_pdata, }; static struct drm_encoder *slave_encoder_create(struct drm_device *dev,