alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: tiwai@suse.de, liam.r.girdwood@linux.intel.com,
	alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: [RFC PATCH 4/8] ASoC: Intel: move all ACPI match tables to common module
Date: Wed, 27 Sep 2017 15:15:45 +0530	[thread overview]
Message-ID: <20170927094545.GK30097@localhost> (raw)
In-Reply-To: <6c836c0f-5403-f7d2-5433-8197f8501e9e@linux.intel.com>

On Tue, Sep 26, 2017 at 02:13:23PM -0500, Pierre-Louis Bossart wrote:
> On 9/25/17 11:23 PM, Vinod Koul wrote:
> >On Fri, Sep 08, 2017 at 03:56:58PM -0500, Pierre-Louis Bossart wrote:
> >>First step of cleaning, move all tables to soc-acpi-intel-match module
> >>
> >>Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> >>---
> >>  include/sound/soc-acpi-intel-match.h          |  32 +++
> >>  sound/soc/intel/Kconfig                       |  24 +-
> >>  sound/soc/intel/Makefile                      |   2 +-
> >>  sound/soc/intel/atom/sst/sst_acpi.c           | 311 ++-----------------------
> >>  sound/soc/intel/common/Makefile               |   2 +
> >>  sound/soc/intel/common/soc-acpi-intel-match.c | 323 ++++++++++++++++++++++++++
> >>  sound/soc/intel/common/sst-acpi.c             |  44 +---
> >>  7 files changed, 395 insertions(+), 343 deletions(-)
> >>  create mode 100644 include/sound/soc-acpi-intel-match.h
> >>  create mode 100644 sound/soc/intel/common/soc-acpi-intel-match.c
> >>
> >>diff --git a/include/sound/soc-acpi-intel-match.h b/include/sound/soc-acpi-intel-match.h
> >>new file mode 100644
> >>index 0000000..1a9191c
> >>--- /dev/null
> >>+++ b/include/sound/soc-acpi-intel-match.h
> >>@@ -0,0 +1,32 @@
> >>+
> >>+/*
> >>+ * Copyright (C) 2017, Intel Corporation. All rights reserved.
> >>+ *
> >>+ * This program is free software; you can redistribute it and/or
> >>+ * modify it under the terms of the GNU General Public License version
> >>+ * 2 as published by the Free Software Foundation.
> >>+ *
> >>+ * This program is distributed in the hope that it will be useful,
> >>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
> >>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> >>+ * GNU General Public License for more details.
> >>+ *
> >>+ */
> >>+
> >>+#ifndef __LINUX_SND_SOC_ACPI_INTEL_MATCH_H
> >>+#define __LINUX_SND_SOC_ACPI_INTEL_MATCH_H
> >
> >do we need LINUX on this one, it already too long :)
> 
> I checked and all include/sound/soc* files have this LINUX_SND_SOC prefix. I
> don't mind removing it but then someone will object it's not consistent.

I didnt realize we had that in soc files :)

$ grep __LINUX include/sound/* |wc -l
56
$ grep -L __LINUX include/sound/* |wc -l
118

Take your pick :D

> 
> >
> >>+
> >>+#include <linux/stddef.h>
> >>+#include <linux/acpi.h>
> >>+
> >>+/*
> >>+ * these tables are not constants, some fields can be used for
> >>+ * pdata or machine ops
> >>+ */
> >>+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_haswell_machines[];
> >>+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[];
> >>+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[];
> >>+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[];
> >>+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[];
> >
> >so the header is just for externs, not a pretty thing, can we avoid these
> >somehow. Do they need to be in common file, why not keep then in respective
> >byt/hsw file.
> 
> Because they will be shared between drivers, that's the whole point.
> I can't put a common table in either of sound/soc/sof or
> sound/soc/intel/atom. I didn't find a better solution than a module with
> just tables + matching functions in it.

yes but shared between byt family or hsw family, maybe a common byt-tables.c
hsw-tables.c and we can move skl ones out to skl-tables.c

