Skip to contentSkip to conversation

ASoC: Intel: Skylake - Add Skylake RT286 I2S machine driver

PATCH Superseded Vinod Koul 2 participants 2 messages Oct 9, 2015

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

PATCH 1/1 ASoC: Intel: Skylake - Add Skylake RT286 I2S machine driver

From: Omair M Abdullah <[email protected]>

Add the SKL I2S machine driver using Realtek ALC286S codec in I2S mode.

---
 sound/soc/intel/Kconfig            |  12 ++
 sound/soc/intel/boards/Makefile    |   2 +
 sound/soc/intel/boards/skl_rt286.c | 268 +++++++++++++++++++++++++++++++++++++
 3 files changed, 282 insertions(+)
 create mode 100644 sound/soc/intel/boards/skl_rt286.c
sound/soc/intel/Kconfig +12 -0
index 664df1f44530..ea3221a8b615 100644
@@ -140,3 +140,15 @@ config SND_SOC_INTEL_SKYLAKE
 	select SND_HDA_EXT_CORE
 	select SND_SOC_TOPOLOGY
 	select SND_SOC_INTEL_SST
+
+config SND_SOC_INTEL_SKL_RT286_MACH
+	tristate "ASoC Audio driver for SKL with RT286 I2S mode"
+	select SND_SOC_INTEL_SST
+	select SND_SOC_INTEL_SKYLAKE
+	select SND_SOC_RT286
+	select SND_SOC_DMIC
+	help
+	   This adds support for ASoC machine driver for Skylake platforms
+	   with RT286 I2S audio codec.
+	   Say Y if you have such a device
+	   If unsure select "N".
sound/soc/intel/boards/Makefile +2 -0
index cb94895c9edb..371c4565cad8 100644
@@ -6,6 +6,7 @@ snd-soc-sst-bytcr-rt5640-objs := bytcr_rt5640.o
 snd-soc-sst-cht-bsw-rt5672-objs := cht_bsw_rt5672.o
 snd-soc-sst-cht-bsw-rt5645-objs := cht_bsw_rt5645.o
 snd-soc-sst-cht-bsw-max98090_ti-objs := cht_bsw_max98090_ti.o
+snd-soc-skl_rt286-objs := skl_rt286.o
 
 obj-$(CONFIG_SND_SOC_INTEL_HASWELL_MACH) += snd-soc-sst-haswell.o
 obj-$(CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH) += snd-soc-sst-byt-rt5640-mach.o
@@ -15,3 +16,4 @@ obj-$(CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH) += snd-soc-sst-bytcr-rt5640.o
 obj-$(CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH) += snd-soc-sst-cht-bsw-rt5672.o
 obj-$(CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH) += snd-soc-sst-cht-bsw-rt5645.o
 obj-$(CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH) += snd-soc-sst-cht-bsw-max98090_ti.o
+obj-$(CONFIG_SND_SOC_INTEL_SKL_RT286_MACH) += snd-soc-skl_rt286.o
sound/soc/intel/boards/skl_rt286.c new file +268 -0

268 lines not on this page · raw message

Signature · 1 line
2.4.3
#1 lore raw
reproduce:

Hi Omair,

[auto build test WARNING on next-20151009 -- if it's inappropriate base, please ignore]

reproduce:

        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__

sparse warnings: (new ones prefixed by >>)

>> sound/soc/intel/skylake/skl-sst-cldma.c:48:24: sparse: incorrect type in assignment (different base types)
   sound/soc/intel/skylake/skl-sst-cldma.c:48:24:    expected unsigned int [unsigned] [usertype] <noident>
   sound/soc/intel/skylake/skl-sst-cldma.c:48:24:    got restricted __le32 [usertype] <noident>
   sound/soc/intel/skylake/skl-sst-cldma.c:49:24: sparse: incorrect type in assignment (different base types)
   sound/soc/intel/skylake/skl-sst-cldma.c:49:24:    expected unsigned int [unsigned] [usertype] <noident>
   sound/soc/intel/skylake/skl-sst-cldma.c:49:24:    got restricted __le32 [usertype] <noident>
   sound/soc/intel/skylake/skl-sst-cldma.c:51:24: sparse: incorrect type in assignment (different base types)
   sound/soc/intel/skylake/skl-sst-cldma.c:51:24:    expected unsigned int [unsigned] [usertype] <noident>
   sound/soc/intel/skylake/skl-sst-cldma.c:51:24:    got restricted __le32 [usertype] <noident>
>> sound/soc/intel/skylake/skl-sst-cldma.c:54:24: sparse: incorrect type in assignment (different base types)

sound/soc/intel/skylake/skl-sst-cldma.c:54:24: expected unsigned int [unsigned] [usertype] <noident>
sound/soc/intel/skylake/skl-sst-cldma.c:54:24: got restricted __le32

vim +48 sound/soc/intel/skylake/skl-sst-cldma.c

914426c8 Vinod Koul 2015-07-10  42  
914426c8 Vinod Koul 2015-07-10  43  	ctx->cl_dev.frags = 0;
914426c8 Vinod Koul 2015-07-10  44  	while (size > 0) {
914426c8 Vinod Koul 2015-07-10  45  		phys_addr_t addr = virt_to_phys(dmab_data->area +
914426c8 Vinod Koul 2015-07-10  46  				(ctx->cl_dev.frags * ctx->cl_dev.bufsize));
914426c8 Vinod Koul 2015-07-10  47  
914426c8 Vinod Koul 2015-07-10 @48  		bdl[0] = cpu_to_le32(lower_32_bits(addr));
914426c8 Vinod Koul 2015-07-10  49  		bdl[1] = cpu_to_le32(upper_32_bits(addr));
914426c8 Vinod Koul 2015-07-10  50  
914426c8 Vinod Koul 2015-07-10  51  		bdl[2] = cpu_to_le32(ctx->cl_dev.bufsize);
914426c8 Vinod Koul 2015-07-10  52  
914426c8 Vinod Koul 2015-07-10  53  		size -= ctx->cl_dev.bufsize;
914426c8 Vinod Koul 2015-07-10 @54  		bdl[3] = (size || !with_ioc) ? 0 : cpu_to_le32(0x01);
914426c8 Vinod Koul 2015-07-10  55  
914426c8 Vinod Koul 2015-07-10  56  		bdl += 4;
914426c8 Vinod Koul 2015-07-10  57  		ctx->cl_dev.frags++;

:::::: The code at line 48 was first introduced by commit
:::::: 914426c8657c1e934b015ffa32e7bfd0cb34f47f ASoC: Intel: Skylake: add code loader DMA operations

:::::: TO: Vinod Koul <[email protected]>
:::::: CC: Mark Brown <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation