Commit graph

47734 commits

Author SHA1 Message Date
Amadeusz Sławiński
8b78fbf7bf
ASoC: Intel: avs: Add rt5514 machine board
To support AVS-rt5514 configuration add machine board connecting AVS
platform component driver with rt5514 codec one.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231027110537.2103712-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-27 17:37:29 +01:00
Geoffrey D. Bennett
a5901f27dc ALSA: scarlett2: Add missing check with firmware version control
scarlett2_add_firmware_version_ctl() may return an error, but the
return value was not being checked. Add the missing check.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Fixes: 701949cc01 ("ALSA: scarlett2: Add support for reading firmware version")
Link: https://lore.kernel.org/r/ZTuKcXajVnuelBEb@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-27 12:33:11 +02:00
Matias Ezequiel Vara Larsen
fe981e6756 ALSA: virtio: use ack callback
This commit uses the ack() callback to determine when a buffer has been
updated, then exposes it to guest.

The current mechanism splits a dma buffer into descriptors that are
exposed to the device. This dma buffer is shared with the user
application. When the device consumes a buffer, the driver moves the
request from the used ring to available ring.

The driver exposes the buffer to the device without knowing if the
content has been updated from the user. The section 2.8.21.1 of the
virtio spec states that: "The device MAY access the descriptor chains
the driver created and the memory they refer to immediately". If the
device picks up buffers from the available ring just after it is
notified, it happens that the content may be old.

When the ack() callback is invoked, the driver exposes only the buffers
that have already been updated, i.e., enqueued in the available ring.
Thus, the device always picks up a buffer that is updated.

For capturing, the driver starts by exposing all the available buffers
to device. After device updates the content of a buffer, it enqueues it
in the used ring. It is only after the ack() for capturing is issued
that the driver re-enqueues the buffer in the available ring.

Co-developed-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>
Signed-off-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>
Signed-off-by: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
Link: https://lore.kernel.org/r/ZTjkn1YAFz67yfqx@fedora
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-27 11:25:07 +02:00
Geoffrey D. Bennett
3473185f31 ALSA: scarlett2: Remap Level Meter values
The values previously returned by the Level Meter control were passed
through from the interface without interpretation, but it has been
discovered that the order of the values matches the mux assignment
order (which is not presented to userspace). In addition, the values
for disabled mux outputs, and mux outputs which share a source are
invalid.

This patch adds a per-device meter_map[], and a dynamic
meter_level_map[] which is updated on routing changes. The meter level
map gets used by scarlett2_meter_ctl_get() to both present the values
in a standard order, and to fix up the invalid values by zeroing them
(for disabled outputs) and copying them (for mux outputs which share a
source).

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/d437ace603eff685d2e0c3d0960589d7a09dd647.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-27 11:23:03 +02:00
Geoffrey D. Bennett
2190b9aea4 ALSA: scarlett2: Allow passing any output to line_out_remap()
Line outputs 3 & 4 on the Gen 3 18i8 are internally the analogue 7 and
8 outputs, and this renumbering is hidden from the user by
line_out_remap(). By allowing higher values (representing non-analogue
outputs) to be passed to line_out_remap(), repeated code from
scarlett2_mux_src_enum_ctl_get() and scarlett2_mux_src_enum_ctl_put()
can be removed.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/3b70267931f5994628ab27306c73cddd17b93c8f.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-27 11:23:02 +02:00
Geoffrey D. Bennett
701949cc01 ALSA: scarlett2: Add support for reading firmware version
The 84 bytes read during initialisation step 2 were previously
ignored. This patch retrieves the firmware version from bytes 8-11,
stores it in the scarlett2_data struct, and makes it available
through a new control "Firmware Version".

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/e76cd80c3445769e60c95df12c4635fc8abfe5c7.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-27 11:23:01 +02:00
Geoffrey D. Bennett
f3c42a2da4 ALSA: scarlett2: Rename Gen 3 config sets
The config sets are named NO_MIXER, GEN_2, GEN_3, and CLARETT
currently. Rename NO_MIXER and GEN_3 to GEN_3A and GEN_3B respectively
as NO_MIXER is only for the smaller Gen 3 devices.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/19ae5eea7fc499945efa8eeda7fcd8afe73f62d9.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-27 11:23:00 +02:00
Geoffrey D. Bennett
efc3d7d203 ALSA: scarlett2: Rename scarlett_gen2 to scarlett2
This driver was originally developed for the Focusrite Scarlett Gen 2
series. Since then Focusrite have used a similar protocol for their
Gen 3, Gen 4, Clarett USB, Clarett+, and Vocaster series.

Let's call this common protocol the "Scarlett 2 Protocol" and rename
the driver to scarlett2 to not imply that it is restricted to Gen 2
series devices.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/e1ad7f69a1e20cdb39094164504389160c1a0a0b.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-27 11:22:59 +02:00
Mark Brown
60781d2d58
ASoC: Intel: bytcr_wm5102: add various quirks
Merge series from Hans de Goede <hdegoede@redhat.com>:

Hi Mark,

As requested here is a v2 of my series to add various quirks
to the bytcr_wm5102 Intel board driver to make it more flexible.

Changes in v2:
- Dropped 2 already merged patches
- Rebased on top of broonie/sound/for-6.7

Regards,

Hans

Hans de Goede (4):
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_SSP2 quirk
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_MCLK_19_2MHZ quirk
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_OUT_MAP quirk
  ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_IN_MAP quirk

 sound/soc/intel/boards/bytcr_wm5102.c | 229 +++++++++++++++++++++++---
 1 file changed, 202 insertions(+), 27 deletions(-)

--
2.41.0
2023-10-26 17:03:01 +01:00
Mark Brown
246f388ec1
sc7180: Add qdsp based soundcard
Merge series from Nikita Travkin <nikita@trvn.ru>:

Some devices, such as Acer Aspire 1, can't use lpass dirrectly, but
instead must use adsp core to play sound. Since otherwise the hardware
is, usually, very similar across the devices on the same platform, it
makes sense to reuse the same boardfile.

This series refactors the sc7180.c slightly and adds the functions to
control clocks via adsp instead of controlling the hardware directly.
2023-10-26 17:02:53 +01:00
Mark Brown
11817547b7
ASoC: fix widget name comparisons (consider DAI name
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Some codec drivers compare widget names with strcmp, ignoring
the component name prefix.  If prefix is used, the comparisons start failing.

Except Qualcomm lpass-rx-macro, none of the patches were tested
on hardware.
2023-10-26 17:02:46 +01:00
Mark Brown
926f192f00
ASoC: codecs: Add aw88399 amplifier driver
Merge series from wangweidong.a@awinic.com:

Add the awinic,aw88399 property to the awinic,aw88395.yaml file.

Add i2c and amplifier registration for
aw88399 and their associated operation functions.
2023-10-26 17:02:39 +01:00
Stefan Binding
76c121821a ASoC: cs35l41: Detect CSPL errors when sending CSPL commands
The existing code checks for the correct state transition after sending
a command. However, it is possible for the message box to return -1,
which indicates an error, if an error has occurred in the firmware.
We can detect if the error has occurred, and return a different error.
In addition, there is no recovering from a CSPL error, so the retry
mechanism is not needed in this case, and we can return immediately.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231026150558.2105827-9-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:29 +02:00
Stefan Binding
a51d8ba03a ALSA: hda: cs35l41: Check CSPL state after loading firmware
CSPL firmware should be in RUNNING or PAUSED state after loading.
If not, the firmware has not been loaded correctly, and we can unload
it and pass the error up.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-8-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:22 +02:00
Stefan Binding
33790d1f03 ALSA: hda: cs35l41: Do not unload firmware before reset in system suspend
Given the part is about to reset due to system suspend, and we are
already in hibernate, there is no need to wake up the amp, just to get
it ready to be reset. We just need to ensure cs_dsp is ready for reset
by resetting the states.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-7-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:21 +02:00
Stefan Binding
2ee06ff5d7 ALSA: hda: cs35l41: Force a software reset after hardware reset
To ensure the chip has correctly reset during probe and system suspend,
we need to force a software reset, in case of systems where the
hardware reset is not available.

The software reset register was labelled as volatile but not readable,
however, it is readable, (just returns 0x0). Adding it to readable
registers means it will be correctly treated as volatile, and thus
will not be cached.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-6-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:20 +02:00
Stefan Binding
881b7bce0c ALSA: hda: cs35l41: Run boot process during resume callbacks
During initial probe, after reset is asserted for the first time, the
driver goes through a boot process to ensure the amp is ready to be
used. This involves verifying a boot flag, as well as verifying the
chip ids.

This is necessary since it is possible for the amp to have been fully
reset by the system suspend calls.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-5-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:19 +02:00
Stefan Binding
fff393db71 ALSA: hda: cs35l41: Assert Reset prior to de-asserting in probe and system resume
To ensure we are in a known state, exiting from reset at the point of
probe or in system resume, assert reset before we de-assert it.

Since the BIOS may enter into a pre-boot environment to control the
amps (for example for boot beep), we need to ensure we start from a
known, reset state prior to probe or system resume.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-4-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:19 +02:00
Stefan Binding
a7423e9019 ALSA: hda: cs35l41: Assert reset before system suspend
Some system suspend modes may remove power supplies.
To ensure we are not running during this time, we should assert reset.

Note: since the amps use a shared reset, asserting reset prior to
system suspend only works if the amps are suspended in the reverse
order to probe.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:18 +02:00
Stefan Binding
f01b371b07 ALSA: hda: cs35l41: Use reset label to get GPIO for HP Zbook Fury 17 G9
This laptop has an incorrect setting in its _DSD for boost type, but
the rest of the _DSD is correct, and we can still use the reset label
to obtain the reset gpio.

Also fix channel map so that amp 0 is right, and amp 1 is left.

Fixes: 581523ee36 ("ALSA: hda: cs35l41: Override the _DSD for HP Zbook Fury 17 G9 to correct boost type")

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 17:55:17 +02:00
Cezary Rojewski
168d97844a
ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails
Error path in snd_skl_parse_uuids() shall free last allocated module if
its instance_id allocation fails.

Fixes: f8e0665211 ("ASoC: Intel: Skylake: Fix uuid_module memory leak in failure case")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231026082558.1864910-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:25:44 +01:00
Krzysztof Kozlowski
f82eb06a40
ASoC: tegra: machine: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-18-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:54 +01:00
Krzysztof Kozlowski
317dd0dbad
ASoC: samsung: speyside: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-17-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:53 +01:00
Krzysztof Kozlowski
86cfaf99e4
ASoC: mediatek: mt8192: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-16-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:52 +01:00
Krzysztof Kozlowski
d1ecaabe9f
ASoC: mediatek: mt8188: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20231023095428.166563-15-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:51 +01:00
Krzysztof Kozlowski
0fe153a99f
ASoC: mediatek: mt8186: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-14-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:50 +01:00
Krzysztof Kozlowski
e84c7f5db9
ASoC: mediatek: mt8183: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-13-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:49 +01:00
Krzysztof Kozlowski
343b62590d
ASoC: codecs: wm8995: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-12-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:48 +01:00
Krzysztof Kozlowski
e13b63c475
ASoC: codecs: wm8994: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:47 +01:00
Krzysztof Kozlowski
e54db8826f
ASoC: codecs: wm8962: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-10-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:46 +01:00
Krzysztof Kozlowski
7df1e6a3c6
ASoC: codecs: wcd9335: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-9-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:45 +01:00
Krzysztof Kozlowski
e2d38e1196
ASoC: codecs: rtq9128: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-8-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:44 +01:00
Krzysztof Kozlowski
b2056ce3cf
ASoC: codecs: rt5682s: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:43 +01:00
Krzysztof Kozlowski
a1fa72a780
ASoC: codecs: max9867: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:42 +01:00
Krzysztof Kozlowski
5efc1c903e
ASoC: codecs: lpass-rx-macro: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:41 +01:00
Krzysztof Kozlowski
ecea1812b9
ASoC: codecs: adav80x: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:39 +01:00
Krzysztof Kozlowski
7a0762587a
ASoC: codecs: adau1373: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:38 +01:00
Krzysztof Kozlowski
ccd0c6c709
ASoC: codecs: 88pm860x: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26 12:15:37 +01:00
Takashi Iwai
ce8466cd4c ALSA: aoa: Replace with __packed attribute
Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 09:43:11 +02:00
Takashi Iwai
98a4e82e57 ALSA: caiaq: Replace with __packed attribute
Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 09:43:07 +02:00
Takashi Iwai
e244953ef6 ALSA: mixart: Replace with __packed attribute
Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 09:43:03 +02:00
Takashi Iwai
afcd82afd2 ALSA: azt3328: Replace with __packed attribute
Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 09:42:59 +02:00
Takashi Iwai
2fb203dbea ALSA: rawmidi: Replace with __packed attribute
Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 09:42:55 +02:00
Takashi Iwai
fdbe0f2044 ALSA: pcm: Replace with __packed attribute
Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 09:42:51 +02:00
Takashi Iwai
b7cbd9c934 ALSA: control: Replace with __packed attribute
Replace the old __attribute__((packed)) with the new __packed.
Only cleanup, no functional changes.

Link: https://lore.kernel.org/r/20231025132314.5878-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26 09:42:43 +02:00
Syed Saba Kareem
b97f4dac40
ASoC: amd: acp: add machine driver support for acp7.0
add machine driver support for ACP7.0 on legacy stack.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-13-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:55 +01:00
Syed Saba Kareem
e84db124cb
ASoC: amd: acp: Add pci legacy driver support for acp7.0 platform
Add pci legacy driver support and create platform driver for
acp7.0 platform.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-12-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:54 +01:00
Syed Saba Kareem
caa126f2b0
ASoC: amd: acp: change acp power on mask macro value
change acp power on mask macro value so that same macro can be used
for all amd platforms.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-11-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:53 +01:00
Syed Saba Kareem
1b6180c095
ASoC: amd: acp: change acp-deinit function arguments
acp-deinit function will not be same for all platforms.
To make platform specific changes in acp-deinit
function, instead of passing base address pass chip
structure which contains acp_rev feild.
chip->acp_rev will be used to add platform specific code
in acp-deinit().

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-10-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:52 +01:00
Syed Saba Kareem
39d9ee4716
ASoC: amd: acp: add machine driver support for pdm use case
add pdm use case machine driver support

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-9-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:51 +01:00
Syed Saba Kareem
16fb2a2544
ASoC: amd: acp: add condition check for i2s clock generation
for only PDM endpoint i2s master clock is not required.
Add a condition check for the same based on chip flag value.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-8-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:50 +01:00
Syed Saba Kareem
57e857770f
ASoC: amd: acp: add platform and flag data to acp data structure
add name of the platform and flag data in private data structure.
name of the platform will be used to differentiate platforms where as
flag will be used to know what kind of endpoint configuration is selected
where its legacy(I2S + PDM) or only ACP PDM.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-7-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:49 +01:00
Syed Saba Kareem
3a94c8ad0a
ASoC: amd: acp: add code for scanning acp pdm controller
Add common code for scanning acp pdm controller and create
platform device for the same.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-6-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:48 +01:00
Syed Saba Kareem
d4c2d5391d
ASoC: amd: acp: add Kconfig options for acp6.3 based platform driver
ACP6.3 based platform legacy drivers can be built by selecting
necessary kernel config option. This patch enables build support
of the same.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-5-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:47 +01:00
Syed Saba Kareem
9393bfb4c4
ASoC: amd: acp: add machine driver support for acp6.3 platform
add legacy machine driver support for acp6.3 based platform.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-4-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:46 +01:00
Syed Saba Kareem
c7bf9156f8
ASoC: amd: acp: add i2s clock generation support for acp6.3 based platforms
Add I2S LRCLK & BCLK generation code for ACP6.3 based platforms.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-3-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:45 +01:00
Syed Saba Kareem
40f74d5f09
ASoC: amd: acp: refactor acp i2s clock generation code
Refactor acp i2s LRCLK,BCLK generation code and move to commnon file.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-2-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:44 +01:00
Syed Saba Kareem
33d120a49b
ASoC: amd: acp: Add acp6.3 pci legacy driver support
Add pci legacy driver support and create platform driver for
acp6.3 based platforms.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:43 +01:00
Su Hui
f5c7bc7a1f
ASoC: Intel: Skylake: add an error code check in skl_pcm_trigger
skl_decoupled_trigger() can return error code like -EPIPE if failed,
add check for this.

Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20231020092619.210520-1-suhui@nfschina.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:42 +01:00
Krzysztof Kozlowski
7618ab5249
ASoC: codecs: wcd938x: use defines for entries in snd_soc_dai_driver array
snd_soc_dai_driver array in wcd938x driver has two entries whose order
must match order of wcd938x->sdw_priv array.  The wcd938x_bind() and
wcd938x_codec_set_sdw_stream() rely on this order.  wcd938x->sdw_priv
array is indexed by enum with AIF1_PB and AIF1_CAP, so use the same
defines instead of raw numners for snd_soc_dai_driver array.
No functional impact.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231019144108.42853-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:41 +01:00
Krzysztof Kozlowski
e29de7abda
ASoC: qcom: q6apm-lpass-dais: pass max number of channels to Audioreach
Using the params_channels() helper when setting hw_params, results in
passing to Audioreach minimum number of channels valid for given
hardware.  This is not valid for any hardware which sets minimum
channels to two and maximum to something bigger, like four channels.

Instead pass the maximum number of supported channels to allow playback
of multi-channel formats.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231017161429.431663-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:40 +01:00
Nikita Travkin
4531f512e3
ASoC: qcom: sc7180: Add support for qdsp6 baked sound
Some sc7180 devices use audio adsp to play sound. The setup for this
adsp is similar to the dirrect lpass usage but requires the use of
different link ids and clocks.

This commit adds support for the qdsp based audio, reusing the common
parts like audio codec setup and jack creation.

Since the setup is mostly generic and codec specific setup is guarded
behind a check, a generic compatible is added, similar to other
platforms. Even though those changes target Acer Aspire 1 as the only
user of the adsp audio on this platform present upstream at the moment
of the commit, those changes should be either dirrectly compatible or
trivially expandable to the other devices that will be added in the
future.

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Link: https://lore.kernel.org/r/20231020-sc7180-qdsp-sndcard-v1-2-157706b7d06f@trvn.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:38 +01:00
Hans de Goede
8619fd0e90
ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_IN_MAP quirk
Unlike all designs supported sofar the Lenovo Yoga Tab 3 YT3-X90 does not
have its internal microphone (intmic) on IN3L with the headset microphone
on IN1L. Instead this tablet has the intmic on IN1L and the hsmic on IN2L.

Add a BYT_WM5102_IN_MAP quirk mechanism to allow selecting between
different input maps and add support for both setups with the current
settings being the default map.

The new INTMIC_IN1L_HSMIC_IN2L map is enabled by default on CHT because
the Lenovo Yoga Tab 3 YT3-X90 model is the only Cherry Trail design
currently supported. If different CHT designs turn up which need different
input maps we can add DMI quirks to select a different map later.

The userspace UCM profile also needs to know about this so
extend the components string with this info too.

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231025143513.291753-5-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:14 +01:00
Hans de Goede
c556d202be
ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_OUT_MAP quirk
Some x86 WM5102 designs don't use the SPK pins for speaker output
instead they use the HPOUT2L + HPOUT2R for the speakers.

Add an BYT_WM5102_OUT_MAP quirk mechanism to allow selecting
between 2 output maps, one for the speakers on the SPK output pins
and one for the speakers on the HPOUT2 pins.

The new HPOUT2 map is enabled by default on CHT because this is used on
the Lenovo Yoga Tab 3 YT3-X90 model which is the only Cherry Trail design
currently supported. If different CHT designs turn up which need different
output maps we can add DMI quirks to select a different map later.

The userspace UCM profile also needs to know about this so
setup a components string with this info too.

While at it also drop the unused "Line Out" route.

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231025143513.291753-4-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:13 +01:00
Hans de Goede
bce4b014cc
ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_MCLK_19_2MHZ quirk
The Cherry Trail SoC only supports 19200000 as clk-frequency for
the pmc_plt_clk used for the audio codec.

Add a BYT_WM5102_MCLK_19_2MHZ quirk for this and enable this
by default on Cherry Trail SoCs.

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231025143513.291753-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:12 +01:00
Hans de Goede
95504218c6
ASoC: Intel: bytcr_wm5102: Add BYT_WM5102_SSP2 quirk
Add the standard intel board file quirk mechanism also used in many
other intel board drivers and add a BYT_WM5102_SSP2 quirk setting
for designs using SSP2 instead of SSP0.

And enable the new BYT_WM5102_SSP2 quirk on Cherry Trail devices
since those always use SSP2.

The logging of the quirks uses dev_info_once() because probe() may run
multiple times because of snd_soc_register_card() returning -EPROBE_DEFER.

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231025143513.291753-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 17:21:11 +01:00
Weidong Wang
8ade6cc7e2
ASoC: codecs: Add aw88399 amplifier driver
Add i2c and amplifier registration for
aw88399 and their associated operation functions.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231025112625.959587-4-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 13:39:26 +01:00
Weidong Wang
725f3b967a
ASoC: codecs: Add code for bin parsing compatible with aw88399
Add aw88399 compatible code to the aw88395_lib.c file
so that it can parse aw88399's bin file.

Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231025112625.959587-3-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25 13:39:25 +01:00
Max McCarthy
99248c8902 ALSA: usb-audio: add quirk flag to enable native DSD for McIntosh devices
McIntosh devices supporting native DSD require the feature to be
explicitly exposed. Add a flag that fixes an issue where DSD audio was
defaulting to DSD over PCM instead of delivering raw DSD data.

Signed-off-by: Max McCarthy <mmccarthy@mcintoshlabs.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/BL0PR13MB4433226005162D186A8DFF4AD6DFA@BL0PR13MB4433.namprd13.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-25 08:39:08 +02:00
Takashi Iwai
264aeb994e ASoC: SOF: Make return of remove_late void, too
Like the change we've done for remove callback, the newly introduced
remove_late callback should be changed to void return, too.

Fixes: 17baaa1f95 ("ASoC: SOF: core: Add probe_early and remove_late callbacks")
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231023153605.863-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-25 08:38:35 +02:00
Hans de Goede
109cb21601
ASoC: Intel: bytcr_wm5102: Add support for Lenovo Yoga Tab 3 Pro YT3-X90
The Lenovo Yoga Tab 3 Pro YT3-X90 x86 tablet, which ships with Android
with a custom kernel as factory OS, does not list the used WM5102 codec
inside its DSDT.

So acpi_dev_get_first_match_dev() is going to fail on this board.
Fallback to using "spi-$(mach->id)" as codec device name in this case
to allow bytcr_wm5102 to work on these tablets.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231021211534.114991-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24 18:03:12 +01:00
Hans de Goede
2cb5478839
ASoC: Intel: soc-acpi-cht: Add Lenovo Yoga Tab 3 Pro YT3-X90 quirk
The Lenovo Yoga Tab 3 Pro YT3-X90 x86 tablet, which ships with Android with
a custom kernel as factory OS, does not list the used WM5102 codec inside
its DSDT.

Workaround this with a new snd_soc_acpi_intel_baytrail_machines[] entry
which matches on the SST id instead of the codec id like nocodec does,
combined with using a machine_quirk callback which returns NULL on
other machines to skip the new entry on other machines.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231021211534.114991-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24 18:03:11 +01:00
Colin Ian King
2e2a161334
ASoC: mediatek: mt8186: remove redundant assignments to variable tdm_con
There are two occurrences where variable tdm_con is being initialized
to zero and the next statement re-assigns tdm_con to a new value. The
initializations are redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023151704.670240-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24 18:03:10 +01:00
Mark Brown
8c2d2383d2
ASoC: mediatek: Remove redundant code and add
Merge series from Maso Huang <maso.huang@mediatek.com>:

Add support for sample rate checking on the MT7986.
2023-10-24 17:38:40 +01:00
Maso Huang
0e20929434
ASoC: mediatek: mt7986: add sample rate checker
mt7986 only supports 8/12/16/24/32/48/96/192 kHz

Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231024035019.11732-4-maso.huang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24 13:26:49 +01:00
Maso Huang
0f10adb0ed
ASoC: mediatek: mt7986: remove the mt7986_wm8960_priv structure
Remove the mt7986_wm8960_priv structure.

Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231024035019.11732-3-maso.huang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24 13:26:48 +01:00
Maso Huang
3e92ea2a46
ASoC: mediatek: mt7986: drop the remove callback of mt7986_wm8960
Drop the remove callback of mt7986_wm8960.

Signed-off-by: Maso Huang <maso.huang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231024035019.11732-2-maso.huang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24 13:26:47 +01:00
Colin Ian King
91e174fc04
ASoC: codecs: rt298: remove redundant assignment to d_len_code
Variable d_len_code is being initialized to zero and then re-assigned a
different value in all the valid cases in the following switch statement.
The only place it is not being assigned a value is on the return for
a default case and in this case it does not need to be assigned. The
initialization is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20231023154917.671595-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 19:40:22 +01:00
Janusz Krzysztofik
7790bccd7b
ASoC: ti: ams-delta: Allow it to be test compiled
The driver is now built only when MACH_AMS_DELTA is selected, which
requires a very specific selection of ARCH settings.  As a consequence, it
gets very little attention from build-bots, if not none.

Drop the driver dependency on <asm/mach-types.h>, no longer required since
conversion to snd_soc_register_card() and drop of machine_is_ams_delta().
With that in place, allow the driver to be built in any environment as
long as COMPILE_TEST is selected.  Take care of not selecting
SND_SOC_OMAP_MCBSP if COMMON_CLK is not selected.

Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Link: https://lore.kernel.org/r/20231008135601.542356-1-jmkrzyszt@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 19:40:21 +01:00
Mark Brown
4fc4db7a68 Linux 6.6-rc7
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmU1ngkeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGrsIH/0k/+gdBBYFFdEym
 foRhKir9WV3ZX4oIozJjA1f7T+qVYclKs6kaYm3gNepRBb6AoG8pdgv4MMAqhYsf
 QMe2XHi0MrO/qKBgfNfivxEa9jq+0QK5uvTbqCRqCAB8LfwVyDqapCmg3EuiZcPW
 UbMITmnwLIfXgPxvp9rabmCsTqO6FLbf0GDOVIkNSAIDBXMpcO1iffjrWUbhRa7n
 oIoiJmWJLcXLxPWDsRKbpJwzw2cIG08YhfQYAiQnC3YaeRm1FKLDIICRBsmfYzja
 rWv9r4dn4TDfV4/AnjggQnsZvz2yPCxNaFSQIT88nIeiLvyuUTJ9j8aidsSfMZQf
 xZAbzbA=
 =NoQv
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmU2vcQACgkQJNaLcl1U
 h9AtIQgAgdSrQSgtmh3DDsLhLISob3mRSAEpaOXzaFCKnJS1K2B1NT2aZxrfBzFE
 DDQgRXfbWM4tnsZ//EVpGK5iu7PH+xjfGpREUsajOzn7Jj5jQNpyQj/RN62sYNfp
 rA17SjilZo8nCHeYB1SVUuj3eJizaRFkFernK8J0ReCDCE8Boc8S8TWXTkjcOVmF
 qzr3c6s6gBHCDDmiFiGSG8Y7ARROTtTAe5UcyCrUXXWXZqfq3qp4kEC/keZX3Y0L
 4hZH62Y+3qHFGc7x9Z/kjGSdIH/DDANH0QMZJ0GND3n7uddgNS7L3U0dB9DoQ5ts
 WCKwsUpsd0bFlhVOB9WBBGPqJLq12g==
 =pBmM
 -----END PGP SIGNATURE-----

ASoC: Merge up v6.6-rc7

Get fixes needed so we can enable build of ams-delta in more
configurations.
2023-10-23 19:38:22 +01:00
Mark Brown
61f85372d2
ASoc: Another series to convert to struct
Merge series from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:

This is another series to convert ASoC drivers to use struct
platform_driver:remove_new(). The rockchip one was already send before
but with a wrong subject prefix, the cs42l43 driver is newer than the
last series. The remaining five patches are for driver combos that my
coccinelle patch failed to detect before.
2023-10-23 17:56:55 +01:00
Vijendar Mukunda
145d7e5ae8
ASoC: SOF: amd: add option to use sram for data bin loading
Provide an option to load DSP data bin to ACP SRAM.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20231020062822.3913760-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:56 +01:00
Vijendar Mukunda
135e0d49cd
ASoC: SOF: amd: refactor acp dram usage for data bin loading
DSP data bin can be loaded in to ACP DRAM or ACP SRAM.
Add conditional check for ACP DRAM usage for data bin loading.
Rename DRAM base address macro to have symmetry.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20231020062822.3913760-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:56 +01:00
Vijendar Mukunda
4dbee5104b
ASoC: SOF: amd: increase DSP cache window range
Increase DSP cache window range to 2.5MB to align with ACP memory.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20231020062822.3913760-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:55 +01:00
Vijendar Mukunda
848c0d34f7
ASoC: SOF: amd: add support for acp6.3 based platform
Add SOF support for ACP6.3 version based platform

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20231020062822.3913760-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:54 +01:00
Vijendar Mukunda
bb98b592cf
ASoC: amd: Add acpi machine id for acp6.3 version based platform
Add acpi machine id for ACP6.3 version based platform and configure
driver data to enable SOF sound card support on newer boards.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20231020062822.3913760-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:53 +01:00
Chris Morgan
18562fc36c
ASoC: es8328: Use rounded rate for es8328_set_sysclk()
I have a board (RK3588 based) that sets the sysclk to 12287999. The
es8328 driver fails to match this to the 12288000 rate and fails to
load. Allow the rate comparison to work if the frequency is within
100hz by dividing it by 100 and rounding it, then multiplying it back
by 100.

Note the 100hz value was chosen arbitrarily by me, but it has only
been tested with a 1hz difference.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20231020171539.65513-1-macroalpha82@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:52 +01:00
Weidong Wang
f1c406866a
ASoC: codecs: Modify max_register usage error
Modify the value of max_register, otherwirse
the AW88261_EFRL1_REG register will not be
accessible.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231020083426.302925-3-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:51 +01:00
Uwe Kleine-König
7242265213
ASoC: uniphier: Make uniphier_aio_remove() return void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code.  However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

uniphier_aio_remove() returned zero unconditionally.  Make it return
void instead and convert all users to struct
platform_device::remove_new().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231013221945.1489203-16-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:48 +01:00
Uwe Kleine-König
d0cc676c42
ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code.  However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

asoc_qcom_lpass_cpu_platform_remove() returned zero unconditionally.
Make it return void instead and convert all users to struct
platform_device::remove_new().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231013221945.1489203-15-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:47 +01:00
Uwe Kleine-König
8210f496c3
ASoC: meson: Make meson_card_remove() return void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code.  However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

meson_card_remove() returned zero unconditionally. Make it return void
instead and convert all users to struct platform_device::remove_new().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20231013221945.1489203-14-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:46 +01:00
Uwe Kleine-König
393df6f321
ASoC: simple-card-utils: Make simple_util_remove() return void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code.  However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

simple_util_remove() returned zero unconditionally. Make it return void
instead and convert all users to struct platform_device::remove_new().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20231013221945.1489203-13-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:45 +01:00
Uwe Kleine-König
6b02f5a6f1
ASoC: starfive/jh7110-pwmdac: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231013221945.1489203-12-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:44 +01:00
Uwe Kleine-König
491a1132f5
ASoC: cs42l43: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231013221945.1489203-11-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:43 +01:00
Uwe Kleine-König
46dd58bef3
ASoC: rockchip: i2s_tdm: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231013221945.1489203-10-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:29:42 +01:00
Mark Hasemeyer
7dd692217b
ASoC: SOF: sof-pci-dev: Fix community key quirk detection
Some Chromebooks do not populate the product family DMI value resulting
in firmware load failures.

Add another quirk detection entry that looks for "Google" in the BIOS
version. Theoretically, PRODUCT_FAMILY could be replaced with
BIOS_VERSION, but it is left as a quirk to be conservative.

Cc: stable@vger.kernel.org
Signed-off-by: Mark Hasemeyer <markhas@chromium.org>
Acked-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20231020145953.v1.1.Iaf5702dc3f8af0fd2f81a22ba2da1a5e15b3604c@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:27:14 +01:00
Zhang Shurong
9e630efb5a
ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by calling
pm_runtime_disable when error returns.

Fixes: 955ac62405 ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers")
Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
Link: https://lore.kernel.org/r/tencent_C0D62E6D89818179A02A04A0C248F0DDC40A@qq.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23 13:27:13 +01:00
Takashi Iwai
39cd06e3f7 ASoC: Updates for v6.7
This is quite a large set of changes but mostly due to API cleanups and
 in driver specific ways rather than due to anything subsystem wide.
 Highlights include:
 
  - Standardisation of API prefixes on snd_soc_, removing asoc_.
  - GPIO API usage improvements.
  - Support for HDA patches.
  - Lots of work on SOF, including crash dump support.
  - Support for AMD platforms with es83xx, Awinc AT87390, many Intel
    platforms, many Mediatek platforms, Qualcomm SM6115,  Richtek RTQ9128
    and Texas Instruments TAS575x.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmUy6X8ACgkQJNaLcl1U
 h9Cv7Qf+PO4ucl/rFITWAp2Ta9fw7Z5J6UCiXiR54TPgAiLJrpKSi3rbYTXjO90Y
 1NNOdoMKr109zdOpdSZI7EX0GgWQbGbdB40nxESdTcojAloRH0jt4RaF7G7B7+86
 b8PGlVPLLV/4zFf9f2gpEKPcKhRRRKYOBIEB+amfjWpdXVrqPD3zS/S16Q3Hn4Gy
 Fx9b9X/lVDG9uqJomHpunEdViZjkm5CCNzdyAhHH99afiqSe//pevx6/FpzAHyng
 AZgE9Yfq4Xw4pdzDdGVfYC+L1GZiHIDRzsusz6aPA5nrMhSn0ru8PMGtmQQTzyhb
 PLYw0OW8cWymfqwal8wrNGJfSZ8IGA==
 =lN5P
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v6.7

This is quite a large set of changes but mostly due to API cleanups and
in driver specific ways rather than due to anything subsystem wide.
Highlights include:

 - Standardisation of API prefixes on snd_soc_, removing asoc_.
 - GPIO API usage improvements.
 - Support for HDA patches.
 - Lots of work on SOF, including crash dump support.
 - Support for AMD platforms with es83xx, Awinc AT87390, many Intel
   platforms, many Mediatek platforms, Qualcomm SM6115,  Richtek RTQ9128
   and Texas Instruments TAS575x.

[ the merge conflicts around SOF Intel HD-audio and CS35L41 subcodec
  drivers are resolved here -- tiwai ]
2023-10-21 09:49:15 +02:00
Linus Torvalds
14f6863328 sound fixes for 6.6-rc7
Still higher volume than wished, but all are driver-specific small
 fixes and look safe for this late RC.  The majority of changes are
 for ASoC, especially for wcd938x driver and Cirrus codec drivers,
 while there are other random fixes including usual HD-audio quirks.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmUyi8AOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE8u8g//VHKNL6eOn9JlJDa0rE/OT4aCrPl8WdVZlJ+C
 wT7lKfMJXpkhbTLTHaxQCBwDOjFQLZ1/HpD/7PP0cdvg+FvP43RBdTxa3UJdRHiJ
 R+Nsm00ilripUKKudngZGjRYIhCxLEDCT46o97t+kGCdbqlyXxpGtHnUqxyqfouH
 0+edkaIEHxcxLsrQM6ALrAsAd3ln2sAG0a9skoinTzr2qF3Xa/TemUGhkAXIH8O/
 Gkn5cne5yk+EWrE8mpXXn0/6K6SFUhJWb7cU0+1u+1Ak5xjaaLs+4UPH+VRpTZWl
 mVqe/D6S8OYBXmL0VMoHzTs3d3FppWnH9vk/1EFmlKaeHyGvD7a89SRcyzJ/qYvR
 dhIaseSo2CNMbgy3bRaRmLmMMAkNeZfWa5AbpNHBljvOcoMr9oSKdSY93gZho+Mu
 eHmFY3rio25RKlhIuUoPVRPHbYmaGUHBB0BUcUAkEfino6yhCpJy/e5wtoSO1p9Q
 j8rQoqzRNlisJvAltN6n710I75XKTEp6hr6Y4DNt7oAVJ7CpRqSrBo5B4qWzO79n
 THXAyHnG97IpCBWCAFfD+u4nnDGrT6ANXoa5fv1ZTvqmyItXAfH1tLkXWttdzOYo
 C5SeAH6BdAQZ5pdIprS3F1BCU1vQ3+e/x7cht8tQeg5AWIuFLffSXOdK/FzZ0Rd5
 yQKuRNs=
 =VcDr
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Still higher volume than wished, but all are driver-specific small
  fixes and look safe for this late RC.

  The majority of changes are for ASoC, especially for wcd938x driver
  and Cirrus codec drivers, while there are other random fixes including
  usual HD-audio quirks"

* tag 'sound-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (22 commits)
  ASoC: da7219: Correct the process of setting up Gnd switch in AAD
  ALSA: hda/realtek - Fixed ASUS platform headset Mic issue
  ALSA: hda/realtek: Add quirk for ASUS ROG GU603ZV
  ALSA: hda/relatek: Enable Mute LED on HP Laptop 15s-fq5xxx
  ASoC: dwc: Fix non-DT instantiation
  ASoC: codecs: tas2780: Fix log of failed reset via I2C.
  ASoC: rt5650: fix the wrong result of key button
  ASoC: cs42l42: Fix missing include of gpio/consumer.h
  ASoC: cs42l43: Update values for bias sense
  ASoC: dt-bindings: cirrus,cs42l43: Update values for bias sense
  ASoC: cs35l56: ASP1 DOUT must default to Hi-Z when not transmitting
  ASoC: pxa: fix a memory leak in probe()
  ASoC: cs35l56: Fix illegal use of init_completion()
  ASoC: codecs: wcd938x-sdw: fix runtime PM imbalance on probe errors
  ASoC: codecs: wcd938x-sdw: fix use after free on driver unbind
  ASoC: codecs: wcd938x: fix runtime PM imbalance on remove
  ASoC: codecs: wcd938x: fix regulator leaks on probe errors
  ASoC: codecs: wcd938x: fix resource leaks on bind errors
  ASoC: codecs: wcd938x: fix unbind tear down order
  ASoC: codecs: wcd938x: drop bogus bind error handling
  ...
2023-10-20 10:05:10 -07:00
Mark Hasemeyer
7c05b44e1a ALSA: hda: intel-dsp-config: Fix JSL Chromebook quirk detection
Some Jasperlake Chromebooks overwrite the system vendor DMI value to the
name of the OEM that manufactured the device. This breaks Chromebook
quirk detection as it expects the system vendor to be "Google".

Add another quirk detection entry that looks for "Google" in the BIOS
version.

Cc: stable@vger.kernel.org
Signed-off-by: Mark Hasemeyer <markhas@chromium.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231018235944.1860717-1-markhas@chromium.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-20 17:39:44 +02:00