diff mbox series

[v10,14/14] ASoC: Intel: Select catpt and deprecate haswell

Message ID 20200929141247.8058-15-cezary.rojewski@intel.com (mailing list archive)
State New, archived
Headers show
Series ASoC: Intel: Catpt - Lynx and Wildcat point | expand

Commit Message

Cezary Rojewski Sept. 29, 2020, 2:12 p.m. UTC
Prevent sound/soc/intel/haswell code compile and select catpt instead as
a recommended solution. Userspace-exposed members are compatible with
what is exposed by deprecated solution thus no harm is done. The only
visible difference is the newly added 'Loopback Mute' kcontrol.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---

Changes in v7:
- patch: 10/14 'ASoC: Intel: Select catpt and deprecate haswell' has
  been moved to the back of the list: enable catpt after machine boards
  have been prepared for it first

Changes in v5:
- remove DMADEVICES depends on: DW_DMAC_CORE already covers that
- add optional COMPILE_TEST depends on

 sound/soc/intel/Kconfig        | 24 ++++++++++++------------
 sound/soc/intel/Makefile       |  2 +-
 sound/soc/intel/boards/Kconfig |  8 ++++----
 sound/soc/intel/catpt/Makefile |  6 ++++++
 4 files changed, 23 insertions(+), 17 deletions(-)
 create mode 100644 sound/soc/intel/catpt/Makefile

Comments

Mark Brown Oct. 1, 2020, 6:33 p.m. UTC | #1
On Tue, Sep 29, 2020 at 04:12:47PM +0200, Cezary Rojewski wrote:
> Prevent sound/soc/intel/haswell code compile and select catpt instead as
> a recommended solution. Userspace-exposed members are compatible with
> what is exposed by deprecated solution thus no harm is done. The only
> visible difference is the newly added 'Loopback Mute' kcontrol.

This doesn't build against current code with x86 allmodconfig, please
check and resend:

In file included from /mnt/kernel/sound/soc/intel/catpt/core.h:14,
                 from /mnt/kernel/sound/soc/intel/catpt/dsp.c:13:
/mnt/kernel/sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_set_regs_defaults':
/mnt/kernel/sound/soc/intel/catpt/dsp.c:339:29: error: 'SSCR2' undeclared (first use in this function); did you mean 'SSCR0'?
   catpt_writel_ssp(cdev, i, SSCR2, CATPT_SSCR2_DEFAULT);
                             ^~~~~
/mnt/kernel/sound/soc/intel/catpt/registers.h:152:43: note: in definition of macro 'catpt_writel_ssp'
  writel(val, catpt_ssp_addr(cdev, ssp) + (reg))
                                           ^~~
/mnt/kernel/sound/soc/intel/catpt/dsp.c:339:29: note: each undeclared identifier is reported only once for each function it appears in
   catpt_writel_ssp(cdev, i, SSCR2, CATPT_SSCR2_DEFAULT);
                             ^~~~~
/mnt/kernel/sound/soc/intel/catpt/registers.h:152:43: note: in definition of macro 'catpt_writel_ssp'
  writel(val, catpt_ssp_addr(cdev, ssp) + (reg))
                                           ^~~
/mnt/kernel/sound/soc/intel/catpt/dsp.c:340:29: error: 'SSPSP2' undeclared (first use in this function); did you mean 'SSPSP'?
   catpt_writel_ssp(cdev, i, SSPSP2, CATPT_SSPSP2_DEFAULT);
                             ^~~~~~
/mnt/kernel/sound/soc/intel/catpt/registers.h:152:43: note: in definition of macro 'catpt_writel_ssp'
  writel(val, catpt_ssp_addr(cdev, ssp) + (reg))
                                           ^~~
Andy Shevchenko Oct. 1, 2020, 6:54 p.m. UTC | #2
On Thu, Oct 01, 2020 at 07:33:29PM +0100, Mark Brown wrote:
> On Tue, Sep 29, 2020 at 04:12:47PM +0200, Cezary Rojewski wrote:
> > Prevent sound/soc/intel/haswell code compile and select catpt instead as
> > a recommended solution. Userspace-exposed members are compatible with
> > what is exposed by deprecated solution thus no harm is done. The only
> > visible difference is the newly added 'Loopback Mute' kcontrol.
> 
> This doesn't build against current code with x86 allmodconfig, please
> check and resend:

