Skip to contentSkip to conversation

ASoC: rt711: add rt711 codec driver

PATCH In review [email protected] 3 participants 3 messages Dec 27, 2019 – Jan 9, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt711: add rt711 codec driver

From: Shuming Fan <[email protected]>

This is the initial codec driver for rt711.

---
 sound/soc/codecs/Kconfig     |   10 +
 sound/soc/codecs/Makefile    |    2 +
 sound/soc/codecs/rt711-sdw.c |  552 +++++++++++++++
 sound/soc/codecs/rt711-sdw.h |  281 ++++++++
 sound/soc/codecs/rt711.c     | 1293 ++++++++++++++++++++++++++++++++++
 sound/soc/codecs/rt711.h     |  227 ++++++
 6 files changed, 2365 insertions(+)
 create mode 100644 sound/soc/codecs/rt711-sdw.c
 create mode 100644 sound/soc/codecs/rt711-sdw.h
 create mode 100644 sound/soc/codecs/rt711.c
 create mode 100644 sound/soc/codecs/rt711.h
sound/soc/codecs/Kconfig +10 -0
index 146682049007..f58c6d35e47a 100644
@@ -165,6 +165,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_RT711_SDW if SOUNDWIRE
 	select SND_SOC_SGTL5000 if I2C
 	select SND_SOC_SI476X if MFD_SI476X_CORE
 	select SND_SOC_SIMPLE_AMPLIFIER
@@ -1058,6 +1059,15 @@ config SND_SOC_RT5677_SPI
 config SND_SOC_RT5682
 	tristate
 
+config SND_SOC_RT711
+	tristate
+
+config SND_SOC_RT711_SDW
+	tristate "Realtek RT711 Codec - SDW"
+	depends on SOUNDWIRE
+	select SND_SOC_RT711
+	select REGMAP_SOUNDWIRE
+
 #Freescale sgtl5000 codec
 config SND_SOC_SGTL5000
 	tristate "Freescale SGTL5000 CODEC"
sound/soc/codecs/Makefile +2 -0
index 0290fb389835..3fb6d0c04f5d 100644
@@ -173,6 +173,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-rt711-objs := rt711.o rt711-sdw.o
 snd-soc-sgtl5000-objs := sgtl5000.o
 snd-soc-alc5623-objs := alc5623.o
 snd-soc-alc5632-objs := alc5632.o
@@ -464,6 +465,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_RT711)     += snd-soc-rt711.o
 obj-$(CONFIG_SND_SOC_SGTL5000)  += snd-soc-sgtl5000.o
 obj-$(CONFIG_SND_SOC_SIGMADSP)	+= snd-soc-sigmadsp.o
 obj-$(CONFIG_SND_SOC_SIGMADSP_I2C)	+= snd-soc-sigmadsp-i2c.o
sound/soc/codecs/rt711-sdw.c new file +552 -0

552 lines not on this page · raw message

sound/soc/codecs/rt711-sdw.h new file +281 -0

281 lines not on this page · raw message

sound/soc/codecs/rt711.c new file +1293 -0

1,293 lines not on this page · raw message

sound/soc/codecs/rt711.h new file +227 -0

227 lines not on this page · raw message

Signature · 6 lines
2.24.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · On 12/26/19 11:44 PM, [email protected] wrote:

From: Shuming Fan <[email protected]>

This is the initial codec driver for rt711.

Thanks Shuming.

I will add my own

tag, but this driver was also tested by others at Intel, including Bard Liao and Rander Wang, on CometLake, IceLake and TigerLake platforms. I am not aware of any issues with this codec, and jack detection was tested extensively.

The key point to be reviewed is the use of regmap, where we disable access to the registers until the device becomes ATTACHED (cache-only), and also make sure hw calibration is rerun (cache-bypass) before restoring settings in the resume step.

This patch also depends on interface changes on the SoundWire side, see below what Vinod provided before the holiday break -Pierre

The following changes since commit e42617b825f8073569da76dc4510bfa019b1c35a:

