1
0
Fork 0
Commit Graph

34831 Commits (redonkable)

Author SHA1 Message Date
Andrey Zhizhikin ec63282b52 This is the 5.4.93 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmARRPQACgkQONu9yGCS
 aT7jAg//SFgHtf8wdnuWP7vANyU+MV8fGTs2No729MXuDEZLMwI9uwlkegcNRatI
 G9zCbuPpoXyQFo5wHVYmS1z97dt+SbAY8bO6qjGJBO6e3Pxbo+DEiGCl70Lm6qqu
 8Z3yuECpNID6A3rAgkE2jDBnMr6QolU4hjKnsf8VEVRwDYDjWxTaxZvtS0tGZJf9
 em/F7+1T1cFd2va6FLhyrin1Mu6J/YgZ9NcZTotx/wV5UUwsp/TCxkciUUa4MgkX
 Tv0rt2LSGx2DKw9pGoQi/oXLpyFbQFAM37KWSto7oS7cPzY1FJ7z1Yxcu18J+v5Y
 bsVpCrtDqmrjI8vkcO+8cGcGPXPTT0liUWpWzLX3wiXAZW876fuJrUPFg1LszZoN
 oztyaQTLSCgfYrS21aKOsP3DP2PPRl2TUCslOQwABJrGJ6nLhTyjiF3g+bV2GPlH
 N5f1vutsyp90YkNqywWdK9rito7JFgawqlw63oS65EYsFLmVFeBAdU+b/ecAw53O
 k09HqkZt7RZXVKRpNkLbGfBkGY3wrsiV33SCMpuSQ2lZWyUfwaFmANuaQWeJ5pvl
 nfv09NfzK0cTlMCkHDl5HIqhErvuTSDC6DowEitpQhv23JddgU9KVvWcS5xrJFpP
 9+9QfqkMk9uq0DIYKTSKC+tOrMl7xxsaSG7Xm5MOxr3GXPg1BPE=
 =Fkdf
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdQaENiSDAlGTDEbB7G51OISzHs0FAmASfSkACgkQ7G51OISz
 Hs2FIRAAkHxX7RhYxsEFknN7akxJ5yI661vpgvt+ZRFIkn+3zb9uC/rlP1r+PnuP
 G/YNkjnLpm0w42NqFXVmYl1wPRRfiKr0NAImFkmoSHrMQsYxXTozTTgIqsOhQdC7
 0mpRZ6JRatp5FHYPG4/oeGmvvnyCjB9uJAqBB/9VAfUziWNCVnxQK/VeVRJKrPSl
 zkmXwqx46vFkjQC4TGDjSPKKUGvwSpPjsF220wA+cZXjwZdiTurYAZEeNe6CT3yl
 IIzeHVF7kdvCW+7ZvjK0pHRuTipysgrRCnEqSDgIDe/XZJnY08ETcwiNWHCeGs6P
 e93m+Meb8ZMjmAHbctwoqrx3LP46Sq8hL/Pzk85lX5P/mXzp6O0+GQu39uO6uvqm
 R/brXylELjL2b4Qcozkjo4aC6fIi3KtJKqFP2nVRKJRTTBJDvIb+f1R0+iNUBun9
 3SFQTOdQgPjQfTQn+0YQ5nywanMFSVkKlsyQ+CtdBxUrR2B1GP8nFWSLaHzM36cr
 Yo9bOzjBAQMtNu1SYX0RDM1P5zuenKxdA3LK0zEBobHsiUT8YCGMCiyZFyFrXuN3
 pKXZGhVKHznVjIhn+VdEeXaKTR1DZlZcwSMGxC8Rrzx3JTJlCMYtI6CNdGR+8XM1
 GOsPolmu9KrDM6kpnZmy+4JT1l4cflPcMQ5R167Jfe5kVOCqSN8=
 =KDG9
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.93' into 5.4-2.2.x-imx

This is the 5.4.93 stable release

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2021-01-28 09:00:22 +00:00
Cezary Rojewski 6af4916744 ASoC: Intel: haswell: Add missing pm_ops
[ Upstream commit bb224c3e3e ]

haswell machine board is missing pm_ops what prevents it from undergoing
suspend-resume procedure successfully. Assign default snd_soc_pm_ops so
this is no longer the case.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201217105401.27865-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-27 11:47:42 +01:00
Takashi Iwai 08fa4ae93e ALSA: hda/via: Add minimum mute flag
commit 67ea698c39 upstream.

It turned out that VIA codecs also mute the sound in the lowest mixer
level.  Turn on the dac_min_mute flag to indicate the mute-as-minimum
in TLV like already done in Conexant and IDT codecs.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210559
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210114072453.11379-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-27 11:47:40 +01:00
Takashi Iwai 1607adf1ac ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info()
commit 217bfbb8b0 upstream.

snd_seq_oss_synth_make_info() didn't check the error code from
snd_seq_oss_midi_make_info(), and this leads to the call of strlcpy()
with the uninitialized string as the source, which may lead to the
access over the limit.

Add the proper error check for avoiding the failure.

Reported-by: syzbot+e42504ff21cff05a595f@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210115093428.15882-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-27 11:47:39 +01:00
Andrey Zhizhikin a6f0cb3ff6 This is the 5.4.91 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmAHFkkACgkQONu9yGCS
 aT5DMg//TWHV1loe76Jy6mT7SavddKkO+C6YXdGMYN4vVKJqYzASSqqmkIGYZVOj
 G5GnILybNjA9aJIqX4vXTXs3YslWZN+rd//GYRyBTE7SwlNI8Lho1ZJq8VqtWo+x
 jxm+2QNX8wBb9QuCqsnLOVidWVOQ9dcz0GC6/N8gKcAWJ71B2RpwKQxnEXjlJp3f
 m5cX+Vnm3XnJkdT4mmycV3h4gnOrwhIUGbu8iLbPTmfZf5aZ14eD2Su8gpcunWat
 7JY2z1u4jSpkKspG5e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/VuRlfB8vLObjN7zxolsHT+UT3+WM8hR3sDCEyU3NsJvVxeuxTJtL2qb4zcrRR
 hoDeX5ATOoiKyx56VQR5V/iwr31RXzxFPMRxOc3SePYiZAuJAfy/+SIfquL8sJ4u
 HP8Bx5jieCbLsCazyk0X2QfA6fCsI+avOrOwY9PAWdsB6XKqx8s=
 =IdJz
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.91' into 5.4-2.2.x-imx

This is the 5.4.91 stable release

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2021-01-19 22:02:36 +00:00
Geert Uytterhoeven 548e4168e6 ALSA: firewire-tascam: Fix integer overflow in midi_port_work()
commit 9f65df9c58 upstream.

As snd_fw_async_midi_port.consume_bytes is unsigned int, and
NSEC_PER_SEC is 1000000000L, the second multiplication in

    port->consume_bytes * 8 * NSEC_PER_SEC / 31250

always overflows on 32-bit platforms, truncating the result.  Fix this
by precalculating "NSEC_PER_SEC / 31250", which is an integer constant.

Note that this assumes port->consume_bytes <= 16777.

Fixes: 531f471834 ("ALSA: firewire-lib/firewire-tascam: localize async midi port")
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20210111130251.361335-3-geert+renesas@glider.be
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-19 18:26:19 +01:00
Geert Uytterhoeven 68e67535e2 ALSA: fireface: Fix integer overflow in transmit_midi_msg()
commit e7c22eeaff upstream.

As snd_ff.rx_bytes[] is unsigned int, and NSEC_PER_SEC is 1000000000L,
the second multiplication in

    ff->rx_bytes[port] * 8 * NSEC_PER_SEC / 31250

always overflows on 32-bit platforms, truncating the result.  Fix this
by precalculating "NSEC_PER_SEC / 31250", which is an integer constant.

Note that this assumes ff->rx_bytes[port] <= 16777.

Fixes: 1917429578 ("ALSA: fireface: add transaction support")
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20210111130251.361335-2-geert+renesas@glider.be
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-19 18:26:18 +01:00
Dan Carpenter 55a1020043 ASoC: Intel: fix error code cnl_set_dsp_D0()
commit f373a811fd upstream.

Return -ETIMEDOUT if the dsp boot times out instead of returning
success.

Fixes: cb6a552846 ("ASoC: Intel: cnl: Add sst library functions for cnl platform")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/X9NEvCzuN+IObnTN@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-19 18:26:17 +01:00
Jerome Brunet 2392a54de8 ASoC: meson: axg-tdmin: fix axg skew offset
commit a84dfb3d55 upstream.

The signal captured on from tdm decoder of the AXG SoC is incorrect. It
appears amplified. The skew offset of the decoder is wrong.

Setting the skew offset to 3, like the g12 and sm1 SoCs, solves and gives
correct data.

