]> www.infradead.org Git - users/dwmw2/linux.git/log
users/dwmw2/linux.git
9 months agoASoC: dt-bindings: simple-audio-mux: add state-labels property
Kuninori Morimoto [Mon, 1 Jul 2024 00:38:59 +0000 (00:38 +0000)]
ASoC: dt-bindings: simple-audio-mux: add state-labels property

simple-audio-mux is designed to be used generally, thus "Input 1" or
"Input 2" are used to selecting MUX input. This numbered inputs would
work, but might be not user friendly in some case, for example in case
of system hardware design has some clear labels.
Adds new "state-labels" property and enable to select MUX by own state
names.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/87le2m7xp8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
9 months agoASoC: simple-audio-mux: enable to select MUX names
Kuninori Morimoto [Mon, 1 Jul 2024 00:38:51 +0000 (00:38 +0000)]
ASoC: simple-audio-mux: enable to select MUX names

simple-audio-mux is designed to be used generally, thus "Input 1" or
"Input 2" are used to selecting MUX input. This numbered inputs would
work, but might be not user friendly in some case, for example in case
of system hardware design has some clear labels.
Adds new "state-labels" property and enable to select MUX by own state
names.

Original
> amixer set "MUX" "Input 1"

Use mux-names
sound_mux: mux {
compatible = "simple-audio-mux";
mux-gpios = <...>;
state-labels = "Label_A", "Label_B";
};

> amixer set "MUX" "Label_A"

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87msn27xpg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoAdd audio support for LPC32XX CPUs
Mark Brown [Fri, 28 Jun 2024 17:07:12 +0000 (18:07 +0100)]
Add audio support for LPC32XX CPUs

Merge series from Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>:

This pach set is to bring back audio to machines with a LPC32XX CPU.
The legacy LPC32XX SoC used to have audio spport in linux 2.6.27.
The support was dropped due to lack of interest from mainaeners.

10 months agoASoC: meson: tdm: add sample rate support up to 768kHz
Jerome Brunet [Fri, 28 Jun 2024 12:32:54 +0000 (14:32 +0200)]
ASoC: meson: tdm: add sample rate support up to 768kHz

Add support for 705.6kHz and 768kHz sample rates

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20240628123256.2019224-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: fsl,xcvr: Adjust the number of interrupts
Shengjiu Wang [Thu, 27 Jun 2024 09:52:59 +0000 (17:52 +0800)]
ASoC: dt-bindings: fsl,xcvr: Adjust the number of interrupts

On i.MX8MP, there are 3 interrupts, the third interrupt is
SPDIF wakeup interrupt from PHY

Add ref: dai-common.yaml for #sound-dai-cells is needed and
XCVR is a DAI device.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/1719481981-4069-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: max98088: Check for clk_prepare_enable() error
Chen Ni [Fri, 28 Jun 2024 08:05:34 +0000 (16:05 +0800)]
ASoC: max98088: Check for clk_prepare_enable() error

clk_prepare_enable() may fail, so we should better check its return
value and propagate it in the case of error.

Fixes: 62a7fc32a628 ("ASoC: max98088: Add master clock handling")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20240628080534.843815-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Remove unneeded semicolon
Yang Li [Fri, 28 Jun 2024 05:24:06 +0000 (13:24 +0800)]
ASoC: Remove unneeded semicolon

./sound/soc/codecs/ak4619.c:757:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9442
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://patch.msgid.link/20240628052406.36644-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: soc-utils: allow sample rate up to 768kHz for the dummy dai
Jerome Brunet [Fri, 28 Jun 2024 12:01:29 +0000 (14:01 +0200)]
ASoC: soc-utils: allow sample rate up to 768kHz for the dummy dai

The dummy DAI should allow any (reasonable) rates possible.
Make the rate continuous for dummy and set range from 5512Hz to 768kHz

The change is mostly cosmetic as dummy is skipped when setting
the hwparams.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20240628120130.2015665-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs
Piotr Wojtaszczyk [Thu, 27 Jun 2024 15:00:29 +0000 (17:00 +0200)]
ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs

This driver was ported from an old version in linux 2.6.27 and adjusted
for the new ASoC framework and DMA API.

Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
Link: https://patch.msgid.link/20240627150046.258795-12-piotr.wojtaszczyk@timesys.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding
Piotr Wojtaszczyk [Thu, 27 Jun 2024 15:00:21 +0000 (17:00 +0200)]
ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding

Add nxp,lpc3220-i2s DT binding documentation.

Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240627150046.258795-4-piotr.wojtaszczyk@timesys.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-wsa-macro: add missing select of common code
Krzysztof Kozlowski [Thu, 27 Jun 2024 12:52:03 +0000 (14:52 +0200)]
ASoC: codecs: lpass-wsa-macro: add missing select of common code

