ASoC: rt5682: Add the soundwire support
Subsystems (3)
Oder Chiou
maintainerPATCH 2/2 ASoC: rt5682: Add the soundwire support
This patch adds the soundwire support for ALC5682.
Signed-off-by Oder Chiou <[email protected]>
--- sound/soc/codecs/Kconfig | 7 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt5682-sdw.c | 333 ++++++++++++++++++++++ sound/soc/codecs/rt5682-sdw.h | 20 ++ sound/soc/codecs/rt5682.c | 517 ++++++++++++++++++++++++++++++++-- sound/soc/codecs/rt5682.h | 46 ++- 6 files changed, 890 insertions(+), 35 deletions(-) create mode 100644 sound/soc/codecs/rt5682-sdw.c create mode 100644 sound/soc/codecs/rt5682-sdw.h
sound/soc/codecs/Kconfig +7 -0
@@ -168,6 +168,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_RT5670 if I2C select SND_SOC_RT5677 if I2C && SPI_MASTER select SND_SOC_RT5682 if I2C + select SND_SOC_RT5682_SDW if SOUNDWIRE select SND_SOC_RT700_SDW if SOUNDWIRE select SND_SOC_RT711_SDW if SOUNDWIRE select SND_SOC_RT715_SDW if SOUNDWIRE
@@ -1087,6 +1088,12 @@ config SND_SOC_RT5677_SPI config SND_SOC_RT5682 tristate +config SND_SOC_RT5682_SDW + tristate "Realtek RT5682 Codec - SDW" + depends on SOUNDWIRE + select SND_SOC_RT5682 + select REGMAP_SOUNDWIRE + config SND_SOC_RT700 tristate
sound/soc/codecs/Makefile +2 -0
@@ -177,6 +177,7 @@ snd-soc-rt5670-objs := rt5670.o snd-soc-rt5677-objs := rt5677.o snd-soc-rt5677-spi-objs := rt5677-spi.o snd-soc-rt5682-objs := rt5682.o +snd-soc-rt5682-sdw-objs := rt5682-sdw.o snd-soc-rt700-objs := rt700.o rt700-sdw.o snd-soc-rt711-objs := rt711.o rt711-sdw.o snd-soc-rt715-objs := rt715.o rt715-sdw.o
@@ -476,6 +477,7 @@ obj-$(CONFIG_SND_SOC_RT5670) += snd-soc-rt5670.o obj-$(CONFIG_SND_SOC_RT5677) += snd-soc-rt5677.o obj-$(CONFIG_SND_SOC_RT5677_SPI) += snd-soc-rt5677-spi.o obj-$(CONFIG_SND_SOC_RT5682) += snd-soc-rt5682.o +obj-$(CONFIG_SND_SOC_RT5682_SDW) += snd-soc-rt5682-sdw.o obj-$(CONFIG_SND_SOC_RT700) += snd-soc-rt700.o obj-$(CONFIG_SND_SOC_RT711) += snd-soc-rt711.o obj-$(CONFIG_SND_SOC_RT715) += snd-soc-rt715.o
sound/soc/codecs/rt5682-sdw.c new file +333 -0
333 lines not on this page · raw message
sound/soc/codecs/rt5682-sdw.h new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only +* +* rt5682-sdw.h -- RT5682 SDW ALSA SoC audio driver +* +* Copyright 2019 Realtek Semiconductor Corp. +* Author: Oder Chiou <[email protected]> +*/ + +#ifndef __RT5682_SDW_H__ +#define __RT5682_SDW_H__ + +#define RT5682_SDW_ADDR_L 0x3000 +#define RT5682_SDW_ADDR_H 0x3001 +#define RT5682_SDW_DATA_L 0x3004 +#define RT5682_SDW_DATA_H 0x3005 +#define RT5682_SDW_CMD 0x3008 + +#define RT5682_PROBE_TIMEOUT 2000 + +#endif /* __RT5682_SDW_H__ */
sound/soc/codecs/rt5682.c +486 -31
625 lines not on this page · raw message
sound/soc/codecs/rt5682.h +42 -4
80 lines not on this page · raw message
Signature · 1 line
2.24.1
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Mark Brown
maintainerQuoted 1 line · Oder Chiou
This patch adds the soundwire support for ALC5682.
This doesn't apply against current code, please check and resend.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel