aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2017-10-12 18:49:38 -0500
committerMark Brown <broonie@kernel.org>2017-10-21 11:21:09 +0100
commit7feb2f786a46d34cac760d5e246dfbdafafa0e96 (patch)
tree7d831a7cc496461853d29b0b7a1e5b5130dc276c /sound/soc/intel/boards
parentSoC: intel: byt: Introduce new custom IN2 map (diff)
downloadlinux-dev-7feb2f786a46d34cac760d5e246dfbdafafa0e96.tar.xz
linux-dev-7feb2f786a46d34cac760d5e246dfbdafafa0e96.zip
ASoC: move ACPI common code out of Intel/sst tree
ACPI support is not specific to the Intel/SST driver. Move the enumeration and matching code which is not hardware-dependent to sound/soc and rename relevant sst_acpi_ structures and functions with snd_soc_acpi_ prefix soc-acpi.h is protected by a #ifndef __LINUX_SND_SOC_ACPI_H for consistency with all other SoC .h files: grep -L __LINUX include/sound/soc* | wc -l 0 grep __LINUX include/sound/soc* | wc -l 14 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards')
-rw-r--r--sound/soc/intel/boards/bytcht_da7213.c6
-rw-r--r--sound/soc/intel/boards/bytcht_es8316.c2
-rw-r--r--sound/soc/intel/boards/bytcr_rt5640.c11
-rw-r--r--sound/soc/intel/boards/bytcr_rt5651.c6
-rw-r--r--sound/soc/intel/boards/cht_bsw_rt5645.c11
-rw-r--r--sound/soc/intel/boards/cht_bsw_rt5672.c7
6 files changed, 23 insertions, 20 deletions
diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c
index 296b50640f46..c4d82ad41bd7 100644
--- a/sound/soc/intel/boards/bytcht_da7213.c
+++ b/sound/soc/intel/boards/bytcht_da7213.c
@@ -27,9 +27,9 @@
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
+#include <sound/soc-acpi.h>
#include "../../codecs/da7213.h"
#include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
static const struct snd_kcontrol_new controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone Jack"),
@@ -224,7 +224,7 @@ static char codec_name[16]; /* i2c-<HID>:00 with HID being 8 chars */
static int bytcht_da7213_probe(struct platform_device *pdev)
{
struct snd_soc_card *card;
- struct sst_acpi_mach *mach;
+ struct snd_soc_acpi_mach *mach;
const char *i2c_name = NULL;
int dai_index = 0;
int ret_val = 0;
@@ -243,7 +243,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
}
/* fixup codec name based on HID */
- i2c_name = sst_acpi_find_name_from_hid(mach->id);
+ i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
if (i2c_name) {
snprintf(codec_name, sizeof(codec_name),
"%s%s", "i2c-", i2c_name);
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 6acacc0aeedb..8088396717e3 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -29,8 +29,8 @@
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
+#include <sound/soc-acpi.h>
#include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
#include "../common/sst-dsp.h"
struct byt_cht_es8316_private {
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 3eeb02036aa1..f2c0fc415e52 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -32,9 +32,9 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/jack.h>
+#include <sound/soc-acpi.h>
#include "../../codecs/rt5640.h"
#include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
#include "../common/sst-dsp.h"
enum {
@@ -737,7 +737,7 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */
static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
{
struct byt_rt5640_private *priv;
- struct sst_acpi_mach *mach;
+ struct snd_soc_acpi_mach *mach;
const char *i2c_name = NULL;
int ret_val = 0;
int dai_index = 0;
@@ -762,7 +762,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
}
/* fixup codec name based on HID */
- i2c_name = sst_acpi_find_name_from_hid(mach->id);
+ i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
if (i2c_name) {
snprintf(byt_rt5640_codec_name, sizeof(byt_rt5640_codec_name),
"%s%s", "i2c-", i2c_name);
@@ -796,7 +796,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
/* format specified: 2 64-bit integers */
struct acpi_buffer format = {sizeof("NN"), "NN"};
struct acpi_buffer state = {0, NULL};
- struct sst_acpi_package_context pkg_ctx;
+ struct snd_soc_acpi_package_context pkg_ctx;
bool pkg_found = false;
state.length = sizeof(chan_package);
@@ -808,7 +808,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
pkg_ctx.state = &state;
pkg_ctx.data_valid = false;
- pkg_found = sst_acpi_find_package_from_hid(mach->id, &pkg_ctx);
+ pkg_found = snd_soc_acpi_find_package_from_hid(mach->id,
+ &pkg_ctx);
if (pkg_found) {
if (chan_package.aif_value == 1) {
dev_info(&pdev->dev, "BIOS Routing: AIF1 connected\n");
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 1dad5c98c9ef..51de1bbe8ecd 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -30,9 +30,9 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/jack.h>
+#include <sound/soc-acpi.h>
#include "../../codecs/rt5651.h"
#include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
enum {
BYT_RT5651_DMIC_MAP,
@@ -443,7 +443,7 @@ static char byt_rt5651_codec_name[16]; /* i2c-<HID>:00 with HID being 8 chars */
static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
{
struct byt_rt5651_private *priv;
- struct sst_acpi_mach *mach;
+ struct snd_soc_acpi_mach *mach;
const char *i2c_name = NULL;
int ret_val = 0;
int dai_index = 0;
@@ -468,7 +468,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
}
/* fixup codec name based on HID */
- i2c_name = sst_acpi_find_name_from_hid(mach->id);
+ i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
if (i2c_name) {
snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name),
"%s%s", "i2c-", i2c_name);
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index 83c923c39393..18d129caa974 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -32,9 +32,9 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/jack.h>
+#include <sound/soc-acpi.h>
#include "../../codecs/rt5645.h"
#include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
#define CHT_PLAT_CLK_3_HZ 19200000
#define CHT_CODEC_DAI1 "rt5645-aif1"
@@ -523,7 +523,7 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */
static int snd_cht_mc_probe(struct platform_device *pdev)
{
struct snd_soc_card *card = snd_soc_cards[0].soc_card;
- struct sst_acpi_mach *mach;
+ struct snd_soc_acpi_mach *mach;
struct cht_mc_private *drv;
const char *i2c_name = NULL;
bool found = false;
@@ -566,7 +566,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
}
/* fixup codec name based on HID */
- i2c_name = sst_acpi_find_name_from_hid(mach->id);
+ i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
if (i2c_name) {
snprintf(cht_rt5645_codec_name, sizeof(cht_rt5645_codec_name),
"%s%s", "i2c-", i2c_name);
@@ -599,7 +599,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
/* format specified: 2 64-bit integers */
struct acpi_buffer format = {sizeof("NN"), "NN"};
struct acpi_buffer state = {0, NULL};
- struct sst_acpi_package_context pkg_ctx;
+ struct snd_soc_acpi_package_context pkg_ctx;
bool pkg_found = false;
state.length = sizeof(chan_package);
@@ -611,7 +611,8 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
pkg_ctx.state = &state;
pkg_ctx.data_valid = false;
- pkg_found = sst_acpi_find_package_from_hid(mach->id, &pkg_ctx);
+ pkg_found = snd_soc_acpi_find_package_from_hid(mach->id,
+ &pkg_ctx);
if (pkg_found) {
if (chan_package.aif_value == 1) {
dev_info(&pdev->dev, "BIOS Routing: AIF1 connected\n");
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index d135640702e9..f8f21eee9b2d 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -24,9 +24,10 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/jack.h>
+#include <sound/soc-acpi.h>
#include "../../codecs/rt5670.h"
#include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
+
/* The platform clock #3 outputs 19.2Mhz clock to codec as I2S MCLK */
#define CHT_PLAT_CLK_3_HZ 19200000
@@ -383,7 +384,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
{
int ret_val = 0;
struct cht_mc_private *drv;
- struct sst_acpi_mach *mach = pdev->dev.platform_data;
+ struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
const char *i2c_name;
int i;
@@ -395,7 +396,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
/* fixup codec name based on HID */
if (mach) {
- i2c_name = sst_acpi_find_name_from_hid(mach->id);
+ i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
if (i2c_name) {
snprintf(drv->codec_name, sizeof(drv->codec_name),
"i2c-%s", i2c_name);