The Qualcomm LPASS WSA macro codec driver uses now parts of common
module, so it has to select SND_SOC_LPASS_MACRO_COMMON.

  sound/soc/codecs/lpass-wsa-macro.o: in function `wsa_macro_probe':
  sound/soc/codecs/lpass-wsa-macro.c:2767:(.text+0x1c9c): undefined reference to `lpass_macro_get_codec_version'

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406272231.th1LtuLk-lkp@intel.com/
Fixes: 5dcf442bbbca ("ASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240627125203.171048-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: imx-audmix: Split capture device to be a new
Mark Brown [Thu, 27 Jun 2024 11:30:52 +0000 (12:30 +0100)]
ASoC: imx-audmix: Split capture device to be a new

Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

The transmitter and receiver part of the SAI interface need to be
configured with different master/slave mode, especially to work
with the audiomix module.

The SAI1 TX is in master mode, but SAI1 RX is in slave mode.
So add another two DAIs for TX and RX separately in fsl_sai driver.

There will be three devices for audiomix sound card, hw:x,0 is
the playback device for one SAI, hw:x,1 is the playback device
for another SAI, hw:x,2 is the capture device for audmix
output.

10 months agoASoC: simple-card / audio-graph:
Mark Brown [Thu, 27 Jun 2024 11:30:40 +0000 (12:30 +0100)]
ASoC: simple-card / audio-graph:

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Introduce the ability for sound cards to manually order the startup of
the various components in the card.

10 months agoASoC: rt712-sdca: add the function for version B
Shuming Fan [Thu, 20 Jun 2024 10:32:37 +0000 (18:32 +0800)]
ASoC: rt712-sdca: add the function for version B

The version B will support the multi-lane function and integrate the DMIC function
in one SoundWire interface.
Due to some registers having different default values between version A and B,
this patch also removes the redundant default registers to avoid confusion.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20240620103237.2124196-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: rt712-sdca: change the definition name of SDCA channel number
Shuming Fan [Thu, 20 Jun 2024 10:32:24 +0000 (18:32 +0800)]
ASoC: rt712-sdca: change the definition name of SDCA channel number

This patch doesn't have any change of functionality.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20240620103224.2124179-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: amlogic,gx-sound-card: drop minItems for audio-widgets
Neil Armstrong [Wed, 5 Jun 2024 09:40:51 +0000 (11:40 +0200)]
ASoC: dt-bindings: amlogic,gx-sound-card: drop minItems for audio-widgets

Like "audio-routing" drop the minItems: 2 from the "audio-widgets", because
any limit here - lower or upper- is rather meaningless.

This will also fix `dtbs_check` warnings like:
sound: audio-widgets: ['Speaker', '7J4-14 LEFT', 'Speaker', '7J4-11 RIGHT'] is too long

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240605-topic-amlogic-upstream-bindings-fixes-audio-widgets-v1-1-65bd7cc2e09b@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: qcom: Adjust issues in case of DT error in asoc_qcom_lpass_cpu_platform_probe()
Aleksandr Mishin [Wed, 5 Jun 2024 10:49:53 +0000 (13:49 +0300)]
ASoC: qcom: Adjust issues in case of DT error in asoc_qcom_lpass_cpu_platform_probe()

If IORESOURCE_MEM "lpass-rxtx-cdc-dma-lpm" or "lpass-va-cdc-dma-lpm"
resources is not provided in Device Tree due to any error,
platform_get_resource_byname() will return NULL which is later
dereferenced. According to sound/qcom,lpass-cpu.yaml, these resources
are provided, but DT can be broken due to any error. In such cases driver
must be able to protect itself, since the DT is external data for the
driver.
Adjust this issues by adding NULL return check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: b138706225c9 ("ASoC: qcom: Add regmap config support for codec dma driver")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Link: https://patch.msgid.link/20240605104953.12072-1-amishin@t-argos.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: imx-audmix: Split capture device for audmix
Shengjiu Wang [Wed, 12 Jun 2024 06:40:52 +0000 (14:40 +0800)]
ASoC: imx-audmix: Split capture device for audmix

There will be three devices for this sound card, hw:x,0 is
the playback device for one SAI, hw:x,1 is the playback device
for another SAI, hw:x,2 is the capture device for audmix
output. then capture device and playback device can be configured
with different master/slave mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1718174452-17596-4-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl_audmix: Split playback and capture stream to different DAI
Shengjiu Wang [Wed, 12 Jun 2024 06:40:51 +0000 (14:40 +0800)]
ASoC: fsl_audmix: Split playback and capture stream to different DAI

As audmix requires playback and capture stream in different
master/slave mode, so separate playback and capture stream to
different DAI. There are three DAIs required, two DAIs for playback
one DAI for capture.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1718174452-17596-3-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: fsl_sai: Add separate DAI for transmitter and receiver
Shengjiu Wang [Wed, 12 Jun 2024 06:40:50 +0000 (14:40 +0800)]
ASoC: fsl_sai: Add separate DAI for transmitter and receiver

The transmitter and receiver part of the SAI interface need to be
configured with different master/slave mode, especially to work
with the audiomix module.

+-------+               +-----------+
| SAI1  |   --TX-->     |           |
|       |   <--RX--     |           |
+-------+               |           |
                        | AUDIOMIX  |
+-------+               |           |
| SAI2  |   --TX-->     |           |
+-------+               +-----------+

The SAI1 TX is in master mode, but SAI1 RX is in slave mode.
So add another two DAIs for TX and RX separately. but only
defined fsl_sai_set_dai_fmt_tx() and fsl_sai_set_dai_fmt_rx()
ops function for current case, in the future, the other ops
function for TX and RX can be defined if required.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1718174452-17596-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: audio-graph-card2: add link-trigger-order support
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:52 +0000 (06:02 +0000)]
ASoC: audio-graph-card2: add link-trigger-order support

