ASoC: SDCA: add a HID device for HIDE entity
Subsystems (3)
PATCH v2 3/3 ASoC: SDCA: add a HID device for HIDE entity
From: Shuming Fan <[email protected]>
This patch supports to add a HID device for SDCA HIDE entity. The codec driver could call 'hid_input_report' to report events.
--- include/sound/sdca_hid.h | 25 +++++++ sound/soc/sdca/Kconfig | 4 + sound/soc/sdca/Makefile | 3 + sound/soc/sdca/sdca_functions.c | 9 +++ sound/soc/sdca/sdca_hid.c | 127 ++++++++++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 include/sound/sdca_hid.h create mode 100644 sound/soc/sdca/sdca_hid.c
include/sound/sdca_hid.h new file +25 -0
@@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ +/* +* The MIPI SDCA specification is available for public downloads at +* https://www.mipi.org/mipi-sdca-v1-0-download +* +*/ + +#ifndef __SDCA_HID_H__ +#define __SDCA_HID_H__ + +#include <linux/types.h> +#include <linux/hid.h> + +#if IS_ENABLED (CONFIG_SND_SOC_SDCA_HID ) +int sdca_add_hid_device (struct device *dev,struct sdca_entity *entity); + +#else +static inline int sdca_add_hid_device (struct device *dev,struct sdca_entity *entity) +{ +return 0 ; +} + +#endif + +#endif /* __SDCA_HID_H__ */
sound/soc/sdca/Kconfig +4 -0
@@ -9,3 +9,7 @@ config SND_SOC_SDCA config SND_SOC_SDCA_OPTIONAL def_tristate SND_SOC_SDCA || !SND_SOC_SDCA + +config SND_SOC_SDCA_HID + tristate "SDCA HID support" + depends on SND_SOC_SDCA && HID
sound/soc/sdca/Makefile +3 -0
@@ -2,4 +2,7 @@ snd-soc-sdca-y := sdca_functions.o sdca_device.o sdca_regmap.o sdca_asoc.o +snd-soc-sdca-hid-y := sdca_hid.o + +obj-$(CONFIG_SND_SOC_SDCA_HID) += snd-soc-sdca-hid.o obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o
sound/soc/sdca/sdca_functions.c +9 -0
@@ -19,6 +19,7 @@#include <linux/types.h> #include <sound/sdca.h> #include <sound/sdca_function.h> +#include <sound/sdca_hid.h> /* * Should be long enough to encompass all the MIPI DisCo properties.
@@ -1294,6 +1295,13 @@ find_sdca_entity_hide(struct device *dev, struct fwnode_handle *function_node, hide->hid_report_desc = report_desc;fwnode_property_read_u8_array (function_node,"mipi-sdca-report-descriptor" , report_desc, nval); + +/* add HID device */ + ret =sdca_add_hid_device (dev, entity); +if (ret) { +dev_err (dev,"%pfwP: failed to add HID device: %d\n" , entity_node, ret); +return ret; + } } }
@@ -1933,3 +1941,4 @@ 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" );
sound/soc/sdca/sdca_hid.c new file +127 -0
127 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 7 lines · On Mon, Jun 16, 2025 at 07:49:29PM +0800, [email protected] wrote:
From: Shuming Fan <[email protected]>
This patch supports to add a HID device for SDCA HIDE entity. The codec driver could call '
hid_input_report' to report events.Signed-off-by Shuming Fan <[email protected]>---
Thanks,
Charles
Mark Brown
maintainerQuoted 4 lines · On Mon, 16 Jun 2025 19:49:29 +0800, [email protected] wrote:
This patch supports to add a HID device for SDCA HIDE entity. The codec driver could call '
hid_input_report' to report events.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[3/3] ASoC: SDCA: add a HID device for HIDE entity
commit: ac558015dfd803626622bd0ba9645d58a3ed16b1
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