All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend
@ 2023-10-23  2:07 ` Chancel Liu
  0 siblings, 0 replies; 13+ messages in thread
From: Chancel Liu @ 2023-10-23  2:07 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel
  Cc: Chancel Liu

Add a property to list audio sound widgets which are marked ignoring
system suspend. Paths between these endpoints are still active over
suspend of the main application processor that the current operating
system is running.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 .../devicetree/bindings/sound/sound-card-common.yaml       | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/sound-card-common.yaml b/Documentation/devicetree/bindings/sound/sound-card-common.yaml
index 3a941177f684..721950f65748 100644
--- a/Documentation/devicetree/bindings/sound/sound-card-common.yaml
+++ b/Documentation/devicetree/bindings/sound/sound-card-common.yaml
@@ -17,6 +17,13 @@ properties:
       pair of strings, the first being the connection's sink, the second
       being the connection's source.
 
+  ignore-suspend-widgets:
+    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+    description: |
+      A list of audio sound widgets which are marked ignoring system suspend.
+      Paths between these endpoints are still active over suspend of the main
+      application processor that the current operating system is running.
+
   model:
     $ref: /schemas/types.yaml#/definitions/string
     description: User specified audio sound card name
-- 
2.25.1


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

* [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend
@ 2023-10-23  2:07 ` Chancel Liu
  0 siblings, 0 replies; 13+ messages in thread
From: Chancel Liu @ 2023-10-23  2:07 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel
  Cc: Chancel Liu

Add a property to list audio sound widgets which are marked ignoring
system suspend. Paths between these endpoints are still active over
suspend of the main application processor that the current operating
system is running.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 .../devicetree/bindings/sound/sound-card-common.yaml       | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/sound-card-common.yaml b/Documentation/devicetree/bindings/sound/sound-card-common.yaml
index 3a941177f684..721950f65748 100644
--- a/Documentation/devicetree/bindings/sound/sound-card-common.yaml
+++ b/Documentation/devicetree/bindings/sound/sound-card-common.yaml
@@ -17,6 +17,13 @@ properties:
       pair of strings, the first being the connection's sink, the second
       being the connection's source.
 
+  ignore-suspend-widgets:
+    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+    description: |
+      A list of audio sound widgets which are marked ignoring system suspend.
+      Paths between these endpoints are still active over suspend of the main
+      application processor that the current operating system is running.
+
   model:
     $ref: /schemas/types.yaml#/definitions/string
     description: User specified audio sound card name
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v4 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode
  2023-10-23  2:07 ` Chancel Liu
@ 2023-10-23  2:07   ` Chancel Liu
  -1 siblings, 0 replies; 13+ messages in thread
From: Chancel Liu @ 2023-10-23  2:07 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel
  Cc: Chancel Liu

Low power audio mode requires binding codec still power on while Acore
enters into suspend so Mcore can continue playback music.

ASoC machine driver acquires DAPM endpoints through reading
"ignore-suspend-widgets" property from DT and then forces the path
between these endpoints ignoring suspend.

If the rpmsg sound card is in low power audio mode, the suspend/resume
callback of binding codec is overridden to disable the suspend/resume.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 sound/soc/fsl/imx-rpmsg.c | 58 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c
index a9324712e3fa..e5bd63dab10c 100644
--- a/sound/soc/fsl/imx-rpmsg.c
+++ b/sound/soc/fsl/imx-rpmsg.c
@@ -20,8 +20,11 @@ struct imx_rpmsg {
 	struct snd_soc_dai_link dai;
 	struct snd_soc_card card;
 	unsigned long sysclk;
+	bool lpa;
 };
 