Some Sound Card might need special trigger ordering which is based on
CPU/Codec connection. It is already supported on ASoC, but Audio Graph
Card2 still not yet support it. Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87msnqzoj8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: audio-graph-card: add link-trigger-order support
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:46 +0000 (06:02 +0000)]
ASoC: audio-graph-card: add link-trigger-order support

Some Sound Card might need special trigger ordering which is based on
CPU/Codec connection. It is already supported on ASoC, but Audio Graph
Card still not yet support it. Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87o786zojd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: simple-audio-card: add link-trigger-order support
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:39 +0000 (06:02 +0000)]
ASoC: simple-audio-card: add link-trigger-order support

Some Sound Card might need special trigger ordering which is based on
CPU/Codec connection. It is already supported on ASoC, but Simple Audio
Card still not yet support it. Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87plsmzojk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: simple-card-utils: add link-trigger-order support
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:33 +0000 (06:02 +0000)]
ASoC: simple-card-utils: add link-trigger-order support

Some Sound Card might need special trigger ordering which is based on
CPU/Codec connection. It is already supported on ASoC, but Simple Audio
Card / Audio Graph Card still not support it. Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87r0d2zojq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: audio-graph-port: add link-trigger-order
Kuninori Morimoto [Wed, 12 Jun 2024 06:02:26 +0000 (06:02 +0000)]
ASoC: audio-graph-port: add link-trigger-order

Sound Card need to consider/adjust HW control ordering based on the
combination of CPU/Codec. The controlling feature is already supported
on ASoC, but Simple Audio Card / Audio Graph Card still not support it.
Let's support it.

Cc: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87sexizojx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-macro: Use enum for handling codec version
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:57:36 +0000 (18:57 +0200)]
ASoC: codecs: lpass-macro: Use enum for handling codec version

Replace 'int' with proper 'enum lpass_codec_version' in every place
which handles the parsed codec version (not raw register values!) to be
explicit about contents of the variable.  This makes code easier to read
and compilers could check missing switch cases.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625165736.722106-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-macro: Gracefully handle unknown version
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:57:35 +0000 (18:57 +0200)]
ASoC: codecs: lpass-macro: Gracefully handle unknown version

Qualcomm LPASS macro codec driver parses registers in order to
detect version of the codec.  It recognizes codecs v2.0 - v2.8, however
we know that there are earlier versions and 'enum lpass_codec_version'
has also v1.0, v1.1 and v1.2.  If by any chance we run on unrecognized
version, driver will use random value from the stack as the codec
version.

Fix it by mapping such cases to an enum of value 0:
LPASS_CODEC_VERSION_UNKNOWN.

Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625165736.722106-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:58:47 +0000 (18:58 +0200)]
ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version

Starting with v2.5 of Qualcomm LPASS Codec, few registers in the WSA
macro block change.  Bring proper support for this v2.5 and newer
versions, to fix second speaker playback (speaker was silent).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-3-f65ffdfc368c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:58:46 +0000 (18:58 +0200)]
ASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions

The driver for Qualcomm LPASS WSA macro codec was developed and tested
on codec v2.1, however v2.5 has significant changes in the registers.
The driver correctly works for v2.1 codec, but has issues when running
on SoC with v2.5 codec (so starting with SM8450, even though playback
works properly on that SoC).

Prepare the driver for handling differences in register layouts of newer
version.  This does not have functional impact on older codec versions,
but just:
1. Renames few soc_enums and widgets as v2.1,
2. For registers being different in v2.5, moves the defaults and regmap
   configuration to new structures,
3. Adds new 'struct wsa_reg_layout' with offsets and masks for few
   registers, so most of the code can stay unchaged on v2.5,
4. Chooses proper widgets, regmap config and register layout based on
   version of the codec.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-2-f65ffdfc368c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-wsa-macro: Drop unused define
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:58:45 +0000 (18:58 +0200)]
ASoC: codecs: lpass-wsa-macro: Drop unused define

WSA_MACRO_MUX_INP_MASK2 define is not used.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-1-f65ffdfc368c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: rt711-sdca: add GE selected mode control
Shuming Fan [Tue, 25 Jun 2024 08:43:03 +0000 (16:43 +0800)]
ASoC: rt711-sdca: add GE selected mode control

The SDCA spec defines a 'selected_mode' control which can override
the 'detected_mode' reported by hardware.
This is useful for platform integration as well as in cases
where the hardware(e.g. 3.5mm jack cable) is not able to accurately detect the jack type.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Tested-by: yung-chuan.liao@linux.intel.com
Link: https://patch.msgid.link/20240625084303.2273911-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: lpass-rx-macro: add missing handling of v2.1 codec
Krzysztof Kozlowski [Tue, 25 Jun 2024 16:06:14 +0000 (18:06 +0200)]
ASoC: codecs: lpass-rx-macro: add missing handling of v2.1 codec

We have also v2.1 version of the codec (see 'enum lpass_codec_version'),
so handle it as well in all switch cases.

Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://patch.msgid.link/20240625160614.450506-1-krzysztof.kozlowski@linaro.org
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: Drop explicit initialization of struct i2c_device_id::driver_data to 0
Uwe Kleine-König [Mon, 24 Jun 2024 13:17:27 +0000 (15:17 +0200)]
ASoC: codecs: Drop explicit initialization of struct i2c_device_id::driver_data to 0

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240624131728.1244053-2-u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoMAINTAINERS: adjust file entries after adding vendor prefix in sound dtbs
Lukas Bulwahn [Tue, 25 Jun 2024 03:34:19 +0000 (05:34 +0200)]
MAINTAINERS: adjust file entries after adding vendor prefix in sound dtbs

Commit ae8fc2948b48 ("ASoC: dt-bindings: add missing vender prefix on
filename") renames a few files in Documentation/devicetree/bindings/sound/,
but misses to adjust the file entries pointing to those files in
MAINTAINERS.

Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about
broken references.

Adjust the file entries in NXP SGTL5000 DRIVER and TEXAS INSTRUMENTS AUDIO
(ASoC/HDA) DRIVERS.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20240625033419.149775-1-lukas.bulwahn@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: boards: updates for 6.11 - part2
Mark Brown [Tue, 25 Jun 2024 11:34:52 +0000 (12:34 +0100)]
ASoC: Intel: boards: updates for 6.11 - part2

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Minor additions and cleanups this time.

10 months agoASoC: codecs: ES8326: Solving headphone detection and
Mark Brown [Tue, 25 Jun 2024 11:34:44 +0000 (12:34 +0100)]
ASoC: codecs: ES8326: Solving headphone detection and

Merge series from Zhang Yi <zhangyi@everest-semi.com>:

We propose four patches to solve headphone detection and suspend issues.
And there are several registers that should be read-only registers. So
we create es8326_writeable_register, and set these registers to false.

10 months agoASoC: Intel: sof_sdw: select PINCTRL_CS42L43 and SPI_CS42L43
Bard Liao [Mon, 24 Jun 2024 12:11:19 +0000 (14:11 +0200)]
ASoC: Intel: sof_sdw: select PINCTRL_CS42L43 and SPI_CS42L43

Cs42l43 bridge mode needs the two configurations.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240624121119.91552-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_sdw: add quirk for Dell SKU 0B8C
Pierre-Louis Bossart [Mon, 24 Jun 2024 12:11:18 +0000 (14:11 +0200)]
ASoC: Intel: sof_sdw: add quirk for Dell SKU 0B8C

Jack detection needs to rely on JD2, as most other Dell
AlderLake-based devices.

Closes: https://github.com/thesofproject/linux/issues/5021
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240624121119.91552-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: maxim-common: add max_98373_get_tx_mask function
Brent Lu [Mon, 24 Jun 2024 12:11:17 +0000 (14:11 +0200)]
ASoC: Intel: maxim-common: add max_98373_get_tx_mask function

Add a helper function max_98373_get_tx_mask() to get tx mask from
max98373 ACPI device properties at runtime.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240624121119.91552-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_sdw: fix jack detection on ADL-N variant RVP
Pierre-Louis Bossart [Mon, 24 Jun 2024 12:11:16 +0000 (14:11 +0200)]
ASoC: Intel: sof_sdw: fix jack detection on ADL-N variant RVP

Experimental tests show that JD2_100K is required, otherwise the jack
is detected always even with nothing plugged-in.

To avoid matching with other known quirks the SKU information is used.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240624121119.91552-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoc: tas2781: Add name_prefix as the prefix name of firmwares and kcontrol to suppor...
Shenghao Ding [Fri, 21 Jun 2024 13:23:07 +0000 (21:23 +0800)]
ASoc: tas2781: Add name_prefix as the prefix name of firmwares and kcontrol to support corresponding TAS2563/TAS2781s

Add name_prefix as the prefix name of firmwares and
kcontrol to support corresponding TAS2563/TAS2781s.
name_prefix is not mandatory.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20240621132309.564-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: ipc4-topology: Use correct queue_id for requesting input pin format
Peter Ujfalusi [Mon, 24 Jun 2024 12:15:18 +0000 (14:15 +0200)]
ASoC: SOF: ipc4-topology: Use correct queue_id for requesting input pin format

It is incorrect to request the input pin format of the destination widget
using the output pin index of the source module as the indexes are not
necessarily matching.
moduleA.out_pin1 can be connected to moduleB.in_pin0 for example.

Use the dst_queue_id to request the input format of the destination module.

This bug remained unnoticed likely because in nocodec topologies we don't
have process modules after a module copier, thus the pin/queue index is
ignored.
For the process module case, the code was likely have been tested in a
controlled way where all the pin/queue/format properties were present to
work.

Update the debug prints to have better information.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: stable@vger.kernel.org # v6.8+
Link: https://patch.msgid.link/20240624121519.91703-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mediatek: mt6358: Add "Dmic Mode Switch" kcontrol for switch DMIC mode.
Jiaxin Yu [Thu, 13 Jun 2024 02:07:25 +0000 (10:07 +0800)]
ASoC: mediatek: mt6358: Add "Dmic Mode Switch" kcontrol for switch DMIC mode.

There are two hardware connection methods for DMICs on the MT6358. In cases
where more than two DMICs are used, we need to time-multiplex these DMICs.
Therefore, we need to dynamically switch the modes of these DMICs based on
the actual usage scenarios.

            ---- DMIC1
AU_VIN0 ---
            ---- DMIC2

AU_VIN2 --- ----DMIC3

When we want to use DMIC1/2, configure it to one-wire mode. When we want to
use DMIC1/3, configure it to two-wire mode.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://patch.msgid.link/20240613020725.27874-1-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: ES8326: regcache_sync error issue
Zhang Yi [Mon, 24 Jun 2024 03:06:07 +0000 (11:06 +0800)]
ASoC: codecs: ES8326: regcache_sync error issue

We modified the regmap_config members to fix cach sync error.
There are several registers that should be read-only registers.
If these registers are written while synchronizing the register values,
the codec will enter an error state.So we create es8326_writeable_register,
and set these registers to false

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20240624030607.4307-5-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: ES8326: Minimize the pop noise
Zhang Yi [Mon, 24 Jun 2024 03:06:06 +0000 (11:06 +0800)]
ASoC: codecs: ES8326: Minimize the pop noise

Executing regcache_sync at initialization, we can hear a gentle pop
noise. So we created es8326_init for initialization instead of
executing es8326_resume

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20240624030607.4307-4-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: ES8326: Slove headphone detection issue
Zhang Yi [Mon, 24 Jun 2024 03:06:04 +0000 (11:06 +0800)]
ASoC: codecs: ES8326: Slove headphone detection issue

We modified the headphone detection setting to avoid an error button state
after codec resume from suspend state

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20240624030607.4307-2-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: nau8822: add MCLK support
Mark Brown [Sun, 23 Jun 2024 12:13:14 +0000 (13:13 +0100)]
ASoC: nau8822: add MCLK support

Merge series from Andrejs Cainikovs <andrejs.cainikovs@gmail.com>:

This change adds local MCLK handling, which would cover a case when a
reference audio clock is present in a system, but is not allowed to be
changed, see [1].

[1]: https://lore.kernel.org/all/ZfBdxrzX3EnPuGOn@ediswmail9.ad.cirrus.com/

10 months agoASoC: qcom: display port changes
Mark Brown [Sun, 23 Jun 2024 12:13:07 +0000 (13:13 +0100)]
ASoC: qcom: display port changes

Merge series from srinivas.kandagatla@linaro.org:

This patchset adds support for.
1. parse Display Port module tokens from ASoC topology
2. add support to DP/HDMI Jack events.
3. fixes a typo in function name in sm8250

Verified these patches on X13s along with changes to tplg in
https://git.codelinaro.org/linaro/qcomlt/audioreach-topology/-/tree/topic/x13s-dp?ref_type=heads
and ucm changes from https://github.com/Srinivas-Kandagatla/alsa-ucm-conf/tree/topic/x13s-dp

x1e80100 is verified by Krzysztof with his changes in tplg

https://git.codelinaro.org/linaro/qcomlt/audioreach-topology/-/merge_requests/7/commits

10 months agoASoC: Few constifications (mostly arguments)
Mark Brown [Sun, 23 Jun 2024 12:13:00 +0000 (13:13 +0100)]
ASoC: Few constifications (mostly arguments)

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Make few pointers in ASoC functions as pointers to const, so the code is
clearer to read, a bit safer and allows further constifications (e.g.
placing some data as rodata).

10 months agoASoC: Add ak4619 codec support
Mark Brown [Sun, 23 Jun 2024 12:12:52 +0000 (13:12 +0100)]
ASoC: Add ak4619 codec support

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

This is v3 patch-set for ak4619 driver.
It was created by Khanh, and I updated/adjusted to upstream.
It was tested on Renesas V4M GrayH

Link: https://lore.kernel.org/r/877ceotnrg.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87frtb3x4k.wl-kuninori.morimoto.gx@renesas.com
10 months agoASoC: add compatible for ti,pcm5242
Mark Brown [Sun, 23 Jun 2024 12:12:45 +0000 (13:12 +0100)]
ASoC: add compatible for ti,pcm5242

Merge series from Christian Hewitt <christianshewitt@gmail.com>:

Update bindings and add a driver compatible for the pcm5242
chip used on the Odroid HiFi-Shield2 i2c mezzanine board.

10 months agoASoC: codecs: wcd family: cleanups
Mark Brown [Sun, 23 Jun 2024 12:12:38 +0000 (13:12 +0100)]
ASoC: codecs: wcd family: cleanups

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Set of simple cleanups from similar issues in all Qualcomm WCD93xx
codecs.

The first patch "ASoC: codecs: wcd-mbhc: Constify passed MBHC reg
fields" is a requirement for few others, but except this they are
independent.

10 months agoASoC: dt-bindings: convert everest,es7134.txt &
Mark Brown [Sun, 23 Jun 2024 12:12:31 +0000 (13:12 +0100)]
ASoC: dt-bindings: convert everest,es7134.txt &

Merge series from Neil Armstrong <neil.armstrong@linaro.org>:

Convert the text bindings of the Everest ES7241/ES7134/7144/7154 2 channels
I2S analog to digital converter to dt-schema.

10 months agotlv320adc3xxx: Allow MICBIAS pins to be used as
Mark Brown [Sun, 23 Jun 2024 12:12:24 +0000 (13:12 +0100)]
tlv320adc3xxx: Allow MICBIAS pins to be used as

Merge series from Ricard Wanderlof <ricard.wanderlof@axis.com>:

In some cases, depending on system design, the MICBIAS pins on the
chip are not needed as such, but a couple of extra GPIO pins would be
useful. This patch allows the MICBIAS pins to be configured in the
device tree as general purpose output pins, controlled via the GPIO
framework.

Owing to their originally intended purpose there are some limitations:
when the MICBIAS pins are deactivated, they will float, so will likely
need a pulldown in many applications. When activated, they will
assume the voltage specified by the micbias1-vg and micbias2-vg
properties, respectively, meaning that the resulting output voltage
will be 2.0 V, 2.5 V or AVDD .

10 months agoCirrus Logic Family of ADCs
Mark Brown [Sun, 23 Jun 2024 12:12:16 +0000 (13:12 +0100)]
Cirrus Logic Family of ADCs

Merge series from Paul Handrigan <paulha@opensource.cirrus.com>:

This patchset provides ASoC support for the latest family
of Cirrus Logic multichannel, high performance audio ADCs.
The devices that are supported are CS5302 (2 channel ADC),
CS5304 (4 channel ADC), and CS5308 (8 channel ADC).

10 months agoASoC: dt-bindings: add ti,pcm5242 to pcm512x
Christian Hewitt [Sat, 22 Jun 2024 13:12:44 +0000 (13:12 +0000)]
ASoC: dt-bindings: add ti,pcm5242 to pcm512x

Add ti,pcm5242 to the pcm512x driver file

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://patch.msgid.link/20240622131245.2607533-2-christianshewitt@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Add support for ti,pcm5242 to the pcm512x driver
Christian Hewitt [Sat, 22 Jun 2024 13:12:45 +0000 (13:12 +0000)]
ASoC: Add support for ti,pcm5242 to the pcm512x driver

Add a compatible string to enable support for the ti,pcm5242 DAC chip
in the pcm512x driver.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://patch.msgid.link/20240622131245.2607533-3-christianshewitt@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: cs530x: Support for cs530x ADCs
Paul Handrigan [Fri, 21 Jun 2024 15:17:57 +0000 (10:17 -0500)]
ASoC: cs530x: Support for cs530x ADCs

Add support for the cs530x family of high performance
ADCs.

Signed-off-by: Paul Handrigan <paulha@opensource.cirrus.com>
Link: https://patch.msgid.link/20240621151757.1661265-3-paulha@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: cirrus,cs530x: Add initial DT binding
Paul Handrigan [Fri, 21 Jun 2024 15:17:56 +0000 (10:17 -0500)]
ASoC: dt-bindings: cirrus,cs530x: Add initial DT binding

Add the YAML DT bindings for the cs530x high performance
audio ADCs.

Signed-off-by: Paul Handrigan <paulha@opensource.cirrus.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240621151757.1661265-2-paulha@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoc: PCM6240: Return directly after a failed devm_kzalloc() in pcmdevice_i2c_probe()
Hao Ge [Mon, 17 Jun 2024 02:09:54 +0000 (10:09 +0800)]
ASoc: PCM6240: Return directly after a failed devm_kzalloc() in pcmdevice_i2c_probe()

The value “-ENOMEM” was assigned to the local variable “ret”
in one if branch after a devm_kzalloc() call failed at the beginning.
This error code will trigger then a pcmdevice_remove() call with a passed
null pointer so that an undesirable dereference will be performed.
Thus return the appropriate error code directly.

Fixes: 1324eafd37aa ("ASoc: PCM6240: Create PCM6240 Family driver code")
Signed-off-by: Hao Ge <gehao@kylinos.cn>
Link: https://patch.msgid.link/20240617020954.17252-1-hao.ge@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add pcm constraints for buffer size and period size
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:41 +0000 (12:58 +0530)]
ASoC: amd: acp: add pcm constraints for buffer size and period size

ACP common dma driver has a buffer size and period size restriction
which should be 64 byte aligned. Add pcm constraints for the same.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-8-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: move i2s clock generation sequence
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:40 +0000 (12:58 +0530)]
ASoC: amd: acp: move i2s clock generation sequence

I2S clock generation registers should be programmed before starting the I2S
dma when I2S controller is programmed as clock master. Move i2s clock
generation register programming sequence prior to i2s dma start.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: modify conditional check for programming i2s mclk
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:39 +0000 (12:58 +0530)]
ASoC: amd: acp: modify conditional check for programming i2s mclk

ACP provides different IO configurations(ACP PDM, I2S and SoundWire).
I2S mclk should be programmed only when I2S configuration is selected and
I2S controller is programmed as clock master.
Modify the conditional check for programming i2s mclk.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: remove unused variables from acp_resource structure
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:38 +0000 (12:58 +0530)]
ASoC: amd: acp: remove unused variables from acp_resource structure

Remove unused variables i2s_pin_cfg_offset and i2s_mode from acp_resource
structure entries.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: remove acp_i2s_probe function
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:37 +0000 (12:58 +0530)]
ASoC: amd: acp: remove acp_i2s_probe function

In acp_i2s_probe(), acp_base null check is verified.
As already acp_base null check will be verified in acp platform
driver probe sequence, additional NULL check in acp_i2s_probe() is not
needed. Remove acp_i2s_probe() function.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Merge up fixes
Mark Brown [Fri, 21 Jun 2024 12:17:21 +0000 (13:17 +0100)]
ASoC: Merge up fixes

