From patchwork Fri Jun 24 02:48:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9196461 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 501EF60756 for ; Fri, 24 Jun 2016 02:48:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45F5628483 for ; Fri, 24 Jun 2016 02:48:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AB9928487; Fri, 24 Jun 2016 02:48:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74FE528483 for ; Fri, 24 Jun 2016 02:48:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751831AbcFXCsW (ORCPT ); Thu, 23 Jun 2016 22:48:22 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:37171 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751623AbcFXCsU (ORCPT ); Thu, 23 Jun 2016 22:48:20 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 24 Jun 2016 11:48:18 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 032B33EA92; Fri, 24 Jun 2016 11:48:19 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id C73C418079; Fri, 24 Jun 2016 11:48:17 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id F202B18071; Fri, 24 Jun 2016 11:48:17 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id MAB16766; Fri, 24 Jun 2016 11:48:17 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="214143637" Received: from mail-sg2apc01lp0240.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.240]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 24 Jun 2016 11:48:15 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wFiOEIztk1CpWCv+UY0cglJ+CVwGpBbA22uBknL4YEU=; b=DUF9bBc/nzn8xdt5waPoW5zM46nkqhhKqqvnZPDS7oNOJIT69yF2T9phZNU+DGwW7RoaCCviHm6RAyDqAC7XNW2araBOgrZl0TSk4B4lvF4GGrX4wgRUfNawNp4EoAznptcICmMcQ6M5xtrmzeJdBp21LSJ6UurbrudhrdvoTpA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by PS1PR06MB1705.apcprd06.prod.outlook.com (10.167.53.15) with Microsoft SMTP Server (TLS) id 15.1.523.12; Fri, 24 Jun 2016 02:48:12 +0000 Message-ID: <87ziqbwbow.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/3] ASoC: hdmi-codec: enable multi probe for same device User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown , David Airlie , Russell King , Fabio Estevam , Daniel Vetter , Koji Matsuoka , Thierry Reding CC: Linux-ALSA , Liam Girdwood , Simon , , , In-Reply-To: <874m8jxqcy.wl%kuninori.morimoto.gx@renesas.com> References: <874m8jxqcy.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 24 Jun 2016 02:48:12 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0031.jpnprd01.prod.outlook.com (10.165.48.141) To PS1PR06MB1705.apcprd06.prod.outlook.com (10.167.53.15) X-MS-Office365-Filtering-Correlation-Id: 6cac8163-1708-403a-d5a9-08d39bd9fc97 X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 2:L+nl+FMuFLPUciPa2+/Dxi3WlkqC7bPiq56FSQ8+XFrygLbyrTpxns1wXdV1Mjovij92oXeLNfuEOtQSDm0sOm7Fj+BidpAYxRQ526JIKL63g7W744bVgXUdJP2QI3ok6mVJusszrOtI3ih3Upu2R241DvL6ZBXEdj0KjNJm1tVb/wFZkLD09147andp4r2p; 3:3vtqZIVpMuhsIbokCco1PS9d3cOmBRf0kMhRk2SRhipGHGVz4HE6TwORghBczdShTM7h8PWwzxE/DXo8lMY6WUD8kAl65tdZjQSUDJTY9EKf3sjpg8FUgtn1MAvUVFAf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:PS1PR06MB1705; X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 25:JyGWi8QhDx1puGAL/4rt/4Un9m2M9YmFPpZ2w3poa56dw6uB5fr1zranpBejI1vw4ONZCJ8jWtL/YZEU5Y0i8Mxb4/5/gkWqZrTZGibtXmBplBOVtjzUjWbgmXOSSKzSBob/59pnt+TwdEX5kciApWG5iigUVV9OUXkKI7MWTAD6E2+I5cXxb+aKbV0Wumn5lNg/j7CiqCKKeOOgcV/T9xRCro3GX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wwiGgIBFPYExZ6Wjyz9r31bPfD/BiXEKj2XinkPfsqyeWBUMro4T4xPspegl9UsR2tOvYDTSx2KNeDloIE9sIIrnJMPciZjru8iZRy9Uryy25ohRApGMXvZDQAM/XXGmcG7J0WVB9qEVX+NMsFiDgyFnEBO5pHAS8j76PxgWH7dIcSoox37IsOwwDMZ/gO7kPpy3azkoK+TqyrBpo00kSt26aWOWNuQMLr8cLbe1leMaEX27ZXqiPD/XWL/4w3HfnxD7Sue2ch515UuGmYT+d0KC62hbe6/ZQdq3He5cO1Oa4cdfvMjCAoyTwHDqHioWGRzrUs/3Cxggr9rq6uBhWsoLrzZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:PS1PR06MB1705; BCL:0; PCL:0; RULEID:; SRVR:PS1PR06MB1705; X-Forefront-PRVS: 0983EAD6B2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(189002)(199003)(66066001)(5001770100001)(46406003)(189998001)(19580405001)(47776003)(92566002)(8666005)(4326007)(69596002)(86362001)(2906002)(19580395003)(7846002)(586003)(3846002)(83506001)(23726003)(50466002)(6116002)(2950100001)(81156014)(8676002)(54356999)(53416004)(50986999)(76176999)(105586002)(97736004)(229853001)(36756003)(305945005)(7736002)(106356001)(77096005)(33646002)(4001350100001)(101416001)(42186005)(68736007)(81166006)(7059030)(21314002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:PS1PR06MB1705; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; PS1PR06MB1705; 23:FBW4gF7zuI62lyuATY9fCjwXZ+OQ8XZpms25X04bI?= =?us-ascii?Q?QbqaV9oGxmdE1/fTtTKm1V6YdNr9l8D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z7i8itBRYZo1LIA8iMD/CD96sFZoHAOtlQeuoFPKP5jwqs3rg9C1kwscpfSSQgr/Y5wb+UOlveLQk5lTo4YD+NPo7/rIhUpZ8stiiRLbHQsy3n6UVJ3e26oB6EPWJ14aCc0P1wp0+qF1iFVI66LZNN+VBQE8lpSOfTidYUN98Exh62yvEdGmpYxU1tTgMVyJuuVF69wwitFWI9rs9UFIm6Uk02OB935WVLIBNg3r17I3f675j5LHARzaIdwtJ1D6IGCLs6PQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 20:2/5dhc0YduFOgAY3w/9zzWCeSkD/294qCUH/4DGXAzx0sV4BKpKICIfqJVjct3UaVu14ntUHiBjssQNOFhYo15vv2P0RORbYdqM+LoQeEppW/AtIz1nscBw+kKHknHqtWV/9Ad19JTqvdcYPBQpww0nxfxwTJ1ssG/G5MsIhlAE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2016 02:48:12.8672 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR06MB1705 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto hdmi-codec driver is common HDMI sound driver, but it doesn't care about multi sound ports. For example, hdmi-codec driver is supporting 1 I2S and 1 SPDIF ports, so, we can't use this driver if HDMI has 2 or more I2S ports. And we would like to use multi detection. For example, DesignWare HDMI driver is providing dw_hdmi_bind() to DRM/KMS driver, and it will setups HDMI video/sound. Note is that it will be called under for_each loop of ports. int dw_hdmi_bind(xxx) { /* register hdmi-codec driver here */ } static int xxx_probe(struct platform_device *pdev) { for_each_xxx(xx) { ... dw_hdmi_bind(xxx); ... } } This case, dw_hdmi_bind() would like to use hdmi-codec, and it will be called multiple times for each ports. Here, ASoC's CPU/Codec/Card bind will checks each "of_node" on DT, and hdmi-codec driver is assuming its parent device for it. But it doesn't care about case. Thus, ASoC never detect correct sound card in this case. To solve this issue, this patch checks each parent device, and names "hdmi-hifi.x" in order to each ports. And uses struct snd_soc_component_driver :: of_xlate_dai_name for snd_soc_get_dai_name(). Signed-off-by: Kuninori Morimoto --- sound/soc/codecs/hdmi-codec.c | 66 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index f27d115..fe155bc 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -24,6 +24,15 @@ #include /* This is only to get MAX_ELD_BYTES */ +struct hdmi_device { + struct device *dev; + struct list_head list; + int cnt; +}; +#define pos_to_hdmi_device(pos) container_of((pos), struct hdmi_device, list) +LIST_HEAD(hdmi_device_list); + +#define DAI_NAME_SIZE 16 struct hdmi_codec_priv { struct hdmi_codec_pdata hcd; struct snd_soc_dai_driver *daidrv; @@ -320,7 +329,6 @@ static const struct snd_soc_dai_ops hdmi_dai_ops = { SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE) static struct snd_soc_dai_driver hdmi_i2s_dai = { - .name = "i2s-hifi", .id = DAI_ID_I2S, .playback = { .stream_name = "Playback", @@ -334,7 +342,6 @@ static struct snd_soc_dai_driver hdmi_i2s_dai = { }; static const struct snd_soc_dai_driver hdmi_spdif_dai = { - .name = "spdif-hifi", .id = DAI_ID_SPDIF, .playback = { .stream_name = "Playback", @@ -346,6 +353,27 @@ static const struct snd_soc_dai_driver hdmi_spdif_dai = { .ops = &hdmi_dai_ops, }; +static char hdmi_dai_name[][DAI_NAME_SIZE] = { + "hdmi-hifi.0", + "hdmi-hifi.1", + "hdmi-hifi.2", + "hdmi-hifi.3", +}; + +static int hdmi_of_xlate_dai_name(struct snd_soc_component *component, + struct of_phandle_args *args, + const char **dai_name) +{ + int id = args->args[0]; + + if (id < ARRAY_SIZE(hdmi_dai_name)) { + *dai_name = hdmi_dai_name[id]; + return 0; + } + + return -EAGAIN; +} + static struct snd_soc_codec_driver hdmi_codec = { .controls = hdmi_controls, .num_controls = ARRAY_SIZE(hdmi_controls), @@ -353,6 +381,9 @@ static struct snd_soc_codec_driver hdmi_codec = { .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), .dapm_routes = hdmi_routes, .num_dapm_routes = ARRAY_SIZE(hdmi_routes), + .component_driver = { + .of_xlate_dai_name = hdmi_of_xlate_dai_name, + }, }; static int hdmi_codec_probe(struct platform_device *pdev) @@ -360,6 +391,8 @@ static int hdmi_codec_probe(struct platform_device *pdev) struct hdmi_codec_pdata *hcd = pdev->dev.platform_data; struct device *dev = &pdev->dev; struct hdmi_codec_priv *hcp; + struct hdmi_device *hd; + struct list_head *pos; int dai_count, i = 0; int ret; @@ -381,6 +414,30 @@ static int hdmi_codec_probe(struct platform_device *pdev) if (!hcp) return -ENOMEM; + hd = NULL; + list_for_each(pos, &hdmi_device_list) { + struct hdmi_device *tmp = pos_to_hdmi_device(pos); + if (tmp->dev == dev->parent) { + hd = tmp; + break; + } + } + + if (!hd) { + hd = devm_kzalloc(dev, sizeof(*hd), GFP_KERNEL); + if (!hd) + return -ENOMEM; + + hd->dev = dev->parent; + + list_add_tail(&hd->list, &hdmi_device_list); + } + + if (hd->cnt >= ARRAY_SIZE(hdmi_dai_name)) { + dev_err(dev, "too many hdmi codec are deteced\n"); + return -EINVAL; + } + hcp->hcd = *hcd; mutex_init(&hcp->current_stream_lock); @@ -393,11 +450,14 @@ static int hdmi_codec_probe(struct platform_device *pdev) hcp->daidrv[i] = hdmi_i2s_dai; hcp->daidrv[i].playback.channels_max = hcd->max_i2s_channels; + hcp->daidrv[i].name = hdmi_dai_name[hd->cnt++]; i++; } - if (hcd->spdif) + if (hcd->spdif) { hcp->daidrv[i] = hdmi_spdif_dai; + hcp->daidrv[i].name = hdmi_dai_name[hd->cnt++]; + } ret = snd_soc_register_codec(dev, &hdmi_codec, hcp->daidrv, dai_count);