ASoC: rt5575: Add the codec driver for the ALC5575
Subsystems (4)
Oder Chiou
maintainerPATCH v5 1/2 ASoC: rt5575: Add the codec driver for the ALC5575
This codec driver is for the ALC5575 that has a built-in audio DSP. The firmware can be loaded by the SPI from the SOC or the external flash.
--- sound/soc/codecs/Kconfig | 9 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/rt5575-spi.c | 110 +++++++++ sound/soc/codecs/rt5575-spi.h | 37 +++ sound/soc/codecs/rt5575.c | 421 ++++++++++++++++++++++++++++++++++ sound/soc/codecs/rt5575.h | 58 +++++ 6 files changed, 639 insertions(+) create mode 100644 sound/soc/codecs/rt5575-spi.c create mode 100644 sound/soc/codecs/rt5575-spi.h create mode 100644 sound/soc/codecs/rt5575.c create mode 100644 sound/soc/codecs/rt5575.h
sound/soc/codecs/Kconfig +9 -0
@@ -210,6 +210,7 @@ config SND_SOC_ALL_CODECS imply SND_SOC_RT1305 imply SND_SOC_RT1308 imply SND_SOC_RT5514 + imply SND_SOC_RT5575 imply SND_SOC_RT5616 imply SND_SOC_RT5631 imply SND_SOC_RT5640
@@ -1739,6 +1740,14 @@ config SND_SOC_RT5514_SPI_BUILTIN bool # force RT5514_SPI to be built-in to avoid link errors default SND_SOC_RT5514=y && SND_SOC_RT5514_SPI=m +config SND_SOC_RT5575 + tristate + depends on I2C + +config SND_SOC_RT5575_SPI + tristate + depends on SPI_MASTER + config SND_SOC_RT5616 tristate "Realtek RT5616 CODEC" depends on I2C
sound/soc/codecs/Makefile +4 -0
@@ -251,6 +251,8 @@ snd-soc-rt286-y := rt286.o snd-soc-rt298-y := rt298.o snd-soc-rt5514-y := rt5514.o snd-soc-rt5514-spi-y := rt5514-spi.o +snd-soc-rt5575-y := rt5575.o +snd-soc-rt5575-spi-y := rt5575-spi.o snd-soc-rt5616-y := rt5616.o snd-soc-rt5631-y := rt5631.o snd-soc-rt5640-y := rt5640.o
@@ -682,6 +684,8 @@ obj-$(CONFIG_SND_SOC_RT298) += snd-soc-rt298.o obj-$(CONFIG_SND_SOC_RT5514) += snd-soc-rt5514.o obj-$(CONFIG_SND_SOC_RT5514_SPI) += snd-soc-rt5514-spi.o obj-$(CONFIG_SND_SOC_RT5514_SPI_BUILTIN) += snd-soc-rt5514-spi.o +obj-$(CONFIG_SND_SOC_RT5575) += snd-soc-rt5575.o +obj-$(CONFIG_SND_SOC_RT5575_SPI) += snd-soc-rt5575-spi.o obj-$(CONFIG_SND_SOC_RT5616) += snd-soc-rt5616.o obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o obj-$(CONFIG_SND_SOC_RT5640) += snd-soc-rt5640.o
sound/soc/codecs/rt5575-spi.c new file +110 -0
110 lines not on this page · raw message
sound/soc/codecs/rt5575-spi.h new file +37 -0
@@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* rt5575-spi.h -- ALC5575 SPI driver +* +* Copyright 2022 Realtek Semiconductor Corp. +* Author: Oder Chiou <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __RT5575_SPI_H__ +#define __RT5575_SPI_H__ + +#define RT5575_SPI_BUF_LEN 240 + +/* SPI Command */ +enum { +RT5575_SPI_CMD_16_READ =0 , +RT5575_SPI_CMD_16_WRITE , +RT5575_SPI_CMD_32_READ , +RT5575_SPI_CMD_32_WRITE , +RT5575_SPI_CMD_BURST_READ , +RT5575_SPI_CMD_BURST_WRITE , +}; + +#if IS_ENABLED (CONFIG_SND_SOC_RT5575_SPI ) +int rt5575_spi_burst_write (u32 addr,const u8 *txbuf,size_t len); +#else +static inline int rt5575_spi_burst_write (u32 addr,const u8 *txbuf,size_t len) +{ +return -EINVAL ; +} +#endif + +#endif /* __RT5575_SPI_H__ */
sound/soc/codecs/rt5575.c new file +421 -0
421 lines not on this page · raw message
sound/soc/codecs/rt5575.h new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
2.34.1
Oder Chiou
maintainerPATCH v5 2/2 ASoC: dt-bindings: realtek,rt5575: add bindings for ALC5575
Realtek ALC5575 codec has a built-in DSP.
--- .../bindings/sound/realtek,rt5575.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/realtek,rt5575.yaml
Documentation/devicetree/bindings/sound/realtek,rt5575.yaml new file +41 -0
@@ -0,0 +1,41 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/realtek,rt5575.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ALC5575 audio CODEC + +maintainers: + - Oder Chiou <[email protected]> + +description: | + This device supports both I2C and SPI. + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + - $ref: dai-common.yaml# + +properties: + compatible: + const: realtek,rt5575 + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + codec@57 { + compatible = "realtek,rt5575"; + reg = <0x57>; + }; + };
Signature · 1 line
2.34.1
Re: [PATCH v5 2/2] ASoC: dt-bindings: realtek,rt5575: add bindings for ALC5575
Quoted 4 lines · Oder Chiou
Realtek ALC5575 codec has a built-in DSP.
Signed-off-by Oder Chiou <[email protected]>---
Missing changelog.
<form letter>
Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.
Tools like b4 or scripts/get_maintainer.pl provide you proper list of people, so fix your workflow. Tools might also fail if you work on some ancient tree (don't, instead use mainline) or work on fork of kernel (don't, instead use mainline). Just use b4 and everything should be fine, although remember about b4 prep --auto-to-cc if you added new patches to the patchset.
You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time.
Please kindly resend and include all necessary To/Cc entries. </form letter>
Best regards,
Krzysztof
_______________________________________________
Alsa-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Oder,
kernel test robot noticed the following build warnings:
[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on linus/master v6.18-rc1 next-20251017] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Oder-Chiou/ASoC-dt-bindings-realtek-rt5575-add-bindings-for-ALC5575/20251017-203710 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next patch link: https://lore.kernel.org/r/20251015103404.3075684-1-oder_chiou%40realtek.com patch subject: [PATCH v5 1/2] ASoC: rt5575: Add the codec driver for the ALC5575 config: riscv-randconfig-r131-20251018 (https://download.01.org/0day-ci/archive/20251018/[email protected]/config) compiler: riscv32-linux-gcc (GCC) 11.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251018/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
sparse warnings: (new ones prefixed by >>)
>> sound/soc/codecs/rt5575.c:298:39: sparse: sparse: symbol 'rt5575_soc_component_dev' was not declared. Should it be static?
vim +/rt5575_soc_component_dev +298 sound/soc/codecs/rt5575.c
297
> 298 const struct snd_soc_component_driver rt5575_soc_component_dev = { 299 .probe = rt5575_probe,
300 .controls = rt5575_snd_controls,
301 .num_controls = ARRAY_SIZE(rt5575_snd_controls),
302 .dapm_widgets = rt5575_dapm_widgets,
303 .num_dapm_widgets = ARRAY_SIZE(rt5575_dapm_widgets),
304 .dapm_routes = rt5575_dapm_routes,
305 .num_dapm_routes = ARRAY_SIZE(rt5575_dapm_routes),
306 .use_pmdown_time = 1,
307 .endianness = 1,
308 };
309
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Mark Brown
maintainerQuoted 4 lines · Oder Chiou
This codec driver is for the ALC5575 that has a built-in audio DSP. The firmware can be loaded by the SPI from the SOC or the external flash.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: rt5575: Add the codec driver for the ALC5575
commit: c7ac7499ac5bb50ab3e00add121822c5c904bc91
[2/2] ASoC: dt-bindings: realtek,rt5575: add bindings for ALC5575
(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