We need some of the AMD fixes as a base for new work.

10 months agoASoC: fsl-asoc-card: set priv->pdev before using it
Elinor Montmasson [Thu, 20 Jun 2024 13:25:03 +0000 (15:25 +0200)]
ASoC: fsl-asoc-card: set priv->pdev before using it

priv->pdev pointer was set after being used in
fsl_asoc_card_audmux_init().
Move this assignment at the start of the probe function, so
sub-functions can correctly use pdev through priv.

fsl_asoc_card_audmux_init() dereferences priv->pdev to get access to the
dev struct, used with dev_err macros.
As priv is zero-initialised, there would be a NULL pointer dereference.
Note that if priv->dev is dereferenced before assignment but never used,
for example if there is no error to be printed, the driver won't crash
probably due to compiler optimisations.

Fixes: 708b4351f08c ("ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support")
Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
Link: https://patch.msgid.link/20240620132511.4291-2-elinor.montmasson@savoirfairelinux.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: convert everest,es7134.txt to dt-schema
Neil Armstrong [Thu, 20 Jun 2024 09:39:58 +0000 (11:39 +0200)]
ASoC: dt-bindings: convert everest,es7134.txt to dt-schema

Convert the text bindings of the Everest ES7134/7144/7154 2 channels
I2S analog to digital converter to dt-schema.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20240620-topic-amlogic-upstream-bindings-convert-everest-v2-2-660985615522@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: convert everest,es7241.txt to dt-schema
Neil Armstrong [Thu, 20 Jun 2024 09:39:57 +0000 (11:39 +0200)]
ASoC: dt-bindings: convert everest,es7241.txt to dt-schema

