platform/kernel/linux-starfive.git
2 years agoplatform/x86: serial-multi-instantiate: Add CLSA0101 Laptop
Lucas Tanure [Wed, 27 Jul 2022 09:59:24 +0000 (10:59 +0100)]
platform/x86: serial-multi-instantiate: Add CLSA0101 Laptop

The device CLSA0101 has two instances of CS35L41
connected by I2C.

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220727095924.80884-5-tanureal@opensource.cirrus.com
Link: https://lore.kernel.org/r/20220816194639.13870-1-cam@neo-zeon.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda/realtek: Add quirk for Lenovo Yoga7 14IAL7
Takashi Iwai [Tue, 16 Aug 2022 13:21:32 +0000 (15:21 +0200)]
ALSA: hda/realtek: Add quirk for Lenovo Yoga7 14IAL7

Lenovo Yoga7 14IAL7 requires the same quirk as Lenovo Yoga9 14IAP7 for
fixing the bass speaker problems.

Reported-by: Pascal Gross <baipush@tutanota.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/N9_CjBz--3-2@tutanota.com
Link: https://lore.kernel.org/r/20220816132132.15520-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda: cs35l41: Clarify support for CSC3551 without _DSD Properties
Stefan Binding [Mon, 15 Aug 2022 16:29:06 +0000 (17:29 +0100)]
ALSA: hda: cs35l41: Clarify support for CSC3551 without _DSD Properties

For devices which use HID CSC3551, correct ACPI _DSD properties are
required to be able support those systems.
Add error message to clarify this.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220815162906.463108-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoMerge tag 'asoc-fix-v6.0-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Tue, 16 Aug 2022 13:07:55 +0000 (15:07 +0200)]
Merge tag 'asoc-fix-v6.0-rc1' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.0

A relatively large batch of fixes that came in since my pull request,
none of them too major and mostly device specific apart from a series of
security/robustness improvements from Takashi.

2 years agoALSA: hda/realtek: Add quirks for ASUS Zenbooks using CS35L41
Stefan Binding [Mon, 15 Aug 2022 14:19:53 +0000 (15:19 +0100)]
ALSA: hda/realtek: Add quirks for ASUS Zenbooks using CS35L41

These Asus Zenbook laptop use Realtek HDA codec combined with
2xCS35L41 Amplifiers using SPI.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220815141953.25197-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda: Fix crash due to jack poll in suspend
Mohan Kumar [Thu, 11 Aug 2022 05:27:04 +0000 (10:57 +0530)]
ALSA: hda: Fix crash due to jack poll in suspend

With jackpoll_in_suspend flag set, there is a possibility that
jack poll worker thread will run even after system suspend was
completed. Any register access after system pm callback flow
will result in kernel crash as still jack poll worker thread
tries to access registers.

To fix the crash issue during system flow, cancel the jack poll
worker thread during system pm prepare callback and cancel the
worker thread at start of runtime suspend callback and re-schedule
at last to avoid any unwarranted access of register by worker thread
during suspend flow.

Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Fixes: b33115bd05af ("ALSA: hda: Jack detection poll in suspend state")
Link: https://lore.kernel.org/r/20220811052704.2944-1-mkumard@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda/cirrus - support for iMac 12,1 model
Allen Ballway [Wed, 10 Aug 2022 15:27:22 +0000 (15:27 +0000)]
ALSA: hda/cirrus - support for iMac 12,1 model

The 12,1 model requires the same configuration as the 12,2 model
to enable headphones but has a different codec SSID. Adds
12,1 SSID for matching quirk.

[ re-sorted in SSID order by tiwai ]

Signed-off-by: Allen Ballway <ballway@chromium.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220810152701.1.I902c2e591bbf8de9acb649d1322fa1f291849266@changeid
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: codec: tlv320aic32x4: fix mono playback via I2S
Philipp Zabel [Wed, 10 Aug 2022 10:41:56 +0000 (12:41 +0200)]
ASoC: codec: tlv320aic32x4: fix mono playback via I2S

The two commits referenced below break mono playback via I2S DAI because
they set BCLK to half the required speed. For PCM transport over I2S, the
number of transmitted channels is always 2, even for mono playback.

Fixes: dcd79364bff3 ("ASoC: codec: tlv3204: Enable 24 bit audio support")
Fixes: 40b37136287b ("ASoC: tlv320aic32x4: Fix bdiv clock rate derivation")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220810104156.665452-1-p.zabel@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoTAS2770 fixes
Mark Brown [Wed, 10 Aug 2022 12:41:56 +0000 (13:41 +0100)]
TAS2770 fixes

Merge series from Martin Povišer <povik+lin@cutebit.org>:

The first two fixes should be straightforward.

The latter two clean up what looks to me like a mess in the setting of
power levels. However we settle it, we should then do the same changes
to TAS2764, which has the same template (and maybe there are other
drivers).

2 years agoALSA: usb-audio: make read-only array marker static const
Colin Ian King [Tue, 9 Aug 2022 18:15:44 +0000 (19:15 +0100)]
ALSA: usb-audio: make read-only array marker static const

Don't populate the read-only array marker on the stack but instead make
it static const. Also makes the object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220809181544.3046429-1-colin.i.king@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda/realtek: Add a quirk for HP OMEN 15 (8786) mute LED
Bedant Patnaik [Tue, 9 Aug 2022 14:24:55 +0000 (19:54 +0530)]
ALSA: hda/realtek: Add a quirk for HP OMEN 15 (8786) mute LED

Board ID 8786 seems to be another variant of the Omen 15 that needs
ALC285_FIXUP_HP_MUTE_LED for working mute LED.

Signed-off-by: Bedant Patnaik <bedant.patnaik@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220809142455.6473-1-bedant.patnaik@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: More comprehensive mixer map for ASUS ROG Zenith II
Takashi Iwai [Tue, 9 Aug 2022 07:32:59 +0000 (09:32 +0200)]
ALSA: usb-audio: More comprehensive mixer map for ASUS ROG Zenith II

ASUS ROG Zenith II has two USB interfaces, one for the front headphone
and another for the rest I/O.  Currently we provided the mixer mapping
for the latter but with an incomplete form.

This patch corrects and provides more comprehensive mixer mapping, as
well as providing the proper device names for both the front headphone
and main audio.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211005
Fixes: 2a48218f8e23 ("ALSA: usb-audio: Add mixer workaround for TRX40 and co")
Link: https://lore.kernel.org/r/20220809073259.18849-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: scarlett2: Add Focusrite Clarett+ 8Pre support
Christian Colglazier [Tue, 9 Aug 2022 04:32:41 +0000 (14:02 +0930)]
ALSA: scarlett2: Add Focusrite Clarett+ 8Pre support