+static struct dev_pm_ops lpa_pm;
+
 static const struct snd_soc_dapm_widget imx_rpmsg_dapm_widgets[] = {
 	SND_SOC_DAPM_HP("Headphone Jack", NULL),
 	SND_SOC_DAPM_SPK("Ext Spk", NULL),
@@ -38,6 +41,58 @@ static int imx_rpmsg_late_probe(struct snd_soc_card *card)
 	struct device *dev = card->dev;
 	int ret;
 
+	if (data->lpa) {
+		struct snd_soc_component *codec_comp;
+		struct device_node *codec_np;
+		struct device_driver *codec_drv;
+		struct device *codec_dev = NULL;
+
+		codec_np = data->dai.codecs->of_node;
+		if (codec_np) {
+			struct platform_device *codec_pdev;
+			struct i2c_client *codec_i2c;
+
+			codec_i2c = of_find_i2c_device_by_node(codec_np);
+			if (codec_i2c)
+				codec_dev = &codec_i2c->dev;
+			if (!codec_dev) {
+				codec_pdev = of_find_device_by_node(codec_np);
+				if (codec_pdev)
+					codec_dev = &codec_pdev->dev;
+			}
+		}
+		if (codec_dev) {
+			codec_comp = snd_soc_lookup_component_nolocked(codec_dev, NULL);
+			if (codec_comp) {
+				int i, num_widgets;
+				const char *widgets;
+				struct snd_soc_dapm_context *dapm;
+
+				num_widgets = of_property_count_strings(data->card.dev->of_node,
+									"ignore-suspend-widgets");
+				for (i = 0; i < num_widgets; i++) {
+					of_property_read_string_index(data->card.dev->of_node,
+								      "ignore-suspend-widgets",
+								      i, &widgets);
+					dapm = snd_soc_component_get_dapm(codec_comp);
+					snd_soc_dapm_ignore_suspend(dapm, widgets);
+				}
+			}
+			codec_drv = codec_dev->driver;
+			if (codec_drv->pm) {
+				memcpy(&lpa_pm, codec_drv->pm, sizeof(lpa_pm));
+				lpa_pm.suspend = NULL;
+				lpa_pm.resume = NULL;
+				lpa_pm.freeze = NULL;
+				lpa_pm.thaw = NULL;
+				lpa_pm.poweroff = NULL;
+				lpa_pm.restore = NULL;
+				codec_drv->pm = &lpa_pm;
+			}
+			put_device(codec_dev);
+		}
+	}
+
 	if (!data->sysclk)
 		return 0;
 
@@ -137,6 +192,9 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
 		goto fail;
 	}
 
+	if (of_property_read_bool(np, "fsl,enable-lpa"))
+		data->lpa = true;
+
 	data->card.dev = &pdev->dev;
 	data->card.owner = THIS_MODULE;
 	data->card.dapm_widgets = imx_rpmsg_dapm_widgets;
-- 
2.25.1


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