Convert the text biddings for the Everest ES7241 2 channels I2S analog
to digital converter to dt-schema.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20240620-topic-amlogic-upstream-bindings-convert-everest-v2-1-660985615522@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: add missing vender prefix on filename
Kuninori Morimoto [Thu, 20 Jun 2024 00:32:39 +0000 (00:32 +0000)]
ASoC: dt-bindings: add missing vender prefix on filename

Many Sound yaml files doesn't have vender prefix on filename.
Add missing vender prefix for these files.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/87wmmkpi6w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: move chip->flag variable assignment
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:36 +0000 (12:58 +0530)]
ASoC: amd: acp: move chip->flag variable assignment

chip->flag variable assignment will be skipped when acp platform device
creation is skipped. In this case chip>flag value will not be set.
chip->flag variable should be assigned along with other structure
variables for 'chip' structure. Move chip->flag variable assignment
prior to acp platform device creation.

Fixes: 3a94c8ad0aae ("ASoC: amd: acp: add code for scanning acp pdm controller")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240617072844.871468-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: remove i2s configuration check in acp_i2s_probe()
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:35 +0000 (12:58 +0530)]
ASoC: amd: acp: remove i2s configuration check in acp_i2s_probe()

ACP supports different pin configurations for I2S IO. Checking ACP pin
configuration value against specific value breaks the functionality for
other I2S pin configurations. This check is no longer required in i2s dai
driver probe call as i2s configuration check will be verified during acp
platform device creation sequence.
Remove i2s_mode check in acp_i2s_probe() function.

Fixes: b24484c18b10 ("ASoC: amd: acp: ACP code generic to support newer platforms")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240617072844.871468-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: add a null check for chip_pdev structure
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:34 +0000 (12:58 +0530)]
ASoC: amd: acp: add a null check for chip_pdev structure

When acp platform device creation is skipped, chip->chip_pdev value will
remain NULL. Add NULL check for chip->chip_pdev structure in
snd_acp_resume() function to avoid null pointer dereference.

Fixes: 088a40980efb ("ASoC: amd: acp: add pm ops support for acp pci driver")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240617072844.871468-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: rt1318: Add RT1318 audio amplifier driver
Jack Yu [Wed, 19 Jun 2024 05:53:42 +0000 (05:53 +0000)]
ASoC: rt1318: Add RT1318 audio amplifier driver

This is the initial i2s-based amplifier driver for rt1318.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://msgid.link/r/b3055442ce6d4994aa01aa1fad6ba1fe@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: ak4619: Add initial DT binding
Kuninori Morimoto [Wed, 19 Jun 2024 01:00:23 +0000 (01:00 +0000)]
ASoC: dt-bindings: ak4619: Add initial DT binding

Add Asahi Kasei ak4619 audio codec bindings.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/87h6dpwxug.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Add ak4619 codec support
Khanh Le [Wed, 19 Jun 2024 00:59:36 +0000 (00:59 +0000)]
ASoC: Add ak4619 codec support

Add support for the Asahi Kasei AK4619 audio codec.

[Kuninori cleanuped and adjusted to upstream code]

Signed-off-by: Khanh Le <khanh.le.xr@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/87iky5wxvr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: cs35l56: Accept values greater than 0 as IRQ numbers
Simon Trimmer [Mon, 17 Jun 2024 13:53:38 +0000 (14:53 +0100)]
ASoC: cs35l56: Accept values greater than 0 as IRQ numbers

IRQ lookup functions such as those in ACPI can return error values when
an IRQ is not defined. The i2c core driver converts the error codes to a
value of 0 and the SPI bus driver passes them unaltered to client device
drivers.

The cs35l56 driver should only accept positive non-zero values as IRQ
numbers.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file")
Link: https://msgid.link/r/20240617135338.82006-1-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: soc-acpi: mtl: fix speaker no sound on Dell SKU 0C64
Shuming Fan [Wed, 12 Jun 2024 07:57:40 +0000 (15:57 +0800)]
ASoC: Intel: soc-acpi: mtl: fix speaker no sound on Dell SKU 0C64

