ASoC: Intel: Skylake - Add Skylake RT286 I2S machine driver
Subsystems (3)
PATCH v2 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.
---
v2: added depends on X86 and ACPI based on LKP reports
sound/soc/intel/Kconfig | 13 ++ sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/skl_rt286.c | 268 +++++++++++++++++++++++++++++++++++++ 3 files changed, 283 insertions(+) create mode 100644 sound/soc/intel/boards/skl_rt286.c
sound/soc/intel/Kconfig +13 -0
@@ -140,3 +140,16 @@ 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" + depends on X86 && ACPI + 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
@@ -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
kbuild test robot
build boturl: https://github.com/0day-ci/linux/commits/Vinod-Koul/ASoC-Intel-Skylake-Add-Skylake-RT286-I2S-machine-driver/20151013-174125 reproduce:
Hi Omair,
[auto build test WARNING on asoc/for-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
url: https://github.com/0day-ci/linux/commits/Vinod-Koul/ASoC-Intel-Skylake-Add-Skylake-RT286-I2S-machine-driver/20151013-174125
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/boards/skl_rt286.c:121:37: sparse: incorrect type in argument 2 (different base types) sound/soc/intel/boards/skl_rt286.c:121:37: expected unsigned int [unsigned] val sound/soc/intel/boards/skl_rt286.c:121:37: got restricted snd_pcm_format_t [usertype] <noident> -- >> sound/soc/intel/skylake/skl-pcm.c:167:56: sparse: incorrect type in argument 3 (different base types) sound/soc/intel/skylake/skl-pcm.c:167:56: expected unsigned int [unsigned] format sound/soc/intel/skylake/skl-pcm.c:167:56: got restricted snd_pcm_format_t [usertype] format -- >> sound/soc/intel/skylake/skl-nhlt.c:117:41: sparse: cast removes address space of expression -- >> sound/soc/intel/skylake/skl-topology.c:1187:47: sparse: incorrect type in argument 4 (different base types)
sound/soc/intel/skylake/skl-topology.c:1187:47: expected unsigned short [unsigned] [usertype] event_type
sound/soc/intel/skylake/skl-topology.c:1187:47: got restricted __le16 [usertype] event_type
vim +121 sound/soc/intel/boards/skl_rt286.c
105 }
106
107
108 static int skylake_ssp0_fixup(struct snd_soc_pcm_runtime *rtd,
109 struct snd_pcm_hw_params *params)
110 {
111 struct snd_interval *rate = hw_param_interval(params,
112 SNDRV_PCM_HW_PARAM_RATE);
113 struct snd_interval *channels = hw_param_interval(params,
114 SNDRV_PCM_HW_PARAM_CHANNELS);
115
116 /* The output is 48KHz, stereo, 16bits */
117 rate->min = rate->max = 48000;
118 channels->min = channels->max = 2;
119 snd_mask_set(¶ms->masks[SNDRV_PCM_HW_PARAM_FORMAT -
120 SNDRV_PCM_HW_PARAM_FIRST_MASK],
> 121 SNDRV_PCM_FORMAT_S16_LE);
122
123 return 0;
124 }
125
126 static int skylake_rt286_hw_params(struct snd_pcm_substream *substream,
127 struct snd_pcm_hw_params *params)
128 {
129 struct snd_soc_pcm_runtime *rtd = substream->private_data;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation