* [PATCH] ASoC: mediatek: mt8192-mt6359: Set the driver name for the card
@ 2022-09-29 20:54 Nícolas F. R. A. Prado
2022-09-30 8:31 ` AngeloGioacchino Del Regno
2022-09-30 10:33 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-09-29 20:54 UTC (permalink / raw)
To: Mark Brown
Cc: kernel, Jaroslav Kysela, AngeloGioacchino Del Regno,
Nícolas F. R. A. Prado, Akihiko Odaki, Jiaxin Yu,
Liam Girdwood, Matthias Brugger, Miaoqian Lin, Takashi Iwai,
Tzung-Bi Shih, alsa-devel, linux-arm-kernel, linux-kernel,
linux-mediatek
The ASoC core automatically populates the driver name field in the card
from the card name if left unset. However, since the driver name can be
at most 16 characters long, wrapping will happen if the card name is
longer, which is the case for the mt8192-mt6359 driver.
Explicitly set the driver name for the card in order to avoid said
wrapping and have a readable driver name exposed to userspace.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
Issue noticed while upstreaming the UCM file for this driver [1].
[1] https://github.com/alsa-project/alsa-ucm-conf/pull/217
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
index ff40ccd36f7e..b93c3237ef2d 100644
--- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
+++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
@@ -24,6 +24,8 @@
#include "mt8192-afe-clk.h"
#include "mt8192-afe-gpio.h"
+#define DRIVER_NAME "mt8192_mt6359"
+
#define RT1015_CODEC_DAI "rt1015-aif"
#define RT1015_DEV0_NAME "rt1015.1-0028"
#define RT1015_DEV1_NAME "rt1015.1-0029"
@@ -1070,6 +1072,7 @@ static struct snd_soc_codec_conf rt1015_amp_conf[] = {
static struct snd_soc_card mt8192_mt6359_rt1015_rt5682_card = {
.name = RT1015_RT5682_CARD_NAME,
+ .driver_name = DRIVER_NAME,
.owner = THIS_MODULE,
.dai_link = mt8192_mt6359_dai_links,
.num_links = ARRAY_SIZE(mt8192_mt6359_dai_links),
@@ -1105,6 +1108,7 @@ static const struct snd_kcontrol_new mt8192_mt6359_rt1015p_rt5682x_controls[] =
};
static struct snd_soc_card mt8192_mt6359_rt1015p_rt5682x_card = {
+ .driver_name = DRIVER_NAME,
.owner = THIS_MODULE,
.dai_link = mt8192_mt6359_dai_links,
.num_links = ARRAY_SIZE(mt8192_mt6359_dai_links),
@@ -1266,7 +1270,7 @@ static const struct dev_pm_ops mt8192_mt6359_pm_ops = {
static struct platform_driver mt8192_mt6359_driver = {
.driver = {
- .name = "mt8192_mt6359",
+ .name = DRIVER_NAME,
#ifdef CONFIG_OF
.of_match_table = mt8192_mt6359_dt_match,
#endif
--
2.37.3
_______________________________________________
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] 3+ messages in thread
* Re: [PATCH] ASoC: mediatek: mt8192-mt6359: Set the driver name for the card
2022-09-29 20:54 [PATCH] ASoC: mediatek: mt8192-mt6359: Set the driver name for the card Nícolas F. R. A. Prado
@ 2022-09-30 8:31 ` AngeloGioacchino Del Regno
2022-09-30 10:33 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-30 8:31 UTC (permalink / raw)
To: Nícolas F. R. A. Prado, Mark Brown
Cc: kernel, Jaroslav Kysela, Akihiko Odaki, Jiaxin Yu, Liam Girdwood,
Matthias Brugger, Miaoqian Lin, Takashi Iwai, Tzung-Bi Shih,
alsa-devel, linux-arm-kernel, linux-kernel, linux-mediatek
Il 29/09/22 22:54, Nícolas F. R. A. Prado ha scritto:
> The ASoC core automatically populates the driver name field in the card
> from the card name if left unset. However, since the driver name can be
> at most 16 characters long, wrapping will happen if the card name is
> longer, which is the case for the mt8192-mt6359 driver.
>
> Explicitly set the driver name for the card in order to avoid said
> wrapping and have a readable driver name exposed to userspace.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
_______________________________________________
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] 3+ messages in thread
* Re: [PATCH] ASoC: mediatek: mt8192-mt6359: Set the driver name for the card
2022-09-29 20:54 [PATCH] ASoC: mediatek: mt8192-mt6359: Set the driver name for the card Nícolas F. R. A. Prado
2022-09-30 8:31 ` AngeloGioacchino Del Regno
@ 2022-09-30 10:33 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-09-30 10:33 UTC (permalink / raw)
To: Nícolas F. R. A. Prado
Cc: Liam Girdwood, linux-kernel, AngeloGioacchino Del Regno,
Miaoqian Lin, linux-arm-kernel, Jaroslav Kysela, alsa-devel,
Akihiko Odaki, Jiaxin Yu, Matthias Brugger, kernel,
Tzung-Bi Shih, Takashi Iwai, linux-mediatek
On Thu, 29 Sep 2022 16:54:53 -0400, Nícolas F. R. A. Prado wrote:
> The ASoC core automatically populates the driver name field in the card
> from the card name if left unset. However, since the driver name can be
> at most 16 characters long, wrapping will happen if the card name is
> longer, which is the case for the mt8192-mt6359 driver.
>
> Explicitly set the driver name for the card in order to avoid said
> wrapping and have a readable driver name exposed to userspace.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: mediatek: mt8192-mt6359: Set the driver name for the card
commit: 4674284aa74cfc6db0c54c16f9557ed8c3552409
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-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-30 10:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29 20:54 [PATCH] ASoC: mediatek: mt8192-mt6359: Set the driver name for the card Nícolas F. R. A. Prado
2022-09-30 8:31 ` AngeloGioacchino Del Regno
2022-09-30 10:33 ` 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).