Dell SKU 0C64 has a single rt1318 amplifier.
The prefix name of control still needs to be set rt1318-1 corresponding to UCM config.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20240612075740.1678082-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd939x: Drop unused num_ports field
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:36 +0000 (18:15 +0200)]
ASoC: codecs: wcd939x: Drop unused num_ports field

The driver does not use few 'num_ports' in 'struct wcd939x_sdw_priv'.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-23-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd939x: Drop unused RX/TX direction enum
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:35 +0000 (18:15 +0200)]
ASoC: codecs: wcd939x: Drop unused RX/TX direction enum

The enum with RX/TX soundwire direction is not used.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-22-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd939x: Constify wcd939x_sdw_ch_info
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:34 +0000 (18:15 +0200)]
ASoC: codecs: wcd939x: Constify wcd939x_sdw_ch_info

Driver does not modify static wcd939x_sdw_ch_info array, so it can be
made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-21-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd939x: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:33 +0000 (18:15 +0200)]
ASoC: codecs: wcd939x: Constify static data

Driver does not modify few static data (MBHC reg fields, IRQ chip), so
make them const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-20-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd938x: Drop unused num_ports field
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:32 +0000 (18:15 +0200)]
ASoC: codecs: wcd938x: Drop unused num_ports field

The driver does not use few 'num_ports' in 'struct wcd938x_sdw_priv'.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-19-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd938x: Drop unused RX/TX direction enum
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:31 +0000 (18:15 +0200)]
ASoC: codecs: wcd938x: Drop unused RX/TX direction enum

The enum with RX/TX soundwire direction is not used.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-18-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd938x: Constify wcd938x_sdw_ch_info
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:30 +0000 (18:15 +0200)]
ASoC: codecs: wcd938x: Constify wcd938x_sdw_ch_info

Driver does not modify static wcd938x_sdw_ch_info array, so it can be
made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-17-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd938x: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:29 +0000 (18:15 +0200)]
ASoC: codecs: wcd938x: Constify static data

Driver does not modify few static data (MBHC reg fields, IRQ chip), so
make them const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-16-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd937x: Drop unused chipid member
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:28 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Drop unused chipid member

The driver stores the read chipid in 'struct wcd937x_priv' but never
needs it after.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-15-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd937x: Drop unused state container fields
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:27 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Drop unused state container fields

The driver does not use few 'struct wcd937x_priv' and 'struct
wcd937x_sdw_priv' members, so just drop them for smaller code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-14-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd937x: Drop unused enums, defines and types
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:26 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Drop unused enums, defines and types

Few declarations (defines, struct codec_port_info, enums) are not used
and can be safely dropped.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-13-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd937x: Constify wcd937x_sdw_ch_info
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:25 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Constify wcd937x_sdw_ch_info

Driver does not modify static wcd937x_sdw_ch_info array, so it can be
made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-12-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd937x: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:24 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Constify static data

Driver does not modify few static data (MBHC reg fields, IRQ chip), so
make them const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-11-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd934x: Handle nicer probe deferral and simplify with dev_err_probe()
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:23 +0000 (18:15 +0200)]
ASoC: codecs: wcd934x: Handle nicer probe deferral and simplify with dev_err_probe()

wcd934x_codec_parse_data() function is called only from probe(), so
printing errors on resource acquisition is discouraged, because it can
pollute dmesg in case of probe deferral.  The actual deferral is here
unlikely, but still the code is a bit simpler with dev_err_probe().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-10-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd934x: Drop unused mic bias voltage fields
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:22 +0000 (18:15 +0200)]
ASoC: codecs: wcd934x: Drop unused mic bias voltage fields

Driver stores the voltage of mic bias in fields in state container
structure, but actually never reads them - except for the mic2 bias
(micb2_mv field).  Drop the fields from the structure so the code will
be a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-9-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd934x: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:21 +0000 (18:15 +0200)]
ASoC: codecs: wcd934x: Constify static data

Driver does not modify few static data (arrays with sample rates, MBHC
reg fields, regmap config), so make them const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-8-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd934x: Drop unused interp path enum
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:20 +0000 (18:15 +0200)]
ASoC: codecs: wcd934x: Drop unused interp path enum

The enum with inter path is not used.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-7-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd9335: Drop unused dmic rate handling
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:19 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Drop unused dmic rate handling

Driver was prepared to adjust DMIC microphone parameters according to
DMIC clock rate which is read from platform data or Devicetree.  The
latter part never happened, so the code is always called with
dmic_clk_rate=0, prints error and uses default/fallback values.  All
this part can be simplified by dropping dead parts of code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-6-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd9335: Drop unneeded error message
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:18 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Drop unneeded error message

Error-level should not be used as debugging.  The code (function
wcd9335_get_dmic_clk_val()) will always be called with same parameters,
so this is not really useful debug anyway, so drop it.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-5-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd9335: Handle nicer probe deferral and simplify with dev_err_probe()
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:17 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Handle nicer probe deferral and simplify with dev_err_probe()

wcd9335_parse_dt() function is called only from probe(), so printing
errors on resource acquisition is discouraged, because it can pollute
dmesg.  Use dev_err_probe() to fix this and also make the code a bit
simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-4-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd9335: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:16 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Constify static data

Driver does not modify few static data (arrays with sample rates,
interrupt description, regmap config), so make them const for code
safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-3-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: wcd9335: Drop unused state container fields
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:15 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Drop unused state container fields

The driver does not use few 'struct wcd9335_codec' members, so just drop
them for smaller code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-2-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>