All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: SOF: initial support for Intel ALH/SoundWire DAIs
@ 2019-08-15 15:50 Pierre-Louis Bossart
  2019-08-15 15:50 ` [PATCH 1/4] ASoC: SOF: rename SOUNDWIRE to ALH Pierre-Louis Bossart
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2019-08-15 15:50 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

This patchset adds the basic functionality to extract DAI information
from the topology and send the information to firmware. At the moment
there is no specific configuration in topology file, all the
programming takes place based on the dai index and the related ALH
stream ID.

The renaming from SoundWire to ALH (Audio Link Hub) is a better
representation of the hardware, the ALH acts as a proxy between the
DMA transfers and the Cadence IP.

Bard liao (1):
  ASoC: SOF: rename SOUNDWIRE to ALH

Pierre-Louis Bossart (3):
  ASoC: SOF: ipc: add ALH parameters
  ASoC: SOF: topology: initial support for Intel ALH DAI type
  ASoC: SOF: pcm: add ALH support

 include/sound/sof/dai-intel.h |  9 ++++++++
 include/sound/sof/dai.h       |  3 ++-
 include/uapi/sound/sof/abi.h  |  2 +-
 sound/soc/sof/pcm.c           |  3 +++
 sound/soc/sof/topology.c      | 42 ++++++++++++++++++++++++++++++++++-
 5 files changed, 56 insertions(+), 3 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] ASoC: SOF: rename SOUNDWIRE to ALH
  2019-08-15 15:50 [PATCH 0/4] ASoC: SOF: initial support for Intel ALH/SoundWire DAIs Pierre-Louis Bossart
@ 2019-08-15 15:50 ` Pierre-Louis Bossart
  2019-08-15 17:08   ` Mark Brown
  2019-08-15 15:50 ` [PATCH 2/4] ASoC: SOF: ipc: add ALH parameters Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Pierre-Louis Bossart @ 2019-08-15 15:50 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Bard liao, Pierre-Louis Bossart

From: Bard liao <yung-chuan.liao@linux.intel.com>