Fixes: 13a22e6a98 ("ASoC: meson: add tdm input driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20201217150834.3247526-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-19 18:26:16 +01:00
Jerome Brunet 973900cd46 ASoC: meson: axg-tdm-interface: fix loopback
commit 671ee4db95 upstream.

When the axg-tdm-interface was introduced, the backend DAI was marked as an
endpoint when DPCM was walking the DAPM graph to find a its BE.

It is no longer the case since this
commit 8dd26dff00 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks")
Because of this, when DPCM finds a BE it does everything it needs on the
DAIs but it won't power up the widgets between the FE and the BE if there
is no actual endpoint after the BE.

On meson-axg HWs, the loopback is a special DAI of the tdm-interface BE.
It is only linked to the dummy codec since there no actual HW after it.
>From the DAPM perspective, the DAI has no endpoint. Because of this, the TDM
decoder, which is a widget between the FE and BE is not powered up.

>From the user perspective, everything seems fine but no data is produced.

Connecting the Loopback DAI to a dummy DAPM endpoint solves the problem.

Fixes: 8dd26dff00 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks")
Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20201217150812.3247405-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-19 18:26:16 +01:00
Thomas Hebb 1a202b9b9d ASoC: dapm: remove widget from dirty list on free
commit 5c6679b5cb upstream.

A widget's "dirty" list_head, much like its "list" list_head, eventually
chains back to a list_head on the snd_soc_card itself. This means that
the list can stick around even after the widget (or all widgets) have
been freed. Currently, however, widgets that are in the dirty list when
freed remain there, corrupting the entire list and leading to memory
errors and undefined behavior when the list is next accessed or
modified.

I encountered this issue when a component failed to probe relatively
late in snd_soc_bind_card(), causing it to bail out and call
soc_cleanup_card_resources(), which eventually called
snd_soc_dapm_free() with widgets that were still dirty from when they'd
been added.

Fixes: db432b414e ("ASoC: Do DAPM power checks only for widgets changed since last run")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/f8b5f031d50122bf1a9bfc9cae046badf4a7a31a.1607822410.git.tommyhebb@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-19 18:26:11 +01:00
Andrey Zhizhikin 761cab513d This is the 5.4.89 stable release
-----B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W1mZ3O4sojB1R48yBckIRGSbYZgLq7Zcd/2B
 /pEuDeG1PkXmz+vXKhNKIohfddXngxcv5B41bv+YuyzBdAcs44sks9tEh9ZzhppC
 zRal9uVMlIIF3OJSIYZ9mQDp70zZuirmN/Jf/4RQ2vNqBwvR1KbLH4EyCvFRZmDk
 7xrGBTLn99hM4Rw62JWzEWMCMD8BRfZegsBtXNO2UEg0VWOZONPDRlo2RVKbOVDm
 cFykPWCs32PuFa5Ys75clt2uL3Y2sw9SnAQUOLiMoWTdccsCP9HCXvMQPs+QlVWQ
 Y+W96naQzbt3Ri55t+mQ+esKmq65KEq1qdbU1dfd412Y+gME/2DCEdHSLL3vwu1M
 aeYBJOre93xKLIwZ0izmPuDnVI5FHqBzd6ZLGHEvnra0/uJuDJ3j2J7L9NPFL0D9
 s0+WjZImfh3E8kYDAJgCEftk3UadxewLtF6Y65KxpQB7mytR5SPSnv06fK9W5Lgf
 l/Fk5xWKcIltjPBjh6df0FMyhFCSH2IOCIFn5W44xglaWl937HI=
 =MeY4
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.89' into 5.4-2.2.x-imx

This is the 5.4.89 stable release

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2021-01-12 21:35:46 +00:00
PeiSen Hou 0cb0b876f1 ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256.
commit ce2e79b223 upstream.

Add two "Intel Reference boad" SSID in the alc256.
Enable "power saving mode" and Enable "headset jack mode".

Signed-off-by: PeiSen Hou <pshou@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/5978d2267f034c28973d117925ec9c63@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:16:23 +01:00
Kai-Heng Feng 02e59692a6 ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7
commit a598098cc9 upstream.

HP EliteBook 850 G7 uses the same GPIO pins as ALC285_FIXUP_HP_GPIO_LED
to enable mute and micmute LED. So apply the quirk to enable the LEDs.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201230125636.45028-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:16:23 +01:00
Kailang Yang d63a96f45c ALSA: hda/realtek - Fix speaker volume control on Lenovo C940
commit f86de9b1c0 upstream.

Cannot adjust speaker's volume on Lenovo C940.
Applying the alc298_fixup_speaker_volume function can fix the issue.

[ Additional note: C940 has I2S amp for the speaker and this needs the
  same initialization as Dell machines.
  The patch was slightly modified so that the quirk entry is moved
  next to the corresponding Dell quirk entry. -- tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/ea25b4e5c468491aa2e9d6cb1f2fced3@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:16:22 +01:00
bo liu 30fd9778cf ALSA: hda/conexant: add a new hda codec CX11970
commit 744a11abc5 upstream.

The current kernel does not support the cx11970 codec chip.
Add a codec configuration item to kernel.

[ Minor coding style fix by tiwai ]

Signed-off-by: bo liu <bo.liu@senarytech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201229035226.62120-1-bo.liu@senarytech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:16:22 +01:00
Takashi Iwai 121944484c ALSA: hda/via: Fix runtime PM for Clevo W35xSS
commit 4bfd6247fa upstream.

Clevo W35xSS_370SS with VIA codec has had the runtime PM problem that
looses the power state of some nodes after the runtime resume.  This
was worked around by disabling the default runtime PM via a denylist
entry.  Since 5.10.x made the runtime PM applied (casually) even
though it's disabled in the denylist, this problem was revisited.  The
result was that disabling power_save_node feature suffices for the
runtime PM problem.

This patch implements the disablement of power_save_node feature in
VIA codec for the device.  It also drops the former denylist entry,
too, as the runtime PM should work in the codec side properly now.

Fixes: b529ef2464 ("ALSA: hda: Add Clevo W35xSS_370SS to the power_save blacklist")
Reported-by: Christian Labisch <clnetbox@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210104153046.19993-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:16:22 +01:00
Takashi Iwai 77a804dd6b ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks
commit c06ccf3ebb upstream.

The calculation of in_cables and out_cables bitmaps are done with the
bit shift by the value from the descriptor, which is an arbitrary
value, and can lead to UBSAN shift-out-of-bounds warnings.

Fix it by filtering the bad descriptor values with the check of the
upper bound 0x10 (the cable bitmaps are 16 bits).

Reported-by: syzbot+92e45ae45543f89e8c88@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201223174557.10249-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:16:20 +01:00
Andrey Zhizhikin 732c2c9b8f This is the 5.4.87 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl/1wNYACgkQONu9yGCS
 aT64cxAAwwt2H911zFagJCVDfLKXJ4da062n0YcJe3saGSg+mdEkSGYEDxjV6jjM
 jTzK1W5C49sQ9kzIF43YnYgdULwcXJ76G/uqFjFOlmbRzAKAYgs/3KXesa7S4cp+
 LT0fiR7uyViOw1zn4yBIeSnax8uRwT4vR1vV++ILC/7vL6hcnOBOPLxGzUKYlvJQ
 TD8ZQjeTXe5E7Ih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hIZwZj3+8z4Ec1bpvnSzKABW09mcvC5guPg6XgF/Ywsp2VohhZlqTirk/tER+v
 NhgzwzBTv97iU99WKeUf41UPjl6/CHx1EpgqA75Oa+eW4r0Mxsztc1kbkvxFVhEB
 4thvAsVG8+csGxd0HK8McXwwnPBVNDVQ6Mxhn6E5TZJSVC+huu/sjK4RRc9BXJD+
 eDQGgdW20gj/mynxr14kQ3/fULpZg50KOdBAVkFF7c4zL/Ogym0=
 =4lm1
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.87' into 5.4-2.2.x-imx

This is the 5.4.87 stable release

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2021-01-06 15:29:48 +00:00
Takashi Iwai 8b3c009772 ALSA: pcm: Clear the full allocated memory at hw_params
[ Upstream commit 618de0f4ef ]

The PCM hw_params core function tries to clear up the PCM buffer
before actually using for avoiding the information leak from the
previous usages or the usage before a new allocation.  It performs the
memset() with runtime->dma_bytes, but this might still leave some
remaining bytes untouched; namely, the PCM buffer size is aligned in
page size for mmap, hence runtime->dma_bytes doesn't necessarily cover
all PCM buffer pages, and the remaining bytes are exposed via mmap.

This patch changes the memory clearance to cover the all buffer pages
if the stream is supposed to be mmap-ready (that guarantees that the
buffer size is aligned in page size).

Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20201218145625.2045-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-06 14:48:40 +01:00
Takashi Iwai 3a2a5e197a ALSA: rawmidi: Access runtime->avail always in spinlock
commit 88a06d6fd6 upstream.

The runtime->avail field may be accessed concurrently while some
places refer to it without taking the runtime->lock spinlock, as
detected by KCSAN.  Usually this isn't a big problem, but for
consistency and safety, we should take the spinlock at each place
referencing this field.

Reported-by: syzbot+a23a6f1215c84756577c@syzkaller.appspotmail.com
Reported-by: syzbot+3d367d1df1d2b67f5c19@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20201206083527.21163-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:48:38 +01:00
Takashi Iwai 8d2204a053 ALSA: seq: Use bool for snd_seq_queue internal flags
commit 4ebd470370 upstream.

The snd_seq_queue struct contains various flags in the bit fields.
Those are categorized to two different use cases, both of which are
protected by different spinlocks.  That implies that there are still
potential risks of the bad operations for bit fields by concurrent
accesses.

For addressing the problem, this patch rearranges those flags to be
a standard bool instead of a bit field.

Reported-by: syzbot+63cbe31877bb80ef58f5@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20201206083456.21110-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:48:38 +01:00
Andrey Zhizhikin 8c8c2d4715 This is the 5.4.86 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl/sW9MACgkQONu9yGCS
 aT5SwBAAo6dgHqwmPfuf98/8oVeVqTxcmE7GpzpVRH2+yI7Zwk2ez29tAflcM7lT
 LKtR2WFGAxoCL4DUKXeO7Ubwpue5NoBIsJ8/dAYBesojps3WDaFGL55PvJLWwFJ7
 5gPtPzynITaqIC1JCFcrJ7OTp7REiCUZRc1CJXJINWAYL1VbEbH8pH904xfFcivy
 XnNyL9UiWp1lSB8oF3CRJOaK5M5gY1+wdCFaLVqQn306XDEM8PvZK4G3at/jXWgH
 jQjArdtC8M8NwjyTwtqW9JAMV+6CD0/HXk0QboTZg6yiaRrtUsfzMqJ1cvhKcQgO
 kLE3rwdnr3/MxuzSnGWbswflG2WCutoah58g0uN8H0nCiui5mKN6x5K+emgDZIoO
 ndDnh+/5OE247EK+3CGn/0N8i/fOymrLAnLL4wCXVdlQLMCalnL37ibdfGbAptXi
 N3GOGZ2iE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
 =IdA4
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.86' into 5.4-2.2.x-imx

This is the 5.4.86 stable release

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2021-01-03 22:38:54 +00:00
Takashi Iwai ee0bcb1721 ASoC: cx2072x: Fix doubly definitions of Playback and Capture streams
commit 0d024a8bec upstream.

The cx2072x codec driver defines multiple DAIs with the same stream
name "Playback" and "Capture".  Although the current code works more
or less as is as the secondary streams are never used, it still leads
the error message like:
 debugfs: File 'Playback' in directory 'dapm' already present!
 debugfs: File 'Capture' in directory 'dapm' already present!

Fix it by renaming the secondary streams to unique names.

Fixes: a497a43637 ("ASoC: Add support for Conexant CX2072X CODEC")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20201208135154.9188-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:35 +01:00
Robin Gong 48d3f12869 ALSA: core: memalloc: add page alignment for iram
commit 74c64efa15 upstream.

Since mmap for userspace is based on page alignment, add page alignment
for iram alloc from pool, otherwise, some good data located in the same
page of dmab->area maybe touched wrongly by userspace like pulseaudio.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1608221747-3474-1-git-send-email-yibin.gong@nxp.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:34 +01:00
Takashi Iwai cd3ff2a46d ALSA: usb-audio: Disable sample read check if firmware doesn't give back
commit 9df28edce7 upstream.

Some buggy firmware don't give the current sample rate but leaves
zero.  Handle this case more gracefully without warning but just skip
the current rate verification from the next time.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201218145858.2357-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:34 +01:00
Amadej Kastelic b1e3c2fb0f ALSA: usb-audio: Add VID to support native DSD reproduction on FiiO devices
commit 725124d10d upstream.

Add VID to support native DSD reproduction on FiiO devices.

Tested-by: Amadej Kastelic <amadejkastelic7@gmail.com>
Signed-off-by: Emilio Moretti <emilio.moretti@gmail.com>
Signed-off-by: Amadej Kastelic <amadejkastelic7@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/X9j7wdXSr4XyK7Bd@ryzen.localdomain
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:34 +01:00
Chris Chiu 58cb166b1f ALSA: hda/realtek: Apply jack fixup for Quanta NL3
commit 6ca653e3f7 upstream.

The Quanta NL3 laptop has both a headphone output jack and a headset
jack, on the right edge of the chassis.

The pin information suggests that both of these are at the Front.
The PulseAudio is confused to differentiate them so one of the jack
can neither get the jack sense working nor the audio output.

The ALC269_FIXUP_LIFEBOOK chained with ALC269_FIXUP_QUANTA_MUTE can
help to differentiate 2 jacks and get the 'Auto-Mute Mode' working
correctly.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201222150459.9545-1-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:33 +01:00
Takashi Iwai b61b2aa91f ALSA: hda/realtek: Add quirk for MSI-GP73
commit 09926202e9 upstream.

MSI-GP73 (with SSID 1462:1229) requires yet again
ALC1220_FIXUP_CLEVO_P950 quirk like other MSI models.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210793
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201220080943.24839-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:33 +01:00
Chris Chiu 89d429ed2c ALSA/hda: apply jack fixup for the Acer Veriton N4640G/N6640G/N2510G
commit 13be30f156 upstream.

This Acer Veriton N4640G/N6640G/N2510G desktops have 2 headphone
jacks(front and rear), and a separate Mic In jack.

The rear headphone jack is actually a line out jack but always silent
while playing audio. The front 'Mic In' also fails the jack sensing.
Apply the ALC269_FIXUP_LIFEBOOK to have all audio jacks to work as
expected.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201222150459.9545-2-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:33 +01:00
Takashi Iwai 0bf907442c ALSA: pcm: oss: Fix a few more UBSAN fixes
commit 11cb881bf0 upstream.

There are a few places that call round{up|down}_pow_of_two() with the
value zero, and this causes undefined behavior warnings.  Avoid
calling those macros if such a nonsense value is passed; it's a minor
optimization as well, as we handle it as either an error or a value to
be skipped, instead.

Reported-by: syzbot+33ef0b6639a8d2d42b4c@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201218161730.26596-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:33 +01:00
Kailang Yang 11cd11af40 ALSA: hda/realtek - Add supported for more Lenovo ALC285 Headset Button
commit 607184cb16 upstream.

Add supported for more Lenovo ALC285 Headset Button.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/bb1f1da1526d460885aa4257be81eb94@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:33 +01:00
Chris Chiu da723248c5 ALSA: hda/realtek - Enable headset mic of ASUS Q524UQK with ALC255
commit 7e41352847 upstream.

The ASUS laptop Q524UQK with ALC255 codec can't detect the headset
microphone until ALC255_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201209045730.9972-1-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:33 +01:00
Chris Chiu 010a784a1a ALSA: hda/realtek - Enable headset mic of ASUS X430UN with ALC256
commit 5cfca59604 upstream.

The ASUS laptop X430UN with ALC256 can't detect the headset microphone
until ALC256_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201207072755.16210-1-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:33 +01:00
Hui Wang 0fc8e6b856 ALSA: hda/realtek: make bass spk volume adjustable on a yoga laptop
commit c72b9bfe0f upstream.

This change could fix 2 issues on this machine:
 - the bass speaker's output volume can't be adjusted, that is because
   the bass speaker is routed to the DAC (Nid 0x6) which has no volume
   control.
 - after plugging a headset with vol+, vol- and pause buttons on it,
   press those buttons, nothing happens, this means those buttons
   don't work at all. This machine has alc287 codec, need to add the
   codec id to the disable/enable_headset_jack_key(), then the headset
   button could work.

The quirk of ALC285_FIXUP_THINKPAD_HEADSET_JACK could fix both of these
2 issues.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20201205051130.8122-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:32 +01:00
Connor McAdams 52d09e0cdb ALSA: hda/ca0132 - Fix AE-5 rear headphone pincfg.
commit c697ba85a9 upstream.

The Windows driver sets the pincfg for the AE-5's rear-headphone to
report as a microphone. This causes issues with Pulseaudio mistakenly
believing there is no headphone plugged in. In Linux, we should instead
set it to be a headphone.

Fixes: a6b0961b39 ("ALSA: hda/ca0132 - fix AE-5 pincfg")
Cc: <stable@kernel.org>
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201208195223.424753-1-conmanx360@gmail.com
Link: https://lore.kernel.org/r/20201210173550.2968-1-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:32 +01:00
Takashi Iwai 1ca2437530 ALSA: hda: Fix regressions on clear and reconfig sysfs
commit 2506318e38 upstream.

It seems that the HD-audio clear and reconfig sysfs don't work any
longer after the recent driver core change.  There are multiple issues
around that: the linked list corruption and the dead device handling.
The former issue is fixed by another patch for the driver core itself,
while the latter patch needs to be addressed in HD-audio side.

This patch corresponds to the latter, it recovers those broken
functions by replacing the device detach and attach actions with the
standard core API functions, which are almost equivalent with unbind
and bind actions.

Fixes: 654888327e ("driver core: Avoid binding drivers to dead devices")
Cc: <stable@vger.kernel.org>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209207
Link: https://lore.kernel.org/r/20201209150119.7705-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:32 +01:00
Connor McAdams 670b1b7e0d ALSA: hda/ca0132 - Change Input Source enum strings.
commit 7079f785b5 upstream.

Change the Input Source enumerated control's strings to make it play
nice with pulseaudio.

Fixes: 7cb9d94c05 ("ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZ")
Cc: <stable@kernel.org>
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201208195223.424753-2-conmanx360@gmail.com
Link: https://lore.kernel.org/r/20201210173550.2968-2-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:32 +01:00
Dan Carpenter aca4d1bd7e ASoC: wm_adsp: remove "ctl" from list on error in wm_adsp_create_control()
[ Upstream commit 85a7555575 ]

The error handling frees "ctl" but it's still on the "dsp->ctl_list"
list so that could result in a use after free.  Remove it from the list
before returning.

Fixes: 2323736dca ("ASoC: wm_adsp: Add basic support for rev 1 firmware file format")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/X9B0keV/02wrx9Xs@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:25 +01:00
Chuhong Yuan a696ed262e ASoC: amd: change clk_get() to devm_clk_get() and add missed checks
[ Upstream commit 95d3befbc5 ]

cz_da7219_init() does not check the return values of clk_get(),
while da7219_clk_enable() calls clk_set_rate() to dereference
the pointers.
Add checks to fix the problems.
Also, change clk_get() to devm_clk_get() to avoid data leak after
failures.

Fixes: bb24a31ed5 ("ASoC: AMD: Configure wclk and bclk of master codec")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20201204063610.513556-1-hslester96@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:22 +01:00
Chuhong Yuan d863d76536 ASoC: jz4740-i2s: add missed checks for clk_get()
[ Upstream commit 1c1fb2653a ]

jz4740_i2s_set_sysclk() does not check the return values of clk_get(),
while the file dereferences the pointers in clk_put().
Add the missed checks to fix it.

Fixes: 11bd3dd1b7 ("ASoC: Add JZ4740 ASoC support")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20201203144227.418194-1-hslester96@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:18 +01:00
Jerome Brunet efb57c87d8 ASoC: meson: fix COMPILE_TEST error
[ Upstream commit 299fe9937d ]

When compiled with CONFIG_HAVE_CLK, the kernel need to get provider for the
clock API. This is usually selected by the platform and the sound drivers
should not really care about this. However COMPILE_TEST is special and the
platform required may not have been selected, leading to this type of
error:

> aiu-encoder-spdif.c:(.text+0x3a0): undefined reference to `clk_set_parent'

Since we need a sane provider of the API with COMPILE_TEST, depends on
COMMON_CLK.

Fixes: 6dc4fa179f ("ASoC: meson: add axg fifo base driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20201116172423.546855-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:08 +01:00
Zhang Qilong 648b9dd270 ASoC: arizona: Fix a wrong free in wm8997_probe
[ Upstream commit 5e7aace13d ]

In the normal path, we should not free the arizona,
we should return immediately. It will be free when
call remove operation.

Fixes: 31833ead95 ("ASoC: arizona: Move request of speaker IRQs into bus probe")
Reported-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111130923.220186-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:07 +01:00
Zhang Qilong c786bc725d ASoC: wm8998: Fix PM disable depth imbalance on error
[ Upstream commit 193aa0a043 ]

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.

Fixes: 31833ead95 ("ASoC: arizona: Move request of speaker IRQs into bus probe")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111041326.1257558-4-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:06 +01:00
Cezary Rojewski ae54a6d994 ASoC: pcm: DRAIN support reactivation
[ Upstream commit 4c22b80f61 ]

soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to kernel
v5.4 where explicit switch(cmd) has been introduced which takes into
account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update
switch statement to reactive support for it.

As DRAIN is somewhat unique by lacking negative/stop counterpart, bring
behaviour of dpcm_fe_dai_do_trigger() for said command back to its
pre-v5.4 state by adding it to START/RESUME/PAUSE_RELEASE group.

Fixes: acbf27746e ("ASoC: pcm: update FE/BE trigger order based on the command")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20201026100129.8216-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:04 +01:00
Clément Péron 129df833e1 ASoC: sun4i-i2s: Fix lrck_period computation for I2S justified mode
[ Upstream commit 93c0210671 ]

Left and Right justified mode are computed using the same formula
as DSP_A and DSP_B mode.
Which is wrong and the user manual explicitly says:

LRCK_PERDIOD:
PCM Mode: Number of BCLKs within (Left + Right) channel width.
I2S/Left-Justified/Right-Justified Mode: Number of BCLKs within each
individual channel width(Left or Right)

Fix this by using the same formula as the I2S mode.

Fixes: 7ae7834ec4 ("ASoC: sun4i-i2s: Add support for DSP formats")
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20201030144648.397824-2-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:03 +01:00
Andrey Zhizhikin 5552df2bf5 This is the 5.4.85 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl/glK0ACgkQONu9yGCS
 aT5W7A/9Fosi7yNmr9UI/IjjcvDzy2ecA/8Je/WHx9Q5AGUvPhaO9hiciuic3vIQ
 hh8TgKl/8+ZHuiKGXi89G1S7VIeZrCqz55wBpWSgaPsZ9zJzHFh65aSIsoN+Rlmy
 FLHr7BKxchmNgvtVcoO8gpgV2NsxRmJ8+NKWXIRmVzBe5oyyLLOtVsN96htq8jrx
 IrqqtpjVSzlP2enEVPsC0Xw6piK5xaWriQS5W8S1y5awP6Dets+T8CWlBvuoaBCH
 KzISleJF/R5sP4U4+4j6OwEzzPUqxMnCsYrATUOcu/pGGqwRZCVtY4JhxccMCZw6
 Q5gsvbcVTrz3IFyhMI7KL28+YvAOeQ67zOim6ucztgNXDYCMbc+uTxCDRERPr5Pl
 oiCfW42X8Z3Alt8KugDhjh6XYmMVS3u5tOQEaNoPC1mv+WGMJy6Szsq+NgJfbeqC
 8Fszz/1MQtPBBk/wVOvtNybNy+0W4sBGaUq98TtrfnfZtsuM/FrJiCgXTB9pqGxH
 Bq6R8BUsGeFEWzDDe29BoFJBXGpZ8Ox0/LKmBM7z2jWBZldH6DC54LhWaQgsLAMO
 UPGVCtfKNQXnJ/0bO5RSgikD9iTQyFBs5nhreJcXMsTPxI/5wXEkw6MDrvYXLTHE
 C6H6TarzGwlUcicc+UYCVplSTy+4D1sGbH95Rz0cMJHRyojKl8E=
 =9HIQ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdQaENiSDAlGTDEbB7G51OISzHs0FAl/gyMIACgkQ7G51OISz
 Hs0J4g//Y3R4XyO45gq0EtLAQy5rwTb+qO58phDIwC+puIedDTJnLo9IaDB3kyTa
 98++yv4VoWcgLLCsCtgqDube2Csyvx2Dl0JgDMR7L998VXxnVuht3vhUkcd081XR
 EJoNfpBva8uIeqB6LiGg9+jGEc0s5vUCXH3Ijt3ync8vZxrz8PSBruP8AKSOjjbo
 zvRUsCJugYyOrbg2bTswBNTgAOMB+SbtQkOPzQ19/uVzHSGFAUKp41XTVTsbaX62
 9UQQLDfUACvCyGXze50QTC4lRJZNl0PuUhQdz6WSu4DDF1I4QRf5onf39fffPHtU
 XwiCoa0mDwOJLr2An1xITdjQzudWRrp7Bt7JbfjTmcfAa5JPXVnXP12fdJeSm0w2
 ZJoH5A3o2iEq1Q+Fk6FOIEhPLm4ktGHegxo7eZOuBzPGtWTvqqE/ngzyfw/NovGP
 579YtIbY6+2pw3FF4Havv/adRKPcrFZNbiqGgOWpeCB+i7BfJQ4tSNJigtQwLvrf
 yVWJ2e+I9B3z+/HqPKU8OtCWf3R3vT4CvN1bInRFodeSsXUxQraXwKPP/bxOI57C
 TrS5/1pKStntol1IKSCVgXIh66GRt11hPKQHEOcOjG4u0VUSBb9uHoyBo0BTuhXW
 5EOj2hzc/DXye5HmGEQlqnMzSHVg6qn+eKhZKkxCqQLMIjKeAM8=
 =xf26
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.85' into 5.4-2.2.x-imx

This is the 5.4.85 stable release

Conflicts (correct auto-resolve):
- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:
Ustream commit 318d90218b ("net: stmmac: free tx skb buffer in
stmmac_resume()") overlapped NXP commit dd7c2b79a9 ("MLK-24217 net:
ethernet: stmmac: free tx skb buffer in stmmac_resume()"), causing
double-declaration of the function to be present in the code.
Replace the NXP commit with upstream one.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2020-12-21 16:06:12 +00:00
Takashi Iwai 14482dc42c ALSA: pcm: oss: Fix potential out-of-bounds shift
commit 175b8d89fe upstream.

syzbot spotted a potential out-of-bounds shift in the PCM OSS layer
where it calculates the buffer size with the arbitrary shift value
given via an ioctl.

Add a range check for avoiding the undefined behavior.
As the value can be treated by a signed integer, the max shift should
be 30.

Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201209084552.17109-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-21 13:27:06 +01:00
Takashi Iwai 5828ae0c19 ALSA: usb-audio: Fix control 'access overflow' errors from chmap
commit c6dde8ffd0 upstream.

The current channel-map control implementation in USB-audio driver may
lead to an error message like
  "control 3:0:0:Playback Channel Map:0: access overflow"
when CONFIG_SND_CTL_VALIDATION is set.  It's because the chmap get
callback clears the whole array no matter which count is set, and
rather the false-positive detection.

This patch fixes the problem by clearing only the needed array range
at usb_chmap_ctl_get().

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201211130048.6358-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-21 13:27:05 +01:00
Takashi Iwai e72a55ea71 ALSA: usb-audio: Fix potential out-of-bounds shift
commit 43d5ca88df upstream.

syzbot spotted a potential out-of-bounds shift in the USB-audio format
parser that receives the arbitrary shift value from the USB
descriptor.

Add a range check for avoiding the undefined behavior.

Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201209084552.17109-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-21 13:27:05 +01:00