* [PATCH v4 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode
@ 2023-10-23  2:07   ` Chancel Liu
  0 siblings, 0 replies; 13+ messages in thread
From: Chancel Liu @ 2023-10-23  2:07 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel
  Cc: Chancel Liu

Low power audio mode requires binding codec still power on while Acore
enters into suspend so Mcore can continue playback music.

ASoC machine driver acquires DAPM endpoints through reading
"ignore-suspend-widgets" property from DT and then forces the path
between these endpoints ignoring suspend.

If the rpmsg sound card is in low power audio mode, the suspend/resume
callback of binding codec is overridden to disable the suspend/resume.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 sound/soc/fsl/imx-rpmsg.c | 58 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c
index a9324712e3fa..e5bd63dab10c 100644
--- a/sound/soc/fsl/imx-rpmsg.c
+++ b/sound/soc/fsl/imx-rpmsg.c
@@ -20,8 +20,11 @@ struct imx_rpmsg {
 	struct snd_soc_dai_link dai;
 	struct snd_soc_card card;
 	unsigned long sysclk;
+	bool lpa;
 };
 
+static struct dev_pm_ops lpa_pm;
+
 static const struct snd_soc_dapm_widget imx_rpmsg_dapm_widgets[] = {
 	SND_SOC_DAPM_HP("Headphone Jack", NULL),
 	SND_SOC_DAPM_SPK("Ext Spk", NULL),
@@ -38,6 +41,58 @@ static int imx_rpmsg_late_probe(struct snd_soc_card *card)
 	struct device *dev = card->dev;
 	int ret;
 
+	if (data->lpa) {
+		struct snd_soc_component *codec_comp;
+		struct device_node *codec_np;
+		struct device_driver *codec_drv;
+		struct device *codec_dev = NULL;
+
+		codec_np = data->dai.codecs->of_node;
+		if (codec_np) {
+			struct platform_device *codec_pdev;
+			struct i2c_client *codec_i2c;
+
+			codec_i2c = of_find_i2c_device_by_node(codec_np);
+			if (codec_i2c)
+				codec_dev = &codec_i2c->dev;
+			if (!codec_dev) {
+				codec_pdev = of_find_device_by_node(codec_np);
+				if (codec_pdev)
+					codec_dev = &codec_pdev->dev;
+			}
+		}
+		if (codec_dev) {
+			codec_comp = snd_soc_lookup_component_nolocked(codec_dev, NULL);
+			if (codec_comp) {
+				int i, num_widgets;
+				const char *widgets;
+				struct snd_soc_dapm_context *dapm;
+
+				num_widgets = of_property_count_strings(data->card.dev->of_node,
+									"ignore-suspend-widgets");
+				for (i = 0; i < num_widgets; i++) {
+					of_property_read_string_index(data->card.dev->of_node,
+								      "ignore-suspend-widgets",
+								      i, &widgets);
+					dapm = snd_soc_component_get_dapm(codec_comp);
+					snd_soc_dapm_ignore_suspend(dapm, widgets);
+				}
+			}
+			codec_drv = codec_dev->driver;
+			if (codec_drv->pm) {
+				memcpy(&lpa_pm, codec_drv->pm, sizeof(lpa_pm));
+				lpa_pm.suspend = NULL;
+				lpa_pm.resume = NULL;
+				lpa_pm.freeze = NULL;
+				lpa_pm.thaw = NULL;
+				lpa_pm.poweroff = NULL;
+				lpa_pm.restore = NULL;
+				codec_drv->pm = &lpa_pm;
+			}
+			put_device(codec_dev);
+		}
+	}
+
 	if (!data->sysclk)
 		return 0;
 
@@ -137,6 +192,9 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
 		goto fail;
 	}
 
+	if (of_property_read_bool(np, "fsl,enable-lpa"))
+		data->lpa = true;
+
 	data->card.dev = &pdev->dev;
 	data->card.owner = THIS_MODULE;
 	data->card.dapm_widgets = imx_rpmsg_dapm_widgets;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend
  2023-10-23  2:07 ` Chancel Liu
  (?)
@ 2023-10-26 17:58   ` Rob Herring
  -1 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-10-26 17:58 UTC (permalink / raw)
  To: Chancel Liu
  Cc: lgirdwood, broonie, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel

On Mon, Oct 23, 2023 at 10:07:17AM +0800, Chancel Liu wrote:
> Add a property to list audio sound widgets which are marked ignoring
> system suspend. Paths between these endpoints are still active over
> suspend of the main application processor that the current operating
> system is running.

Perhaps it would be better to define components used for low power 
audio rather than the OS mode that gets used. Isn't LPA just audio 
handling that doesn't require the OS CPU to be involved? So the state of 
the CPU is kind of orthogonal.

Rob

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

* Re: [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend
@ 2023-10-26 17:58   ` Rob Herring
  0 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-10-26 17:58 UTC (permalink / raw)
  To: Chancel Liu
  Cc: devicetree, conor+dt, linuxppc-dev, kernel, alsa-devel,
	Xiubo.Lee, festevam, s.hauer, tiwai, lgirdwood, perex,
	nicoleotsuka, broonie, linux-arm-kernel, krzysztof.kozlowski+dt,
	shawnguo, shengjiu.wang, linux-kernel

On Mon, Oct 23, 2023 at 10:07:17AM +0800, Chancel Liu wrote:
> Add a property to list audio sound widgets which are marked ignoring
> system suspend. Paths between these endpoints are still active over
> suspend of the main application processor that the current operating
> system is running.

Perhaps it would be better to define components used for low power 
audio rather than the OS mode that gets used. Isn't LPA just audio 
handling that doesn't require the OS CPU to be involved? So the state of 
the CPU is kind of orthogonal.

Rob

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

* Re: [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend
@ 2023-10-26 17:58   ` Rob Herring
  0 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-10-26 17:58 UTC (permalink / raw)
  To: Chancel Liu
  Cc: lgirdwood, broonie, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel

On Mon, Oct 23, 2023 at 10:07:17AM +0800, Chancel Liu wrote:
> Add a property to list audio sound widgets which are marked ignoring
> system suspend. Paths between these endpoints are still active over
> suspend of the main application processor that the current operating
> system is running.

Perhaps it would be better to define components used for low power 
audio rather than the OS mode that gets used. Isn't LPA just audio 
handling that doesn't require the OS CPU to be involved? So the state of 
the CPU is kind of orthogonal.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend
  2023-10-26 17:58   ` Rob Herring
  (?)
@ 2023-10-26 18:11     ` Mark Brown
  -1 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2023-10-26 18:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: Chancel Liu, lgirdwood, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

On Thu, Oct 26, 2023 at 12:58:42PM -0500, Rob Herring wrote:
> On Mon, Oct 23, 2023 at 10:07:17AM +0800, Chancel Liu wrote:

> > Add a property to list audio sound widgets which are marked ignoring
> > system suspend. Paths between these endpoints are still active over
> > suspend of the main application processor that the current operating
> > system is running.

> Perhaps it would be better to define components used for low power 
> audio rather than the OS mode that gets used. Isn't LPA just audio 
> handling that doesn't require the OS CPU to be involved? So the state of 
> the CPU is kind of orthogonal.

Not really - you can have bypass paths that don't touch the AP but which
will have the power cut if the AP goes into suspend and it can be a
system integration decision which components that will be true for.
Often it's an inflexible PMIC/MCU setup managing the lowest system power
states.  The pure low power audio bit we should already be able to
figure out.

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

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

* Re: [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend
@ 2023-10-26 18:11     ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2023-10-26 18:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, conor+dt, linuxppc-dev, kernel, alsa-devel,
	Xiubo.Lee, festevam, s.hauer, tiwai, lgirdwood, perex,
	nicoleotsuka, Chancel Liu, linux-arm-kernel,
	krzysztof.kozlowski+dt, shawnguo, shengjiu.wang, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

On Thu, Oct 26, 2023 at 12:58:42PM -0500, Rob Herring wrote:
> On Mon, Oct 23, 2023 at 10:07:17AM +0800, Chancel Liu wrote:

> > Add a property to list audio sound widgets which are marked ignoring
> > system suspend. Paths between these endpoints are still active over
> > suspend of the main application processor that the current operating
> > system is running.

> Perhaps it would be better to define components used for low power 
> audio rather than the OS mode that gets used. Isn't LPA just audio 
> handling that doesn't require the OS CPU to be involved? So the state of 
> the CPU is kind of orthogonal.

Not really - you can have bypass paths that don't touch the AP but which
will have the power cut if the AP goes into suspend and it can be a
system integration decision which components that will be true for.
Often it's an inflexible PMIC/MCU setup managing the lowest system power
states.  The pure low power audio bit we should already be able to
figure out.

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

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

* Re: [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend
@ 2023-10-26 18:11     ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2023-10-26 18:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: Chancel Liu, lgirdwood, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel


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

On Thu, Oct 26, 2023 at 12:58:42PM -0500, Rob Herring wrote:
> On Mon, Oct 23, 2023 at 10:07:17AM +0800, Chancel Liu wrote:

> > Add a property to list audio sound widgets which are marked ignoring
> > system suspend. Paths between these endpoints are still active over
> > suspend of the main application processor that the current operating
> > system is running.

> Perhaps it would be better to define components used for low power 
> audio rather than the OS mode that gets used. Isn't LPA just audio 
> handling that doesn't require the OS CPU to be involved? So the state of 
> the CPU is kind of orthogonal.

Not really - you can have bypass paths that don't touch the AP but which
will have the power cut if the AP goes into suspend and it can be a
system integration decision which components that will be true for.
Often it's an inflexible PMIC/MCU setup managing the lowest system power
states.  The pure low power audio bit we should already be able to
figure out.

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

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v4 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode
  2023-10-23  2:07   ` Chancel Liu
  (?)
@ 2023-11-20 22:07     ` Mark Brown
  -1 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2023-11-20 22:07 UTC (permalink / raw)
  To: Chancel Liu
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On Mon, Oct 23, 2023 at 10:07:18AM +0800, Chancel Liu wrote:
> Low power audio mode requires binding codec still power on while Acore
> enters into suspend so Mcore can continue playback music.
> 
> ASoC machine driver acquires DAPM endpoints through reading
> "ignore-suspend-widgets" property from DT and then forces the path
> between these endpoints ignoring suspend.

This breaks an x86 allmodconfig build:

/build/stage/linux/sound/soc/fsl/imx-rpmsg.c: In function ‘imx_rpmsg_late_probe’
:
/build/stage/linux/sound/soc/fsl/imx-rpmsg.c:60:46: error: implicit declaration 
of function ‘of_find_device_by_node’; did you mean ‘of_find_i2c_device_by_node’?
 [-Werror=implicit-function-declaration]
   60 |                                 codec_pdev = of_find_device_by_node(code
c_np);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~
      |                                              of_find_i2c_device_by_node
/build/stage/linux/sound/soc/fsl/imx-rpmsg.c:60:44: error: assignment to ‘struct
 platform_device *’ from ‘int’ makes pointer from integer without a cast [-Werro
r=int-conversion]
   60 |                                 codec_pdev = of_find_device_by_node(codec_np);
      |                                            ^
cc1: all warnings being treated as errors

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

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

* Re: [PATCH v4 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode
@ 2023-11-20 22:07     ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2023-11-20 22:07 UTC (permalink / raw)
  To: Chancel Liu
  Cc: devicetree, conor+dt, linuxppc-dev, kernel, alsa-devel,
	Xiubo.Lee, festevam, s.hauer, tiwai, lgirdwood, perex,
	nicoleotsuka, robh+dt, linux-arm-kernel, krzysztof.kozlowski+dt,
	shawnguo, shengjiu.wang, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On Mon, Oct 23, 2023 at 10:07:18AM +0800, Chancel Liu wrote:
> Low power audio mode requires binding codec still power on while Acore
> enters into suspend so Mcore can continue playback music.
> 
> ASoC machine driver acquires DAPM endpoints through reading
> "ignore-suspend-widgets" property from DT and then forces the path
> between these endpoints ignoring suspend.

This breaks an x86 allmodconfig build:

/build/stage/linux/sound/soc/fsl/imx-rpmsg.c: In function ‘imx_rpmsg_late_probe’
:
/build/stage/linux/sound/soc/fsl/imx-rpmsg.c:60:46: error: implicit declaration 
of function ‘of_find_device_by_node’; did you mean ‘of_find_i2c_device_by_node’?
 [-Werror=implicit-function-declaration]
   60 |                                 codec_pdev = of_find_device_by_node(code
c_np);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~
      |                                              of_find_i2c_device_by_node
/build/stage/linux/sound/soc/fsl/imx-rpmsg.c:60:44: error: assignment to ‘struct
 platform_device *’ from ‘int’ makes pointer from integer without a cast [-Werro
r=int-conversion]
   60 |                                 codec_pdev = of_find_device_by_node(codec_np);
      |                                            ^
cc1: all warnings being treated as errors

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

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

* Re: [PATCH v4 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode
@ 2023-11-20 22:07     ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2023-11-20 22:07 UTC (permalink / raw)
  To: Chancel Liu
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, perex, tiwai,
	shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
	linuxppc-dev, devicetree, linux-arm-kernel


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

On Mon, Oct 23, 2023 at 10:07:18AM +0800, Chancel Liu wrote:
> Low power audio mode requires binding codec still power on while Acore
> enters into suspend so Mcore can continue playback music.
> 
> ASoC machine driver acquires DAPM endpoints through reading
> "ignore-suspend-widgets" property from DT and then forces the path
> between these endpoints ignoring suspend.

This breaks an x86 allmodconfig build:

/build/stage/linux/sound/soc/fsl/imx-rpmsg.c: In function ‘imx_rpmsg_late_probe’
:
/build/stage/linux/sound/soc/fsl/imx-rpmsg.c:60:46: error: implicit declaration 
of function ‘of_find_device_by_node’; did you mean ‘of_find_i2c_device_by_node’?
 [-Werror=implicit-function-declaration]
   60 |                                 codec_pdev = of_find_device_by_node(code
c_np);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~
      |                                              of_find_i2c_device_by_node
/build/stage/linux/sound/soc/fsl/imx-rpmsg.c:60:44: error: assignment to ‘struct
 platform_device *’ from ‘int’ makes pointer from integer without a cast [-Werro
r=int-conversion]
   60 |                                 codec_pdev = of_find_device_by_node(codec_np);
      |                                            ^
cc1: all warnings being treated as errors

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

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-11-20 22:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23  2:07 [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend Chancel Liu
2023-10-23  2:07 ` Chancel Liu
2023-10-23  2:07 ` [PATCH v4 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode Chancel Liu
2023-10-23  2:07   ` Chancel Liu
2023-11-20 22:07   ` Mark Brown
2023-11-20 22:07     ` Mark Brown
2023-11-20 22:07     ` Mark Brown
2023-10-26 17:58 ` [PATCH v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend Rob Herring
2023-10-26 17:58   ` Rob Herring
2023-10-26 17:58   ` Rob Herring
2023-10-26 18:11   ` Mark Brown
2023-10-26 18:11     ` Mark Brown
2023-10-26 18:11     ` Mark Brown

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.