Rename SOUNDWIRE to ALH.

Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 include/sound/sof/dai.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/sound/sof/dai.h b/include/sound/sof/dai.h
index 7a84f7fb460a..6b296df242bd 100644
--- a/include/sound/sof/dai.h
+++ b/include/sound/sof/dai.h
@@ -49,7 +49,7 @@ enum sof_ipc_dai_type {
 	SOF_DAI_INTEL_SSP,		/**< Intel SSP */
 	SOF_DAI_INTEL_DMIC,		/**< Intel DMIC */
 	SOF_DAI_INTEL_HDA,		/**< Intel HD/A */
-	SOF_DAI_INTEL_SOUNDWIRE,	/**< Intel SoundWire */
+	SOF_DAI_INTEL_ALH,		/**< Intel ALH  */
 	SOF_DAI_IMX_SAI,		/**< i.MX SAI */
 	SOF_DAI_IMX_ESAI,		/**< i.MX ESAI */
 };
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] ASoC: SOF: ipc: add ALH parameters
  2019-08-15 15:50 [PATCH 0/4] ASoC: SOF: initial support for Intel ALH/SoundWire DAIs Pierre-Louis Bossart
  2019-08-15 15:50 ` [PATCH 1/4] ASoC: SOF: rename SOUNDWIRE to ALH Pierre-Louis Bossart
@ 2019-08-15 15:50 ` Pierre-Louis Bossart
  2019-08-15 17:14   ` Applied "ASoC: SOF: ipc: add ALH parameters" to the asoc tree Mark Brown
  2019-08-15 15:50 ` [PATCH 3/4] ASoC: SOF: topology: initial support for Intel ALH DAI type Pierre-Louis Bossart
  2019-08-15 15:50 ` [PATCH 4/4] ASoC: SOF: pcm: add ALH support Pierre-Louis Bossart
  3 siblings, 1 reply; 9+ messages in thread
From: Pierre-Louis Bossart @ 2019-08-15 15:50 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

The only configuration parameter is the ALH stream ID. No range
checking is done by the driver, the firmware should check that the
stream is valid for a specific hardware.

Bump the ABI Minor number to keep the alignment with SOF firmware

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 include/sound/sof/dai-intel.h | 9 +++++++++
 include/sound/sof/dai.h       | 1 +
 include/uapi/sound/sof/abi.h  | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/sound/sof/dai-intel.h b/include/sound/sof/dai-intel.h
index 1ab52fd63ceb..5f1ef5565be6 100644
--- a/include/sound/sof/dai-intel.h
+++ b/include/sound/sof/dai-intel.h
@@ -179,4 +179,13 @@ struct sof_ipc_dai_dmic_params {
 	struct sof_ipc_dai_dmic_pdm_ctrl pdm[0];
 } __packed;
 
+/* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */
+struct sof_ipc_dai_alh_params {
+	struct sof_ipc_hdr hdr;
+	uint32_t stream_id;
+
+	/* reserved for future use */
+	uint32_t reserved[15];
+} __packed;
+
 #endif
diff --git a/include/sound/sof/dai.h b/include/sound/sof/dai.h
index 6b296df242bd..0f1235022146 100644
--- a/include/sound/sof/dai.h
+++ b/include/sound/sof/dai.h
@@ -72,6 +72,7 @@ struct sof_ipc_dai_config {
 		struct sof_ipc_dai_ssp_params ssp;
 		struct sof_ipc_dai_dmic_params dmic;
 		struct sof_ipc_dai_hda_params hda;
+		struct sof_ipc_dai_alh_params alh;
 	};
 } __packed;
 
diff --git a/include/uapi/sound/sof/abi.h b/include/uapi/sound/sof/abi.h
index dff70a42445a..a0fe0d4c4b66 100644
--- a/include/uapi/sound/sof/abi.h
+++ b/include/uapi/sound/sof/abi.h
@@ -26,7 +26,7 @@
 
 /* SOF ABI version major, minor and patch numbers */
 #define SOF_ABI_MAJOR 3
-#define SOF_ABI_MINOR 9
+#define SOF_ABI_MINOR 10
 #define SOF_ABI_PATCH 0
 
 /* SOF ABI version number. Format within 32bit word is MMmmmppp */
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] ASoC: SOF: topology: initial support for Intel ALH DAI type
  2019-08-15 15:50 [PATCH 0/4] ASoC: SOF: initial support for Intel ALH/SoundWire DAIs Pierre-Louis Bossart
  2019-08-15 15:50 ` [PATCH 1/4] ASoC: SOF: rename SOUNDWIRE to ALH Pierre-Louis Bossart
  2019-08-15 15:50 ` [PATCH 2/4] ASoC: SOF: ipc: add ALH parameters Pierre-Louis Bossart
@ 2019-08-15 15:50 ` Pierre-Louis Bossart
  2019-08-15 15:50 ` [PATCH 4/4] ASoC: SOF: pcm: add ALH support Pierre-Louis Bossart
  3 siblings, 0 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2019-08-15 15:50 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

The Audio Link Hub DAI does not require any static configuration from
topology for now. We still need to pass the frame rate and format to
firmware.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/sof/topology.c | 42 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index a215bf58b138..28a7a6e06a53 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -346,6 +346,7 @@ static const struct sof_dai_types sof_dais[] = {
 	{"SSP", SOF_DAI_INTEL_SSP},
 	{"HDA", SOF_DAI_INTEL_HDA},
 	{"DMIC", SOF_DAI_INTEL_DMIC},
+	{"ALH", SOF_DAI_INTEL_ALH},
 	{"SAI", SOF_DAI_IMX_SAI},
 	{"ESAI", SOF_DAI_IMX_ESAI},
 };
@@ -2763,6 +2764,40 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index,
 	return ret;
 }
 
+static int sof_link_alh_load(struct snd_soc_component *scomp, int index,
+			     struct snd_soc_dai_link *link,
+			     struct snd_soc_tplg_link_config *cfg,
+			     struct snd_soc_tplg_hw_config *hw_config,
+			     struct sof_ipc_dai_config *config)
+{
+	struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
+	struct sof_ipc_reply reply;
+	u32 size = sizeof(*config);
+	int ret;
+
+	/* init IPC */
+	config->hdr.size = size;
+
+	/* send message to DSP */
+	ret = sof_ipc_tx_message(sdev->ipc,
+				 config->hdr.cmd, config, size, &reply,
+				 sizeof(reply));
+
+	if (ret < 0) {
+		dev_err(sdev->dev, "error: failed to set DAI config for ALH %d\n",
+			config->dai_index);
+		return ret;
+	}
+
+	/* set config for all DAI's with name matching the link name */
+	ret = sof_set_dai_config(sdev, size, link, config);
+	if (ret < 0)
+		dev_err(sdev->dev, "error: failed to save DAI config for ALH %d\n",
+			config->dai_index);
+
+	return ret;
+}
+
 /* DAI link - used for any driver specific init */
 static int sof_link_load(struct snd_soc_component *scomp, int index,
 			 struct snd_soc_dai_link *link,
@@ -2859,6 +2894,10 @@ static int sof_link_load(struct snd_soc_component *scomp, int index,
 		ret = sof_link_hda_load(scomp, index, link, cfg, hw_config,
 					&config);
 		break;
+	case SOF_DAI_INTEL_ALH:
+		ret = sof_link_alh_load(scomp, index, link, cfg, hw_config,
+					&config);
+		break;
 	case SOF_DAI_IMX_SAI:
 		ret = sof_link_sai_load(scomp, index, link, cfg, hw_config,
 					&config);
@@ -2924,7 +2963,8 @@ static int sof_link_unload(struct snd_soc_component *scomp,
 	switch (sof_dai->dai_config->type) {
 	case SOF_DAI_INTEL_SSP:
 	case SOF_DAI_INTEL_DMIC:
-		/* no resource needs to be released for SSP and DMIC */
+	case SOF_DAI_INTEL_ALH:
+		/* no resource needs to be released for SSP, DMIC and ALH */
 		break;
 	case SOF_DAI_INTEL_HDA:
 		ret = sof_link_hda_unload(sdev, link);
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] ASoC: SOF: pcm: add ALH support
  2019-08-15 15:50 [PATCH 0/4] ASoC: SOF: initial support for Intel ALH/SoundWire DAIs Pierre-Louis Bossart
                   ` (2 preceding siblings ...)
  2019-08-15 15:50 ` [PATCH 3/4] ASoC: SOF: topology: initial support for Intel ALH DAI type Pierre-Louis Bossart
@ 2019-08-15 15:50 ` Pierre-Louis Bossart
  3 siblings, 0 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2019-08-15 15:50 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

