Skip to contentSkip to conversation

ASoC: Intel: kbl: Add Multi-endpoint Playback & Echo Ref support

PATCH In review Naveen M 3 participants 8 messages Aug 2, 2017 – Aug 3, 2017

Subsystems (3)
lore
Share & tools
lore

Naveen M

author
#0 lore raw

cover ASoC: Intel: kbl: Add Multi-endpoint Playback & Echo Ref support

1. Add new FE capabilities to support:
a. Parallel playback on 2 ports simultaneously
Define new frontends to enable additional playback port. This will be used when platform needs to support multi-playback on different ports. Ex: Headset and Speaker simultaneously
b. Echo reference capture capability
Certain platforms need reference stream of playback to supplement User-space post-processing algorithms. This pin enables platform driver to provide such a FE.
2. Add DAI links for parallel playback and echo ref
3. Add map for new DAIs for parallel playback and echo ref

Naveen M (3):
ASoC: Intel: kbl: Add new FEs for Multi-Playback & Echo-Reference
ASoC: Intel: kbl: Add DAI links for Multi-Playback & Echo-reference
ASoC: Intel: kbl: Add map for new DAIs for Multi-Playback & Echo Ref

 sound/soc/intel/boards/kbl_rt5663_max98927.c       | 30 +++++++++++++++++++---
 .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c  | 30 +++++++++++++++++++---
 sound/soc/intel/skylake/skl-pcm.c                  | 26 +++++++++++++++++++
 3 files changed, 80 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/3 ASoC: Intel: kbl: Add new FEs for Multi-Playback & Echo-Reference

Adding new frontends to support:
1. Parallel playback on 2 ports simultaneously
2. Echo reference capture capability

---
 sound/soc/intel/skylake/skl-pcm.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
