From patchwork Tue Sep 19 14:59:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 9959285 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 858F660208 for ; Tue, 19 Sep 2017 15:01:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6176228EA0 for ; Tue, 19 Sep 2017 15:01:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5392A28E9B; Tue, 19 Sep 2017 15:01:25 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 C6DD228E78 for ; Tue, 19 Sep 2017 15:01:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751752AbdISPAA (ORCPT ); Tue, 19 Sep 2017 11:00:00 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:53296 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbdISO77 (ORCPT ); Tue, 19 Sep 2017 10:59:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=5KA/AOB5HeIGDHxHNYyQHBKAPIgwuQ6u2MWucsKhd5Q=; b=B72GPh5n4SqO rNd70xkAUrJ2xrRuaU6YyCrAk50GLlx46Knajm1tKXYnNmxrqaP35BMJZvcvI8tYBvKfZmkhhT/mJ g0DgLZWd5ZHDZsBtACt/MSg1ursfmYjNkkJaOt92/PyvTOQWrtPCZNLKK+1E1VZ1xenALgqs4OtXI Y4jD4=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1duK04-0001XC-Lx; Tue, 19 Sep 2017 14:59:48 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1duK04-0002FS-9J; Tue, 19 Sep 2017 15:59:48 +0100 From: Mark Brown To: Jaechul Lee Cc: Mark Brown , Krzysztof Kozlowski , Sangbeom Kim , Sylwester Nawrocki , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Chanwoo Choi , galaxyra@gmail.com, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Applied "ASoC: samsung: i2s: Use specific name for i2s dais" to the asoc tree In-Reply-To: <20170906010415.26952-2-jcsing.lee@samsung.com> Message-Id: Date: Tue, 19 Sep 2017 15:59:48 +0100 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch ASoC: samsung: i2s: Use specific name for i2s dais has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 22289ddcd87285b3d61cd8b129438ca6abb1aa37 Mon Sep 17 00:00:00 2001 From: Jaechul Lee Date: Wed, 6 Sep 2017 10:04:13 +0900 Subject: [PATCH] ASoC: samsung: i2s: Use specific name for i2s dais Add specific dais name when components are registered. Component and dai name will follow their parent dev name, if the name isn't described. In case of this driver, each dais will have same name like '11440000.i2s0' by fmt_single_name function. The problem having same name is that TM2 machine driver can't detect capture devices correctly. Machine driver doesn't know which one is proper to use for cpu dai. The driver just selects to use 'samsung-i2c-sec' that doesn't have capture functionality because the component of samsung-i2s-sec is located in the first of the component_list. I add dai name like 'samsung-i2s', 'samsung-i2s-sec' for each dais. The reason why adding dai id to 1 is that it doesn't allow to use particular dai name in case of when I use 0 for dai id. Signed-off-by: Jaechul Lee Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown --- sound/soc/samsung/i2s.c | 4 ++++ sound/soc/samsung/i2s.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index d7e7f4244d38..8d5e1861abb1 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1099,6 +1099,7 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, i2s->pdev = pdev; i2s->pri_dai = NULL; i2s->sec_dai = NULL; + i2s->i2s_dai_drv.id = 1; i2s->i2s_dai_drv.symmetric_rates = 1; i2s->i2s_dai_drv.probe = samsung_i2s_dai_probe; i2s->i2s_dai_drv.remove = samsung_i2s_dai_remove; @@ -1111,10 +1112,13 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, i2s->i2s_dai_drv.playback.formats = SAMSUNG_I2S_FMTS; if (!sec) { + i2s->i2s_dai_drv.name = SAMSUNG_I2S_DAI; i2s->i2s_dai_drv.capture.channels_min = 1; i2s->i2s_dai_drv.capture.channels_max = 2; i2s->i2s_dai_drv.capture.rates = i2s_dai_data->pcm_rates; i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS; + } else { + i2s->i2s_dai_drv.name = SAMSUNG_I2S_DAI_SEC; } return i2s; } diff --git a/sound/soc/samsung/i2s.h b/sound/soc/samsung/i2s.h index 21ff24e930db..79781de2f247 100644 --- a/sound/soc/samsung/i2s.h +++ b/sound/soc/samsung/i2s.h @@ -13,6 +13,9 @@ #ifndef __SND_SOC_SAMSUNG_I2S_H #define __SND_SOC_SAMSUNG_I2S_H +#define SAMSUNG_I2S_DAI "samsung-i2s" +#define SAMSUNG_I2S_DAI_SEC "samsung-i2s-sec" + #define SAMSUNG_I2S_DIV_BCLK 1 #define SAMSUNG_I2S_RCLKSRC_0 0