diff mbox series

[v5,10/13] ASoC: Intel: haswell: Remove haswell-solution specific code

Message ID 20200915162944.16241-11-cezary.rojewski@intel.com (mailing list archive)
State Superseded
Headers show
Series ASoC: Intel: Catpt - Lynx and Wildcat point | expand

Commit Message

Cezary Rojewski Sept. 15, 2020, 4:29 p.m. UTC
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>
---

No changes since initial version.

 sound/soc/intel/boards/haswell.c | 28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)

Comments

Andy Shevchenko Sept. 16, 2020, 3:50 p.m. UTC | #1
On Tue, Sep 15, 2020 at 06:29:41PM +0200, Cezary Rojewski wrote:
> Remove code specific to sound/soc/intel/haswell. Update BE dai_link
> definition to provide seamless transition to catpt solution.

I thought I gave a tag for this...
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
> ---
> 
> No changes since initial version.
> 
>  sound/soc/intel/boards/haswell.c | 28 ++++------------------------
>  1 file changed, 4 insertions(+), 24 deletions(-)
> 
> diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c
> index 744b7b5b8106..c268405e5594 100644
> --- a/sound/soc/intel/boards/haswell.c
> +++ b/sound/soc/intel/boards/haswell.c
> @@ -13,9 +13,6 @@
>  #include <sound/soc-acpi.h>
>  #include <sound/pcm_params.h>
>  
> -#include "../common/sst-dsp.h"
> -#include "../haswell/sst-haswell-ipc.h"
> -
>  #include "../../codecs/rt5640.h"
>  
>  /* Haswell ULT platforms have a Headphone and Mic jack */
> @@ -77,25 +74,6 @@ static const struct snd_soc_ops haswell_rt5640_ops = {
>  	.hw_params = haswell_rt5640_hw_params,
>  };
>  
> -static int haswell_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 *haswell = pdata->dsp;
> -	int ret;
> -
> -	/* Set ADSP SSP port settings */
> -	ret = sst_hsw_device_set_config(haswell, 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, "failed to set device config\n");
> -		return ret;
> -	}
> -
> -	return 0;
> -}
> -
>  SND_SOC_DAILINK_DEF(dummy,
>  	DAILINK_COMP_ARRAY(COMP_DUMMY()));
>  
> @@ -117,13 +95,15 @@ SND_SOC_DAILINK_DEF(codec,
>  SND_SOC_DAILINK_DEF(platform,
>  	DAILINK_COMP_ARRAY(COMP_PLATFORM("haswell-pcm-audio")));
>  
> +SND_SOC_DAILINK_DEF(ssp0_port,
> +	    DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port")));
> +
>  static struct snd_soc_dai_link haswell_rt5640_dais[] = {
>  	/* Front End DAI links */
>  	{
>  		.name = "System",
>  		.stream_name = "System Playback/Capture",
>  		.dynamic = 1,
> -		.init = haswell_rtd_init,
>  		.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
>  		.dpcm_playback = 1,
>  		.dpcm_capture = 1,
> @@ -167,7 +147,7 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = {
>  		.ops = &haswell_rt5640_ops,
>  		.dpcm_playback = 1,
>  		.dpcm_capture = 1,
> -		SND_SOC_DAILINK_REG(dummy, codec, dummy),
> +		SND_SOC_DAILINK_REG(ssp0_port, codec, platform),
>  	},
>  };
>  
> -- 
> 2.17.1
>
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c
index 744b7b5b8106..c268405e5594 100644
--- a/sound/soc/intel/boards/haswell.c
+++ b/sound/soc/intel/boards/haswell.c
@@ -13,9 +13,6 @@ 
 #include <sound/soc-acpi.h>
 #include <sound/pcm_params.h>
 
-#include "../common/sst-dsp.h"
-#include "../haswell/sst-haswell-ipc.h"
-
 #include "../../codecs/rt5640.h"
 
 /* Haswell ULT platforms have a Headphone and Mic jack */
@@ -77,25 +74,6 @@  static const struct snd_soc_ops haswell_rt5640_ops = {
 	.hw_params = haswell_rt5640_hw_params,
 };
 
-static int haswell_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 *haswell = pdata->dsp;
-	int ret;
-
-	/* Set ADSP SSP port settings */
-	ret = sst_hsw_device_set_config(haswell, 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, "failed to set device config\n");
-		return ret;
-	}
-
-	return 0;
-}
-
 SND_SOC_DAILINK_DEF(dummy,
 	DAILINK_COMP_ARRAY(COMP_DUMMY()));
 
@@ -117,13 +95,15 @@  SND_SOC_DAILINK_DEF(codec,
 SND_SOC_DAILINK_DEF(platform,
 	DAILINK_COMP_ARRAY(COMP_PLATFORM("haswell-pcm-audio")));
 
+SND_SOC_DAILINK_DEF(ssp0_port,
+	    DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port")));
+
 static struct snd_soc_dai_link haswell_rt5640_dais[] = {
 	/* Front End DAI links */
 	{
 		.name = "System",
 		.stream_name = "System Playback/Capture",
 		.dynamic = 1,
-		.init = haswell_rtd_init,
 		.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
 		.dpcm_playback = 1,
 		.dpcm_capture = 1,
@@ -167,7 +147,7 @@  static struct snd_soc_dai_link haswell_rt5640_dais[] = {
 		.ops = &haswell_rt5640_ops,
 		.dpcm_playback = 1,
 		.dpcm_capture = 1,
-		SND_SOC_DAILINK_REG(dummy, codec, dummy),
+		SND_SOC_DAILINK_REG(ssp0_port, codec, platform),
 	},
 };