From patchwork Tue Nov 20 17:01:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 151608 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp841999ljp; Tue, 20 Nov 2018 09:01:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/XRlLvKChMlovLUf7q84tVS0A54QpvKJmJOqDjPDRiXy9QxWUwBjSHrPbRj8ig3leg7oeut X-Received: by 2002:a05:6000:1c8:: with SMTP id t8mr2776407wrx.146.1542733295151; Tue, 20 Nov 2018 09:01:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542733295; cv=none; d=google.com; s=arc-20160816; b=Nb5tqzRiOHd8BXS69yqUbTfIq1ubEfMGUHflJnhH/rlA2tk3LF1GoeBwKSJUzlLnOJ GGWf//elpDpnAJrwaKouIbEK8XAUMljFm4Ba2vgsHg7Kb3k4fNRs+/Oc7g6FzjJWDxSf SoxdLgiAxZnr3J4Z5ISI4I+98xGCTDrTqOnAuFtEDNey7Kmd6ure56GU21uLvQtjhzj8 LeBUIK2GOMEXxJO5ZTtNMFgmLZn7EMXjkuv6kwctURt4FBkH4L4d3ZV6lLYbgq4fz73E MZvUnrUUWKLkH2zg9UB084yD3nAEuEjvtY9NnQFksF4/Qd0jahkaTIWuWgoGslKdsfah QE5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to; bh=44GkYnwJfqgEN6bdePJ/wHV0RUMaSdivUJ2h5/13HUI=; b=nJ/sps21kxYmYcW9GNJuvwVWu1ESuxmoMTNk0f5lZ++0MvwXdBcnzQus4MM1CaDG/G iSVzlLcRxtSFh14Wyfxl9C6v/M2RdqtfnaDd7R9MTSp95fDhQJ+GUvNaY8PQKtcA6T7J kpKsDRSpsB2Q3X3KJ6nsFvKgG0GnFZJbXonkajS6VPl9SfsHJGvNZ8TVDjQNRFkKnEZb RiPWlJs+kSW6qKcGms8SPmX7+HUOigPd99tpe9pinyr61RjfFHBrVrwhnSqNUKbw9MT/ pWtJm0QrM+i013m6Pb2L5DjfspeJlxUlUxW+7xW0uuTiaYr9yC1HQyxmgCR7Nu/LUoUz Seag== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="A8BsAf/P"; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id z16si19067375wmi.172.2018.11.20.09.01.34; Tue, 20 Nov 2018 09:01:35 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="A8BsAf/P"; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3B3092678DD; Tue, 20 Nov 2018 18:01:33 +0100 (CET) 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 254112678DF; Tue, 20 Nov 2018 18:01:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 2C68726784F for ; Tue, 20 Nov 2018 18:01:28 +0100 (CET) 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=EWypQ9pCr1qNor1ynAB+yY1ICEoPcPxHXdab7553ayk=; b=A8BsAf/PcrtB idj4PNiHK4zI9ZVXogfZG87mq97HNAVnhgLu7lkpXK/KEkEHwZwer2t1Wo84L1OQ1IEoa5ldqoOPR ynK3zZ5mKEgrG0irH6PuCfXzBZIxmkbpabf8phSJtiwLc4vCYVlyTUha8l7ySgHbzDT7H/Amyz92k fmlm8=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gP9Ox-0001pU-28; Tue, 20 Nov 2018 17:01:27 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id C19411124DC2; Tue, 20 Nov 2018 17:01:26 +0000 (GMT) From: Mark Brown To: Pierre-Louis Bossart In-Reply-To: <20181117004706.15911-4-pierre-louis.bossart@linux.intel.com> Message-Id: <20181120170126.C19411124DC2@debutante.sirena.org.uk> Date: Tue, 20 Nov 2018 17:01:26 +0000 (GMT) Cc: alsa-devel@alsa-project.org, tiwai@suse.de, liam.r.girdwood@linux.intel.com, vkoul@kernel.org, broonie@kernel.org, andriy.shevchenko@linux.intel.com Subject: [alsa-devel] Applied "ASoC: Intel: use platform_data for machine drivers" to the asoc tree 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: Intel: use platform_data for machine drivers has been applied to the asoc tree at https://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 5a619b9e8883a0f9691964d001b8480df44df5b9 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 16 Nov 2018 18:47:06 -0600 Subject: [PATCH] ASoC: Intel: use platform_data for machine drivers For some reason we have different mechanisms for passing data to machine drivers. Use the solution used by Atom/SST and SOF instead of using drv_data as done by Skylake. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown --- sound/soc/intel/boards/kbl_rt5663_max98927.c | 2 +- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +- sound/soc/intel/boards/skl_hda_dsp_generic.c | 2 +- sound/soc/intel/boards/skl_nau88l25_max98357a.c | 2 +- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 2 +- sound/soc/intel/skylake/skl.c | 13 ++++++++++--- 6 files changed, 15 insertions(+), 8 deletions(-) -- 2.19.0.rc2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c index c2a96940f9f2..d71475200b08 100644 --- a/sound/soc/intel/boards/kbl_rt5663_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c @@ -984,7 +984,7 @@ static int kabylake_audio_probe(struct platform_device *pdev) kabylake_audio_card->dev = &pdev->dev; snd_soc_card_set_drvdata(kabylake_audio_card, ctx); - mach = dev_get_drvdata(&pdev->dev); + mach = (&pdev->dev)->platform_data; if (mach) dmic_constraints = mach->mach_params.dmic_num == 2 ? &constraints_dmic_2ch : &constraints_dmic_channels; diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c index d7df307b406f..7044d8c2b187 100644 --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c @@ -659,7 +659,7 @@ static int kabylake_audio_probe(struct platform_device *pdev) kabylake_audio_card.dev = &pdev->dev; snd_soc_card_set_drvdata(&kabylake_audio_card, ctx); - mach = dev_get_drvdata(&pdev->dev); + mach = (&pdev->dev)->platform_data; if (mach) dmic_constraints = mach->mach_params.dmic_num == 2 ? &constraints_dmic_2ch : &constraints_dmic_channels; diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c index 15c502d6774d..b9a21e64ead2 100644 --- a/sound/soc/intel/boards/skl_hda_dsp_generic.c +++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c @@ -146,7 +146,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev) INIT_LIST_HEAD(&ctx->hdmi_pcm_list); - mach = dev_get_drvdata(&pdev->dev); + mach = (&pdev->dev)->platform_data; if (!mach) return -EINVAL; diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c index 931890f9aa74..0922106bd323 100644 --- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c +++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c @@ -652,7 +652,7 @@ static int skylake_audio_probe(struct platform_device *pdev) skylake_audio_card.dev = &pdev->dev; snd_soc_card_set_drvdata(&skylake_audio_card, ctx); - mach = dev_get_drvdata(&pdev->dev); + mach = (&pdev->dev)->platform_data; if (mach) dmic_constraints = mach->mach_params.dmic_num == 2 ? &constraints_dmic_2ch : &constraints_dmic_channels; diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c index 657c650766fc..8433c521d39f 100644 --- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c +++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c @@ -705,7 +705,7 @@ static int skylake_audio_probe(struct platform_device *pdev) skylake_audio_card.dev = &pdev->dev; snd_soc_card_set_drvdata(&skylake_audio_card, ctx); - mach = dev_get_drvdata(&pdev->dev); + mach = (&pdev->dev)->platform_data; if (mach) dmic_constraints = mach->mach_params.dmic_num == 2 ? &constraints_dmic_2ch : &constraints_dmic_channels; diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index b66d66acbc35..f81e7996aa0c 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -534,6 +534,16 @@ static int skl_machine_device_register(struct skl *skl) return -EIO; } + mach->mach_params.platform = dev_name(bus->dev); + mach->mach_params.codec_mask = bus->codec_mask; + + ret = platform_device_add_data(pdev, (const void *)mach, sizeof(*mach)); + if (ret) { + dev_err(bus->dev, "failed to add machine device platform data\n"); + platform_device_put(pdev); + return ret; + } + ret = platform_device_add(pdev); if (ret) { dev_err(bus->dev, "failed to add machine device\n"); @@ -541,9 +551,6 @@ static int skl_machine_device_register(struct skl *skl) return -EIO; } - mach->mach_params.platform = dev_name(bus->dev); - mach->mach_params.codec_mask = bus->codec_mask; - dev_set_drvdata(&pdev->dev, mach); skl->i2s_dev = pdev;