All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	liam.r.girdwood@linux.intel.com, vinod.koul@intel.com,
	broonie@kernel.org, andriy.shevchenko@linux.intel.com
Subject: [PATCH 1/7] ASoC: acpi: define common interface for machine driver configuration
Date: Wed, 31 Oct 2018 20:07:12 -0500	[thread overview]
Message-ID: <20181101010718.2878-2-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20181101010718.2878-1-pierre-louis.bossart@linux.intel.com>

The machine drivers may need information provided by the platform
driver.  Currently the information is passed using pdata specific to
each plaform driver. This prevents other drivers, such as SOF, from
reusing machine drivers directly.

Add a new structure which contains the required fields.

This proposal requires a bit more work on the platform side but this
generic interface helps reuse code directly.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 include/sound/soc-acpi.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h
index e45b2330d16a..5154c6359609 100644
--- a/include/sound/soc-acpi.h
+++ b/include/sound/soc-acpi.h
@@ -37,6 +37,19 @@ snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
 struct snd_soc_acpi_mach *
 snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines);
 
+/**
+ * snd_soc_acpi_mach_params: interface for machine driver configuration
+ *
+ * @acpi_ipc_irq_index: used for BYT-CR detection
+ * @platform: string used for HDaudio codec support
+ * @codec_mask: used for HDAudio support
+ */
+struct snd_soc_acpi_mach_params {
+	u32 acpi_ipc_irq_index;
+	const char *platform;
+	u32 codec_mask;
+};
+
 /**
  * snd_soc_acpi_mach: ACPI-based machine descriptor. Most of the fields are
  * related to the hardware, except for the firmware and topology file names.
@@ -68,6 +81,7 @@ struct snd_soc_acpi_mach {
 	struct snd_soc_acpi_mach * (*machine_quirk)(void *arg);
 	const void *quirk_data;
 	void *pdata;
+	struct snd_soc_acpi_mach_params mach_params;
 	const char *sof_fw_filename;
 	const char *sof_tplg_filename;
 	const char *asoc_plat_name;
-- 
2.17.1

  reply	other threads:[~2018-11-01  1:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01  1:07 [PATCH 0/7] ASoC: Intel: cleanups Pierre-Louis Bossart
2018-11-01  1:07 ` Pierre-Louis Bossart [this message]
2018-11-01  1:07 ` [PATCH 2/7] ASoC: Intel: use standard interface for Hdaudio machine driver Pierre-Louis Bossart
2018-11-01  1:07 ` [PATCH 3/7] ASoC: Intel: use standard interface for Atom machine drivers Pierre-Louis Bossart
2018-11-01  1:07 ` [PATCH 4/7] ASoC: Intel: boards: fix Skylake typo Pierre-Louis Bossart
2018-11-01  1:07 ` [PATCH 5/7] ASoC: Intel: remove GFP_ATOMIC, use GFP_KERNEL Pierre-Louis Bossart
2018-11-01  1:07 ` [PATCH 6/7] ASoC: Intel: common: add SOF information for APL RVP Pierre-Louis Bossart
2018-11-01  1:07 ` [PATCH 7/7] ASoC: Intel: common: add quirk for APL RVP boards Pierre-Louis Bossart
2018-11-01  2:35   ` Keyon Jie
2018-11-01 14:11   ` Andy Shevchenko
2018-11-01 15:08     ` Pierre-Louis Bossart
2018-11-01 14:12 ` [PATCH 0/7] ASoC: Intel: cleanups Andy Shevchenko

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=20181101010718.2878-2-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@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.