All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Subject: Applied "ASoC: Intel: bytcr_rt5640: fixup DAI codec_name with HID" to the asoc tree
Date: Tue, 05 Jan 2016 17:49:13 +0000	[thread overview]
Message-ID: <E1aGVjN-000362-Ik@debutante> (raw)
In-Reply-To: <1450406156-22246-18-git-send-email-pierre-louis.bossart@linux.intel.com>

The patch

   ASoC: Intel: bytcr_rt5640: fixup DAI codec_name with HID

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 caf94ed8629afb82d61a82ce76fb314145933a40 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Mon, 4 Jan 2016 17:20:28 -0600
Subject: [PATCH] ASoC: Intel: bytcr_rt5640: fixup DAI codec_name with HID

Codec name is hard-coded in machine driver, pass information
from actual ACPI HID to help support BIOS variations

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/atom/sst/sst_acpi.c   | 17 ++++++++++++-----
 sound/soc/intel/boards/bytcr_rt5640.c | 10 ++++++++++
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c
index b6ea0a58f9d3..f61e53106339 100644
--- a/sound/soc/intel/atom/sst/sst_acpi.c
+++ b/sound/soc/intel/atom/sst/sst_acpi.c
@@ -247,16 +247,23 @@ static int sst_acpi_probe(struct platform_device *pdev)
 
 	dev_dbg(dev, "ACPI device id: %x\n", dev_id);
 
-	plat_dev = platform_device_register_data(dev, pdata->platform, -1, NULL, 0);
+	plat_dev = platform_device_register_data(dev, pdata->platform, -1,
+						NULL, 0);
 	if (IS_ERR(plat_dev)) {
-		dev_err(dev, "Failed to create machine device: %s\n", pdata->platform);
+		dev_err(dev, "Failed to create machine device: %s\n",
+			pdata->platform);
 		return PTR_ERR(plat_dev);
 	}
 
-	/* Create platform device for sst machine driver */
-	mdev = platform_device_register_data(dev, mach->drv_name, -1, NULL, 0);
+	/*
+	 * Create platform device for sst machine driver,
+	 * pass machine info as pdata
+	 */
+	mdev = platform_device_register_data(dev, mach->drv_name, -1,
+					(const void *)mach, sizeof(*mach));
 	if (IS_ERR(mdev)) {
-		dev_err(dev, "Failed to create machine device: %s\n", mach->drv_name);
+		dev_err(dev, "Failed to create machine device: %s\n",
+			mach->drv_name);
 		return PTR_ERR(mdev);
 	}
 
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 0f2385f6f6ac..74bb7cc1f54a 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -30,6 +30,7 @@
 #include <sound/jack.h>
 #include "../../codecs/rt5640.h"
 #include "../atom/sst-atom-controls.h"
