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>
This commit is contained in:

committed by
Mark Brown

父節點
39712db878
當前提交
7feb2f786a
@@ -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");
|
||||
|
Reference in New Issue
Block a user