* [PATCH 0/2] Update SDCA Kconfig
@ 2025-07-10 16:34 Charles Keepax
2025-07-10 16:34 ` [PATCH 1/2] ASoC: SDCA: Kconfig/Makefile fixups Charles Keepax
2025-07-10 16:34 ` [PATCH 2/2] ASoC: SDCA: Pull HID and IRQ into the primary SDCA module Charles Keepax
0 siblings, 2 replies; 7+ messages in thread
From: Charles Keepax @ 2025-07-10 16:34 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, peter.ujfalusi,
arnd, patches, linux-sound
Tidy up a bunch of makefile and Kconfig things, and pull the HID and IRQ
into the main SDCA module.
Charles Keepax (2):
ASoC: SDCA: Kconfig/Makefile fixups
ASoC: SDCA: Pull HID and IRQ into the primary SDCA module
sound/soc/sdca/Kconfig | 15 ++++++++++-----
sound/soc/sdca/Makefile | 14 +++++++-------
sound/soc/sdca/sdca_functions.c | 1 -
sound/soc/sdca/sdca_hid.c | 2 +-
sound/soc/sdca/sdca_interrupts.c | 8 ++++----
5 files changed, 22 insertions(+), 18 deletions(-)
--
2.39.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] ASoC: SDCA: Kconfig/Makefile fixups
2025-07-10 16:34 [PATCH 0/2] Update SDCA Kconfig Charles Keepax
@ 2025-07-10 16:34 ` Charles Keepax
2025-07-11 5:58 ` Arnd Bergmann
2025-07-10 16:34 ` [PATCH 2/2] ASoC: SDCA: Pull HID and IRQ into the primary SDCA module Charles Keepax
1 sibling, 1 reply; 7+ messages in thread
From: Charles Keepax @ 2025-07-10 16:34 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, peter.ujfalusi,
arnd, patches, linux-sound
Tidy up a few bits of the SDCA Kconfig. Make the primary SDCA
symbol visible again, whilst this is selected directly in current
Intel systems it is not a given that is how other systems will use
the subsystem and a user can not directly disable the symbol if it
is being selected anyway.
Default both HID and IRQ to enabled, since typically if one wants
SDCA all the functionality will be expected.
Finally, update the IRQ support to match the changes made to the HID
support.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/sdca/Kconfig | 15 ++++++++++-----
sound/soc/sdca/Makefile | 10 ++++++----
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/sound/soc/sdca/Kconfig b/sound/soc/sdca/Kconfig
index 2253a300dcc3..7fd4cbba87bf 100644
--- a/sound/soc/sdca/Kconfig
+++ b/sound/soc/sdca/Kconfig
@@ -2,25 +2,30 @@
menu "SoundWire (SDCA)"
config SND_SOC_SDCA
- tristate
+ tristate "SDCA support"
depends on ACPI
help
This option enables support for the MIPI SoundWire Device
Class for Audio (SDCA).
-config SND_SOC_SDCA_OPTIONAL
- def_tristate SND_SOC_SDCA || !SND_SOC_SDCA
-
config SND_SOC_SDCA_HID
bool "SDCA HID support"
depends on SND_SOC_SDCA
depends on HID=y || HID=SND_SOC_SDCA
+ default y
+ help
+ This option enables support for audio jack button reporting using HID.
config SND_SOC_SDCA_IRQ
- tristate
+ bool "SDCA IRQ support"
select REGMAP
select REGMAP_IRQ
+ depends on SND_SOC_SDCA
+ default y
help
This option enables support for SDCA IRQs.
+config SND_SOC_SDCA_OPTIONAL
+ def_tristate SND_SOC_SDCA || !SND_SOC_SDCA
+
endmenu
diff --git a/sound/soc/sdca/Makefile b/sound/soc/sdca/Makefile
index 1efc869c6cbc..58a8f3ef3feb 100644
--- a/sound/soc/sdca/Makefile
+++ b/sound/soc/sdca/Makefile
@@ -1,11 +1,13 @@
# SPDX-License-Identifier: GPL-2.0-only
-snd-soc-sdca-y := sdca_functions.o sdca_device.o sdca_regmap.o sdca_asoc.o
+snd-soc-sdca-y := sdca_functions.o sdca_device.o sdca_regmap.o sdca_asoc.o
snd-soc-sdca-hid-y := sdca_hid.o
snd-soc-sdca-irq-y := sdca_interrupts.o
-obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o
+obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o
ifdef CONFIG_SND_SOC_SDCA_HID
-obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-hid.o
+obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-hid.o
+endif
+ifdef CONFIG_SND_SOC_SDCA_IRQ
+obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-irq.o
endif
-obj-$(CONFIG_SND_SOC_SDCA_IRQ) += snd-soc-sdca-irq.o
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] ASoC: SDCA: Pull HID and IRQ into the primary SDCA module
2025-07-10 16:34 [PATCH 0/2] Update SDCA Kconfig Charles Keepax
2025-07-10 16:34 ` [PATCH 1/2] ASoC: SDCA: Kconfig/Makefile fixups Charles Keepax
@ 2025-07-10 16:34 ` Charles Keepax
2025-07-11 5:44 ` Arnd Bergmann
1 sibling, 1 reply; 7+ messages in thread
From: Charles Keepax @ 2025-07-10 16:34 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, peter.ujfalusi,
arnd, patches, linux-sound
If the HID or the IRQ are selected as options they will always require
loading alongside the main SDCA module. Since it will never be possible
to run without them the value of keeping them as separate modules is
fairly limited. Pull them into the main SDCA module to simplify things
still further.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/sdca/Makefile | 10 ++++------
sound/soc/sdca/sdca_functions.c | 1 -
sound/soc/sdca/sdca_hid.c | 2 +-
sound/soc/sdca/sdca_interrupts.c | 8 ++++----
4 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/sound/soc/sdca/Makefile b/sound/soc/sdca/Makefile
index 58a8f3ef3feb..08f87eb6746d 100644
--- a/sound/soc/sdca/Makefile
+++ b/sound/soc/sdca/Makefile
@@ -1,13 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-only
snd-soc-sdca-y := sdca_functions.o sdca_device.o sdca_regmap.o sdca_asoc.o
-snd-soc-sdca-hid-y := sdca_hid.o
-snd-soc-sdca-irq-y := sdca_interrupts.o
-
-obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o
ifdef CONFIG_SND_SOC_SDCA_HID
-obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-hid.o
+snd-soc-sdca-y += sdca_hid.o
endif
ifdef CONFIG_SND_SOC_SDCA_IRQ
-obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-irq.o
+snd-soc-sdca-y += sdca_interrupts.o
endif
+
+obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o
diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
index c34f3bf62983..be09b7a34102 100644
--- a/sound/soc/sdca/sdca_functions.c
+++ b/sound/soc/sdca/sdca_functions.c
@@ -1943,4 +1943,3 @@ EXPORT_SYMBOL_NS(sdca_parse_function, "SND_SOC_SDCA");
MODULE_LICENSE("Dual BSD/GPL");
MODULE_DESCRIPTION("SDCA library");
-MODULE_IMPORT_NS("SND_SOC_SDCA_HID");
diff --git a/sound/soc/sdca/sdca_hid.c b/sound/soc/sdca/sdca_hid.c
index b227ad94d08f..2224ade59aff 100644
--- a/sound/soc/sdca/sdca_hid.c
+++ b/sound/soc/sdca/sdca_hid.c
@@ -121,7 +121,7 @@ int sdca_add_hid_device(struct device *dev, struct sdca_entity *entity)
return 0;
}
-EXPORT_SYMBOL_NS(sdca_add_hid_device, "SND_SOC_SDCA_HID");
+EXPORT_SYMBOL_NS(sdca_add_hid_device, "SND_SOC_SDCA");
MODULE_LICENSE("Dual BSD/GPL");
MODULE_DESCRIPTION("SDCA HID library");
diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c
index edb045c7ebb0..2f85fcc6e544 100644
--- a/sound/soc/sdca/sdca_interrupts.c
+++ b/sound/soc/sdca/sdca_interrupts.c
@@ -279,7 +279,7 @@ int sdca_irq_request(struct device *dev, struct sdca_interrupt_info *info,
return 0;
}
-EXPORT_SYMBOL_NS_GPL(sdca_irq_request, "SND_SOC_SDCA_IRQ");
+EXPORT_SYMBOL_NS_GPL(sdca_irq_request, "SND_SOC_SDCA");
/**
* sdca_irq_data_populate - Populate common interrupt data
@@ -313,7 +313,7 @@ int sdca_irq_data_populate(struct snd_soc_component *component,
return 0;
}
-EXPORT_SYMBOL_NS_GPL(sdca_irq_data_populate, "SND_SOC_SDCA_IRQ");
+EXPORT_SYMBOL_NS_GPL(sdca_irq_data_populate, "SND_SOC_SDCA");
/**
* sdca_irq_populate - Request all the individual IRQs for an SDCA Function
@@ -393,7 +393,7 @@ int sdca_irq_populate(struct sdca_function_data *function,
return 0;
}
-EXPORT_SYMBOL_NS_GPL(sdca_irq_populate, "SND_SOC_SDCA_IRQ");
+EXPORT_SYMBOL_NS_GPL(sdca_irq_populate, "SND_SOC_SDCA");
/**
* sdca_irq_allocate - allocate an SDCA interrupt structure for a device
@@ -433,7 +433,7 @@ struct sdca_interrupt_info *sdca_irq_allocate(struct device *dev,
return info;
}
-EXPORT_SYMBOL_NS_GPL(sdca_irq_allocate, "SND_SOC_SDCA_IRQ");
+EXPORT_SYMBOL_NS_GPL(sdca_irq_allocate, "SND_SOC_SDCA");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SDCA IRQ library");
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] ASoC: SDCA: Pull HID and IRQ into the primary SDCA module
2025-07-10 16:34 ` [PATCH 2/2] ASoC: SDCA: Pull HID and IRQ into the primary SDCA module Charles Keepax
@ 2025-07-11 5:44 ` Arnd Bergmann
2025-07-11 8:34 ` Charles Keepax
0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2025-07-11 5:44 UTC (permalink / raw)
To: Charles Keepax, Mark Brown
Cc: lgirdwood, Bard Liao, Pierre-Louis Bossart, Peter Ujfalusi,
patches, linux-sound
On Thu, Jul 10, 2025, at 18:34, Charles Keepax wrote:
> -obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o
> ifdef CONFIG_SND_SOC_SDCA_HID
> -obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-hid.o
> +snd-soc-sdca-y += sdca_hid.o
> endif
> ifdef CONFIG_SND_SOC_SDCA_IRQ
> -obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-irq.o
> +snd-soc-sdca-y += sdca_interrupts.o
> endif
Since these are now both 'bool' options, you could write
this more concisely as
snd-soc-sdca-$(CONFIG_SND_SOC_SDCA_HID) += sdca_hid.o
snd-soc-sdca-$(CONFIG_SND_SOC_SDCA_IRQ) += sdca_interrupts.o
Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] ASoC: SDCA: Kconfig/Makefile fixups
2025-07-10 16:34 ` [PATCH 1/2] ASoC: SDCA: Kconfig/Makefile fixups Charles Keepax
@ 2025-07-11 5:58 ` Arnd Bergmann
2025-07-11 8:34 ` Charles Keepax
0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2025-07-11 5:58 UTC (permalink / raw)
To: Charles Keepax, Mark Brown
Cc: lgirdwood, Bard Liao, Pierre-Louis Bossart, Peter Ujfalusi,
patches, linux-sound
On Thu, Jul 10, 2025, at 18:34, Charles Keepax wrote:
> Tidy up a few bits of the SDCA Kconfig. Make the primary SDCA
> symbol visible again, whilst this is selected directly in current
> Intel systems it is not a given that is how other systems will use
> the subsystem and a user can not directly disable the symbol if it
> is being selected anyway.
I'm not sure that making this one visible is a good idea even
if I don't see any immediate bug as a result.
In general, I think symbols should be either user-visible or
get selected by other drivers, mixing the two tends to cause
additional problems.
Would it be possible to just not select SND_SOC_SDCA from
drivers that can use it and require users to enable it
manually, or does that not work? I assume there would be
a link failure with SND_SOC_ACPI_INTEL_SDCA_QUIRKS=y
and SND_SOC_SDCA=m?
Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] ASoC: SDCA: Kconfig/Makefile fixups
2025-07-11 5:58 ` Arnd Bergmann
@ 2025-07-11 8:34 ` Charles Keepax
0 siblings, 0 replies; 7+ messages in thread
From: Charles Keepax @ 2025-07-11 8:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mark Brown, lgirdwood, Bard Liao, Pierre-Louis Bossart,
Peter Ujfalusi, patches, linux-sound
On Fri, Jul 11, 2025 at 07:58:14AM +0200, Arnd Bergmann wrote:
> On Thu, Jul 10, 2025, at 18:34, Charles Keepax wrote:
> > Tidy up a few bits of the SDCA Kconfig. Make the primary SDCA
> > symbol visible again, whilst this is selected directly in current
> > Intel systems it is not a given that is how other systems will use
> > the subsystem and a user can not directly disable the symbol if it
> > is being selected anyway.
>
> I'm not sure that making this one visible is a good idea even
> if I don't see any immediate bug as a result.
> In general, I think symbols should be either user-visible or
> get selected by other drivers, mixing the two tends to cause
> additional problems.
>
> Would it be possible to just not select SND_SOC_SDCA from
> drivers that can use it and require users to enable it
> manually, or does that not work? I assume there would be
> a link failure with SND_SOC_ACPI_INTEL_SDCA_QUIRKS=y
> and SND_SOC_SDCA=m?
Certainly nothing needs it right now, so I will drop that part of
the patch for v2.
Thanks,
Charles
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] ASoC: SDCA: Pull HID and IRQ into the primary SDCA module
2025-07-11 5:44 ` Arnd Bergmann
@ 2025-07-11 8:34 ` Charles Keepax
0 siblings, 0 replies; 7+ messages in thread
From: Charles Keepax @ 2025-07-11 8:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mark Brown, lgirdwood, Bard Liao, Pierre-Louis Bossart,
Peter Ujfalusi, patches, linux-sound
On Fri, Jul 11, 2025 at 07:44:56AM +0200, Arnd Bergmann wrote:
> On Thu, Jul 10, 2025, at 18:34, Charles Keepax wrote:
> > -obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o
> > ifdef CONFIG_SND_SOC_SDCA_HID
> > -obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-hid.o
> > +snd-soc-sdca-y += sdca_hid.o
> > endif
> > ifdef CONFIG_SND_SOC_SDCA_IRQ
> > -obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-irq.o
> > +snd-soc-sdca-y += sdca_interrupts.o
> > endif
>
> Since these are now both 'bool' options, you could write
> this more concisely as
>
> snd-soc-sdca-$(CONFIG_SND_SOC_SDCA_HID) += sdca_hid.o
> snd-soc-sdca-$(CONFIG_SND_SOC_SDCA_IRQ) += sdca_interrupts.o
Thanks, yeah I will update for v2.
Thanks,
Charles
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-07-11 8:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10 16:34 [PATCH 0/2] Update SDCA Kconfig Charles Keepax
2025-07-10 16:34 ` [PATCH 1/2] ASoC: SDCA: Kconfig/Makefile fixups Charles Keepax
2025-07-11 5:58 ` Arnd Bergmann
2025-07-11 8:34 ` Charles Keepax
2025-07-10 16:34 ` [PATCH 2/2] ASoC: SDCA: Pull HID and IRQ into the primary SDCA module Charles Keepax
2025-07-11 5:44 ` Arnd Bergmann
2025-07-11 8:34 ` Charles Keepax
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.