The Focusrite Clarett+ 8Pre uses the same protocol as the Scarlett Gen
2 and Gen 3 product range. This patch adds support for the Clarett+
8Pre by adding appropriate entries to the scarlett2 driver.

The Clarett+ 2Pre and 4Pre, and the Clarett USB product line
presumably use the same protocol as well, so support for them can
easily be added if someone can test.

Signed-off-by: Christian Colglazier <christian@cacolglazier.com>
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/20220809043241.GA2749152@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: rt5640: Fix the JD voltage dropping issue
Oder Chiou [Mon, 8 Aug 2022 05:28:36 +0000 (13:28 +0800)]
ASoC: rt5640: Fix the JD voltage dropping issue

The patch fixes the JD voltage dropping issue in the HDA JD using.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Reported-by: Mohan Kumar D <mkumard@nvidia.com>
Link: https://lore.kernel.org/r/20220808052836.25791-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tas2770: Fix handling of mute/unmute
Martin Povišer [Mon, 8 Aug 2022 14:12:46 +0000 (16:12 +0200)]
ASoC: tas2770: Fix handling of mute/unmute

Because the PWR_CTRL field is modeled as the power state of the DAC
widget, and at the same time it is used to implement mute/unmute, we
need some additional book-keeping to have the right end result no matter
the sequence of calls. Without this fix, one can mute an ongoing stream
by toggling a speaker pin control.

Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220808141246.5749-5-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tas2770: Drop conflicting set_bias_level power setting
Martin Povišer [Mon, 8 Aug 2022 14:12:45 +0000 (16:12 +0200)]
ASoC: tas2770: Drop conflicting set_bias_level power setting

The driver is setting the PWR_CTRL field in both the set_bias_level
callback and on DAPM events of the DAC widget (and also in the
mute_stream method). Drop the set_bias_level callback altogether as the
power setting it does is in conflict with the other code paths.

Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220808141246.5749-4-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tas2770: Allow mono streams
Martin Povišer [Mon, 8 Aug 2022 14:12:44 +0000 (16:12 +0200)]
ASoC: tas2770: Allow mono streams

The part is a mono speaker amp, but it can do downmix and switch between
left and right channel, so the right channel range is 1 to 2.

Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220808141246.5749-3-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tas2770: Set correct FSYNC polarity
Martin Povišer [Mon, 8 Aug 2022 14:12:43 +0000 (16:12 +0200)]
ASoC: tas2770: Set correct FSYNC polarity

Fix setting of FSYNC polarity for DAI formats other than I2S. Also
add support for polarity inversion.

Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220808141246.5749-2-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model
Meng Tang [Mon, 8 Aug 2022 07:34:06 +0000 (15:34 +0800)]
ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model

There is another LENOVO 20149 (Type1Sku0) Notebook model with
CX20590, the device PCI SSID is 17aa:3977, which headphones are
not responding, that requires the quirk CXT_PINCFG_LENOVO_NOTEBOOK.
Add the corresponding entry to the quirk table.

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220808073406.19460-1-tangmeng@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: Intel: fix sof_es8336 probe
Pierre-Louis Bossart [Fri, 5 Aug 2022 13:33:32 +0000 (15:33 +0200)]
ASoC: Intel: fix sof_es8336 probe

Changes to add HDMI capture support broke the machine driver probe for
all other platforms. The commit listed in the Fixes tag added a
board_id descriptor but didn't add the default name for the
sof_essx8336 machine driver.

Add the missing entry and remove the now-useless platform driver
alias.

Reported-by: Eugene J Markow <ejmarkow@yahoo.com>
BugLink: https://github.com/thesofproject/linux/issues/3336
Fixes: 86b1959a2ccb ("ASoC: Intel: sof_es8336: add support for HDMI_In capture")
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220805133332.207932-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Fix theoretical buffer overflow by snprintf()
Mark Brown [Fri, 5 Aug 2022 14:24:07 +0000 (15:24 +0100)]
ASoC: Fix theoretical buffer overflow by snprintf()

Merge series from Takashi Iwai <tiwai@suse.de>:

This is a patch series to paper over the theoretical buffer overflow
that might be caused by snprintf().  snprintf() is notorious for its
behavior and the usage of a safer version, scnprintf(), is
recommended.

2 years agoASoC: DPCM: Don't pick up BE without substream
Takashi Iwai [Mon, 1 Aug 2022 17:05:10 +0000 (19:05 +0200)]
ASoC: DPCM: Don't pick up BE without substream

When DPCM tries to add valid BE connections at dpcm_add_paths(), it
doesn't check whether the picked BE actually supports for the given
stream direction.  Due to that, when an asymmetric BE stream is
present, it picks up wrongly and this may result in a NULL dereference
at a later point where the code assumes the existence of a
corresponding BE substream.

This patch adds the check for the presence of the substream for the
target BE for avoiding the problem above.

