ASoC: Intel:kbl_da7219_max98927: remove headset
Subsystems (3)
PATCH 1/1 ASoC: Intel:kbl_da7219_max98927: remove headset
kbl_da7219_max98927 supports two configurations - One with da7219 & max98927/373 and other one with max98927/373 alone. This patch removes the headset dais from max98927/373 configuration. Since the snd_soc_dapm_ignore_suspend for DMIC is called from da7219_codec_init, the code is re-arranged to invoke snd_soc_dapm_ignore_suspend from kabylake_dmic_init.
--- sound/soc/intel/boards/kbl_da7219_max98927.c | 52 ++++++++++++---------------- 1 file changed, 23 insertions(+), 29 deletions(-)
sound/soc/intel/boards/kbl_da7219_max98927.c +23 -29
@@ -52,7 +52,6 @@ struct kbl_codec_private {enum {KBL_DPCM_AUDIO_PB =0 , -KBL_DPCM_AUDIO_CP ,KBL_DPCM_AUDIO_ECHO_REF_CP ,KBL_DPCM_AUDIO_REF_CP ,KBL_DPCM_AUDIO_DMIC_CP ,
@@ -60,6 +59,7 @@ enum {KBL_DPCM_AUDIO_HDMI2_PB ,KBL_DPCM_AUDIO_HDMI3_PB ,KBL_DPCM_AUDIO_HS_PB , + KBL_DPCM_AUDIO_CP, }; static int platform_clock_control(struct snd_soc_dapm_widget *w,
@@ -311,6 +311,12 @@ static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)da7219_aad_jack_det (component, &ctx->kabylake_headset); +return 0 ; +} + +static int kabylake_dmic_init (struct snd_soc_pcm_runtime *rtd) +{ +int ret; ret =snd_soc_dapm_ignore_suspend (&rtd->card->dapm,"SoC DMIC" );if (ret)dev_err (rtd->dev,"SoC DMIC - Ignore suspend failed %d\n" , ret);
@@ -581,20 +587,6 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .dpcm_playback = 1, .ops = &kabylake_da7219_fe_ops, }, - [KBL_DPCM_AUDIO_CP] = { - .name = "Kbl Audio Capture Port", - .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", - .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .nonatomic = 1, - .trigger = { - SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, - .ops = &kabylake_da7219_fe_ops, - }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture",
@@ -690,6 +682,20 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .ops = &kabylake_da7219_fe_ops, }, + [KBL_DPCM_AUDIO_CP] = { + .name = "Kbl Audio Capture Port", + .stream_name = "Audio Record", + .cpu_dai_name = "System Pin", + .platform_name = "0000:00:1f.3", + .dynamic = 1, + .codec_name = "snd-soc-dummy", + .codec_dai_name = "snd-soc-dummy-dai", + .nonatomic = 1, + .trigger = { + SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, + .dpcm_capture = 1, + .ops = &kabylake_da7219_fe_ops, + }, /* Back End DAI links */ {
@@ -733,6 +739,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .cpu_dai_name = "DMIC01 Pin", .codec_name = "dmic-codec", .codec_dai_name = "dmic-hifi", + .init = kabylake_dmic_init, .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1,
@@ -792,20 +799,6 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .dpcm_playback = 1, .ops = &kabylake_da7219_fe_ops, }, - [KBL_DPCM_AUDIO_CP] = { - .name = "Kbl Audio Capture Port", - .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", - .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .nonatomic = 1, - .trigger = { - SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, - .ops = &kabylake_da7219_fe_ops, - }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture",
@@ -911,6 +904,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .cpu_dai_name = "DMIC01 Pin", .codec_name = "dmic-codec", .codec_dai_name = "dmic-hifi", + .init = kabylake_dmic_init, .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1,
Signature · 1 line
1.9.1
Quoted 8 lines · Jenny TC
kbl_da7219_max98927supports two configurations - One with da7219 & max98927/373 and other one with max98927/373 alone. This patch removes the headset dais from max98927/373 configuration. Since thesnd_soc_dapm_ignore_suspendfor DMIC is called fromda7219_codec_init, the code is re-arranged to invokesnd_soc_dapm_ignore_suspendfromkabylake_dmic_init.Signed-off-by Jenny TC <[email protected]>
it's quite hard to review this patch with the diff format you've selected. What I find surprising is that you removed the headset capture, but not the playback? Shouldn't the HS_PB also be removed somewhere?
Quoted 117 lines
--- sound/soc/intel/boards/kbl_da7219_max98927.c | 52 ++++++++++++---------------- 1 file changed, 23 insertions(+), 29 deletions(-)sound/soc/intel/boards/kbl_da7219_max98927.c +23
-29@@ -52,7 +52,6 @@ struct kbl_codec_private {enum {KBL_DPCM_AUDIO_PB =0 , -KBL_DPCM_AUDIO_CP ,KBL_DPCM_AUDIO_ECHO_REF_CP ,KBL_DPCM_AUDIO_REF_CP ,KBL_DPCM_AUDIO_DMIC_CP ,@@ -60,6 +59,7 @@ enum {KBL_DPCM_AUDIO_HDMI2_PB ,KBL_DPCM_AUDIO_HDMI3_PB ,KBL_DPCM_AUDIO_HS_PB , + KBL_DPCM_AUDIO_CP, }; static int platform_clock_control(struct snd_soc_dapm_widget *w,@@ -311,6 +311,12 @@ static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)da7219_aad_jack_det (component, &ctx->kabylake_headset); +return 0 ; +} + +static int kabylake_dmic_init (struct snd_soc_pcm_runtime *rtd) +{ +int ret; ret =snd_soc_dapm_ignore_suspend (&rtd->card->dapm,"SoC DMIC" );if (ret)dev_err (rtd->dev,"SoC DMIC - Ignore suspend failed %d\n" , ret);@@ -581,20 +587,6 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .dpcm_playback = 1, .ops = &kabylake_da7219_fe_ops, }, - [KBL_DPCM_AUDIO_CP] = { - .name = "Kbl Audio Capture Port", - .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", - .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .nonatomic = 1, - .trigger = { - SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, - .ops = &kabylake_da7219_fe_ops, - }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture",@@ -690,6 +682,20 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .ops = &kabylake_da7219_fe_ops, }, + [KBL_DPCM_AUDIO_CP] = { + .name = "Kbl Audio Capture Port", + .stream_name = "Audio Record", + .cpu_dai_name = "System Pin", + .platform_name = "0000:00:1f.3", + .dynamic = 1, + .codec_name = "snd-soc-dummy", + .codec_dai_name = "snd-soc-dummy-dai", + .nonatomic = 1, + .trigger = { + SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, + .dpcm_capture = 1, + .ops = &kabylake_da7219_fe_ops, + }, /* Back End DAI links */ {@@ -733,6 +739,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .cpu_dai_name = "DMIC01 Pin", .codec_name = "dmic-codec", .codec_dai_name = "dmic-hifi", + .init = kabylake_dmic_init, .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1,@@ -792,20 +799,6 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .dpcm_playback = 1, .ops = &kabylake_da7219_fe_ops, }, - [KBL_DPCM_AUDIO_CP] = { - .name = "Kbl Audio Capture Port", - .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", - .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .nonatomic = 1, - .trigger = { - SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, - .ops = &kabylake_da7219_fe_ops, - }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture",@@ -911,6 +904,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream) .cpu_dai_name = "DMIC01 Pin", .codec_name = "dmic-codec", .codec_dai_name = "dmic-hifi", + .init = kabylake_dmic_init, .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1,
Mark Brown
maintainerApplied "ASoC: Intel: kbl_da7219_max98927: remove headset" to the asoc tree
In reply to Jenny TCThe patch
ASoC: Intel: kbl_da7219_max98927: remove headset
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
2390c9b473da217ee086e5382869ade82c217a30Mon Sep 17 00:00:00 2001
From: Jenny TC <[email protected]>
Date: Tue, 26 Mar 2019 22:50:56 +0530
Subject: [PATCH] ASoC: Intel: kbl_da7219_max98927: remove headset
kbl_da7219_max98927 supports two configurations - One with da7219 & max98927/373 and other one with max98927/373 alone. This patch removes the headset dais from max98927/373 configuration. Since the snd_soc_dapm_ignore_suspend for DMIC is called from da7219_codec_init, the code is re-arranged to invoke snd_soc_dapm_ignore_suspend from kabylake_dmic_init.
--- sound/soc/intel/boards/kbl_da7219_max98927.c | 52 +++++++++----------- 1 file changed, 23 insertions(+), 29 deletions(-)
sound/soc/intel/boards/kbl_da7219_max98927.c +23 -29
@@ -52,7 +52,6 @@ struct kbl_codec_private {enum {KBL_DPCM_AUDIO_PB =0 , -KBL_DPCM_AUDIO_CP ,KBL_DPCM_AUDIO_ECHO_REF_CP ,KBL_DPCM_AUDIO_REF_CP ,KBL_DPCM_AUDIO_DMIC_CP ,
@@ -60,6 +59,7 @@ enum {KBL_DPCM_AUDIO_HDMI2_PB ,KBL_DPCM_AUDIO_HDMI3_PB ,KBL_DPCM_AUDIO_HS_PB , + KBL_DPCM_AUDIO_CP, }; static int platform_clock_control(struct snd_soc_dapm_widget *w,
@@ -311,6 +311,12 @@ static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)da7219_aad_jack_det (component, &ctx->kabylake_headset); +return 0 ; +} + +static int kabylake_dmic_init (struct snd_soc_pcm_runtime *rtd) +{ +int ret; ret =snd_soc_dapm_ignore_suspend (&rtd->card->dapm,"SoC DMIC" );if (ret)dev_err (rtd->dev,"SoC DMIC - Ignore suspend failed %d\n" , ret);
@@ -581,20 +587,6 @@ static struct snd_soc_dai_link kabylake_dais[] = { .dpcm_playback = 1, .ops = &kabylake_da7219_fe_ops, }, - [KBL_DPCM_AUDIO_CP] = { - .name = "Kbl Audio Capture Port", - .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", - .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .nonatomic = 1, - .trigger = { - SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, - .ops = &kabylake_da7219_fe_ops, - }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture",
@@ -690,6 +682,20 @@ static struct snd_soc_dai_link kabylake_dais[] = { .ops = &kabylake_da7219_fe_ops, }, + [KBL_DPCM_AUDIO_CP] = { + .name = "Kbl Audio Capture Port", + .stream_name = "Audio Record", + .cpu_dai_name = "System Pin", + .platform_name = "0000:00:1f.3", + .dynamic = 1, + .codec_name = "snd-soc-dummy", + .codec_dai_name = "snd-soc-dummy-dai", + .nonatomic = 1, + .trigger = { + SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, + .dpcm_capture = 1, + .ops = &kabylake_da7219_fe_ops, + }, /* Back End DAI links */ {
@@ -733,6 +739,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .cpu_dai_name = "DMIC01 Pin", .codec_name = "dmic-codec", .codec_dai_name = "dmic-hifi", + .init = kabylake_dmic_init, .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1,
@@ -792,20 +799,6 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .dpcm_playback = 1, .ops = &kabylake_da7219_fe_ops, }, - [KBL_DPCM_AUDIO_CP] = { - .name = "Kbl Audio Capture Port", - .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", - .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .nonatomic = 1, - .trigger = { - SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, - .ops = &kabylake_da7219_fe_ops, - }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture",
@@ -911,6 +904,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .cpu_dai_name = "DMIC01 Pin", .codec_name = "dmic-codec", .codec_dai_name = "dmic-hifi", + .init = kabylake_dmic_init, .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1,
Signature · 1 line
2.20.1