Even if ALH has no specific configuration, we still need to handle the
common parameters for all DAIs

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/sof/pcm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c
index 8612896673a5..e3f6a6dc0f36 100644
--- a/sound/soc/sof/pcm.c
+++ b/sound/soc/sof/pcm.c
@@ -675,6 +675,9 @@ static int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
 	case SOF_DAI_INTEL_HDA:
 		/* do nothing for HDA dai_link */
 		break;
+	case SOF_DAI_INTEL_ALH:
+		/* do nothing for ALH dai_link */
+		break;
 	default:
 		dev_err(sdev->dev, "error: invalid DAI type %d\n",
 			dai->dai_config->type);
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] ASoC: SOF: rename SOUNDWIRE to ALH
  2019-08-15 15:50 ` [PATCH 1/4] ASoC: SOF: rename SOUNDWIRE to ALH Pierre-Louis Bossart
@ 2019-08-15 17:08   ` Mark Brown
  2019-08-15 18:30     ` Pierre-Louis Bossart
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2019-08-15 17:08 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: tiwai, alsa-devel, Bard liao


[-- Attachment #1.1: Type: text/plain, Size: 488 bytes --]

On Thu, Aug 15, 2019 at 10:50:29AM -0500, Pierre-Louis Bossart wrote:
> From: Bard liao <yung-chuan.liao@linux.intel.com>
>
> Rename SOUNDWIRE to ALH.

What's this patch based on, it doesn't seem to be something upstream?

Description: [1/4] ASoC: SOF: rename SOUNDWIRE to ALH
Applying: ASoC: SOF: rename SOUNDWIRE to ALH
error: sha1 information is lacking or useless (include/sound/sof/dai.h).
error: could not build fake ancestor
Patch failed at 0001 ASoC: SOF: rename SOUNDWIRE to ALH

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Applied "ASoC: SOF: ipc: add ALH parameters" to the asoc tree
  2019-08-15 15:50 ` [PATCH 2/4] ASoC: SOF: ipc: add ALH parameters Pierre-Louis Bossart