Note that we have already some fix for non-existing BE substream at
commit 6246f283d5e0 ("ASoC: dpcm: skip missing substream while
applying symmetry").  But the code path we've hit recently is rather
happening before the previous fix.  So this patch tries to fix at
picking up a BE instead of parsing BE lists.

Fixes: bbf7d3b1c4f4 ("ASoC: soc-pcm: align BE 'atomicity' with that of the FE")
Reported-by: Alex Natalsson <harmoniesworlds@gmail.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/CADs9LoPZH_D+eJ9qjTxSLE5jGyhKsjMN7g2NighZ16biVxsyKw@mail.gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220801170510.26582-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoALSA: ice1712: remove redundant assignment to new
Colin Ian King [Fri, 5 Aug 2022 12:04:39 +0000 (13:04 +0100)]
ALSA: ice1712: remove redundant assignment to new

The variable new is initialized with a value but it is never read. It is
being re-assigned a new value in every case path in the following switch
statement. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
sound/pci/ice1712/quartet.c:569:8: warning: Although the value stored
to 'new' is used in the enclosing expression, the value is never actually
read from 'new' [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220805120439.2341600-1-colin.i.king@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: SOF: ipc3-topology: Fix clang -Wformat warning
Justin Stitt [Wed, 3 Aug 2022 20:44:42 +0000 (13:44 -0700)]
ASoC: SOF: ipc3-topology: Fix clang -Wformat warning

When building with Clang we encounter these warnings:
| sound/soc/sof/ipc3-topology.c:2343:4: error: format specifies type
| 'unsigned char' but the argument has type 'int' [-Werror,-Wformat]
|                  SOF_ABI_MAJOR, SOF_ABI_MINOR, SOF_ABI_PATCH);
|                  ^~~~~~~~~~~~~~~^~~~~~~~~~~~~~~^~~~~~~~~~~~~

Use correct format specifier `%d` since args are of type int.

Link: https://github.com/ClangBuiltLinux/linux/issues/378
Reported-by: Nathan Chancellor <nathan@kernel.org>
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220803204442.2996580-1-justinstitt@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: sh: rz-ssi: Improve error handling in rz_ssi_probe() error path
Biju Das [Thu, 28 Jul 2022 09:26:12 +0000 (10:26 +0100)]
ASoC: sh: rz-ssi: Improve error handling in rz_ssi_probe() error path

We usually do cleanup in reverse order of init. Currently in case of
error rz_ssi_release_dma_channels() done in the reverse order. This
patch improves error handling in rz_ssi_probe() error path.

While at it, use "goto cleanup" style to reduce code duplication.

Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220728092612.38858-1-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Intel: hda: Fix potential buffer overflow by snprintf()
Takashi Iwai [Mon, 1 Aug 2022 16:54:20 +0000 (18:54 +0200)]
ASoC: SOF: Intel: hda: Fix potential buffer overflow by snprintf()

snprintf() returns the would-be-filled size when the string overflows
the given buffer size, hence using this value may result in the buffer
overflow (although it's unrealistic).

This patch replaces with a safer version, scnprintf() for papering
over such a potential issue.

Fixes: 29c8e4398f02 ("ASoC: SOF: Intel: hda: add extended rom status dump to error log")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220801165420.25978-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: debug: Fix potential buffer overflow by snprintf()
Takashi Iwai [Mon, 1 Aug 2022 16:54:19 +0000 (18:54 +0200)]
ASoC: SOF: debug: Fix potential buffer overflow by snprintf()

snprintf() returns the would-be-filled size when the string overflows
the given buffer size, hence using this value may result in the buffer
overflow (although it's unrealistic).

This patch replaces with a safer version, scnprintf() for papering
over such a potential issue.

Fixes: 5b10b6298921 ("ASoC: SOF: Add `memory_info` file to debugfs")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220801165420.25978-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: avs: Fix potential buffer overflow by snprintf()
Takashi Iwai [Mon, 1 Aug 2022 16:54:18 +0000 (18:54 +0200)]
ASoC: Intel: avs: Fix potential buffer overflow by snprintf()

snprintf() returns the would-be-filled size when the string overflows
the given buffer size, hence using this value may result in a buffer
overflow (although it's unrealistic).

This patch replaces it with a safer version, scnprintf() for papering
over such a potential issue.

Fixes: f1b3b320bd65 ("ASoC: Intel: avs: Generic soc component driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220801165420.25978-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoALSA: hda/realtek: Add quirk for another Asus K42JZ model
Meng Tang [Fri, 5 Aug 2022 07:45:34 +0000 (15:45 +0800)]
ALSA: hda/realtek: Add quirk for another Asus K42JZ model

There is another Asus K42JZ model with the PCI SSID 1043:1313
that requires the quirk ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE.
Add the corresponding entry to the quirk table.

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220805074534.20003-1-tangmeng@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda/realtek: Add quirk for HP Spectre x360 15-eb0xxx
Ivan Hasenkampf [Wed, 3 Aug 2022 16:40:01 +0000 (18:40 +0200)]
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-eb0xxx

Fixes speaker output on HP Spectre x360 15-eb0xxx

[ re-sorted in SSID order by tiwai ]

Signed-off-by: Ivan Hasenkampf <ivan.hasenkampf@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220803164001.290394-1-ivan.hasenkampf@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: line6: Replace sprintf() with sysfs_emit()
Takashi Iwai [Mon, 1 Aug 2022 16:56:39 +0000 (18:56 +0200)]
ALSA: line6: Replace sprintf() with sysfs_emit()

For sysfs outputs, it's safer to use a new helper, sysfs_emit(),
instead of the raw sprintf() & co.  This patch replaces those usages
straightforwardly with a new helper, sysfs_emit().

Link: https://lore.kernel.org/r/20220801165639.26030-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda: Replace sprintf() with sysfs_emit()
Takashi Iwai [Mon, 1 Aug 2022 16:56:38 +0000 (18:56 +0200)]
ALSA: hda: Replace sprintf() with sysfs_emit()

For sysfs outputs, it's safer to use a new helper, sysfs_emit(),
instead of the raw sprintf() & co.  This patch replaces those usages
straightforwardly with new helpers, sysfs_emit() and sysfs_emit_at().

Link: https://lore.kernel.org/r/20220801165639.26030-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: pcm: Replace sprintf() with sysfs_emit()
Takashi Iwai [Mon, 1 Aug 2022 16:56:37 +0000 (18:56 +0200)]
ALSA: pcm: Replace sprintf() with sysfs_emit()

For sysfs outputs, it's safer to use a new helper, sysfs_emit(),
instead of the raw sprintf() & co.  This patch replaces such a
sprintf() call straightforwardly with the new helper.

Link: https://lore.kernel.org/r/20220801165639.26030-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: core: Replace scnprintf() with sysfs_emit()
Takashi Iwai [Mon, 1 Aug 2022 16:56:36 +0000 (18:56 +0200)]
ALSA: core: Replace scnprintf() with sysfs_emit()

sysfs_emit() is a new helper to simplify the sysfs string output.
Replace the open-code with this new helper.

Link: https://lore.kernel.org/r/20220801165639.26030-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: control-led: Replace sprintf() with sysfs_emit()
Takashi Iwai [Mon, 1 Aug 2022 16:56:35 +0000 (18:56 +0200)]
ALSA: control-led: Replace sprintf() with sysfs_emit()

For sysfs outputs, it's safer to use a new helper, sysfs_emit(),
instead of the raw sprintf() & co.  This patch replaces such sprintf()
calls with sysfs_emit() while simplifying the open code in
list_show().

Link: https://lore.kernel.org/r/20220801165639.26030-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: aoa: Replace sprintf() with sysfs_emit()
Takashi Iwai [Mon, 1 Aug 2022 16:56:34 +0000 (18:56 +0200)]
ALSA: aoa: Replace sprintf() with sysfs_emit()

For sysfs outputs, it's safer to use a new helper, sysfs_emit(),
instead of the raw sprintf() & co.  This patch replaces such sprintf()
calls with sysfs_emit() while simplifying the open code in
modalias_show(); as modalias[] is a NUL-terminated string, we can pass
it straightly to a printf() argument.

Link: https://lore.kernel.org/r/20220801165639.26030-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: ac97: Replace sprintf() with sysfs_emit()
Takashi Iwai [Mon, 1 Aug 2022 16:56:33 +0000 (18:56 +0200)]
ALSA: ac97: Replace sprintf() with sysfs_emit()

For sysfs outputs, it's safer to use a new helper, sysfs_emit(),
instead of the raw sprintf() & co.  This patch replaces the open code
straightforwardly with a new helper.

Link: https://lore.kernel.org/r/20220801165639.26030-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: amd: yc: Update DMI table entries for AMD platforms
syed sabakareem [Tue, 2 Aug 2022 06:25:00 +0000 (11:55 +0530)]
ASoC: amd: yc: Update DMI table entries for AMD platforms

Updated DMI entries 21EM, 21EN, 21J5 and 21J6 for
AMD platforms P15v Gen 3 and P14s Gen 3.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216267
Signed-off-by: syed saba kareem <Syed.SabaKareem@amd.com>
Reported-by: Pananchikkal Renjith <renjith.pananchikkal@amd.com>
Link: https://lore.kernel.org/r/20220802062503.159328-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoMerge tag 'asoc-v5.20-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 1 Aug 2022 13:26:40 +0000 (15:26 +0200)]
Merge tag 'asoc-v5.20-2' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: More updates for v5.20

More updates that came in since the last pull request I sent, a series
of driver specific changes:

 - Support for AMD RPL, some Intel platforms and Mediatek MT8186.

2 years agoMerge branch 'for-next' into for-linus
Takashi Iwai [Mon, 1 Aug 2022 06:11:19 +0000 (08:11 +0200)]
Merge branch 'for-next' into for-linus

2 years agoALSA: hda/realtek: Add quirk for Clevo NV45PZ
Tim Crawford [Sun, 31 Jul 2022 03:22:43 +0000 (21:22 -0600)]
ALSA: hda/realtek: Add quirk for Clevo NV45PZ

Fixes headset detection on Clevo NV45PZ.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220731032243.4300-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda/realtek: Add quirk for Lenovo Yoga9 14IAP7
Philipp Jungkamp [Fri, 29 Jul 2022 16:21:03 +0000 (18:21 +0200)]
ALSA: hda/realtek: Add quirk for Lenovo Yoga9 14IAP7

The Lenovo Yoga 9 14IAP7 is set up similarly to the Thinkpad X1 7th and
8th Gen. It also has the speakers attached to NID 0x14 and the bass
speakers to NID 0x17, but here the codec misreports the NID 0x17 as
unconnected.

The pincfg and hda verbs connect and activate the bass speaker
amplifiers, but the generic driver will connect them to NID 0x06 which
has no volume control. Set connection list/preferred connections is
required to gain volume control.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208555
Signed-off-by: Philipp Jungkamp <p.jungkamp@gmx.net>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220729162103.6062-1-p.jungkamp@gmx.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: control: Use deferred fasync helper
Takashi Iwai [Thu, 28 Jul 2022 12:59:45 +0000 (14:59 +0200)]
ALSA: control: Use deferred fasync helper

For avoiding the potential deadlock via kill_fasync() call, use the
new fasync helpers to defer the invocation from the control API.  Note
that it's merely a workaround.

Another note: although we haven't received reports about the deadlock
with the control API, the deadlock is still potentially possible, and
it's better to align the behavior with other core APIs (PCM and
timer); so let's move altogether.

Link: https://lore.kernel.org/r/20220728125945.29533-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: pcm: Use deferred fasync helper
Takashi Iwai [Thu, 28 Jul 2022 12:59:44 +0000 (14:59 +0200)]
ALSA: pcm: Use deferred fasync helper

For avoiding the potential deadlock via kill_fasync() call, use the
new fasync helpers to defer the invocation from timer API.  Note that
it's merely a workaround.

Reported-by: syzbot+8285e973a41b5aa68902@syzkaller.appspotmail.com
Reported-by: syzbot+669c9abf11a6a011dd09@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20220728125945.29533-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: timer: Use deferred fasync helper
Takashi Iwai [Thu, 28 Jul 2022 12:59:43 +0000 (14:59 +0200)]
ALSA: timer: Use deferred fasync helper

For avoiding the potential deadlock via kill_fasync() call, use the
new fasync helpers to defer the invocation from PCI API.  Note that
it's merely a workaround.

Reported-by: syzbot+1ee0910eca9c94f71f25@syzkaller.appspotmail.com
Reported-by: syzbot+49b10793b867871ee26f@syzkaller.appspotmail.com
Reported-by: syzbot+8285e973a41b5aa68902@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20220728125945.29533-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: core: Add async signal helpers
Takashi Iwai [Thu, 28 Jul 2022 12:59:42 +0000 (14:59 +0200)]
ALSA: core: Add async signal helpers

Currently the call of kill_fasync() from an interrupt handler might
lead to potential spin deadlocks, as spotted by syzkaller.
Unfortunately, it's not so trivial to fix this lock chain as it's
involved with the tasklist_lock that is touched in allover places.

As a temporary workaround, this patch provides the way to defer the
async signal notification in a work.  The new helper functions,
snd_fasync_helper() and snd_kill_faync() are replacements for
fasync_helper() and kill_fasync(), respectively.  In addition,
snd_fasync_free() needs to be called at the destructor of the relevant
file object.

Link: https://lore.kernel.org/r/20220728125945.29533-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoMerge tag 'asoc-fix-v5.19-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Thu, 28 Jul 2022 14:28:24 +0000 (16:28 +0200)]
Merge tag 'asoc-fix-v5.19-rc8' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.19

A few more small fixes, they could all wait for the merge window if you
prefer.

2 years agoASoC: q6asm: use kcalloc() instead of kzalloc()
Gustavo A. R. Silva [Wed, 6 Oct 2021 18:08:10 +0000 (13:08 -0500)]
ASoC: q6asm: use kcalloc() instead of kzalloc()

Use 2-factor multiplication argument form kcalloc() instead
of kzalloc().

Link: https://github.com/KSPP/linux/issues/162
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20211006180810.GA913370@embeddedor
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoACPI: scan: Add CLSA0101 Laptop Support
Lucas Tanure [Wed, 27 Jul 2022 09:59:23 +0000 (10:59 +0100)]
ACPI: scan: Add CLSA0101 Laptop Support

Add CLSA0101 id to the ignore_serial_bus_ids
so serial-multi-instantiate can correctly
instantiate the driver.

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220727095924.80884-4-tanureal@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda: cs35l41: Support CLSA0101
Lucas Tanure [Wed, 27 Jul 2022 09:59:22 +0000 (10:59 +0100)]
ALSA: hda: cs35l41: Support CLSA0101

Add support for Intel version of Legion 7 laptop.

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220727095924.80884-3-tanureal@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda: cs35l41: Use the CS35L41 HDA internal define
Lucas Tanure [Wed, 27 Jul 2022 09:59:21 +0000 (10:59 +0100)]
ALSA: hda: cs35l41: Use the CS35L41 HDA internal define

Follow GPIO1 pattern, use cs35l41 HDA internal define for
IRQ and then translate to ASoC cs35l41 define.

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220727095924.80884-2-tanureal@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: atmel: one fix and one cleanup
Mark Brown [Thu, 28 Jul 2022 00:21:40 +0000 (01:21 +0100)]
ASoC: atmel: one fix and one cleanup

Merge series from Claudiu Beznea <claudiu.beznea@microchip.com>:

Hi,

The series adds one fix for mchp-spdifrx and one cleanups for
mchp-spdifrx and mchp-spdifrx drivers.

Thank you,
Claudiu Beznea

Changes in v3:
- changed cover letter title s/few/one, s/cleanups/cleanup
- fix compilation error and warnings
- keep only patch 1/5 and patch 3/5 from previous version as the rest
  of them were integrated

Changes in v2:
- s/tag/tab in the title of patch 2/5

Claudiu Beznea (2):
  ASoC: mchp-spdifrx: disable end of block interrupt on failures
  ASoC: mchp-spdiftx: remove references to mchp_i2s_caps

 sound/soc/atmel/mchp-spdifrx.c | 9 ++++++---
 sound/soc/atmel/mchp-spdiftx.c | 8 --------
 2 files changed, 6 insertions(+), 11 deletions(-)

--
2.34.1

2 years agoASoC: dt-bindings: use spi-peripheral-props.yaml
Krzysztof Kozlowski [Wed, 27 Jul 2022 16:40:50 +0000 (18:40 +0200)]
ASoC: dt-bindings: use spi-peripheral-props.yaml

Instead of listing directly properties typical for SPI peripherals,
reference the spi-peripheral-props.yaml schema.  This allows using all
properties typical for SPI-connected devices, even these which device
bindings author did not tried yet.

Remove the spi-* properties which now come via spi-peripheral-props.yaml
schema, except for the cases when device schema adds some constraints
like maximum frequency.

While changing additionalProperties->unevaluatedProperties, put it in
typical place, just before example DTS.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220727164050.385241-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: va-macro: use fsgen as clock
Srinivas Kandagatla [Wed, 27 Jul 2022 12:47:49 +0000 (13:47 +0100)]
ASoC: codecs: va-macro: use fsgen as clock

VA Macro fsgen clock is supplied to other LPASS Macros using proper
clock apis, however the internal user uses the registers directly without
clk apis. This approch has race condition where in external users of
the clock might cut the clock while VA macro is actively using this.

Moving the internal usage to clk apis would provide a proper refcounting
and avoid such race conditions.

This issue was noticed while headset was pulled out while recording is
in progress and shifting record patch to DMIC.

Reported-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Link: https://lore.kernel.org/r/20220727124749.4604-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: remove unnecessary judgments
Jiaxin Yu [Tue, 26 Jul 2022 15:42:20 +0000 (23:42 +0800)]
ASoC: mediatek: mt8186: remove unnecessary judgments

The afe_priv->dai_priv[] is allocated when platform driver probe(), if it
failed, the ASoC platform driver probe() will return fail first.
Therefore, this is excessive judgment, and the condition will never be
established.

Bug report: https://www.spinics.net/lists/alsa-devel/msg145609.html

This is a semi-automatic email about new static checker warnings.

The patch ae92dcbee8b6: "ASoC: mediatek: mt8186: support tdm in
platform driver" from May 23, 2022, leads to the following Smatch
complaint:

    sound/soc/mediatek/mt8186/mt8186-dai-tdm.c:424 mtk_dai_tdm_hw_params()
    warn: variable dereferenced before check 'tdm_priv' (see line 406)

sound/soc/mediatek/mt8186/mt8186-dai-tdm.c
   405 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[tdm_id];
   406 unsigned int tdm_mode = tdm_priv->tdm_mode;
                                        ^^^^^^^^^^^^^^^^^^^
Lot's of dereferences

   407 unsigned int data_mode = tdm_priv->data_mode;
   408 unsigned int rate = params_rate(params);
   409 unsigned int channels = params_channels(params);
   410 snd_pcm_format_t format = params_format(params);
   411 unsigned int bit_width =
   412 snd_pcm_format_physical_width(format);
   413 unsigned int tdm_channels = (data_mode == TDM_DATA_ONE_PIN) ?
   414 get_tdm_ch_per_sdata(tdm_mode, channels) : 2;
   415 unsigned int lrck_width =
   416 get_tdm_lrck_width(format, tdm_mode);
   417 unsigned int tdm_con = 0;
   418 bool slave_mode = tdm_priv->slave_mode;
   419 bool lrck_inv = tdm_priv->lck_invert;
   420 bool bck_inv = tdm_priv->bck_invert;
   421 unsigned int tran_rate;
   422 unsigned int tran_relatch_rate;
   423
   424 if (!tdm_priv) {
                    ^^^^^^^^^
Checked too late

   425 dev_err(afe->dev, "%s(), tdm_priv == NULL", __func__);
   426 return -EINVAL;

Fixes: ae92dcbee8b6 ("ASoC: mediatek: mt8186: support tdm in platform driver")
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220726154220.28141-1-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mchp-spdiftx: remove references to mchp_i2s_caps
Claudiu Beznea [Wed, 27 Jul 2022 09:08:14 +0000 (12:08 +0300)]
ASoC: mchp-spdiftx: remove references to mchp_i2s_caps

Remove references to struct mchp_i2s_caps as they are not used.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220727090814.2446111-3-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mchp-spdifrx: disable end of block interrupt on failures
Claudiu Beznea [Wed, 27 Jul 2022 09:08:13 +0000 (12:08 +0300)]
ASoC: mchp-spdifrx: disable end of block interrupt on failures

Disable end of block interrupt in case of wait for completion timeout
or errors to undo previously enable operation (done in
mchp_spdifrx_isr_blockend_en()). Otherwise we can end up with an
unbalanced reference counter for this interrupt.

Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220727090814.2446111-2-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: set the correct string to strncmp()
Jiaxin Yu [Tue, 26 Jul 2022 15:31:30 +0000 (23:31 +0800)]
ASoC: mediatek: mt8186: set the correct string to strncmp()

Fix Smatch static checker warning. strncmp() here only needs to compare
the first seven bytes, so in order to make the code more clear, only the
first seven bytes of the string used as the comparison are reserved.

Bug report: https://www.spinics.net/lists/alsa-devel/msg145608.html

sound/soc/mediatek/mt8186/mt8186-dai-adda.c:78 get_adda_priv_by_name()
warn: strncmp() with weird length: 17 vs 7

sound/soc/mediatek/mt8186/mt8186-dai-adda.c
    72 static struct mtk_afe_adda_priv *get_adda_priv_by_name(struct mtk_base_afe *afe,
    73                                                        const char *name)
    74 {
    75         struct mt8186_afe_private *afe_priv = afe->platform_priv;
    76         int dai_id;
    77
--> 78         if (strncmp(name, "aud_dac_hires_clk", 7) == 0 ||
    79             strncmp(name, "aud_adc_hires_clk", 7) == 0)

Fixes: b65c466220b3 ("ASoC: mediatek: mt8186: support adda in platform driver")
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220726153130.27584-1-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: tas2780: remove tas2780 and will merge it to tas27xx
Raphael-Xu [Fri, 22 Jul 2022 10:53:45 +0000 (18:53 +0800)]
ASoC: dt-bindings: tas2780: remove tas2780 and will merge it to tas27xx

Remove tas2780 binding documentation, the binding will be documented in
the tax27xx binding.

Signed-off-by: Raphael-Xu <13691752556@139.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220722105345.175-1-13691752556@139.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: qcom,wcd934x: use absolute path to other schema
Krzysztof Kozlowski [Tue, 26 Jul 2022 11:59:17 +0000 (13:59 +0200)]
ASoC: dt-bindings: qcom,wcd934x: use absolute path to other schema

Absolute path to other DT schema is preferred over relative one.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220726115917.101371-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: atmel: one fix and few cleanups
Mark Brown [Tue, 26 Jul 2022 13:06:52 +0000 (14:06 +0100)]
ASoC: atmel: one fix and few cleanups

Merge series from Claudiu Beznea <claudiu.beznea@microchip.com>:

The series adds one fix for mchp-spdifrx and few cleanups for
mchp-spdifrx and mchp-spdifrx drivers.

2 years agoASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler()
Nathan Chancellor [Mon, 25 Jul 2022 18:05:39 +0000 (11:05 -0700)]
ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler()

Clang warns:

  ../sound/soc/amd/acp/acp-platform.c:117:19: error: variable 'ext_intr_stat1' is uninitialized when used here [-Werror,-Wuninitialized]
                          if (stream && (ext_intr_stat1 & stream->irq_bit)) {
                                         ^~~~~~~~~~~~~~
  ../sound/soc/amd/acp/acp-platform.c:97:35: note: initialize the variable 'ext_intr_stat1' to silence this warning
          u32 ext_intr_stat, ext_intr_stat1, i;
                                           ^
                                            = 0
  1 error generated.

The variable was not properly renamed, correct it to resolve the
warning.

Fixes: 93f53881473c ("ASoC: amd: acp: Modify local variables name to generic")
Link: https://github.com/ClangBuiltLinux/linux/issues/1675
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20220725180539.1315066-1-nathan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: machine driver updates for 5.20
Mark Brown [Tue, 26 Jul 2022 11:29:57 +0000 (12:29 +0100)]
ASoC: Intel: machine driver updates for 5.20

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

A couple of minor updates contributed and tested by Intel teams or end-users.

2 years agoASoC: SOF: minor updates for 5.20
Mark Brown [Tue, 26 Jul 2022 11:29:56 +0000 (12:29 +0100)]
ASoC: SOF: minor updates for 5.20

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

One sanity check for SSP index reported by NHLT/BIOS and two updates for
Mediatek and Intel Chromebooks related to already-merged firmware
changes.

2 years agoASoC: mchp-spdiftx: add and remove black line around MODULE_DEVICE_TABLE()
Claudiu Beznea [Mon, 25 Jul 2022 13:09:25 +0000 (16:09 +0300)]
ASoC: mchp-spdiftx: add and remove black line around MODULE_DEVICE_TABLE()

Add blank line after MODULE_DEVICE_TABLE() and remove the one
before it.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220725130925.1781791-6-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mchp-spdiftx: return directly ret
Claudiu Beznea [Mon, 25 Jul 2022 13:09:24 +0000 (16:09 +0300)]
ASoC: mchp-spdiftx: return directly ret

Avoid having patterns like:

int ret;

// ...
ret = 0;
// ...

ret = call_function();
if (ret)
return ret;

return 0;

and return directly ret for all cases.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220725130925.1781791-5-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mchp-spdifrx: use single tab indent for structure
Claudiu Beznea [Mon, 25 Jul 2022 13:09:22 +0000 (16:09 +0300)]
ASoC: mchp-spdifrx: use single tab indent for structure

Use single tab indentation for mchp_spdifrx_mixer_control structure.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220725130925.1781791-3-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_nau8825: Move quirk check to the front in late probe
Yong Zhi [Mon, 25 Jul 2022 19:49:09 +0000 (14:49 -0500)]
ASoC: Intel: sof_nau8825: Move quirk check to the front in late probe

The sof_rt5682_quirk check was placed in the middle of
hdmi handling code, move it to the front to be consistent
with sof_rt5682.c/sof_card_late_probe().

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_rt5682: Perform quirk check first in card late probe
Yong Zhi [Mon, 25 Jul 2022 19:49:08 +0000 (14:49 -0500)]
ASoC: Intel: sof_rt5682: Perform quirk check first in card late probe

The check of sof_rt5682_quirk should not be skipped unless the HDMI
handling code exits with error, fix by moving the quirk check to the front.

Fixes: 94d2d0897474 ("ASoC: Intel: Boards: tgl_max98373: add dai_trigger function")
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_rt5682: Add support for mtl_mx98357_rt5682
Yong Zhi [Mon, 25 Jul 2022 19:49:07 +0000 (14:49 -0500)]
ASoC: Intel: sof_rt5682: Add support for mtl_mx98357_rt5682

This patch adds the driver data for rt5682 codec on SSP0 and
max98357a speaker amplifiers on SSP1 for MTL platform.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_es8336: remove hard-coded SSP selection
Pierre-Louis Bossart [Mon, 25 Jul 2022 19:49:06 +0000 (14:49 -0500)]
ASoC: Intel: sof_es8336: remove hard-coded SSP selection

For some reason we open-coded the SSP selection and only supported
SSP0, 1 and 2. On ApolloLake platforms, the SSP5 can be used as well
for the ES8336 hardware link.

Remove hard-coded if/else code and align with same code already used
in the SOF driver.

BugLink: https://github.com/thesofproject/sof/issues/6015
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_es8336: reset the num_links during probe
Muralidhar Reddy [Mon, 25 Jul 2022 19:49:05 +0000 (14:49 -0500)]
ASoC: Intel: sof_es8336: reset the num_links during probe

The number of dai_links for sound cards needs to be reset during
probe. This is done in all machine drivers except this one.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_es8336: add support for HDMI_In capture
Muralidhar Reddy [Mon, 25 Jul 2022 19:49:04 +0000 (14:49 -0500)]
ASoC: Intel: sof_es8336: add support for HDMI_In capture

Adding support for 2 streams of HDMI-In capture via I2S in CBP_CFP
configuration (codec provides bit clock and frame sync).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_es8336: ignore GpioInt when looking for speaker/headset GPIO lines
Andrey Turkin [Mon, 25 Jul 2022 19:49:03 +0000 (14:49 -0500)]
ASoC: Intel: sof_es8336: ignore GpioInt when looking for speaker/headset GPIO lines

This fixes speaker GPIO detection on machines those ACPI tables
list their jack detection GpioInt before output GpioIo.
GpioInt entry can never be the speaker/headphone amplifier control
so it makes sense to only look for GpioIo entries when looking for them.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrey Turkin <andrey.turkin@gmail.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_es8336: Fix GPIO quirks set via module option
Andrey Turkin [Mon, 25 Jul 2022 19:49:02 +0000 (14:49 -0500)]
ASoC: Intel: sof_es8336: Fix GPIO quirks set via module option

The two GPIO quirk bits only affected actual GPIO selection
when set by the quirks table. They were reported as being
in effect when set via module options but actually did nothing.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrey Turkin <andrey.turkin@gmail.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: soc-acpi: Add entry for sof_es8336 in ADL match table
Muralidhar Reddy [Mon, 25 Jul 2022 19:49:01 +0000 (14:49 -0500)]
ASoC: Intel: soc-acpi: Add entry for sof_es8336 in ADL match table

Adding support for ES83x6 codec in ADL match table

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_sdw: add support for Dell SKU 0AF0
Pierre-Louis Bossart [Mon, 25 Jul 2022 19:49:00 +0000 (14:49 -0500)]
ASoC: Intel: sof_sdw: add support for Dell SKU 0AF0

Somehow this device was not added in the initial AlderLake batch.
From the ACPI definition this looks like a standard SDCA version with
RT711 on link0, RT1316 on link1/2 and RT714 on link3.

BugLink: https://github.com/thesofproject/linux/issues/3772
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: dai-intel: add SOF_DAI_INTEL_SSP_CLKCTRL_MCLK_AON bit
Brent Lu [Mon, 25 Jul 2022 19:53:43 +0000 (14:53 -0500)]
ASoC: SOF: dai-intel: add SOF_DAI_INTEL_SSP_CLKCTRL_MCLK_AON bit

Update definition for mclk always-on feature and increase the
SOF_ABI_MINOR number for interface change.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@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://lore.kernel.org/r/20220725195343.145603-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Add cont_update_posn to platform parameters
YC Hung [Mon, 25 Jul 2022 19:53:42 +0000 (14:53 -0500)]
ASoC: SOF: Add cont_update_posn to platform parameters

Add cont_update_posn to platform parameters to support
continue update position for platform.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725195343.145603-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Intel: hda: add sanity check on SSP index reported by NHLT
Pierre-Louis Bossart [Mon, 25 Jul 2022 19:53:41 +0000 (14:53 -0500)]
ASoC: SOF: Intel: hda: add sanity check on SSP index reported by NHLT

We should have a limited trust in the BIOS and verify that the SSP
index reported in NHLT is valid for each platform.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220725195343.145603-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: max98373: Removing 0x203E from the volatile reg
Ryan Lee [Sat, 23 Jul 2022 01:52:20 +0000 (18:52 -0700)]
ASoC: max98373: Removing 0x203E from the volatile reg

The 0x203E speaker gain register should be non-volatile.
This register value was not able to be synced because it was marked as
volatile.

Signed-off-by: Ryan Lee <ryans.lee@analog.com>
Link: https://lore.kernel.org/r/20220723015220.4169-1-ryans.lee@analog.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8186: fix Kconfig dependency
Ren Zhijie [Sun, 24 Jul 2022 11:06:19 +0000 (19:06 +0800)]
ASoC: mediatek: mt8186: fix Kconfig dependency

If CONFIG_SND_SOC_MT8186=y and CONFIG_SND_SOC_MT6358 is not set,
make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this:

sound/soc/mediatek/mt8186/mt8186-mt6366-common.o: In function `mt8186_mt6366_init':
mt8186-mt6366-common.c:(.text+0x4d): undefined reference to `mt6358_set_mtkaif_protocol'
make: *** [vmlinux] Error 1

To fix this build error, add select SND_SOC_MT6358 to config SND_SOC_MT8186 dependency.

Fixes: 097e874ad3fc ("ASoC: mediatek: mt8186: add platform driver")
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
Link: https://lore.kernel.org/r/20220724110619.212774-1-renzhijie2@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoALSA: hda/realtek: Enable speaker and mute LEDs for HP laptops
Kai-Heng Feng [Tue, 19 Jul 2022 14:20:14 +0000 (22:20 +0800)]
ALSA: hda/realtek: Enable speaker and mute LEDs for HP laptops

Two more HP laptops that use cs35l41 AMP for speaker and GPIO for mute
LEDs.

So use the existing quirk to enable them accordingly.

[ Sort the entries at the SSID order by tiwai ]

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220719142015.244426-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 25 Jul 2022 06:35:23 +0000 (08:35 +0200)]
Merge branch 'for-linus' into for-next

Merge 5.19-rc devel branch for applying HD-audio quirk patches more
cleanly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda: cs35l41: Fix build error unused-function
Ren Zhijie [Mon, 25 Jul 2022 02:36:11 +0000 (10:36 +0800)]
ALSA: hda: cs35l41: Fix build error unused-function

If CONFIG_PM_SLEEP is not set,
make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this:

sound/pci/hda/cs35l41_hda.c:583:12: error: ‘cs35l41_runtime_resume’ defined but not used [-Werror=unused-function]
 static int cs35l41_runtime_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~
sound/pci/hda/cs35l41_hda.c:565:12: error: ‘cs35l41_runtime_suspend’ defined but not used [-Werror=unused-function]
 static int cs35l41_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [sound/pci/hda/cs35l41_hda.o] Error 1

commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros,
deprecate old ones"), add new marco RUNTIME_PM_OPS to fix this unused-function problem.

Fixes: 1873ebd30cc8 ("ALSA: hda: cs35l41: Support Hibernation during Suspend")
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
Link: https://lore.kernel.org/r/20220725023611.57055-1-renzhijie2@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hiface: fix repeated words in comments
wangjianli [Sun, 24 Jul 2022 07:18:29 +0000 (15:18 +0800)]
ALSA: hiface: fix repeated words in comments

Delete the redundant word 'in'.

Signed-off-by: wangjianli <wangjianli@cdjrlc.com>
Link: https://lore.kernel.org/r/20220724071829.11117-1-wangjianli@cdjrlc.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb/6fire: fix repeated words in comments
wangjianli [Sun, 24 Jul 2022 07:16:44 +0000 (15:16 +0800)]
ALSA: usb/6fire: fix repeated words in comments

Delete the redundant word 'in'.

Signed-off-by: wangjianli <wangjianli@cdjrlc.com>
Link: https://lore.kernel.org/r/20220724071644.10630-1-wangjianli@cdjrlc.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: asihpi: fix repeated words in comments
wangjianli [Sun, 24 Jul 2022 07:14:13 +0000 (15:14 +0800)]
ALSA: asihpi: fix repeated words in comments

Delete the redundant word 'in'.

Signed-off-by: wangjianli <wangjianli@cdjrlc.com>
Link: https://lore.kernel.org/r/20220724071413.10085-1-wangjianli@cdjrlc.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: amd: yc: Update DMI table entries
syed sabakareem [Fri, 22 Jul 2022 13:45:32 +0000 (19:15 +0530)]
ASoC: amd: yc: Update DMI table entries

Removed intel DMI product id's 21AW/21AX/21D8/21D9/21BN/21BQ
in DMI table and updated DMI entry for AMD platform X13 Gen 3
platform 21CM/21CN.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216267
Signed-off-by: syed sabakareem <Syed.SabaKareem@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reported-by: David Korth <gerbilsoft@gerbilsoft.com>
Fixes: fa991481b8b2 ("ASoC: amd: add YC machine driver using dmic")
Link: https://lore.kernel.org/r/20220722134603.316668-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: atmel-i2s: Convert to json-schema
Ryan Wanner [Fri, 22 Jul 2022 15:29:45 +0000 (08:29 -0700)]
ASoC: dt-bindings: atmel-i2s: Convert to json-schema

Convert atmel i2s devicetree binding to json-schema.
Change file name to match json-schema naming.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220722152945.2950807-1-Ryan.Wanner@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: audio-graph-card2: Add of_node_put() in fail path
Liang He [Fri, 22 Jul 2022 14:18:01 +0000 (22:18 +0800)]
ASoC: audio-graph-card2: Add of_node_put() in fail path

In asoc_simple_parse_dai(), we should call of_node_put() for the
reference returned by of_graph_get_port_parent() in fail path.

Fixes: 6e5f68fe3f2d ("ASoC: add Audio Graph Card2 driver")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220722141801.1304854-1-windhl@126.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoALSA: usb-audio: Add quirk for Behringer UMC202HD
Takashi Iwai [Fri, 22 Jul 2022 14:39:48 +0000 (16:39 +0200)]
ALSA: usb-audio: Add quirk for Behringer UMC202HD

Just like other Behringer models, UMC202HD (USB ID 1397:0507) requires
the quirk for the stable streaming, too.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215934
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220722143948.29804-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: Intel: avs: Use lookup table to create modules
Amadeusz Sławiński [Fri, 22 Jul 2022 11:19:59 +0000 (13:19 +0200)]
ASoC: Intel: avs: Use lookup table to create modules

As reported by Nathan, when building avs driver using clang with:
  CONFIG_COMPILE_TEST=y
  CONFIG_FORTIFY_SOURCE=y
  CONFIG_KASAN=y
  CONFIG_PCI=y
  CONFIG_SOUND=y
  CONFIG_SND=y
  CONFIG_SND_SOC=y
  CONFIG_SND_SOC_INTEL_AVS=y

there are reports of too big stack use, like:
  sound/soc/intel/avs/path.c:815:18: error: stack frame size (2176) exceeds limit (2048) in 'avs_path_create' [-Werror,-Wframe-larger-than]
  struct avs_path *avs_path_create(struct avs_dev *adev, u32 dma_id,
                   ^
  1 error generated.

This is apparently caused by inlining many calls to guid_equal which
inlines fortified memcpy, using 2 size_t variables.

Instead of hardcoding many calls to guid_equal, use lookup table with
one call, this improves stack usage.

Link: https://lore.kernel.org/alsa-devel/YtlzY9aYdbS4Y3+l@dev-arch.thelio-3990X/T/
Link: https://github.com/ClangBuiltLinux/linux/issues/1642
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Build-tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220722111959.2588597-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41
Cristian Ciocaltea [Fri, 22 Jul 2022 09:27:00 +0000 (12:27 +0300)]
ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41

Unlike most CODEC drivers, the CS35L41 driver did not have the
non_legacy_dai_naming set, meaning the corresponding DAI has been
traditionally registered using the legacy naming: spi-VLV1776:0x

The recent migration to the new legacy DAI naming style has implicitly
corrected that behavior and DAI gets now registered via the non-legacy
naming, i.e. cs35l41-pcm.

The problem is the acp5x platform driver is now broken as it continues
to refer to the above mentioned codec using the legacy DAI naming in
function acp5x_cs35l41_hw_params() and, therefore, the related setup
is not being executed anymore.

Let's fix that by replacing the obsolete DAI name with the correct one.

Fixes: 129f055a2144 ("ASoC: core: Switch core to new DAI naming flag")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220722092700.8269-1-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agofirmware: cs_dsp: Add memory chunk helpers
Charles Keepax [Fri, 22 Jul 2022 09:48:51 +0000 (10:48 +0100)]
firmware: cs_dsp: Add memory chunk helpers

Add helpers that can be layered on top of a buffer read from or to be
written to the DSP to faciliate accessing datastructures within the DSP
memory. These functions handle adding the padding bytes for the DSP,
converting to big endian, and packing arbitrary length data.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220722094851.92521-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agofirmware: cs_dsp: Add pre_stop callback
Charles Keepax [Fri, 22 Jul 2022 09:48:50 +0000 (10:48 +0100)]
firmware: cs_dsp: Add pre_stop callback

The code already has a post_stop callback, add a matching pre_stop
callback to the client_ops that is called before execution is stopped.
This callback provides a convenient place for the client code to
communicate with the DSP before it is stopped.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220722094851.92521-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl: Fix sparse warning
Mark Brown [Fri, 22 Jul 2022 11:30:59 +0000 (12:30 +0100)]
ASoC: fsl: Fix sparse warning

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

Fix sparse warnings in various fsl drivers.

2 years agoALSA: asihpi: Fix typo in comments
shaomin Deng [Thu, 21 Jul 2022 15:55:17 +0000 (11:55 -0400)]
ALSA: asihpi: Fix typo in comments

Delete the repeated word "in" in comments.

Signed-off-by: shaomin Deng <dengshaomin@cdjrlc.com>
Link: https://lore.kernel.org/r/20220721155517.2438-1-dengshaomin@cdjrlc.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: emu10k1: Fix typo in comments
shaomin Deng [Thu, 21 Jul 2022 15:05:28 +0000 (11:05 -0400)]
ALSA: emu10k1: Fix typo in comments

Remove the rebundant word "in" in comments.

Signed-off-by: shaomin Deng <dengshaomin@cdjrlc.com>
Link: https://lore.kernel.org/r/20220721150528.22099-1-dengshaomin@cdjrlc.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: audio-graph-card: Add of_node_put() in fail path
Liang He [Thu, 21 Jul 2022 14:43:08 +0000 (22:43 +0800)]
ASoC: audio-graph-card: Add of_node_put() in fail path

In asoc_simple_parse_dai(), we should call of_node_put() for the
reference returned by of_graph_get_port_parent() in fail path.

Fixes: ae30a694da4c ("ASoC: simple-card-utils: add asoc_simple_card_parse_dai()")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220721144308.1301587-1-windhl@126.com
Signed-off-by: Mark Brown <broonie@kernel.org>