Linux 5.5-rc1 (2019-12-08 14:57:55 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git
tags/sdw_interfaces_5.6

for you to fetch changes up to 09f6a72d014386939d21899921dd379006471a4b:

soundwire: intel: add clock stop quirks (2019-12-12 09:17:07 +0530)

----------------------------------------------------------------
SoundWire tag for ASoC

This contains the recently merged soundwire interface changes for ASoC subsystem.

----------------------------------------------------------------
Bard Liao (2):
soundwire: intel: update headers for interrupts
soundwire: intel: add link_list to handle interrupts with a
single thread

Pierre-Louis Bossart (7):
soundwire: sdw_slave: add probe_complete structure and new fields
soundwire: sdw_slave: add enumeration_complete structure
soundwire: sdw_slave: add initialization_complete definition
soundwire: sdw_slave: track unattach_request to handle all init
sequences
soundwire: intel: update interfaces between ASoC and SoundWire
soundwire: intel: add mutex for shared SHIM register access
soundwire: intel: add clock stop quirks

Rander Wang (2):
soundwire: intel: update stream callbacks for hwparams/free
stream operations
soundwire: intel: add prototype for WAKEEN interrupt processing

 drivers/soundwire/intel.c           |  20 ++++++++++++++------
 drivers/soundwire/intel.h           |  13 ++++++++-----
 drivers/soundwire/intel_init.c      |  32 ++++++++------------------------
 include/linux/soundwire/sdw.h       |  19 +++++++++++++++++++
 include/linux/soundwire/sdw_intel.h | 156 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
 5 files changed, 196 insertions(+), 44 deletions(-)

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

maintainer
#2 lore raw

[alsa-devel] Applied "ASoC: rt711: add rt711 codec driver" to the asoc tree

In reply to [email protected]

The patch

ASoC: rt711: add rt711 codec driver

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.6

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 320b8b0d13b81f3697acff5b6ddb47f88a09c118 Mon Sep 17 00:00:00 2001
From: Shuming Fan <[email protected]>
Date: Fri, 27 Dec 2019 13:44:45 +0800
Subject: [PATCH] ASoC: rt711: add rt711 codec driver

This is the initial codec driver for rt711.

---
 sound/soc/codecs/Kconfig     |   10 +
 sound/soc/codecs/Makefile    |    2 +
 sound/soc/codecs/rt711-sdw.c |  552 +++++++++++++++
 sound/soc/codecs/rt711-sdw.h |  281 ++++++++
 sound/soc/codecs/rt711.c     | 1293 ++++++++++++++++++++++++++++++++++
 sound/soc/codecs/rt711.h     |  227 ++++++
 6 files changed, 2365 insertions(+)
 create mode 100644 sound/soc/codecs/rt711-sdw.c
 create mode 100644 sound/soc/codecs/rt711-sdw.h
 create mode 100644 sound/soc/codecs/rt711.c
 create mode 100644 sound/soc/codecs/rt711.h
sound/soc/codecs/Kconfig +10 -0
index 986a31c68992..65b81888ca3d 100644
@@ -165,6 +165,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_RT711_SDW if SOUNDWIRE
 	select SND_SOC_SGTL5000 if I2C
 	select SND_SOC_SI476X if MFD_SI476X_CORE
 	select SND_SOC_SIMPLE_AMPLIFIER
@@ -1059,6 +1060,15 @@ config SND_SOC_RT5677_SPI
 config SND_SOC_RT5682
 	tristate
 
+config SND_SOC_RT711
+	tristate
+
+config SND_SOC_RT711_SDW
+	tristate "Realtek RT711 Codec - SDW"
+	depends on SOUNDWIRE
+	select SND_SOC_RT711
+	select REGMAP_SOUNDWIRE
+
 #Freescale sgtl5000 codec
 config SND_SOC_SGTL5000
 	tristate "Freescale SGTL5000 CODEC"
sound/soc/codecs/Makefile +2 -0
index 495f7e2f63eb..f4dfe033d120 100644
@@ -173,6 +173,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-rt711-objs := rt711.o rt711-sdw.o
 snd-soc-sgtl5000-objs := sgtl5000.o
 snd-soc-alc5623-objs := alc5623.o
 snd-soc-alc5632-objs := alc5632.o
@@ -465,6 +466,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_RT711)     += snd-soc-rt711.o
 obj-$(CONFIG_SND_SOC_SGTL5000)  += snd-soc-sgtl5000.o
 obj-$(CONFIG_SND_SOC_SIGMADSP)	+= snd-soc-sigmadsp.o
 obj-$(CONFIG_SND_SOC_SIGMADSP_I2C)	+= snd-soc-sigmadsp-i2c.o
sound/soc/codecs/rt711-sdw.c new file +552 -0

552 lines not on this page · raw message

sound/soc/codecs/rt711-sdw.h new file +281 -0

281 lines not on this page · raw message

sound/soc/codecs/rt711.c new file +1293 -0

1,293 lines not on this page · raw message

sound/soc/codecs/rt711.h new file +227 -0

227 lines not on this page · raw message

Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel