From af00978a0a06bab60bd5adf54a65ea69d19ce35d Mon Sep 17 00:00:00 2001 From: Stephan Gerhold Date: Thu, 13 May 2021 12:41:29 +0200 Subject: ASoC: codecs: Add driver for NXP/Goodix TFA989x (TFA1) amplifiers NXP's TFA98xx (now part of Goodix) are fairly popular speaker amplifiers used in many smartphones and tablets. Most of them are sold as "smart amplifiers" with built-in "CoolFlux DSP" that is used for volume control, plus a "sophisticated speaker-boost and protection algorithm". Unfortunately, they are also almost entirely undocumented. The short datasheets (e.g. [1] for TFA9897) describe the available features, but do not provide any information about the registers or how to use the "CoolFlux DSP". The amplifiers are most often configured through proprietary userspace libraries. There are also some (rather complex) kernel drivers (e.g. [2]) but even those rely on obscure firmware blobs for configuration (so-called "containers"). They seem to contain different "profiles" with tuned speaker settings, sample rates and volume steps (which would be better exposed as separate ALSA mixers). The format of the firmware files seems to have changed a lot over the time, so it's not even possible to simply re-use the firmware originally provided by the vendor. Overall, it seems close to impossible to develop a proper mainline driver for these amplifiers that could make proper use of the built-in DSP. This commit implements a compromise: At least the TFA1 family of the TFA98xx amplifiers (usually called TFA989x) provide a way to *bypass* the DSP using a special register sequence. The register sequence can be found in similar variations in the kernel drivers from lots of vendors e.g. in [3] and was probably mainly used for factory testing. With the DSP bypassed, the amplifier acts mostly like a dumb standard speaker amplifier, without (hardware) volume control. However, the setup is much simpler and it works without any obscure firmware. This driver implements the DSP bypass combined with chip-specific initialization sequences adapted from [2]. Only TFA9895 is supported in this initial commit. Except for the lack of volume control I can not hear any difference with or without the DSP, it works just fine. This driver allows the speaker to work on mainline Linux running on the Samsung Galaxy A3/A5 (2015) [TFA9895] and Alcatel Idol 3 [TFA9897]. TFA9897 support will be added in separate patch set later. [1]: https://product.goodix.com/en/docview/TFA9897%20SDS_Rev.3.1?objectId=47&objectType=document&version=78 [2]: https://source.codeaurora.org/external/mas/tfa98xx [3]: https://github.com/sonyxperiadev/kernel/blob/57b5050e340f40a88e1ddb8d16fd9adb44418923/sound/soc/codecs/tfa98xx.c#L1422-L1462 Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210513104129.36583-2-stephan@gerhold.net Signed-off-by: Mark Brown --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index bd7aff0c120f..33079fddc7b8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13204,6 +13204,13 @@ S: Maintained F: Documentation/devicetree/bindings/sound/tfa9879.txt F: sound/soc/codecs/tfa9879* +NXP/Goodix TFA989X (TFA1) DRIVER +M: Stephan Gerhold +L: alsa-devel@alsa-project.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml +F: sound/soc/codecs/tfa989x.c + NXP-NCI NFC DRIVER M: Clément Perrochaud R: Charles Gorand -- cgit v1.2.3-59-g8ed1b From 50b1ce617d66d04f1f9006e51793e6cffcdec6ea Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Sun, 20 Jun 2021 11:01:35 -0500 Subject: MAINTAINERS: remove Timur Tabi from Freescale SOC sound drivers I haven't touched these drivers in seven years, and none of the patches sent to me these days affect code that I wrote. The other maintainers are doing a very good job without me. Signed-off-by: Timur Tabi Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20210620160135.28651-1-timur@kernel.org Signed-off-by: Mark Brown --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index 81e1edeceae4..06cf1a1bdcc7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7345,7 +7345,6 @@ F: drivers/net/ethernet/freescale/fs_enet/ F: include/linux/fs_enet_pd.h FREESCALE SOC SOUND DRIVERS -M: Timur Tabi M: Nicolin Chen M: Xiubo Li R: Fabio Estevam -- cgit v1.2.3-59-g8ed1b From 91bc92d783fecb77b8bfa80787c8cfca6513a928 Mon Sep 17 00:00:00 2001 From: "Geoffrey D. Bennett" Date: Wed, 23 Jun 2021 02:47:24 +0930 Subject: MAINTAINERS: Add Focusrite Scarlett Gen 2/3 Mixer Driver entry Add Focusrite Scarlett Gen 2/3 Mixer Driver entry. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210622171724.GA15534@m.b4.vu Signed-off-by: Takashi Iwai --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index bd7aff0c120f..71e327d970d7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7103,6 +7103,13 @@ L: linux-input@vger.kernel.org S: Maintained F: drivers/input/joystick/fsia6b.c +FOCUSRITE SCARLETT GEN 2/3 MIXER DRIVER +M: Geoffrey D. Bennett +L: alsa-devel@alsa-project.org (moderated for non-subscribers) +S: Maintained +T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git +F: sound/usb/mixer_scarlett_gen2.c + FORCEDETH GIGABIT ETHERNET DRIVER M: Rain River M: Zhu Yanjun -- cgit v1.2.3-59-g8ed1b