diff mbox series

[06/13] ASoC: Intel: Skylake: Use global PCI match macro

Message ID 20230711125726.3509391-7-amadeuszx.slawinski@linux.intel.com (mailing list archive)
State Superseded
Headers show
Series PCI: Define Intel PCI IDs and use them in drivers | expand

Commit Message

Amadeusz Sławiński July 11, 2023, 12:57 p.m. UTC
Instead of using local macro to match PCI device, use global one.

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 include/sound/hda_codec.h         | 3 ---
 sound/soc/intel/skylake/skl-pcm.c | 3 ++-
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

Andy Shevchenko July 11, 2023, 1:41 p.m. UTC | #1
On Tue, Jul 11, 2023 at 02:57:19PM +0200, Amadeusz Sławiński wrote:
> Instead of using local macro to match PCI device, use global one.

Same comment as per another patch, i.e. explain CFL/BXT --> APL (*).
With that,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

*) I think it's something like "the BXT/APL/CFL line of SoCs has the same
(compatible?) HDA IP blablabla".

> Acked-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
> ---
>  include/sound/hda_codec.h         | 3 ---
>  sound/soc/intel/skylake/skl-pcm.c | 3 ++-
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h
> index bbb7805e85d8..5497dc9c396a 100644
> --- a/include/sound/hda_codec.h
> +++ b/include/sound/hda_codec.h
> @@ -18,9 +18,6 @@
>  #include <sound/hda_verbs.h>
>  #include <sound/hda_regmap.h>
>  
> -#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
> -#define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
> -
>  /*
>   * Structures
>   */
> diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
> index a4209d88b0c6..ac3dc8c63c26 100644
> --- a/sound/soc/intel/skylake/skl-pcm.c
> +++ b/sound/soc/intel/skylake/skl-pcm.c
> @@ -13,6 +13,7 @@
>  #include <linux/pci.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/delay.h>
> +#include <sound/hdaudio.h>
>  #include <sound/pcm_params.h>
>  #include <sound/soc.h>
>  #include "skl.h"
> @@ -152,7 +153,7 @@ int skl_pcm_host_dma_prepare(struct device *dev, struct skl_pipe_params *params)
>  	 * The recommended SDxFMT programming sequence for BXT
>  	 * platforms is to couple the stream before writing the format
>  	 */
> -	if (IS_BXT(skl->pci)) {
> +	if (HDA_CONTROLLER_IS_APL(skl->pci)) {
>  		snd_hdac_ext_stream_decouple(bus, stream, false);
>  		err = snd_hdac_stream_setup(hdac_stream(stream));
>  		snd_hdac_ext_stream_decouple(bus, stream, true);
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h
index bbb7805e85d8..5497dc9c396a 100644
--- a/include/sound/hda_codec.h
+++ b/include/sound/hda_codec.h
@@ -18,9 +18,6 @@ 
 #include <sound/hda_verbs.h>
 #include <sound/hda_regmap.h>
 
-#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
-#define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
-
 /*
  * Structures
  */
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index a4209d88b0c6..ac3dc8c63c26 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -13,6 +13,7 @@ 
 #include <linux/pci.h>
 #include <linux/pm_runtime.h>
 #include <linux/delay.h>
+#include <sound/hdaudio.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include "skl.h"
@@ -152,7 +153,7 @@  int skl_pcm_host_dma_prepare(struct device *dev, struct skl_pipe_params *params)
 	 * The recommended SDxFMT programming sequence for BXT
 	 * platforms is to couple the stream before writing the format
 	 */
-	if (IS_BXT(skl->pci)) {
+	if (HDA_CONTROLLER_IS_APL(skl->pci)) {
 		snd_hdac_ext_stream_decouple(bus, stream, false);
 		err = snd_hdac_stream_setup(hdac_stream(stream));
 		snd_hdac_ext_stream_decouple(bus, stream, true);