linux-sunxi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe
@ 2022-09-11 14:57 Mikhail Rudenko
  2022-09-11 14:57 ` [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Mikhail Rudenko @ 2022-09-11 14:57 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Kuninori Morimoto
  Cc: Mikhail Rudenko, alsa-devel, linux-arm-kernel, linux-sunxi, linux-kernel

In the case when a codec device is probed before codec analog
controls, snd_soc_register_card() returns -EPROBE_DEFER, resulting in
a misleading error message

    sun4i-codec 1c22c00.codec: Failed to register our card

even if the device is probed successfully later. Use dev_err_probe()
to demote the above error to a debug message.

Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
---
 sound/soc/sunxi/sun4i-codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 60712f24ade5..01b461c64d68 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1825,7 +1825,7 @@ static int sun4i_codec_probe(struct platform_device *pdev)
 
 	ret = snd_soc_register_card(card);
 	if (ret) {
-		dev_err(&pdev->dev, "Failed to register our card\n");
+		dev_err_probe(&pdev->dev, ret, "Failed to register our card\n");
 		goto err_assert_reset;
 	}
 
-- 
2.37.3


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

* [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component
  2022-09-11 14:57 [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
@ 2022-09-11 14:57 ` Mikhail Rudenko
  2022-09-12 16:15   ` Jernej Škrabec
  2022-09-13 16:04   ` Mark Brown
  2022-09-12 16:14 ` [PATCH " Jernej Škrabec
  2022-09-14  9:40 ` Mark Brown
  2 siblings, 2 replies; 9+ messages in thread
From: Mikhail Rudenko @ 2022-09-11 14:57 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Kuninori Morimoto
  Cc: Mikhail Rudenko, alsa-devel, linux-arm-kernel, linux-sunxi, linux-kernel

At present, succesfull probing of H3 Codec results in an error

    debugfs: Directory '1c22c00.codec' with parent 'H3 Audio Codec' already present!