@ 2019-08-15 17:14   ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2019-08-15 17:14 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: tiwai, alsa-devel, Mark Brown

The patch

   ASoC: SOF: ipc: add ALH parameters

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4

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

>From 3a9477a06c6acb4234407b59999835a6f12f889d Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Thu, 15 Aug 2019 10:50:30 -0500
Subject: [PATCH] ASoC: SOF: ipc: add ALH parameters

The only configuration parameter is the ALH stream ID. No range
checking is done by the driver, the firmware should check that the
stream is valid for a specific hardware.

Bump the ABI Minor number to keep the alignment with SOF firmware

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815155032.29181-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/sof/dai-intel.h | 9 +++++++++
 include/sound/sof/dai.h       | 1 +
 include/uapi/sound/sof/abi.h  | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/sound/sof/dai-intel.h b/include/sound/sof/dai-intel.h
index a81afd3fbd41..b03e2ec08694 100644
--- a/include/sound/sof/dai-intel.h
+++ b/include/sound/sof/dai-intel.h
@@ -179,4 +179,13 @@ struct sof_ipc_dai_dmic_params {
 	struct sof_ipc_dai_dmic_pdm_ctrl pdm[0];
 } __packed;
 
+/* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */
+struct sof_ipc_dai_alh_params {
+	struct sof_ipc_hdr hdr;
+	uint32_t stream_id;
+
+	/* reserved for future use */
+	uint32_t reserved[15];
+} __packed;
+
 #endif
diff --git a/include/sound/sof/dai.h b/include/sound/sof/dai.h
index 3d174e20aa53..da9825ad41d4 100644
--- a/include/sound/sof/dai.h
+++ b/include/sound/sof/dai.h
@@ -70,6 +70,7 @@ struct sof_ipc_dai_config {
 		struct sof_ipc_dai_ssp_params ssp;
 		struct sof_ipc_dai_dmic_params dmic;
 		struct sof_ipc_dai_hda_params hda;
+		struct sof_ipc_dai_alh_params alh;
 	};
 } __packed;
 
diff --git a/include/uapi/sound/sof/abi.h b/include/uapi/sound/sof/abi.h
index dff70a42445a..a0fe0d4c4b66 100644
--- a/include/uapi/sound/sof/abi.h
+++ b/include/uapi/sound/sof/abi.h
@@ -26,7 +26,7 @@
 
 /* SOF ABI version major, minor and patch numbers */
 #define SOF_ABI_MAJOR 3