This has a dependency from SPI tree. Can you merge (cherry-pick) one patch from
there to ASoC tree, please?

a2bee00cccf4 ("spi: pxa2xx: Add SSC2 and SSPSP2 SSP registers")


> In file included from /mnt/kernel/sound/soc/intel/catpt/core.h:14,
>                  from /mnt/kernel/sound/soc/intel/catpt/dsp.c:13:
> /mnt/kernel/sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_set_regs_defaults':
> /mnt/kernel/sound/soc/intel/catpt/dsp.c:339:29: error: 'SSCR2' undeclared (first use in this function); did you mean 'SSCR0'?
>    catpt_writel_ssp(cdev, i, SSCR2, CATPT_SSCR2_DEFAULT);
>                              ^~~~~
> /mnt/kernel/sound/soc/intel/catpt/registers.h:152:43: note: in definition of macro 'catpt_writel_ssp'
>   writel(val, catpt_ssp_addr(cdev, ssp) + (reg))
>                                            ^~~
> /mnt/kernel/sound/soc/intel/catpt/dsp.c:339:29: note: each undeclared identifier is reported only once for each function it appears in
>    catpt_writel_ssp(cdev, i, SSCR2, CATPT_SSCR2_DEFAULT);
>                              ^~~~~
> /mnt/kernel/sound/soc/intel/catpt/registers.h:152:43: note: in definition of macro 'catpt_writel_ssp'
>   writel(val, catpt_ssp_addr(cdev, ssp) + (reg))
>                                            ^~~
> /mnt/kernel/sound/soc/intel/catpt/dsp.c:340:29: error: 'SSPSP2' undeclared (first use in this function); did you mean 'SSPSP'?
>    catpt_writel_ssp(cdev, i, SSPSP2, CATPT_SSPSP2_DEFAULT);
>                              ^~~~~~
> /mnt/kernel/sound/soc/intel/catpt/registers.h:152:43: note: in definition of macro 'catpt_writel_ssp'
>   writel(val, catpt_ssp_addr(cdev, ssp) + (reg))
>                                            ^~~
>
Mark Brown Oct. 1, 2020, 7:49 p.m. UTC | #3
On Thu, Oct 01, 2020 at 09:54:09PM +0300, Andy Shevchenko wrote:

> This has a dependency from SPI tree. Can you merge (cherry-pick) one patch from
> there to ASoC tree, please?

> a2bee00cccf4 ("spi: pxa2xx: Add SSC2 and SSPSP2 SSP registers")

Ah, right - that was actually mentioned in the cover letter but got
missed (I think I didn't register that it was a SPI change and stopped
at the "already merged" bit).  It would have been helpful to highlight
this with the SPI change so it could have been applied as a separate
branch rather than on the main branch which would make this easier, this
sort of stuff is why I like to have per driver branches.
Cezary Rojewski Oct. 2, 2020, 8:32 a.m. UTC | #4
On 2020-10-01 9:49 PM, Mark Brown wrote:
> On Thu, Oct 01, 2020 at 09:54:09PM +0300, Andy Shevchenko wrote:
> 
>> This has a dependency from SPI tree. Can you merge (cherry-pick) one patch from
>> there to ASoC tree, please?
> 
>> a2bee00cccf4 ("spi: pxa2xx: Add SSC2 and SSPSP2 SSP registers")
> 
> Ah, right - that was actually mentioned in the cover letter but got
> missed (I think I didn't register that it was a SPI change and stopped
> at the "already merged" bit).  It would have been helpful to highlight
> this with the SPI change so it could have been applied as a separate
> branch rather than on the main branch which would make this easier, this
> sort of stuff is why I like to have per driver branches.
> 

While catpt's cover-letter mentioned this, indeed the SPI change was
devoid of such note. Sorry for that, Mark.

Is my action required?

Regards,
Czarek
diff mbox series

Patch

diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index 0e48c4f532ce..dfc20f2bb859 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -47,21 +47,21 @@  config SND_SOC_INTEL_SST_FIRMWARE
 	# Haswell/Broadwell/Baytrail legacy and will be set
 	# when these platforms are enabled
 