This is caused by a directory name conflict between codec
components. Fix it by setting debugfs_prefix for the CPU DAI
component.

Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
---
 sound/soc/sunxi/sun4i-codec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 01b461c64d68..4d118f271e8c 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1253,6 +1253,7 @@ static const struct snd_soc_component_driver sun8i_a23_codec_codec = {
 
 static const struct snd_soc_component_driver sun4i_codec_component = {
 	.name = "sun4i-codec",
+	.debugfs_prefix = "dai",
 };
 
 #define SUN4I_CODEC_RATES	SNDRV_PCM_RATE_CONTINUOUS
-- 
2.37.3


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

* Re: [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe
  2022-09-11 14:57 [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
  2022-09-11 14:57 ` [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
@ 2022-09-12 16:14 ` Jernej Škrabec
  2022-09-14  9:40 ` Mark Brown
  2 siblings, 0 replies; 9+ messages in thread
From: Jernej Škrabec @ 2022-09-12 16:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Chen-Yu Tsai, Samuel Holland, Kuninori Morimoto, Mikhail Rudenko
  Cc: Mikhail Rudenko, alsa-devel, linux-arm-kernel, linux-sunxi, linux-kernel

Dne nedelja, 11. september 2022 ob 16:57:11 CEST je Mikhail Rudenko 
napisal(a):
> In the case when a codec device is probed before codec analog
> controls, snd_soc_register_card() returns -EPROBE_DEFER, resulting in
> a misleading error message
> 
>     sun4i-codec 1c22c00.codec: Failed to register our card
> 
> even if the device is probed successfully later. Use dev_err_probe()
> to demote the above error to a debug message.
> 
> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  sound/soc/sunxi/sun4i-codec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
> index 60712f24ade5..01b461c64d68 100644
> --- a/sound/soc/sunxi/sun4i-codec.c
> +++ b/sound/soc/sunxi/sun4i-codec.c
> @@ -1825,7 +1825,7 @@ static int sun4i_codec_probe(struct platform_device
> *pdev)
> 
>  	ret = snd_soc_register_card(card);
>  	if (ret) {
> -		dev_err(&pdev->dev, "Failed to register our card\n");
> +		dev_err_probe(&pdev->dev, ret, "Failed to register our 
card\n");
>  		goto err_assert_reset;
>  	}





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

* Re: [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component
  2022-09-11 14:57 ` [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
@ 2022-09-12 16:15   ` Jernej Škrabec
  2022-09-13 16:04   ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Jernej Škrabec @ 2022-09-12 16:15 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Chen-Yu Tsai, Samuel Holland, Kuninori Morimoto, Mikhail Rudenko
  Cc: Mikhail Rudenko, alsa-devel, linux-arm-kernel, linux-sunxi, linux-kernel

Dne nedelja, 11. september 2022 ob 16:57:12 CEST je Mikhail Rudenko 
napisal(a):
> At present, succesfull probing of H3 Codec results in an error
> 
>     debugfs: Directory '1c22c00.codec' with parent 'H3 Audio Codec' already
> present!
> 
> This is caused by a directory name conflict between codec
> components. Fix it by setting debugfs_prefix for the CPU DAI
> component.
> 
> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  sound/soc/sunxi/sun4i-codec.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
> index 01b461c64d68..4d118f271e8c 100644
> --- a/sound/soc/sunxi/sun4i-codec.c
> +++ b/sound/soc/sunxi/sun4i-codec.c
> @@ -1253,6 +1253,7 @@ static const struct snd_soc_component_driver
> sun8i_a23_codec_codec = {
> 
>  static const struct snd_soc_component_driver sun4i_codec_component = {
>  	.name = "sun4i-codec",
> +	.debugfs_prefix = "dai",
>  };
> 
>  #define SUN4I_CODEC_RATES	SNDRV_PCM_RATE_CONTINUOUS





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

* Re: [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component
  2022-09-11 14:57 ` [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
  2022-09-12 16:15   ` Jernej Škrabec
@ 2022-09-13 16:04   ` Mark Brown
  2022-09-13 21:22     ` [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
  1 sibling, 1 reply; 9+ messages in thread
From: Mark Brown @ 2022-09-13 16:04 UTC (permalink / raw)
  To: Mikhail Rudenko
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Kuninori Morimoto, alsa-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel

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

On Sun, Sep 11, 2022 at 05:57:12PM +0300, Mikhail Rudenko wrote:
> At present, succesfull probing of H3 Codec results in an error
> 
>     debugfs: Directory '1c22c00.codec' with parent 'H3 Audio Codec' already present!
> 
> This is caused by a directory name conflict between codec
> components. Fix it by setting debugfs_prefix for the CPU DAI
> component.

This doesn't apply against current code, please check and resend.

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

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

* [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe
  2022-09-13 16:04   ` Mark Brown
@ 2022-09-13 21:22     ` Mikhail Rudenko
  2022-09-13 21:22       ` [PATCH v2 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
  2022-09-19 23:10       ` [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mark Brown
  0 siblings, 2 replies; 9+ messages in thread
From: Mikhail Rudenko @ 2022-09-13 21:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Charles Keepax,
	Li Chen, Kuninori Morimoto
  Cc: Mikhail Rudenko, alsa-devel, linux-arm-kernel, linux-sunxi, linux-kernel

In the case when a codec device is probed before codec analog
controls, snd_soc_register_card() returns -EPROBE_DEFER, resulting in
a misleading error message

    sun4i-codec 1c22c00.codec: Failed to register our card

even if the device is probed successfully later. Use dev_err_probe()
to demote the above error to a debug message.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
---
changes in v2:
- rebase against current tree
- add Jernej's Acked-by

 sound/soc/sunxi/sun4i-codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 830beb38bf15..3a7075d03c23 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1804,7 +1804,7 @@ static int sun4i_codec_probe(struct platform_device *pdev)

 	ret = snd_soc_register_card(card);
 	if (ret) {
-		dev_err(&pdev->dev, "Failed to register our card\n");
+		dev_err_probe(&pdev->dev, ret, "Failed to register our card\n");
 		goto err_assert_reset;
 	}

--
2.37.3

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

* [PATCH v2 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component
  2022-09-13 21:22     ` [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
@ 2022-09-13 21:22       ` Mikhail Rudenko
  2022-09-19 23:10       ` [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Mikhail Rudenko @ 2022-09-13 21:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Charles Keepax,
	Li Chen, Kuninori Morimoto
  Cc: Mikhail Rudenko, alsa-devel, linux-arm-kernel, linux-sunxi, linux-kernel

At present, succesfull probing of H3 Codec results in an error

    debugfs: Directory '1c22c00.codec' with parent 'H3 Audio Codec' already present!

This is caused by a directory name conflict between codec
components. Fix it by setting debugfs_prefix for the CPU DAI
component.

Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
---
changes in v2:
- rebase against current tree
- add #ifdef CONFIG_DEBUG_FS guard
- change prefix from "dai" to more specific "cpu"

 sound/soc/sunxi/sun4i-codec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 3a7075d03c23..835dc3404367 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1232,6 +1232,9 @@ static const struct snd_soc_component_driver sun8i_a23_codec_codec = {
 static const struct snd_soc_component_driver sun4i_codec_component = {
 	.name			= "sun4i-codec",
 	.legacy_dai_naming	= 1,
+#ifdef CONFIG_DEBUG_FS
+	.debugfs_prefix		= "cpu",
+#endif
 };

 #define SUN4I_CODEC_RATES	SNDRV_PCM_RATE_CONTINUOUS
--
2.37.3

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

* Re: [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe
  2022-09-11 14:57 [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
  2022-09-11 14:57 ` [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
  2022-09-12 16:14 ` [PATCH " Jernej Škrabec
@ 2022-09-14  9:40 ` Mark Brown
  2 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2022-09-14  9:40 UTC (permalink / raw)
  To: Jaroslav Kysela, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Liam Girdwood, Kuninori Morimoto, Mikhail Rudenko, Takashi Iwai
  Cc: linux-kernel, linux-sunxi, alsa-devel, linux-arm-kernel

On Sun, 11 Sep 2022 17:57:11 +0300, Mikhail Rudenko wrote:
> In the case when a codec device is probed before codec analog
> controls, snd_soc_register_card() returns -EPROBE_DEFER, resulting in
> a misleading error message
> 
>     sun4i-codec 1c22c00.codec: Failed to register our card
> 
> even if the device is probed successfully later. Use dev_err_probe()
> to demote the above error to a debug message.
> 
> [...]

Applied to

   broonie/sound.git for-next

Thanks!

[1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe
      commit: 30248f618d30cf1ad9d5a72126799f2f0239860c
[2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component
      (no commit info)

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

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

* Re: [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe
  2022-09-13 21:22     ` [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
  2022-09-13 21:22       ` [PATCH v2 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
@ 2022-09-19 23:10       ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2022-09-19 23:10 UTC (permalink / raw)
  To: Kuninori Morimoto, Jaroslav Kysela, Jernej Skrabec,
	Charles Keepax, Liam Girdwood, Samuel Holland, Li Chen,
	Takashi Iwai, Chen-Yu Tsai, Mikhail Rudenko
  Cc: alsa-devel, linux-sunxi, linux-kernel, linux-arm-kernel

On Wed, 14 Sep 2022 00:22:54 +0300, Mikhail Rudenko wrote:
> In the case when a codec device is probed before codec analog
> controls, snd_soc_register_card() returns -EPROBE_DEFER, resulting in
> a misleading error message
> 
>     sun4i-codec 1c22c00.codec: Failed to register our card
> 
> even if the device is probed successfully later. Use dev_err_probe()
> to demote the above error to a debug message.
> 
> [...]

Applied to

   broonie/sound.git for-next

Thanks!

[1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe
      commit: 30248f618d30cf1ad9d5a72126799f2f0239860c
[2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component
      commit: 717a8ff20f32792d6a94f2883e771482c37d844b

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

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

end of thread, other threads:[~2022-09-19 23:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-11 14:57 [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
2022-09-11 14:57 ` [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
2022-09-12 16:15   ` Jernej Škrabec
2022-09-13 16:04   ` Mark Brown
2022-09-13 21:22     ` [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
2022-09-13 21:22       ` [PATCH v2 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
2022-09-19 23:10       ` [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mark Brown
2022-09-12 16:14 ` [PATCH " Jernej Škrabec
2022-09-14  9:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).