-#define SOF_ABI_MINOR 9
+#define SOF_ABI_MINOR 10
 #define SOF_ABI_PATCH 0
 
 /* SOF ABI version number. Format within 32bit word is MMmmmppp */
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] ASoC: SOF: rename SOUNDWIRE to ALH
  2019-08-15 17:08   ` Mark Brown
@ 2019-08-15 18:30     ` Pierre-Louis Bossart
  2019-08-15 19:22       ` Pierre-Louis Bossart
  0 siblings, 1 reply; 9+ messages in thread
From: Pierre-Louis Bossart @ 2019-08-15 18:30 UTC (permalink / raw)
  To: Mark Brown; +Cc: tiwai, alsa-devel, Bard liao



On 8/15/19 12:08 PM, Mark Brown wrote:
> On Thu, Aug 15, 2019 at 10:50:29AM -0500, Pierre-Louis Bossart wrote:
>> From: Bard liao <yung-chuan.liao@linux.intel.com>
>>
>> Rename SOUNDWIRE to ALH.
> 
> What's this patch based on, it doesn't seem to be something upstream?
> 
> Description: [1/4] ASoC: SOF: rename SOUNDWIRE to ALH
> Applying: ASoC: SOF: rename SOUNDWIRE to ALH
> error: sha1 information is lacking or useless (include/sound/sof/dai.h).
> error: could not build fake ancestor
> Patch failed at 0001 ASoC: SOF: rename SOUNDWIRE to ALH

ok so this is upstream but the patch will not apply if you didn't take 
Daniel's iMX patches, which change the same dai.h file in '[PATCH 3/3] 
ASoC: SOF: topology: Add dummy support for i.MX8 DAIs'

I'll resubmit this separately.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] ASoC: SOF: rename SOUNDWIRE to ALH
  2019-08-15 18:30     ` Pierre-Louis Bossart
@ 2019-08-15 19:22       ` Pierre-Louis Bossart
  0 siblings, 0 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2019-08-15 19:22 UTC (permalink / raw)
  To: Mark Brown; +Cc: tiwai, alsa-devel, Bard liao



On 8/15/19 1:30 PM, Pierre-Louis Bossart wrote:
> 
> 
> On 8/15/19 12:08 PM, Mark Brown wrote:
>> On Thu, Aug 15, 2019 at 10:50:29AM -0500, Pierre-Louis Bossart wrote:
>>> From: Bard liao <yung-chuan.liao@linux.intel.com>
>>>
>>> Rename SOUNDWIRE to ALH.
>>
>> What's this patch based on, it doesn't seem to be something upstream?
>>
>> Description: [1/4] ASoC: SOF: rename SOUNDWIRE to ALH
>> Applying: ASoC: SOF: rename SOUNDWIRE to ALH
>> error: sha1 information is lacking or useless (include/sound/sof/dai.h).
>> error: could not build fake ancestor
>> Patch failed at 0001 ASoC: SOF: rename SOUNDWIRE to ALH
> 
> ok so this is upstream but the patch will not apply if you didn't take 
> Daniel's iMX patches, which change the same dai.h file in '[PATCH 3/3] 
> ASoC: SOF: topology: Add dummy support for i.MX8 DAIs'
> 
> I'll resubmit this separately

Just resent a separate set of patches which combine i.MX8 and intel new 
DAI definitions. Putting them in different series was a mistake in 
hindsight since the same files are changed, sorry about that.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-08-15 19:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15 15:50 [PATCH 0/4] ASoC: SOF: initial support for Intel ALH/SoundWire DAIs Pierre-Louis Bossart
2019-08-15 15:50 ` [PATCH 1/4] ASoC: SOF: rename SOUNDWIRE to ALH Pierre-Louis Bossart
2019-08-15 17:08   ` Mark Brown
2019-08-15 18:30     ` Pierre-Louis Bossart
2019-08-15 19:22       ` Pierre-Louis Bossart
2019-08-15 15:50 ` [PATCH 2/4] ASoC: SOF: ipc: add ALH parameters Pierre-Louis Bossart
2019-08-15 17:14   ` Applied "ASoC: SOF: ipc: add ALH parameters" to the asoc tree Mark Brown
2019-08-15 15:50 ` [PATCH 3/4] ASoC: SOF: topology: initial support for Intel ALH DAI type Pierre-Louis Bossart
2019-08-15 15:50 ` [PATCH 4/4] ASoC: SOF: pcm: add ALH support Pierre-Louis Bossart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.