From patchwork Tue Sep 16 20:40:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 4920051 Return-Path: X-Original-To: patchwork-linux-omap@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 7D0A79F3ED for ; Tue, 16 Sep 2014 20:38:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F233B201E4 for ; Tue, 16 Sep 2014 20:40:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A161F201ED for ; Tue, 16 Sep 2014 20:40:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754948AbaIPUke (ORCPT ); Tue, 16 Sep 2014 16:40:34 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:49292 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754875AbaIPUkc (ORCPT ); Tue, 16 Sep 2014 16:40:32 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s8GKePP6014864; Tue, 16 Sep 2014 15:40:25 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8GKePDf028128; Tue, 16 Sep 2014 15:40:25 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 16 Sep 2014 15:40:25 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8GKeOKr030082; Tue, 16 Sep 2014 15:40:25 -0500 From: Jyri Sarha To: , , , , , CC: , , , , , , Jyri Sarha Subject: [PATCH v3 2/5] drm/tilcdc: Add I2S HDMI audio config for tda998x Date: Tue, 16 Sep 2014 23:40:15 +0300 Message-ID: <5580c70666076104fbc7ece7ddd0f035d0c9d5a3.1410898073.git.jsarha@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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 3775fd4..5dd8d78 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,