ASoC: rt5682: Add the soundwire support
Subsystems (3)
Oder Chiou
maintainerPATCH 1/2 ASoC: rt5682: Add the soundwire support
This patch adds the soundwire support for ALC5682.
--- 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 | 526 +++++++++++++++++++++++++++++++--- sound/soc/codecs/rt5682.h | 49 ++++ 6 files changed, 897 insertions(+), 40 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 imply SND_SOC_RT5670 imply SND_SOC_RT5677 imply SND_SOC_RT5682 + imply SND_SOC_RT5682_SDW imply SND_SOC_RT700_SDW imply SND_SOC_RT711_SDW imply SND_SOC_RT715_SDW
@@ -1135,6 +1136,12 @@ config SND_SOC_RT5682 tristate depends on I2C +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 -40
635 lines not on this page · raw message
sound/soc/codecs/rt5682.h +49 -0
68 lines not on this page · raw message
Signature · 1 line
2.25.0
Oder Chiou
maintainerPATCH 2/2 ASoC: rt5682: Revise the function name
This patch revises the function name.
--- sound/soc/codecs/rt5682.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/rt5682.c +2 -2
@@ -1554,7 +1554,7 @@ static int set_dmic_power(struct snd_soc_dapm_widget *w,return 0 ; } -static int rt5655_set_verf (struct snd_soc_dapm_widget *w, +static int rt5682_set_verf (struct snd_soc_dapm_widget *w,struct snd_kcontrol *kcontrol,int event) { struct snd_soc_component *component =
@@ -1632,7 +1632,7 @@ static const struct snd_soc_dapm_widget rt5682_dapm_widgets[] = {SND_SOC_DAPM_SUPPLY ("PLL2F" ,RT5682_PWR_ANLG_3 ,RT5682_PWR_PLL2F_BIT ,0 , set_filter_clk,SND_SOC_DAPM_PRE_PMU ),SND_SOC_DAPM_SUPPLY ("Vref1" ,RT5682_PWR_ANLG_1 ,RT5682_PWR_VREF1_BIT ,0 , - rt5655_set_verf,SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMU ), + rt5682_set_verf,SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMU ),SND_SOC_DAPM_SUPPLY ("Vref2" ,RT5682_PWR_ANLG_1 ,RT5682_PWR_VREF2_BIT ,0 ,NULL ,0 ), SND_SOC_DAPM_SUPPLY("MICBIAS", SND_SOC_NOPM, 0, 0, NULL, 0),
Signature · 1 line
2.25.0
Mark Brown
maintainerApplied "ASoC: rt5682: Revise the function name" to the asoc tree
The patch
ASoC: rt5682: Revise the function name
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
From b2d48dde38d373487503fd36cda05f17c1183b6d Mon Sep 17 00:00:00 2001
From: Oder Chiou <[email protected]>
Date: Wed, 19 Feb 2020 18:28:58 +0800
Subject: [PATCH] ASoC: rt5682: Revise the function name
This patch revises the function name.
--- sound/soc/codecs/rt5682.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/rt5682.c +2 -2
@@ -1554,7 +1554,7 @@ static int set_dmic_power(struct snd_soc_dapm_widget *w,return 0 ; } -static int rt5655_set_verf (struct snd_soc_dapm_widget *w, +static int rt5682_set_verf (struct snd_soc_dapm_widget *w,struct snd_kcontrol *kcontrol,int event) { struct snd_soc_component *component =
@@ -1632,7 +1632,7 @@ static const struct snd_soc_dapm_widget rt5682_dapm_widgets[] = {SND_SOC_DAPM_SUPPLY ("PLL2F" ,RT5682_PWR_ANLG_3 ,RT5682_PWR_PLL2F_BIT ,0 , set_filter_clk,SND_SOC_DAPM_PRE_PMU ),SND_SOC_DAPM_SUPPLY ("Vref1" ,RT5682_PWR_ANLG_1 ,RT5682_PWR_VREF1_BIT ,0 , - rt5655_set_verf,SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMU ), + rt5682_set_verf,SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMU ),SND_SOC_DAPM_SUPPLY ("Vref2" ,RT5682_PWR_ANLG_1 ,RT5682_PWR_VREF2_BIT ,0 ,NULL ,0 ), SND_SOC_DAPM_SUPPLY("MICBIAS", SND_SOC_NOPM, 0, 0, NULL, 0),
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: rt5682: Add the soundwire support" to the asoc tree
In reply to Oder ChiouThe patch
ASoC: rt5682: Add the soundwire support
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
From 03f6fc6de9192f4e4209ceee0e92f5947d44fc0a Mon Sep 17 00:00:00 2001
From: Oder Chiou <[email protected]>
Date: Wed, 19 Feb 2020 18:28:57 +0800
Subject: [PATCH] ASoC: rt5682: Add the soundwire support
This patch adds the soundwire support for ALC5682.
--- 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 | 526 +++++++++++++++++++++++++++++++--- sound/soc/codecs/rt5682.h | 49 ++++ 6 files changed, 897 insertions(+), 40 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 imply SND_SOC_RT5670 imply SND_SOC_RT5677 imply SND_SOC_RT5682 + imply SND_SOC_RT5682_SDW imply SND_SOC_RT700_SDW imply SND_SOC_RT711_SDW imply SND_SOC_RT715_SDW
@@ -1136,6 +1137,12 @@ config SND_SOC_RT5682 tristate depends on I2C +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
@@ -477,6 +478,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 -40
635 lines not on this page · raw message
sound/soc/codecs/rt5682.h +49 -0
68 lines not on this page · raw message
Signature · 1 line
2.20.1