mirror of https://gitee.com/openkylin/linux.git
ASoC: Intel: bdw-5677: Remove haswell-solution specific code
Remove code specific to sound/soc/intel/haswell. Update BE dai_link definition to provide seamless transition to catpt solution. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-14-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
02f2442fb3
commit
053743f0c4
|
@ -17,9 +17,6 @@
|
||||||
#include <sound/jack.h>
|
#include <sound/jack.h>
|
||||||
#include <sound/soc-acpi.h>
|
#include <sound/soc-acpi.h>
|
||||||
|
|
||||||
#include "../common/sst-dsp.h"
|
|
||||||
#include "../haswell/sst-haswell-ipc.h"
|
|
||||||
|
|
||||||
#include "../../codecs/rt5677.h"
|
#include "../../codecs/rt5677.h"
|
||||||
|
|
||||||
struct bdw_rt5677_priv {
|
struct bdw_rt5677_priv {
|
||||||
|
@ -201,27 +198,6 @@ static const struct snd_soc_ops bdw_rt5677_dsp_ops = {
|
||||||
.hw_params = bdw_rt5677_dsp_hw_params,
|
.hw_params = bdw_rt5677_dsp_hw_params,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL)
|
|
||||||
static int bdw_rt5677_rtd_init(struct snd_soc_pcm_runtime *rtd)
|
|
||||||
{
|
|
||||||
struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
|
|
||||||
struct sst_pdata *pdata = dev_get_platdata(component->dev);
|
|
||||||
struct sst_hsw *broadwell = pdata->dsp;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Set ADSP SSP port settings */
|
|
||||||
ret = sst_hsw_device_set_config(broadwell, SST_HSW_DEVICE_SSP_0,
|
|
||||||
SST_HSW_DEVICE_MCLK_FREQ_24_MHZ,
|
|
||||||
SST_HSW_DEVICE_CLOCK_MASTER, 9);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(rtd->dev, "error: failed to set device config\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const unsigned int channels[] = {
|
static const unsigned int channels[] = {
|
||||||
2,
|
2,
|
||||||
};
|
};
|
||||||
|
@ -333,10 +309,8 @@ SND_SOC_DAILINK_DEF(platform,
|
||||||
SND_SOC_DAILINK_DEF(be,
|
SND_SOC_DAILINK_DEF(be,
|
||||||
DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-aif1")));
|
DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-aif1")));
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL)
|
|
||||||
SND_SOC_DAILINK_DEF(ssp0_port,
|
SND_SOC_DAILINK_DEF(ssp0_port,
|
||||||
DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port")));
|
DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port")));
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Wake on voice interface */
|
/* Wake on voice interface */
|
||||||
SND_SOC_DAILINK_DEFS(dsp,
|
SND_SOC_DAILINK_DEFS(dsp,
|
||||||
|
@ -350,9 +324,6 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = {
|
||||||
.name = "System PCM",
|
.name = "System PCM",
|
||||||
.stream_name = "System Playback/Capture",
|
.stream_name = "System Playback/Capture",
|
||||||
.dynamic = 1,
|
.dynamic = 1,
|
||||||
#if !IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL)
|
|
||||||
.init = bdw_rt5677_rtd_init,
|
|
||||||
#endif
|
|
||||||
.trigger = {
|
.trigger = {
|
||||||
SND_SOC_DPCM_TRIGGER_POST,
|
SND_SOC_DPCM_TRIGGER_POST,
|
||||||
SND_SOC_DPCM_TRIGGER_POST
|
SND_SOC_DPCM_TRIGGER_POST
|
||||||
|
@ -387,11 +358,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = {
|
||||||
.dpcm_capture = 1,
|
.dpcm_capture = 1,
|
||||||
.init = bdw_rt5677_init,
|
.init = bdw_rt5677_init,
|
||||||
.exit = bdw_rt5677_exit,
|
.exit = bdw_rt5677_exit,
|
||||||
#if !IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL)
|
|
||||||
SND_SOC_DAILINK_REG(dummy, be, dummy),
|
|
||||||
#else
|
|
||||||
SND_SOC_DAILINK_REG(ssp0_port, be, platform),
|
SND_SOC_DAILINK_REG(ssp0_port, be, platform),
|
||||||
#endif
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue