linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: meson: cards: select SND_DYNAMIC_MINORS
@ 2024-04-26 13:41 Jerome Brunet
  2024-04-30 14:31 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Jerome Brunet @ 2024-04-26 13:41 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Jerome Brunet, alsa-devel, linux-kernel, linux-amlogic

Amlogic sound cards do create a lot of pcm interfaces, possibly more than
8. Some pcm interfaces are internal (like DPCM backends and c2c) and not
exposed to userspace.

Those interfaces still increase the number passed to snd_find_free_minor(),
which eventually exceeds 8 causing -EBUSY error on card registration if
CONFIG_SND_DYNAMIC_MINORS=n and the interface is exposed to userspace.

select CONFIG_SND_DYNAMIC_MINORS for Amlogic cards to avoid the problem.

Fixes: 7864a79f37b5 ("ASoC: meson: add axg sound card support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---

NOTE: This problem was found while toying with a minimal configuration
which disabled CONFIG_SND_DYNAMIC_MINORS and DT overlays. Overlays
prepend nodes instead of doing append. This changes the order in which
the links are parsed by the card driver, which in turn changes the pcm
numbers. The userpace pcm number then got over 8 triggering the problem.

 sound/soc/meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig
index b93ea33739f2..6458d5dc4902 100644
--- a/sound/soc/meson/Kconfig
+++ b/sound/soc/meson/Kconfig
@@ -99,6 +99,7 @@ config SND_MESON_AXG_PDM
 
 config SND_MESON_CARD_UTILS
 	tristate
+	select SND_DYNAMIC_MINORS
 
 config SND_MESON_CODEC_GLUE
 	tristate
-- 
2.43.0


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

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

* Re: [PATCH] ASoC: meson: cards: select SND_DYNAMIC_MINORS
  2024-04-26 13:41 [PATCH] ASoC: meson: cards: select SND_DYNAMIC_MINORS Jerome Brunet
@ 2024-04-30 14:31 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-04-30 14:31 UTC (permalink / raw)
  To: Liam Girdwood, Jerome Brunet; +Cc: alsa-devel, linux-kernel, linux-amlogic

On Fri, 26 Apr 2024 15:41:47 +0200, Jerome Brunet wrote:
> Amlogic sound cards do create a lot of pcm interfaces, possibly more than
> 8. Some pcm interfaces are internal (like DPCM backends and c2c) and not
> exposed to userspace.
> 
> Those interfaces still increase the number passed to snd_find_free_minor(),
> which eventually exceeds 8 causing -EBUSY error on card registration if
> CONFIG_SND_DYNAMIC_MINORS=n and the interface is exposed to userspace.
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: meson: cards: select SND_DYNAMIC_MINORS
      commit: 6db26f9ea4edd8a17d39ab3c20111e3ccd704aef

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


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

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

end of thread, other threads:[~2024-04-30 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26 13:41 [PATCH] ASoC: meson: cards: select SND_DYNAMIC_MINORS Jerome Brunet
2024-04-30 14:31 ` 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).