-config SND_SOC_INTEL_HASWELL
-	tristate "Haswell/Broadwell Platforms"
+config SND_SOC_INTEL_CATPT
+	tristate "Haswell and Broadwell"
+	depends on ACPI || COMPILE_TEST
 	depends on SND_DMA_SGBUF
-	depends on DMADEVICES && ACPI
-	select SND_SOC_INTEL_SST
-	select SND_SOC_INTEL_SST_ACPI
-	select SND_SOC_INTEL_SST_FIRMWARE
+	select DW_DMAC_CORE
 	select SND_SOC_ACPI_INTEL_MATCH
 	help
-	  If you have a Intel Haswell or Broadwell platform connected to
-	  an I2S codec, then enable this option by saying Y or m. This is
-	  typically used for Chromebooks. This is a recommended option.
-	  This option is mutually exclusive with the SOF support on
-	  Broadwell. If you want to enable SOF on Broadwell, you need to
-	  deselect this option first.
+	  Enable support for Intel(R) Haswell and Broadwell platforms
+	  with I2S codec present. This is a recommended option.
+	  Say Y or m if you have such device.
+	  If unsure, say N.
+
+config SND_SOC_INTEL_HASWELL
+	tristate
+	select SND_SOC_INTEL_CATPT
 
 config SND_SOC_INTEL_BAYTRAIL
 	tristate "Baytrail (legacy) Platforms"
diff --git a/sound/soc/intel/Makefile b/sound/soc/intel/Makefile
index 04ee48204fc9..c88c615f85f7 100644
--- a/sound/soc/intel/Makefile
+++ b/sound/soc/intel/Makefile
@@ -3,9 +3,9 @@ 
 obj-$(CONFIG_SND_SOC) += common/
 
 # Platform Support
-obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += haswell/
 obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += baytrail/
 obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM) += atom/
+obj-$(CONFIG_SND_SOC_INTEL_CATPT) += catpt/
 obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += skylake/
 obj-$(CONFIG_SND_SOC_INTEL_KEEMBAY) += keembay/
 
diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 12dd41796e82..6afdd9ac4478 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -26,7 +26,7 @@  config SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES
 	  interface.
 	  If unsure select N.
 
-if SND_SOC_INTEL_HASWELL
+if SND_SOC_INTEL_CATPT
 
 config SND_SOC_INTEL_HASWELL_MACH
 	tristate "Haswell Lynxpoint"
@@ -40,9 +40,9 @@  config SND_SOC_INTEL_HASWELL_MACH
 	  Say Y or m if you have such a device.
 	  If unsure select "N".
 
-endif ## SND_SOC_INTEL_HASWELL
+endif ## SND_SOC_INTEL_CATPT
 
-if SND_SOC_INTEL_HASWELL || SND_SOC_SOF_BROADWELL
+if SND_SOC_INTEL_CATPT || SND_SOC_SOF_BROADWELL
 
 config SND_SOC_INTEL_BDW_RT5650_MACH
 	tristate "Broadwell with RT5650 codec"
@@ -83,7 +83,7 @@  config SND_SOC_INTEL_BROADWELL_MACH
 	  Ultrabook platforms.
 	  Say Y or m if you have such a device. This is a recommended option.
 	  If unsure select "N".
-endif ## SND_SOC_INTEL_HASWELL || SND_SOC_SOF_BROADWELL
+endif ## SND_SOC_INTEL_CATPT || SND_SOC_SOF_BROADWELL
 
 if SND_SOC_INTEL_BAYTRAIL
 
diff --git a/sound/soc/intel/catpt/Makefile b/sound/soc/intel/catpt/Makefile
new file mode 100644
index 000000000000..c393a45795da
--- /dev/null
+++ b/sound/soc/intel/catpt/Makefile
@@ -0,0 +1,6 @@ 
+snd-soc-catpt-objs := device.o dsp.o loader.o ipc.o messages.o pcm.o sysfs.o
+
+# tell define_trace.h where to find the trace header
+CFLAGS_device.o := -I$(src)
+
+obj-$(CONFIG_SND_SOC_INTEL_CATPT) += snd-soc-catpt.o