> 
> >
> >
> >>+config SND_SOC_INTEL_COMMON
> >>+	tristate
> >>+
> >>  config SND_SOC_INTEL_SST
> >>  	tristate
> >>+	select SND_SOC_INTEL_COMMON
> >>  	select SND_SOC_INTEL_SST_ACPI if ACPI
> >>-	select SND_SOC_INTEL_SST_MATCH if ACPI
> >>+	select SND_SOC_ACPI_INTEL_MATCH if ACPI
> >>-config SND_SOC_INTEL_SST_MATCH
> >>+config SND_SOC_ACPI_INTEL_MATCH
> >>  	tristate
> >>  	select SND_SOC_ACPI if ACPI
> >>@@ -145,7 +149,7 @@ config SND_SOC_INTEL_BYTCR_RT5640_MACH
> >>  	select SND_SOC_RT5640
> >>  	select SND_SST_ATOM_HIFI2_PLATFORM
> >>  	select SND_SST_IPC_ACPI
> >>-	select SND_SOC_INTEL_SST_MATCH if ACPI
> >>+	select SND_SOC_ACPI_INTEL_MATCH if ACPI
> >
> >why do you need this change, SND_SOC_INTEL_SST selects
> >SND_SOC_ACPI_INTEL_MATCH, so we should select top symbol which is
> >SND_SOC_INTEL_SST
> 
> The idea is also to share machine drivers between SOF and closed-source
> based platform drivers, so if we keep the semantic of INTEL_SST as is then
> it needs to go away from the machine parts.

ok

-- 
~Vinod

  reply	other threads:[~2017-09-27  9:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 20:56 [RFC PATCH 0/8] Prepare Sound Open Firmware (SOF) driver integration Pierre-Louis Bossart
2017-09-08 20:56 ` [RFC PATCH 1/8] ASoC: move ACPI common code out of Intel/sst tree Pierre-Louis Bossart
2017-09-08 20:56 ` [RFC PATCH 2/8] ASoC: Intel: common: use c99 syntax for ACPI/machine tables Pierre-Louis Bossart
2017-10-21 10:30   ` Applied "ASoC: Intel: common: use c99 syntax for ACPI/machine tables" to the asoc tree Mark Brown
2017-09-08 20:56 ` [RFC PATCH 3/8] ASoC: ACPI: add new fields for SOF support Pierre-Louis Bossart
2017-09-26  4:18   ` Vinod Koul
2017-09-26 19:14     ` Pierre-Louis Bossart
2017-09-08 20:56 ` [RFC PATCH 4/8] ASoC: Intel: move all ACPI match tables to common module Pierre-Louis Bossart
2017-09-26  4:23   ` Vinod Koul
2017-09-26 19:13     ` Pierre-Louis Bossart
2017-09-27  9:45       ` Vinod Koul [this message]
2017-09-27 17:06         ` Pierre-Louis Bossart
2017-09-27 17:31           ` Vinod Koul
2017-09-27 17:39             ` Pierre-Louis Bossart
2017-09-08 20:56 ` [RFC PATCH 5/8] ASoC: Intel: add SOF firmare/topology file information Pierre-Louis Bossart
2017-09-08 20:57 ` [RFC PATCH 6/8] ASoC: Intel: move machine drivers to dedicated KConfig Pierre-Louis Bossart
2017-10-21 10:29   ` Applied "ASoC: Intel: move machine drivers to dedicated KConfig" to the asoc tree Mark Brown
2017-09-08 20:57 ` [RFC PATCH 7/8] ASoC: Intel: reorder boards Kconfig by chronological order Pierre-Louis Bossart
2017-09-26  4:24   ` Vinod Koul
2017-10-21 10:28   ` Applied "ASoC: Intel: reorder boards Kconfig by chronological order" to the asoc tree Mark Brown
2017-09-08 20:57 ` [RFC PATCH 8/8] ASoC: Intel: clarify Kconfig dependencies Pierre-Louis Bossart
2017-10-21 10:27   ` Applied "ASoC: Intel: clarify Kconfig dependencies" to the asoc tree Mark Brown
2017-09-25 19:09 ` [RFC PATCH 0/8] Prepare Sound Open Firmware (SOF) driver integration Mark Brown
2017-09-25 21:49   ` Liam Girdwood

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=20170927094545.GK30097@localhost \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).