+#include "../common/sst-acpi.h"
 
 static const struct snd_soc_dapm_widget byt_rt5640_widgets[] = {
 	SND_SOC_DAPM_HP("Headphone", NULL),
@@ -326,12 +327,21 @@ static struct snd_soc_card byt_rt5640_card = {
 	.fully_routed = true,
 };
 
+static char byt_rt5640_codec_name[16]; /* i2c-<HID>:00 with HID being 8 chars */
+
 static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
 {
 	int ret_val = 0;
+	struct sst_acpi_mach *mach;
 
 	/* register the soc card */
 	byt_rt5640_card.dev = &pdev->dev;
+	mach = byt_rt5640_card.dev->platform_data;
+
+	/* fixup codec name based on HID */
+	snprintf(byt_rt5640_codec_name, sizeof(byt_rt5640_codec_name),
+		 "%s%s%s", "i2c-", mach->id, ":00");
+	byt_rt5640_dais[MERR_DPCM_COMPR+1].codec_name = byt_rt5640_codec_name;
 
 	ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5640_card);
 
-- 
2.7.0.rc3

  reply	other threads:[~2016-01-05 17:49 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18  2:35 [PATCH 00/19] Baytrail/Cherrytrail cleanups and fixes Pierre-Louis Bossart
2015-12-18  2:35 ` [PATCH 01/19] ASoC: Intel: fix ACPI probe regression with Atom DPCM driver Pierre-Louis Bossart
2015-12-18 10:56   ` Takashi Iwai
2015-12-18 15:26     ` Pierre-Louis Bossart
2016-01-05 17:49   ` Applied "ASoC: Intel: fix ACPI probe regression with Atom DPCM driver" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 02/19] ASoC: Intel: bytcr_rt5640: set SSP to I2S mode 2ch Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoC: Intel: bytcr_rt5640: set SSP to I2S mode 2ch" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 03/19] ASoC: Intel: boards: align pin names between byt-rt5640 drivers Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoC: Intel: boards: align pin names between byt-rt5640 drivers" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 04/19] ASoC: Intel: boards: start merging byt-rt5640 drivers Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoC: Intel: boards: start merging byt-rt5640 drivers" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 05/19] ASoC: Intel: boards: merge DMI-based quirks in bytcr-rt5640 driver Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoC: Intel: boards: merge DMI-based quirks in bytcr-rt5640 driver" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 06/19] ASoC: Intel: tag byt-rt5640 machine driver as deprecated Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoC: Intel: tag byt-rt5640 machine driver as deprecated" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 07/19] ASoc: Intel: Atom: add deep buffer definitions for atom platforms Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoc: Intel: Atom: add deep buffer definitions for atom platforms" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 08/19] ASoC: Intel: boards: add DEEP_BUFFER support for BYT/CHT/BSW Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoC: Intel: boards: add DEEP_BUFFER support for BYT/CHT/BSW" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 09/19] ASoC: Intel: Atom: add 24-bit support for media playback and capture Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoC: Intel: Atom: add 24-bit support for media playback and capture" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 10/19] ASoC: Intel: Atom: clean-up compressed DAI definition Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoC: Intel: Atom: clean-up compressed DAI definition" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 11/19] ASoC: Intel: Atom: flip logic for gain Switch Pierre-Louis Bossart
2015-12-19 11:51   ` Applied "ASoC: Intel: Atom: flip logic for gain Switch" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 12/19] ASoC: codec: rt5651: add ACPI and OF support Pierre-Louis Bossart
2015-12-19 11:50   ` Mark Brown
2015-12-21 16:18     ` Pierre-Louis Bossart
2015-12-23  5:29       ` Bard Liao
2015-12-18  2:35 ` [PATCH 13/19] ASoC: Intel: add bytct-rt5651 machine driver Pierre-Louis Bossart
2015-12-18  2:35 ` [PATCH 14/19] ASoC: intel: boards: add card for MinnowBoard I2S access Pierre-Louis Bossart
2015-12-18  2:35 ` [PATCH 15/19] ASoC: rt5640: add ASRC support Pierre-Louis Bossart
2016-01-05 12:33   ` Applied "ASoC: rt5640: add ASRC support" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 16/19] ASoC: Intel: bytcr-rt5640: enable ASRC Pierre-Louis Bossart
2016-01-05 17:49   ` Applied "ASoC: Intel: bytcr-rt5640: enable ASRC" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 17/19] ASoC: Intel: bytcr_rt5640: fixup DAI codec_name with HID Pierre-Louis Bossart
2016-01-05 17:49   ` Mark Brown [this message]
2015-12-18  2:35 ` [PATCH 18/19] ASoC: Intel: Atom: add support for RT5642 Pierre-Louis Bossart
2016-01-05 17:49   ` Applied "ASoC: Intel: Atom: add support for RT5642" to the asoc tree Mark Brown
2015-12-18  2:35 ` [PATCH 19/19] ASoC: Intel: Atom: Add support for HP ElitePad 1000 G2 Pierre-Louis Bossart
2016-01-05 17:49   ` Applied "ASoC: Intel: Atom: Add support for HP ElitePad 1000 G2" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1aGVjN-000362-Ik@debutante \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.