sound/soc/intel/skylake/skl-pcm.c +26 -0
index 0ebea34a..f18b4c9 100644
@@ -675,6 +675,32 @@ static int skl_link_hw_free(struct snd_pcm_substream *substream,
 	},
 },
 {
+	.name = "System Pin2",
+	.ops = &skl_pcm_dai_ops,
+	.playback = {
+		.stream_name = "Headset Playback",
+		.channels_min = HDA_MONO,
+		.channels_max = HDA_STEREO,
+		.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_16000 |
+			SNDRV_PCM_RATE_8000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE |
+			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE,
+	},
+},
+{
+	.name = "Echoref Pin",
+	.ops = &skl_pcm_dai_ops,
+	.capture = {
+		.stream_name = "Echoreference Capture",
+		.channels_min = HDA_STEREO,
+		.channels_max = HDA_STEREO,
+		.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_16000 |
+			SNDRV_PCM_RATE_8000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE |
+			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE,
+	},
+},
+{
 	.name = "Reference Pin",
 	.ops = &skl_pcm_dai_ops,
 	.capture = {
Signature · 1 line
1.9.1
maintainer
#2 lore raw

Applied "ASoC: Intel: kbl: Add new FEs for Multi-Playback & Echo-Reference" to the asoc tree

The patch

ASoC: Intel: kbl: Add new FEs for Multi-Playback & Echo-Reference

has been applied to the asoc tree at

git://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 da3cbb40f35b4b5ab66df9a23a717a4a5df1f992 Mon Sep 17 00:00:00 2001

From: Naveen Manohar <[email protected]>
Date: Wed, 2 Aug 2017 11:43:33 +0530
Subject: [PATCH] ASoC: Intel: kbl: Add new FEs for Multi-Playback &
Echo-Reference

Adding new frontends to support:
1. Parallel playback on 2 ports simultaneously
2. Echo reference capture capability

---
 sound/soc/intel/skylake/skl-pcm.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
sound/soc/intel/skylake/skl-pcm.c +26 -0
index b1f2dba642c4..debdaac2c3a2 100644
@@ -675,6 +675,32 @@ static struct snd_soc_dai_driver skl_platform_dai[] = {
 	},
 },
 {
+	.name = "System Pin2",
+	.ops = &skl_pcm_dai_ops,
+	.playback = {
+		.stream_name = "Headset Playback",
+		.channels_min = HDA_MONO,
+		.channels_max = HDA_STEREO,
+		.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_16000 |
+			SNDRV_PCM_RATE_8000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE |
+			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE,
+	},
+},
+{
+	.name = "Echoref Pin",
+	.ops = &skl_pcm_dai_ops,
+	.capture = {
+		.stream_name = "Echoreference Capture",
+		.channels_min = HDA_STEREO,
+		.channels_max = HDA_STEREO,
+		.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_16000 |
+			SNDRV_PCM_RATE_8000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE |
+			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE,
+	},
+},
+{
 	.name = "Reference Pin",
 	.ops = &skl_pcm_dai_ops,
 	.capture = {
Signature · 1 line
2.13.2
author
#3 lore raw

PATCH 2/3 ASoC: Intel: kbl: Add DAI links for Multi-Playback & Echo-reference

In reply to Naveen M

Add new FE DAI links to support:
1. Parallel playback on 2 ports simultaneously
2. Echo reference capture capability

---
 sound/soc/intel/boards/kbl_rt5663_max98927.c       | 24 ++++++++++++++++++++++
 .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c  | 24 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)
sound/soc/intel/boards/kbl_rt5663_max98927.c +24 -0
index f9ba977..795e959 100644
@@ -52,6 +52,8 @@ struct kbl_rt5663_private {
 enum {
 	KBL_DPCM_AUDIO_PB = 0,
 	KBL_DPCM_AUDIO_CP,
+	KBL_DPCM_AUDIO_HS_PB,
+	KBL_DPCM_AUDIO_ECHO_REF_CP,
 	KBL_DPCM_AUDIO_REF_CP,
 	KBL_DPCM_AUDIO_DMIC_CP,
 	KBL_DPCM_AUDIO_HDMI1_PB,
@@ -443,6 +445,28 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream)
 		.dpcm_capture = 1,
 		.ops = &kabylake_rt5663_fe_ops,
 	},
+	[KBL_DPCM_AUDIO_HS_PB] = {
+		.name = "Kbl Audio Headset Playback",
+		.stream_name = "Headset Audio",
+		.cpu_dai_name = "System Pin2",
+		.codec_name = "snd-soc-dummy",
+		.codec_dai_name = "snd-soc-dummy-dai",
+		.platform_name = "0000:00:1f.3",
+		.dpcm_playback = 1,
+		.nonatomic = 1,
+		.dynamic = 1,
+	},
+	[KBL_DPCM_AUDIO_ECHO_REF_CP] = {
+		.name = "Kbl Audio Echo Reference cap",
+		.stream_name = "Echoreference Capture",
+		.cpu_dai_name = "Echoref Pin",
+		.codec_name = "snd-soc-dummy",
+		.codec_dai_name = "snd-soc-dummy-dai",
+		.platform_name = "0000:00:1f.3",
+		.init = NULL,
+		.capture_only = 1,
+		.nonatomic = 1,
+	},
 	[KBL_DPCM_AUDIO_REF_CP] = {
 		.name = "Kbl Audio Reference cap",
 		.stream_name = "Wake on Voice",
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +24 -0
index 3fe4a08..2d98982 100644
@@ -62,6 +62,8 @@ struct kbl_codec_private {
 enum {
 	KBL_DPCM_AUDIO_PB = 0,
 	KBL_DPCM_AUDIO_CP,
+	KBL_DPCM_AUDIO_HS_PB,
+	KBL_DPCM_AUDIO_ECHO_REF_CP,
 	KBL_DPCM_AUDIO_DMIC_CP,
 	KBL_DPCM_AUDIO_HDMI1_PB,
 	KBL_DPCM_AUDIO_HDMI2_PB,
@@ -449,6 +451,28 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
 		.dpcm_capture = 1,
 		.ops = &kabylake_rt5663_fe_ops,
 	},
+	[KBL_DPCM_AUDIO_HS_PB] = {
+		.name = "Kbl Audio Headset Playback",
+		.stream_name = "Headset Audio",
+		.cpu_dai_name = "System Pin2",
+		.codec_name = "snd-soc-dummy",
+		.codec_dai_name = "snd-soc-dummy-dai",
+		.platform_name = "0000:00:1f.3",
+		.dpcm_playback = 1,
+		.nonatomic = 1,
+		.dynamic = 1,
+	},
+	[KBL_DPCM_AUDIO_ECHO_REF_CP] = {
+		.name = "Kbl Audio Echo Reference cap",
+		.stream_name = "Echoreference Capture",
+		.cpu_dai_name = "Echoref Pin",
+		.codec_name = "snd-soc-dummy",
+		.codec_dai_name = "snd-soc-dummy-dai",
+		.platform_name = "0000:00:1f.3",
+		.init = NULL,
+		.capture_only = 1,
+		.nonatomic = 1,
+	},
 	[KBL_DPCM_AUDIO_DMIC_CP] = {
 		.name = "Kbl Audio DMIC cap",
 		.stream_name = "dmiccap",
Signature · 1 line
1.9.1
maintainer
#4 lore raw

Applied "ASoC: Intel: kbl: Add DAI links for Multi-Playback & Echo-reference" to the asoc tree

The patch

ASoC: Intel: kbl: Add DAI links for Multi-Playback & Echo-reference

has been applied to the asoc tree at

git://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 b32ee384ac18d3e4db0ef45d23c3ff1c67113529 Mon Sep 17 00:00:00 2001

From: Naveen Manohar <[email protected]>
Date: Wed, 2 Aug 2017 11:43:34 +0530
Subject: [PATCH] ASoC: Intel: kbl: Add DAI links for Multi-Playback &
Echo-reference

Add new FE DAI links to support:
1. Parallel playback on 2 ports simultaneously
2. Echo reference capture capability

---
 sound/soc/intel/boards/kbl_rt5663_max98927.c       | 24 ++++++++++++++++++++++
 .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c  | 24 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)
sound/soc/intel/boards/kbl_rt5663_max98927.c +24 -0
index 090331bd6900..4c70d5a3028c 100644
@@ -52,6 +52,8 @@ struct kbl_rt5663_private {
 enum {
 	KBL_DPCM_AUDIO_PB = 0,
 	KBL_DPCM_AUDIO_CP,
+	KBL_DPCM_AUDIO_HS_PB,
+	KBL_DPCM_AUDIO_ECHO_REF_CP,
 	KBL_DPCM_AUDIO_REF_CP,
 	KBL_DPCM_AUDIO_DMIC_CP,
 	KBL_DPCM_AUDIO_HDMI1_PB,
@@ -485,6 +487,28 @@ static struct snd_soc_dai_link kabylake_dais[] = {
 		.dpcm_capture = 1,
 		.ops = &kabylake_rt5663_fe_ops,
 	},
+	[KBL_DPCM_AUDIO_HS_PB] = {
+		.name = "Kbl Audio Headset Playback",
+		.stream_name = "Headset Audio",
+		.cpu_dai_name = "System Pin2",
+		.codec_name = "snd-soc-dummy",
+		.codec_dai_name = "snd-soc-dummy-dai",
+		.platform_name = "0000:00:1f.3",
+		.dpcm_playback = 1,
+		.nonatomic = 1,
+		.dynamic = 1,
+	},
+	[KBL_DPCM_AUDIO_ECHO_REF_CP] = {
+		.name = "Kbl Audio Echo Reference cap",
+		.stream_name = "Echoreference Capture",
+		.cpu_dai_name = "Echoref Pin",
+		.codec_name = "snd-soc-dummy",
+		.codec_dai_name = "snd-soc-dummy-dai",
+		.platform_name = "0000:00:1f.3",
+		.init = NULL,
+		.capture_only = 1,
+		.nonatomic = 1,
+	},
 	[KBL_DPCM_AUDIO_REF_CP] = {
 		.name = "Kbl Audio Reference cap",
 		.stream_name = "Wake on Voice",
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +24 -0
index 74bbc008c965..64364de165be 100644
@@ -62,6 +62,8 @@ struct kbl_codec_private {
 enum {
 	KBL_DPCM_AUDIO_PB = 0,
 	KBL_DPCM_AUDIO_CP,
+	KBL_DPCM_AUDIO_HS_PB,
+	KBL_DPCM_AUDIO_ECHO_REF_CP,
 	KBL_DPCM_AUDIO_DMIC_CP,
 	KBL_DPCM_AUDIO_HDMI1_PB,
 	KBL_DPCM_AUDIO_HDMI2_PB,
@@ -456,6 +458,28 @@ static struct snd_soc_dai_link kabylake_dais[] = {
 		.dpcm_capture = 1,
 		.ops = &kabylake_rt5663_fe_ops,
 	},
+	[KBL_DPCM_AUDIO_HS_PB] = {
+		.name = "Kbl Audio Headset Playback",
+		.stream_name = "Headset Audio",
+		.cpu_dai_name = "System Pin2",
+		.codec_name = "snd-soc-dummy",
+		.codec_dai_name = "snd-soc-dummy-dai",
+		.platform_name = "0000:00:1f.3",
+		.dpcm_playback = 1,
+		.nonatomic = 1,
+		.dynamic = 1,
+	},
+	[KBL_DPCM_AUDIO_ECHO_REF_CP] = {
+		.name = "Kbl Audio Echo Reference cap",
+		.stream_name = "Echoreference Capture",
+		.cpu_dai_name = "Echoref Pin",
+		.codec_name = "snd-soc-dummy",
+		.codec_dai_name = "snd-soc-dummy-dai",
+		.platform_name = "0000:00:1f.3",
+		.init = NULL,
+		.capture_only = 1,
+		.nonatomic = 1,
+	},
 	[KBL_DPCM_AUDIO_DMIC_CP] = {
 		.name = "Kbl Audio DMIC cap",
 		.stream_name = "dmiccap",
Signature · 1 line
2.13.2
author
#5 lore raw

PATCH 3/3 ASoC: Intel: kbl: Add map for new DAIs for Multi-Playback & Echo Ref

In reply to Naveen M

Modified DAPM Machine map for machine to suit the toplogy change required to enable features:
Multi-Endpoint Playback
Echo Reference Capture

---
 sound/soc/intel/boards/kbl_rt5663_max98927.c        | 6 +++---
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/intel/boards/kbl_rt5663_max98927.c +3 -3
index 795e959..17cd5a5 100644
@@ -99,12 +99,12 @@ enum {
 	/* CODEC BE connections */
 	{ "Left HiFi Playback", NULL, "ssp0 Tx" },
 	{ "Right HiFi Playback", NULL, "ssp0 Tx" },
-	{ "ssp0 Tx", NULL, "codec0_out" },
+	{ "ssp0 Tx", NULL, "spk_out" },
 
 	{ "AIF Playback", NULL, "ssp1 Tx" },
-	{ "ssp1 Tx", NULL, "codec1_out" },
+	{ "ssp1 Tx", NULL, "hs_out" },
 
-	{ "codec0_in", NULL, "ssp1 Rx" },
+	{ "hs_in", NULL, "ssp1 Rx" },
 	{ "ssp1 Rx", NULL, "AIF Capture" },
 
 	/* DMIC */
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +3 -3
index 2d98982..73b3f05 100644
@@ -107,12 +107,12 @@ enum {
 	/* CODEC BE connections */
 	{ "Left HiFi Playback", NULL, "ssp0 Tx" },
 	{ "Right HiFi Playback", NULL, "ssp0 Tx" },
-	{ "ssp0 Tx", NULL, "codec0_out" },
+	{ "ssp0 Tx", NULL, "spk_out" },
 
 	{ "AIF Playback", NULL, "ssp1 Tx" },
-	{ "ssp1 Tx", NULL, "codec1_out" },
+	{ "ssp1 Tx", NULL, "hs_out" },
 
-	{ "codec0_in", NULL, "ssp1 Rx" },
+	{ "hs_in", NULL, "ssp1 Rx" },
 	{ "ssp1 Rx", NULL, "AIF Capture" },
 
 	{ "codec1_in", NULL, "ssp0 Rx" },
Signature · 1 line
1.9.1
maintainer
#6 lore raw

Applied "ASoC: Intel: kbl: Add map for new DAIs for Multi-Playback & Echo Ref" to the asoc tree

The patch

ASoC: Intel: kbl: Add map for new DAIs for Multi-Playback & Echo Ref

has been applied to the asoc tree at

git://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 0b06122fc8d0949a0aa7b817d98e031104802611 Mon Sep 17 00:00:00 2001

From: Naveen Manohar <[email protected]>
Date: Wed, 2 Aug 2017 11:43:35 +0530
Subject: [PATCH] ASoC: Intel: kbl: Add map for new DAIs for Multi-Playback &
Echo Ref

Modified DAPM Machine map for machine to suit the toplogy change required to enable features:
Multi-Endpoint Playback
Echo Reference Capture

---
 sound/soc/intel/boards/kbl_rt5663_max98927.c        | 6 +++---
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/intel/boards/kbl_rt5663_max98927.c +3 -3
index 4c70d5a3028c..12b34b9a0104 100644
@@ -99,12 +99,12 @@ static const struct snd_soc_dapm_route kabylake_map[] = {
 	/* CODEC BE connections */
 	{ "Left HiFi Playback", NULL, "ssp0 Tx" },
 	{ "Right HiFi Playback", NULL, "ssp0 Tx" },
-	{ "ssp0 Tx", NULL, "codec0_out" },
+	{ "ssp0 Tx", NULL, "spk_out" },
 
 	{ "AIF Playback", NULL, "ssp1 Tx" },
-	{ "ssp1 Tx", NULL, "codec1_out" },
+	{ "ssp1 Tx", NULL, "hs_out" },
 
-	{ "codec0_in", NULL, "ssp1 Rx" },
+	{ "hs_in", NULL, "ssp1 Rx" },
 	{ "ssp1 Rx", NULL, "AIF Capture" },
 
 	/* DMIC */
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +3 -3
index 64364de165be..5ec942885b69 100644
@@ -107,12 +107,12 @@ static const struct snd_soc_dapm_route kabylake_map[] = {
 	/* CODEC BE connections */
 	{ "Left HiFi Playback", NULL, "ssp0 Tx" },
 	{ "Right HiFi Playback", NULL, "ssp0 Tx" },
-	{ "ssp0 Tx", NULL, "codec0_out" },
+	{ "ssp0 Tx", NULL, "spk_out" },
 
 	{ "AIF Playback", NULL, "ssp1 Tx" },
-	{ "ssp1 Tx", NULL, "codec1_out" },
+	{ "ssp1 Tx", NULL, "hs_out" },
 
-	{ "codec0_in", NULL, "ssp1 Rx" },
+	{ "hs_in", NULL, "ssp1 Rx" },
 	{ "ssp1 Rx", NULL, "AIF Capture" },
 
 	{ "codec1_in", NULL, "ssp0 Rx" },
Signature · 1 line
2.13.2
Acked-by on the v1 series
#7 lore raw
In reply to Naveen M
Quoted 11 lines · Naveen M

1. Add new FE capabilities to support:
a. Parallel playback on 2 ports simultaneously
Define new frontends to enable additional playback port. This will be used when platform needs to support multi-playback on different ports. Ex: Headset and Speaker simultaneously
b. Echo reference capture capability
Certain platforms need reference stream of playback to supplement User-space post-processing algorithms. This pin enables platform driver to provide such a FE.
2. Add DAI links for parallel playback and echo ref
3. Add map for new DAIs for parallel playback and echo ref

Signature · 1 line
~Vinod