ASoC: Intel: Boards: Add GLK Realtek Maxim I2S machine driver
Subsystems (3)
PATCH 1/1 ASoC: Intel: Boards: Add GLK Realtek Maxim I2S machine driver
Patch adds Geminilake I2S machine driver which uses following codecs:
RT5682 and MAX98357A.
sound/soc/intel/boards/Kconfig +14 -0
@@ -281,6 +281,20 @@ config SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH Say Y if you have such a device. If unsure select "N". +config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH + tristate "GLK with RT5682 and MAX98357A in I2S Mode" + depends on MFD_INTEL_LPSS && I2C && ACPI + select SND_SOC_RT5682 + select SND_SOC_MAX98357A + select SND_SOC_DMIC + select SND_SOC_HDAC_HDMI + select SND_HDA_DSP_LOADER + help + This adds support for ASoC machine driver for Geminilake platforms + with RT5682 + MAX98357A I2S audio codec. + Say Y if you have such a device. + If unsure select "N". + endif ## SND_SOC_INTEL_SKYLAKE endif ## SND_SOC_INTEL_MACH
sound/soc/intel/boards/Makefile +2 -0
@@ -6,6 +6,7 @@ snd-soc-sst-bdw-rt5677-mach-objs := bdw-rt5677.o snd-soc-sst-broadwell-objs := broadwell.o snd-soc-sst-bxt-da7219_max98357a-objs := bxt_da7219_max98357a.o snd-soc-sst-bxt-rt298-objs := bxt_rt298.o +snd-soc-sst-glk-rt5682_max98357a-objs := glk_rt5682_max98357a.o snd-soc-sst-bytcr-rt5640-objs := bytcr_rt5640.o snd-soc-sst-bytcr-rt5651-objs := bytcr_rt5651.o snd-soc-sst-cht-bsw-rt5672-objs := cht_bsw_rt5672.o
@@ -27,6 +28,7 @@ obj-$(CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH) += snd-soc-sst-byt-rt5640-mach.o obj-$(CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH) += snd-soc-sst-byt-max98090-mach.o obj-$(CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH) += snd-soc-sst-bxt-da7219_max98357a.o obj-$(CONFIG_SND_SOC_INTEL_BXT_RT298_MACH) += snd-soc-sst-bxt-rt298.o +obj-$(CONFIG_SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH) += snd-soc-sst-glk-rt5682_max98357a.o obj-$(CONFIG_SND_SOC_INTEL_BROADWELL_MACH) += snd-soc-sst-broadwell.o obj-$(CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH) += snd-soc-sst-bdw-rt5677-mach.o obj-$(CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH) += snd-soc-sst-bytcr-rt5640.o
sound/soc/intel/boards/glk_rt5682_max98357a.c new file +643 -0
643 lines not on this page · raw message
Signature · 1 line
2.7.4
Quoted 2 lines · Naveen Manohar
Patch adds Geminilake I2S machine driver which uses following codecs:
RT5682 and MAX98357A.
Thanks Naveen. Looks good to me, just 4 nit-picks below on style (reverse x-mas tree order for variable definitions) if you can fix, add my tag below and resubmit it'd nice.
sound/soc/intel/boards/glk_rt5682_max98357a.c line 64
Quoted 7 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c new file +7
-0+static int platform_clock_control (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *k,int event) +{ +int ret =0 ; +struct snd_soc_dapm_context *dapm = w->dapm; +struct snd_soc_card *card = dapm->card; +struct snd_soc_dai *codec_dai;
here..
sound/soc/intel/boards/glk_rt5682_max98357a.c line 179
Quoted 7 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c new file +7
-0+static int geminilake_rt5682_codec_init (struct snd_soc_pcm_runtime *rtd) +{ +int ret; +struct snd_soc_jack *jack; +struct snd_soc_dai *codec_dai = rtd->codec_dai; +struct snd_soc_component *component = rtd->codec_dai->component; +struct glk_card_private *ctx =snd_soc_card_get_drvdata (rtd->card);
and here
sound/soc/intel/boards/glk_rt5682_max98357a.c line 259
Quoted 5 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c new file +5
-0+static int geminilake_rt5682_fe_init (struct snd_soc_pcm_runtime *rtd) +{ +int ret; +struct snd_soc_dapm_context *dapm; +struct snd_soc_component *component = rtd->cpu_dai->component;
and here
sound/soc/intel/boards/glk_rt5682_max98357a.c line 559
Quoted 7 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c new file +7
-0+static int glk_card_late_probe (struct snd_soc_card *card) +{ +struct glk_card_private *ctx =snd_soc_card_get_drvdata (card); +struct snd_soc_component *component =NULL ; +char jack_name[NAME_SIZE ]; +struct glk_hdmi_pcm *pcm; +int err, i =0 ;
one last, i find it more readable to have one assignment per line.
Quoted 11 lines · Pierre-Louis Bossart
Quoted 2 lines · Naveen Manohar
Patch adds Geminilake I2S machine driver which uses following codecs:
RT5682 and MAX98357A.Thanks Naveen. Looks good to me, just 4 nit-picks below on style (reverse x-mas tree order for variable definitions)
if you can fix, add my tag below and resubmit it'd nice.
Sure, I will do that. Thanks for pointing this out and this Ack.
Quoted 22 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c line 64
Quoted 7 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c new file +7
-0+static int platform_clock_control (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *k,int event) +{ +int ret =0 ; +struct snd_soc_dapm_context *dapm = w->dapm; +struct snd_soc_card *card = dapm->card; +struct snd_soc_dai *codec_dai;here..
sound/soc/intel/boards/glk_rt5682_max98357a.c line 179
Quoted 7 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c new file +7
-0+static int geminilake_rt5682_codec_init (struct snd_soc_pcm_runtime *rtd) +{ +int ret; +struct snd_soc_jack *jack; +struct snd_soc_dai *codec_dai = rtd->codec_dai; +struct snd_soc_component *component = rtd->codec_dai->component; +struct glk_card_private *ctx =snd_soc_card_get_drvdata (rtd->card);and here
sound/soc/intel/boards/glk_rt5682_max98357a.c line 259
Quoted 5 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c new file +5
-0+static int geminilake_rt5682_fe_init (struct snd_soc_pcm_runtime *rtd) +{ +int ret; +struct snd_soc_dapm_context *dapm; +struct snd_soc_component *component = rtd->cpu_dai->component;and here
Quoted 9 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c line 559
Quoted 7 lines
sound/soc/intel/boards/glk_rt5682_max98357a.c new file +7
-0+static int glk_card_late_probe (struct snd_soc_card *card) +{ +struct glk_card_private *ctx =snd_soc_card_get_drvdata (card); +struct snd_soc_component *component =NULL ; +char jack_name[NAME_SIZE ]; +struct glk_hdmi_pcm *pcm; +int err, i =0 ;one last, i find it more readable to have one assignment per line.
Sure.