summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-20 15:47:44 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-20 15:47:44 -0800
commitbc1d4e705f48f001f3a5480f04067c48bd00bcf0 (patch)
treed4da92d831ded487a1a71fce1fb9930f3f24e6a6
parentd4a292c5f8e65d2784b703c67179f4f7d0c7846c (diff)
parent89339d889d63a4f981f185d048796762e86aa6c0 (diff)
Merge tag 'sound-fix-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Here are a bunch of updates, but there should be no big surprises; mostly device-specific quirks and fix-ups or non-code changes: - Quirks for ASoC AMD, HD-audio and USB-audio - Fixes in ASoC fsl, rockchip, renesas, aw codecs - Fixes for USB-audio packet handling in the implicit feedback mode - Updates of SPDX license IDs in some files" * tag 'sound-fix-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits) ASoC: rockchip: i2s-tdm: Use param rate if not provided by set_sysclk ALSA: hda/hdmi: Add quirk for TUXEDO IBS14G6 ASoC: dt-bindings: asahi-kasei,ak5558: Fix the supply names ASoC: dt-bindings: asahi-kasei,ak4458: Fix the supply names ASoC: dt-bindings: asahi-kasei,ak4458: set unevaluatedProperties:false ASoC: amd: amd_sdw: add machine driver quirk for Lenovo models ASoC: amd: acp: Add ACP7.0 match entries for Realtek parts ALSA: echoaudio: Add SPDX ids to some files ALSA: isa: Add SPDX id lines to some files ALSA: core: Add SPDX license id to files ASoC: tas2783A: add explicit port prepare handling ASoC: renesas: rz-ssi: Fix playback and capture ALSA: hda/realtek: Fix headset mic on ASUS Zenbook 14 UX3405MA ALSA: hda/conexant: Fix headphone jack handling on Acer Swift SF314 ASoC: qcom: sm8250: Add quinary MI2S support ASoC: amd: yc: Add DMI quirk for ASUS Vivobook Pro 15X M6501RR ALSA: usb-audio: Avoid potentially repeated XRUN error messages ALSA: usb-audio: Add sanity check for OOB writes at silencing ALSA: usb-audio: Optimize the copy of packet sizes for implicit fb handling ALSA: usb-audio: Update the number of packets properly at receiving ...
-rw-r--r--Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml6
-rw-r--r--Documentation/devicetree/bindings/sound/asahi-kasei,ak5558.yaml9
-rw-r--r--sound/core/oss/copy.c17
-rw-r--r--sound/core/oss/io.c17
-rw-r--r--sound/core/oss/linear.c17
-rw-r--r--sound/core/oss/mulaw.c16
-rw-r--r--sound/core/oss/pcm_plugin.c17
-rw-r--r--sound/core/oss/rate.c17
-rw-r--r--sound/core/oss/route.c17
-rw-r--r--sound/core/pcm_misc.c19
-rw-r--r--sound/hda/codecs/conexant.c10
-rw-r--r--sound/hda/codecs/hdmi/hdmi.c1
-rw-r--r--sound/hda/codecs/realtek/alc269.c14
-rw-r--r--sound/hda/codecs/side-codecs/tas2781_hda_spi.c20
-rw-r--r--sound/hda/core/trace.c1
-rw-r--r--sound/isa/gus/interwave-stb.c1
-rw-r--r--sound/isa/msnd/msnd_classic.c1
-rw-r--r--sound/isa/opti9xx/opti92x-cs4231.c1
-rw-r--r--sound/isa/opti9xx/opti93x.c1
-rw-r--r--sound/isa/sb/jazz16.c7
-rw-r--r--sound/isa/sb/sbawe.c1
-rw-r--r--sound/oss/dmasound/dmasound_core.c5
-rw-r--r--sound/pci/echoaudio/darla20_dsp.c17
-rw-r--r--sound/pci/echoaudio/darla24_dsp.c17
-rw-r--r--sound/pci/echoaudio/echo3g_dsp.c17
-rw-r--r--sound/pci/echoaudio/echoaudio.h17
-rw-r--r--sound/pci/echoaudio/echoaudio_3g.c17
-rw-r--r--sound/pci/echoaudio/echoaudio_dsp.c17
-rw-r--r--sound/pci/echoaudio/echoaudio_dsp.h17
-rw-r--r--sound/pci/echoaudio/echoaudio_gml.c17
-rw-r--r--sound/pci/echoaudio/gina20_dsp.c17
-rw-r--r--sound/pci/echoaudio/gina24_dsp.c17
-rw-r--r--sound/pci/echoaudio/indigo_dsp.c17
-rw-r--r--sound/pci/echoaudio/indigo_express_dsp.c17
-rw-r--r--sound/pci/echoaudio/indigodj_dsp.c17
-rw-r--r--sound/pci/echoaudio/indigodjx_dsp.c17
-rw-r--r--sound/pci/echoaudio/indigoio_dsp.c17
-rw-r--r--sound/pci/echoaudio/indigoiox_dsp.c17
-rw-r--r--sound/pci/echoaudio/layla20_dsp.c17
-rw-r--r--sound/pci/echoaudio/layla24_dsp.c16
-rw-r--r--sound/pci/echoaudio/mia_dsp.c17
-rw-r--r--sound/pci/echoaudio/midi.c17
-rw-r--r--sound/pci/echoaudio/mona_dsp.c17
-rw-r--r--sound/pci/ens1371.c1
-rw-r--r--sound/soc/amd/acp/acp-sdw-legacy-mach.c16
-rw-r--r--sound/soc/amd/acp/amd-acp70-acpi-match.c37
-rw-r--r--sound/soc/amd/yc/acp6x-mach.c8
-rw-r--r--sound/soc/codecs/aw88261.c3
-rw-r--r--sound/soc/codecs/rt721-sdca.c4
-rw-r--r--sound/soc/codecs/tas2783-sdw.c43
-rw-r--r--sound/soc/fsl/fsl_xcvr.c3
-rw-r--r--sound/soc/qcom/sm8250.c8
-rw-r--r--sound/soc/renesas/rz-ssi.c2
-rw-r--r--sound/soc/rockchip/rockchip_i2s_tdm.c10
-rw-r--r--sound/usb/card.h2
-rw-r--r--sound/usb/endpoint.c69
-rw-r--r--sound/usb/quirks.c2
57 files changed, 248 insertions, 531 deletions
diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml
index 1fdbeecc5eff..3a3313ea0890 100644
--- a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml
+++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml
@@ -21,10 +21,10 @@ properties:
reg:
maxItems: 1
- avdd-supply:
+ AVDD-supply:
description: Analog power supply
- dvdd-supply:
+ DVDD-supply:
description: Digital power supply
reset-gpios:
@@ -60,7 +60,7 @@ allOf:
properties:
dsd-path: false
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak5558.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak5558.yaml
index d3d494ae8abf..18919d9112a3 100644
--- a/Documentation/devicetree/bindings/sound/asahi-kasei,ak5558.yaml
+++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak5558.yaml
@@ -19,10 +19,10 @@ properties:
reg:
maxItems: 1
- avdd-supply:
+ AVDD-supply:
description: A 1.8V supply that powers up the AVDD pin.
- dvdd-supply:
+ DVDD-supply:
description: A 1.2V supply that powers up the DVDD pin.
reset-gpios:
@@ -32,7 +32,10 @@ required:
- compatible
- reg
-additionalProperties: false
+allOf:
+ - $ref: dai-common.yaml#
+
+unevaluatedProperties: false
examples:
- |
diff --git a/sound/core/oss/copy.c b/sound/core/oss/copy.c
index 05b58d4fc2b7..467fc6847bc9 100644
--- a/sound/core/oss/copy.c
+++ b/sound/core/oss/copy.c
@@ -1,22 +1,7 @@
+// SPDX-License-Identifier: LGPL-2.0+
/*
* Linear conversion Plug-In
* Copyright (c) 2000 by Abramo Bagnara <abramo@alsa-project.org>
- *
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
#include <linux/time.h>
diff --git a/sound/core/oss/io.c b/sound/core/oss/io.c
index d870b2d93135..9317f971a0d3 100644
--- a/sound/core/oss/io.c
+++ b/sound/core/oss/io.c
@@ -1,22 +1,7 @@
+// SPDX-License-Identifier: LGPL-2.0+
/*
* PCM I/O Plug-In Interface
* Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz>
- *
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
#include <linux/time.h>
diff --git a/sound/core/oss/linear.c b/sound/core/oss/linear.c
index 797d838a2f9e..6e51cfdca238 100644
--- a/sound/core/oss/linear.c
+++ b/sound/core/oss/linear.c
@@ -1,23 +1,8 @@
+// SPDX-License-Identifier: LGPL-2.0+
/*
* Linear conversion Plug-In
* Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz>,
* Abramo Bagnara <abramo@alsa-project.org>
- *
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
#include <linux/time.h>
diff --git a/sound/core/oss/mulaw.c b/sound/core/oss/mulaw.c
index fe27034f2846..a95386e55fa1 100644
--- a/sound/core/oss/mulaw.c
+++ b/sound/core/oss/mulaw.c
@@ -1,24 +1,10 @@
+// SPDX-License-Identifier: LGPL-2.0+
/*
* Mu-Law conversion Plug-In Interface
* Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz>
* Uros Bizjak <uros@kss-loka.si>
*
* Based on reference implementation by Sun Microsystems, Inc.
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
#include <linux/time.h>
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
index 82e180c776ae..a4c8c9f538f1 100644
--- a/sound/core/oss/pcm_plugin.c
+++ b/sound/core/oss/pcm_plugin.c
@@ -1,23 +1,8 @@
+// SPDX-License-Identifier: LGPL-2.0+
/*
* PCM Plug-In shared (kernel/library) code
* Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz>
* Copyright (c) 2000 by Abramo Bagnara <abramo@alsa-project.org>
- *
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
#if 0
diff --git a/sound/core/oss/rate.c b/sound/core/oss/rate.c
index b56eeda5e30e..68711ad251ee 100644
--- a/sound/core/oss/rate.c
+++ b/sound/core/oss/rate.c
@@ -1,22 +1,7 @@
+// SPDX-License-Identifier: LGPL-2.0+
/*
* Rate conversion Plug-In
* Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz>
- *
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
#include <linux/time.h>
diff --git a/sound/core/oss/route.c b/sound/core/oss/route.c
index 72dea04197ef..20f7032d12bb 100644
--- a/sound/core/oss/route.c
+++ b/sound/core/oss/route.c
@@ -1,22 +1,7 @@
+// SPDX-License-Identifier: LGPL-2.0+
/*
* Route Plug-In
* Copyright (c) 2000 by Abramo Bagnara <abramo@alsa-project.org>
- *
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
#include <linux/time.h>
diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c
index 71eec32a7a0a..180b6b64a448 100644
--- a/sound/core/pcm_misc.c
+++ b/sound/core/pcm_misc.c
@@ -1,24 +1,9 @@
+// SPDX-License-Identifier: LGPL-2.0+
/*
* PCM Interface - misc routines
* Copyright (c) 1998 by Jaroslav Kysela <perex@perex.cz>
- *
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
*/
-
+
#include <linux/time.h>
#include <linux/export.h>
#include <sound/core.h>
diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
index 5623d8c0a0f7..f71123a47546 100644
--- a/sound/hda/codecs/conexant.c
+++ b/sound/hda/codecs/conexant.c
@@ -299,6 +299,7 @@ enum {
CXT_PINCFG_SWS_JS201D,
CXT_PINCFG_TOP_SPEAKER,
CXT_FIXUP_HP_A_U,
+ CXT_FIXUP_ACER_SWIFT_HP,
};
/* for hda_fixup_thinkpad_acpi() */
@@ -1024,6 +1025,14 @@ static const struct hda_fixup cxt_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = cxt_fixup_hp_a_u,
},
+ [CXT_FIXUP_ACER_SWIFT_HP] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x16, 0x0321403f }, /* Headphone */
+ { 0x19, 0x40f001f0 }, /* Mic */
+ { }
+ },
+ },
};
static const struct hda_quirk cxt5045_fixups[] = {
@@ -1073,6 +1082,7 @@ static const struct hda_quirk cxt5066_fixups[] = {
SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC),
SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC),
SND_PCI_QUIRK(0x1025, 0x054f, "Acer Aspire 4830T", CXT_FIXUP_ASPIRE_DMIC),
+ SND_PCI_QUIRK(0x1025, 0x136d, "Acer Swift SF314", CXT_FIXUP_ACER_SWIFT_HP),
SND_PCI_QUIRK(0x103c, 0x8079, "HP EliteBook 840 G3", CXT_FIXUP_HP_DOCK),
SND_PCI_QUIRK(0x103c, 0x807C, "HP EliteBook 820 G3", CXT_FIXUP_HP_DOCK),
SND_PCI_QUIRK(0x103c, 0x80FD, "HP ProBook 640 G2", CXT_FIXUP_HP_DOCK),
diff --git a/sound/hda/codecs/hdmi/hdmi.c b/sound/hda/codecs/hdmi/hdmi.c
index 111c9b5335af..c2e3adc7b3c0 100644
--- a/sound/hda/codecs/hdmi/hdmi.c
+++ b/sound/hda/codecs/hdmi/hdmi.c
@@ -1557,6 +1557,7 @@ static const struct snd_pci_quirk force_connect_list[] = {
SND_PCI_QUIRK(0x1043, 0x86ae, "ASUS", 1), /* Z170 PRO */
SND_PCI_QUIRK(0x1043, 0x86c7, "ASUS", 1), /* Z170M PLUS */
SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1),
+ SND_PCI_QUIRK(0x1558, 0x14a1, "TUXEDO InfinityBook S 14 Gen6", 1),
SND_PCI_QUIRK(0x8086, 0x2060, "Intel NUC5CPYB", 1),
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1),
{}
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 80f0be13b69f..36053042ca77 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3886,6 +3886,7 @@ enum {
ALC294_FIXUP_ASUS_MIC,
ALC294_FIXUP_ASUS_HEADSET_MIC,
ALC294_FIXUP_ASUS_I2C_HEADSET_MIC,
+ ALC294_FIXUP_ASUS_SPI_HEADSET_MIC,
ALC294_FIXUP_ASUS_SPK,
ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
@@ -5236,6 +5237,15 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC287_FIXUP_CS35L41_I2C_2
},
+ [ALC294_FIXUP_ASUS_SPI_HEADSET_MIC] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x19, 0x04a11020 }, /* use as headset mic */
+ { }
+ },
+ .chained = true,
+ .chain_id = ALC245_FIXUP_CS35L41_SPI_2
+ },
[ALC294_FIXUP_ASUS_SPK] = {
.type = HDA_FIXUP_VERBS,
.v.verbs = (const struct hda_verb[]) {
@@ -7189,7 +7199,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
- SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC245_FIXUP_CS35L41_SPI_2),
+ SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC294_FIXUP_ASUS_SPI_HEADSET_MIC),
SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1043, 0x1a8e, "ASUS G712LWS", ALC294_FIXUP_LENOVO_MIC_LOCATION),
SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
@@ -7318,7 +7328,9 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x144d, 0xc872, "Samsung Galaxy Book2 Pro (NP950XEE)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
SND_PCI_QUIRK(0x144d, 0xc886, "Samsung Galaxy Book3 Pro (NP964XFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
SND_PCI_QUIRK(0x144d, 0xc1ca, "Samsung Galaxy Book3 Pro 360 (NP960QFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
+ SND_PCI_QUIRK(0x144d, 0xc1cb, "Samsung Galaxy Book3 Pro 360 (NP965QFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
SND_PCI_QUIRK(0x144d, 0xc1cc, "Samsung Galaxy Book3 Ultra (NT960XFH)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
+ SND_PCI_QUIRK(0x1458, 0x900e, "Gigabyte G5 KF5 (2023)", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
index 0c9b57b6ff55..f860e0eb7602 100644
--- a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
@@ -631,7 +631,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
struct tasdevice_priv *tas_priv = context;
struct tas2781_hda *tas_hda = dev_get_drvdata(tas_priv->dev);
struct hda_codec *codec = tas_priv->codec;
- int ret, val;
+ int ret;
guard(pm_runtime_active_auto)(tas_priv->dev);
guard(mutex)(&tas_priv->codec_lock);
@@ -670,20 +670,14 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
tas_priv->rcabin.profile_cfg_id = 0;
tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
- ret = tasdevice_spi_dev_read(tas_priv, tas_priv->index,
- TAS2781_REG_CLK_CONFIG, &val);
- if (ret < 0)
- goto out;
- if (val == TAS2781_REG_CLK_CONFIG_RESET) {
- ret = tasdevice_prmg_load(tas_priv, 0);
- if (ret < 0) {
- dev_err(tas_priv->dev, "FW download failed = %d\n",
- ret);
- goto out;
- }
- tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
+ ret = tasdevice_prmg_load(tas_priv, 0);
+ if (ret < 0) {
+ dev_err(tas_priv->dev, "FW download failed = %d\n", ret);
+ goto out;
}
+ tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
+
if (tas_priv->fmw->nr_programs > 0)
tas_priv->tasdevice[tas_priv->index].cur_prog = 0;
if (tas_priv->fmw->nr_configurations > 0)
diff --git a/sound/hda/core/trace.c b/sound/hda/core/trace.c
index ca2d6bd94518..c18759ca48ea 100644
--- a/sound/hda/core/trace.c
+++ b/sound/hda/core/trace.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* tracepoint definitions for HD-audio core drivers
*/
diff --git a/sound/isa/gus/interwave-stb.c b/sound/isa/gus/interwave-stb.c
index dbe4f48a9846..9b3468c8bc43 100644
--- a/sound/isa/gus/interwave-stb.c
+++ b/sound/isa/gus/interwave-stb.c
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0
#define SNDRV_STB
#include "interwave.c"
diff --git a/sound/isa/msnd/msnd_classic.c b/sound/isa/msnd/msnd_classic.c
index 3b23a096fa4e..9c37c9fb94ab 100644
--- a/sound/isa/msnd/msnd_classic.c
+++ b/sound/isa/msnd/msnd_classic.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/* The work is in msnd_pinnacle.c, just define MSND_CLASSIC before it. */
#define MSND_CLASSIC
#include "msnd_pinnacle.c"
diff --git a/sound/isa/opti9xx/opti92x-cs4231.c b/sound/isa/opti9xx/opti92x-cs4231.c
index b17ab19f6d81..e27dc9093c02 100644
--- a/sound/isa/opti9xx/opti92x-cs4231.c
+++ b/sound/isa/opti9xx/opti92x-cs4231.c
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0
#define CS4231
#include "opti92x-ad1848.c"
diff --git a/sound/isa/opti9xx/opti93x.c b/sound/isa/opti9xx/opti93x.c
index bad9da521bf9..cd1fa4635b26 100644
--- a/sound/isa/opti9xx/opti93x.c
+++ b/sound/isa/opti9xx/opti93x.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
#define OPTi93X
#include "opti92x-ad1848.c"
diff --git a/sound/isa/sb/jazz16.c b/sound/isa/sb/jazz16.c
index 69d9bfb6c14c..3f2a5c4e47a7 100644
--- a/sound/isa/sb/jazz16.c
+++ b/sound/isa/sb/jazz16.c
@@ -1,14 +1,9 @@
-
+// SPDX-License-Identifier: GPL-2.0
/*
* jazz16.c - driver for Media Vision Jazz16 based soundcards.
* Copyright (C) 2009 Krzysztof Helt <krzysztof.h1@wp.pl>
* Based on patches posted by Rask Ingemann Lambertsen and Rene Herman.
* Based on OSS Sound Blaster driver.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive for
- * more details.
- *
*/
#include <linux/init.h>
diff --git a/sound/isa/sb/sbawe.c b/sound/isa/sb/sbawe.c
index 2ec52a3473a2..1e00a6b4a1bd 100644
--- a/sound/isa/sb/sbawe.c
+++ b/sound/isa/sb/sbawe.c
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0
#define SNDRV_SBAWE
#include "sb16.c"
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
index dea2d9b18fc9..a718b75bb6a0 100644
--- a/sound/oss/dmasound/dmasound_core.c
+++ b/sound/oss/dmasound/dmasound_core.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* linux/sound/oss/dmasound/dmasound_core.c
*
@@ -21,10 +22,6 @@
* /dev/sndstat is based on code by Hannu Savolainen, the author of the
* VoxWare family of drivers.
*
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive
- * for more details.
- *
* History:
*
* 1995/8/25 First release
diff --git a/sound/pci/echoaudio/darla20_dsp.c b/sound/pci/echoaudio/darla20_dsp.c
index 0356efad7528..5a41644b16b0 100644
--- a/sound/pci/echoaudio/darla20_dsp.c
+++ b/sound/pci/echoaudio/darla20_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/***************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/darla24_dsp.c b/sound/pci/echoaudio/darla24_dsp.c
index b96300772aee..5dc0efaca425 100644
--- a/sound/pci/echoaudio/darla24_dsp.c
+++ b/sound/pci/echoaudio/darla24_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/***************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/echo3g_dsp.c b/sound/pci/echoaudio/echo3g_dsp.c
index 9e1f2cad0909..38084c2c3f73 100644
--- a/sound/pci/echoaudio/echo3g_dsp.c
+++ b/sound/pci/echoaudio/echo3g_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/echoaudio.h b/sound/pci/echoaudio/echoaudio.h
index 511f2fcc0fb9..7a5744bf3155 100644
--- a/sound/pci/echoaudio/echoaudio.h
+++ b/sound/pci/echoaudio/echoaudio.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
****************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/echoaudio_3g.c b/sound/pci/echoaudio/echoaudio_3g.c
index c9ee98ea3c71..4b3c6a8bc66a 100644
--- a/sound/pci/echoaudio/echoaudio_3g.c
+++ b/sound/pci/echoaudio/echoaudio_3g.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c
index 6e872103305b..4dd494508c9b 100644
--- a/sound/pci/echoaudio/echoaudio_dsp.c
+++ b/sound/pci/echoaudio/echoaudio_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/echoaudio_dsp.h b/sound/pci/echoaudio/echoaudio_dsp.h
index aa9129519795..4f73bc037f59 100644
--- a/sound/pci/echoaudio/echoaudio_dsp.h
+++ b/sound/pci/echoaudio/echoaudio_dsp.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/echoaudio_gml.c b/sound/pci/echoaudio/echoaudio_gml.c
index 248983fa2959..682a8cc63f0b 100644
--- a/sound/pci/echoaudio/echoaudio_gml.c
+++ b/sound/pci/echoaudio/echoaudio_gml.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/gina20_dsp.c b/sound/pci/echoaudio/gina20_dsp.c
index c93939850357..ba4c398f8611 100644
--- a/sound/pci/echoaudio/gina20_dsp.c
+++ b/sound/pci/echoaudio/gina20_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/gina24_dsp.c b/sound/pci/echoaudio/gina24_dsp.c
index 78fbac9f3eac..fa1d8c06f059 100644
--- a/sound/pci/echoaudio/gina24_dsp.c
+++ b/sound/pci/echoaudio/gina24_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/indigo_dsp.c b/sound/pci/echoaudio/indigo_dsp.c
index 16eb082df56a..c53643279cdd 100644
--- a/sound/pci/echoaudio/indigo_dsp.c
+++ b/sound/pci/echoaudio/indigo_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/indigo_express_dsp.c b/sound/pci/echoaudio/indigo_express_dsp.c
index ceda2d7046ac..7a032b702498 100644
--- a/sound/pci/echoaudio/indigo_express_dsp.c
+++ b/sound/pci/echoaudio/indigo_express_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
/************************************************************************
This file is part of Echo Digital Audio's generic driver library.
@@ -5,22 +6,6 @@ Copyright Echo Digital Audio Corporation (c) 1998 - 2005
All rights reserved
www.echoaudio.com
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-*************************************************************************
-
Translation from C++ and adaptation for use in ALSA-Driver
were made by Giuliano Pochini <pochini@shiny.it>
diff --git a/sound/pci/echoaudio/indigodj_dsp.c b/sound/pci/echoaudio/indigodj_dsp.c
index 17a1d888d0b9..0f8299ab123f 100644
--- a/sound/pci/echoaudio/indigodj_dsp.c
+++ b/sound/pci/echoaudio/indigodj_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/indigodjx_dsp.c b/sound/pci/echoaudio/indigodjx_dsp.c
index 5fbd4a3a3083..677cd8ed7cc4 100644
--- a/sound/pci/echoaudio/indigodjx_dsp.c
+++ b/sound/pci/echoaudio/indigodjx_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
/************************************************************************
This file is part of Echo Digital Audio's generic driver library.
@@ -5,22 +6,6 @@ Copyright Echo Digital Audio Corporation (c) 1998 - 2005
All rights reserved
www.echoaudio.com
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-*************************************************************************
-
Translation from C++ and adaptation for use in ALSA-Driver
were made by Giuliano Pochini <pochini@shiny.it>
diff --git a/sound/pci/echoaudio/indigoio_dsp.c b/sound/pci/echoaudio/indigoio_dsp.c
index 791787aa0744..55d6431c8291 100644
--- a/sound/pci/echoaudio/indigoio_dsp.c
+++ b/sound/pci/echoaudio/indigoio_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/indigoiox_dsp.c b/sound/pci/echoaudio/indigoiox_dsp.c
index 1ae394ea7c7d..48958e51d414 100644
--- a/sound/pci/echoaudio/indigoiox_dsp.c
+++ b/sound/pci/echoaudio/indigoiox_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
/************************************************************************
This file is part of Echo Digital Audio's generic driver library.
@@ -5,22 +6,6 @@ Copyright Echo Digital Audio Corporation (c) 1998 - 2005
All rights reserved
www.echoaudio.com
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-*************************************************************************
-
Translation from C++ and adaptation for use in ALSA-Driver
were made by Giuliano Pochini <pochini@shiny.it>
diff --git a/sound/pci/echoaudio/layla20_dsp.c b/sound/pci/echoaudio/layla20_dsp.c
index 5fb5c4a4598b..e0349a3c20e4 100644
--- a/sound/pci/echoaudio/layla20_dsp.c
+++ b/sound/pci/echoaudio/layla20_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/layla24_dsp.c b/sound/pci/echoaudio/layla24_dsp.c
index decfccb1e803..e7b8f5fe7753 100644
--- a/sound/pci/echoaudio/layla24_dsp.c
+++ b/sound/pci/echoaudio/layla24_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,21 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/mia_dsp.c b/sound/pci/echoaudio/mia_dsp.c
index 8a4dffc68889..f040a09f3191 100644
--- a/sound/pci/echoaudio/mia_dsp.c
+++ b/sound/pci/echoaudio/mia_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/midi.c b/sound/pci/echoaudio/midi.c
index dd5212644844..4d66163a6bb0 100644
--- a/sound/pci/echoaudio/midi.c
+++ b/sound/pci/echoaudio/midi.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/echoaudio/mona_dsp.c b/sound/pci/echoaudio/mona_dsp.c
index 9bb6a174745c..6089152eb246 100644
--- a/sound/pci/echoaudio/mona_dsp.c
+++ b/sound/pci/echoaudio/mona_dsp.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
Copyright Echo Digital Audio Corporation (c) 1998 - 2004
@@ -5,22 +6,6 @@
www.echoaudio.com
This file is part of Echo Digital Audio's generic driver library.
-
- Echo Digital Audio's generic driver library is free software;
- you can redistribute it and/or modify it under the terms of
- the GNU General Public License as published by the Free Software
- Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
*************************************************************************
Translation from C++ and adaptation for use in ALSA-Driver
diff --git a/sound/pci/ens1371.c b/sound/pci/ens1371.c
index ca0da0ab40b6..694978c4b22d 100644
--- a/sound/pci/ens1371.c
+++ b/sound/pci/ens1371.c
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0
#define CHIP1371
#include "ens1370.c"
diff --git a/sound/soc/amd/acp/acp-sdw-legacy-mach.c b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
index 9cb55d592c3c..c93fc0920a3e 100644
--- a/sound/soc/amd/acp/acp-sdw-legacy-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
@@ -95,6 +95,22 @@ static const struct dmi_system_id soc_sdw_quirk_table[] = {
},
.driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
},
+ {
+ .callback = soc_sdw_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "21YW"),
+ },
+ .driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
+ },
+ {
+ .callback = soc_sdw_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "21YX"),
+ },
+ .driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
+ },
{}
};
diff --git a/sound/soc/amd/acp/amd-acp70-acpi-match.c b/sound/soc/amd/acp/amd-acp70-acpi-match.c
index dd2b010efdaa..7a567ba02292 100644
--- a/sound/soc/amd/acp/amd-acp70-acpi-match.c
+++ b/sound/soc/amd/acp/amd-acp70-acpi-match.c
@@ -531,9 +531,46 @@ static const struct snd_soc_acpi_link_adr acp70_rt722_l0_rt1320_l1[] = {
{}
};
+static const struct snd_soc_acpi_adr_device rt1320_0_single_adr[] = {
+ {
+ .adr = 0x000030025D132001ull,
+ .num_endpoints = 1,
+ .endpoints = &single_endpoint,
+ .name_prefix = "rt1320-1"
+ }
+};
+
+static const struct snd_soc_acpi_adr_device rt722_1_single_adr[] = {
+ {
+ .adr = 0x000130025d072201ull,
+ .num_endpoints = ARRAY_SIZE(rt722_endpoints),
+ .endpoints = rt722_endpoints,
+ .name_prefix = "rt722"
+ }
+};
+
+static const struct snd_soc_acpi_link_adr acp70_rt1320_l0_rt722_l1[] = {
+ {
+ .mask = BIT(0),
+ .num_adr = ARRAY_SIZE(rt1320_0_single_adr),
+ .adr_d = rt1320_0_single_adr,
+ },
+ {
+ .mask = BIT(1),
+ .num_adr = ARRAY_SIZE(rt722_1_single_adr),
+ .adr_d = rt722_1_single_adr,
+ },
+ {}
+};
+
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = {
{
.link_mask = BIT(0) | BIT(1),
+ .links = acp70_rt1320_l0_rt722_l1,
+ .drv_name = "amd_sdw",
+ },
+ {
+ .link_mask = BIT(0) | BIT(1),
.links = acp70_rt722_l0_rt1320_l1,
.drv_name = "amd_sdw",
},
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 67f2fee19398..f1a63475100d 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -696,7 +696,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_BOARD_NAME, "XyloD5_RBU"),
}
},
-
+ {
+ .driver_data = &acp6x_card,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vivobook_ASUSLaptop M6501RR_M6501RR"),
+ }
+ },
{}
};
diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c
index 29b3fc8a1ea4..43c03d3cb252 100644
--- a/sound/soc/codecs/aw88261.c
+++ b/sound/soc/codecs/aw88261.c
@@ -424,9 +424,10 @@ static int aw88261_dev_reg_update(struct aw88261 *aw88261,
if (ret)
break;
+ /* keep all three bits from current hw status */
read_val &= (~AW88261_AMPPD_MASK) | (~AW88261_PWDN_MASK) |
(~AW88261_HMUTE_MASK);
- reg_val &= (AW88261_AMPPD_MASK | AW88261_PWDN_MASK | AW88261_HMUTE_MASK);
+ reg_val &= (AW88261_AMPPD_MASK & AW88261_PWDN_MASK & AW88261_HMUTE_MASK);
reg_val |= read_val;
/* enable uls hmute */
diff --git a/sound/soc/codecs/rt721-sdca.c b/sound/soc/codecs/rt721-sdca.c
index 8233532a1752..35960c225224 100644
--- a/sound/soc/codecs/rt721-sdca.c
+++ b/sound/soc/codecs/rt721-sdca.c
@@ -245,12 +245,12 @@ static void rt721_sdca_jack_preset(struct rt721_sdca_priv *rt721)
regmap_write(rt721->mbq_regmap, 0x5b10007, 0x2000);
regmap_write(rt721->mbq_regmap, 0x5B10017, 0x1b0f);
rt_sdca_index_write(rt721->mbq_regmap, RT721_CBJ_CTRL,
- RT721_CBJ_A0_GAT_CTRL1, 0x2a02);
+ RT721_CBJ_A0_GAT_CTRL1, 0x2205);
rt_sdca_index_write(rt721->mbq_regmap, RT721_CAP_PORT_CTRL,
RT721_HP_AMP_2CH_CAL4, 0xa105);
rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
RT721_UAJ_TOP_TCON14, 0x3b33);
- regmap_write(rt721->mbq_regmap, 0x310400, 0x3023);
+ regmap_write(rt721->mbq_regmap, 0x310400, 0x3043);
rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
RT721_UAJ_TOP_TCON14, 0x3f33);
rt_sdca_index_write(rt721->mbq_regmap, RT721_VENDOR_ANA_CTL,
diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c
index 193aee8653d1..84d45eab3523 100644
--- a/sound/soc/codecs/tas2783-sdw.c
+++ b/sound/soc/codecs/tas2783-sdw.c
@@ -1216,8 +1216,51 @@ static s32 tas_update_status(struct sdw_slave *slave,
return tas_io_init(&slave->dev, slave);
}
+/*
+ * TAS2783 requires explicit port prepare during playback stream
+ * setup even when simple_ch_prep_sm is enabled. Without this,
+ * the port fails to enter the prepared state resulting in no audio output.
+ */
+static int tas_port_prep(struct sdw_slave *slave, struct sdw_prepare_ch *prep_ch,
+ enum sdw_port_prep_ops pre_ops)
+{
+ struct device *dev = &slave->dev;
+ struct sdw_dpn_prop *dpn_prop;
+ u32 addr;
+ int ret;
+
+ dpn_prop = slave->prop.sink_dpn_prop;
+ if (!dpn_prop || !dpn_prop->simple_ch_prep_sm)
+ return 0;
+
+ addr = SDW_DPN_PREPARECTRL(prep_ch->num);
+ switch (pre_ops) {
+ case SDW_OPS_PORT_PRE_PREP:
+ ret = sdw_write_no_pm(slave, addr, prep_ch->ch_mask);
+ if (ret)
+ dev_err(dev, "prep failed for port %d, err=%d\n",
+ prep_ch->num, ret);
+ return ret;
+
+ case SDW_OPS_PORT_PRE_DEPREP:
+ ret = sdw_write_no_pm(slave, addr, 0x00);
+ if (ret)
+ dev_err(dev, "de-prep failed for port %d, err=%d\n",
+ prep_ch->num, ret);
+ return ret;
+
+ case SDW_OPS_PORT_POST_PREP:
+ case SDW_OPS_PORT_POST_DEPREP:
+ /* No POST handling required for TAS2783 */
+ return 0;
+ }
+
+ return 0;
+}
+
static const struct sdw_slave_ops tas_sdw_ops = {
.update_status = tas_update_status,
+ .port_prep = tas_port_prep,
};
static void tas_remove(struct tas2783_prv *tas_dev)
diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c
index 5de93f458b56..a268fb81a2f8 100644
--- a/sound/soc/fsl/fsl_xcvr.c
+++ b/sound/soc/fsl/fsl_xcvr.c
@@ -223,13 +223,10 @@ static int fsl_xcvr_mode_put(struct snd_kcontrol *kcontrol,
xcvr->mode = snd_soc_enum_item_to_val(e, item[0]);
- down_read(&card->snd_card->controls_rwsem);
fsl_xcvr_activate_ctl(dai, fsl_xcvr_arc_mode_kctl.name,
(xcvr->mode == FSL_XCVR_MODE_ARC));
fsl_xcvr_activate_ctl(dai, fsl_xcvr_earc_capds_kctl.name,
(xcvr->mode == FSL_XCVR_MODE_EARC));
- up_read(&card->snd_card->controls_rwsem);
-
/* Allow playback for SPDIF only */
rtd = snd_soc_get_pcm_runtime(card, card->dai_link);
rtd->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count =
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index 05a8b04e50e0..f193d0ba63d0 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -104,6 +104,14 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream)
snd_soc_dai_set_fmt(cpu_dai, fmt);
snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
break;
+ case QUINARY_MI2S_RX:
+ codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S;
+ snd_soc_dai_set_sysclk(cpu_dai,
+ Q6AFE_LPASS_CLK_ID_QUI_MI2S_IBIT,
+ MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
+ snd_soc_dai_set_fmt(cpu_dai, fmt);
+ snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
+ break;
default:
break;
}
diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c
index 39aa865bdca3..74e078c04150 100644
--- a/sound/soc/renesas/rz-ssi.c
+++ b/sound/soc/renesas/rz-ssi.c
@@ -180,7 +180,7 @@ static inline bool rz_ssi_stream_is_play(struct snd_pcm_substream *substream)
static inline struct rz_ssi_stream *
rz_ssi_stream_get(struct rz_ssi_priv *ssi, struct snd_pcm_substream *substream)
{
- return (ssi->playback.substream == substream) ? &ssi->playback : &ssi->capture;
+ return (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? &ssi->playback : &ssi->capture;
}
static inline bool rz_ssi_is_dma_enabled(struct rz_ssi_priv *ssi)
diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c
index 770b9bfbb384..fc52149ed6ae 100644
--- a/sound/soc/rockchip/rockchip_i2s_tdm.c
+++ b/sound/soc/rockchip/rockchip_i2s_tdm.c
@@ -22,6 +22,7 @@
#define DRV_NAME "rockchip-i2s-tdm"
+#define DEFAULT_MCLK_FS 256
#define CH_GRP_MAX 4 /* The max channel 8 / 2 */
#define MULTIPLEX_CH_MAX 10
@@ -665,6 +666,15 @@ static int rockchip_i2s_tdm_hw_params(struct snd_pcm_substream *substream,
mclk_rate = i2s_tdm->mclk_rx_freq;
}
+ /*
+ * When the dai/component driver doesn't need to set mclk-fs for a specific
+ * clock, it can skip the call to set_sysclk() for that clock.
+ * In that case, simply use the clock rate from the params and multiply it by
+ * the default mclk-fs value.
+ */
+ if (!mclk_rate)
+ mclk_rate = DEFAULT_MCLK_FS * params_rate(params);
+
err = clk_set_rate(mclk, mclk_rate);
if (err)
return err;
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 94404c24d240..e34d92d576a2 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -90,7 +90,7 @@ struct snd_usb_endpoint {
struct snd_urb_ctx urb[MAX_URBS];
struct snd_usb_packet_info {
- uint32_t packet_size[MAX_PACKS_HS];
+ int packet_size[MAX_PACKS_HS];
int packets;
} next_packet[MAX_URBS];
unsigned int next_packet_head; /* ring buffer offset to read */
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 8f9313857ee9..a855b2cc60c7 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -275,8 +275,8 @@ static inline bool has_tx_length_quirk(struct snd_usb_audio *chip)
return chip->quirk_flags & QUIRK_FLAG_TX_LENGTH;
}
-static void prepare_silent_urb(struct snd_usb_endpoint *ep,
- struct snd_urb_ctx *ctx)
+static int prepare_silent_urb(struct snd_usb_endpoint *ep,
+ struct snd_urb_ctx *ctx)
{
struct urb *urb = ctx->urb;
unsigned int offs = 0;
@@ -289,28 +289,34 @@ static void prepare_silent_urb(struct snd_usb_endpoint *ep,
extra = sizeof(packet_length);
for (i = 0; i < ctx->packets; ++i) {
- unsigned int offset;
- unsigned int length;
- int counts;
-
- counts = snd_usb_endpoint_next_packet_size(ep, ctx, i, 0);
- length = counts * ep->stride; /* number of silent bytes */
- offset = offs * ep->stride + extra * i;
- urb->iso_frame_desc[i].offset = offset;
+ int length;
+
+ length = snd_usb_endpoint_next_packet_size(ep, ctx, i, 0);
+ if (length < 0)
+ return length;
+ length *= ep->stride; /* number of silent bytes */
+ if (offs + length + extra > ctx->buffer_size)
+ break;
+ urb->iso_frame_desc[i].offset = offs;
urb->iso_frame_desc[i].length = length + extra;
if (extra) {
packet_length = cpu_to_le32(length);
- memcpy(urb->transfer_buffer + offset,
+ memcpy(urb->transfer_buffer + offs,
&packet_length, sizeof(packet_length));
+ offs += extra;
}
- memset(urb->transfer_buffer + offset + extra,
+ memset(urb->transfer_buffer + offs,
ep->silence_value, length);
- offs += counts;
+ offs += length;
}
- urb->number_of_packets = ctx->packets;
- urb->transfer_buffer_length = offs * ep->stride + ctx->packets * extra;
+ if (!offs)
+ return -EPIPE;
+
+ urb->number_of_packets = i;
+ urb->transfer_buffer_length = offs;
ctx->queued = 0;
+ return 0;
}
/*
@@ -332,8 +338,7 @@ static int prepare_outbound_urb(struct snd_usb_endpoint *ep,
if (data_subs && ep->prepare_data_urb)
return ep->prepare_data_urb(data_subs, urb, in_stream_lock);
/* no data provider, so send silence */
- prepare_silent_urb(ep, ctx);
- break;
+ return prepare_silent_urb(ep, ctx);
case SND_USB_ENDPOINT_TYPE_SYNC:
if (snd_usb_get_speed(ep->chip->dev) >= USB_SPEED_HIGH) {
@@ -397,18 +402,21 @@ static int prepare_inbound_urb(struct snd_usb_endpoint *ep,
}
/* notify an error as XRUN to the assigned PCM data substream */
-static void notify_xrun(struct snd_usb_endpoint *ep)
+static bool notify_xrun(struct snd_usb_endpoint *ep)
{
struct snd_usb_substream *data_subs;
struct snd_pcm_substream *psubs;
data_subs = READ_ONCE(ep->data_subs);
if (!data_subs)
- return;
+ return false;
psubs = data_subs->pcm_substream;
if (psubs && psubs->runtime &&
- psubs->runtime->state == SNDRV_PCM_STATE_RUNNING)
+ psubs->runtime->state == SNDRV_PCM_STATE_RUNNING) {
snd_pcm_stop_xrun(psubs);
+ return true;
+ }
+ return false;
}
static struct snd_usb_packet_info *
@@ -462,7 +470,7 @@ int snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
while (ep_state_running(ep)) {
struct snd_usb_packet_info *packet;
struct snd_urb_ctx *ctx = NULL;
- int err, i;
+ int err;
scoped_guard(spinlock_irqsave, &ep->lock) {
if ((!implicit_fb || ep->next_packet_queued > 0) &&
@@ -481,8 +489,9 @@ int snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
/* copy over the length information */
if (implicit_fb) {
- for (i = 0; i < packet->packets; i++)
- ctx->packet_size[i] = packet->packet_size[i];
+ ctx->packets = packet->packets;
+ memcpy(ctx->packet_size, packet->packet_size,
+ packet->packets * sizeof(packet->packet_size[0]));
}
/* call the data handler to fill in playback data */
@@ -588,8 +597,9 @@ static void snd_complete_urb(struct urb *urb)
return;
if (!atomic_read(&ep->chip->shutdown)) {
- usb_audio_err(ep->chip, "cannot submit urb (err = %d)\n", err);
- notify_xrun(ep);
+ if (notify_xrun(ep))
+ usb_audio_err(ep->chip,
+ "cannot submit urb (err = %d)\n", err);
}
exit_clear:
@@ -1773,10 +1783,11 @@ static void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
spin_lock_irqsave(&ep->lock, flags);
if (ep->next_packet_queued >= ARRAY_SIZE(ep->next_packet)) {
spin_unlock_irqrestore(&ep->lock, flags);
- usb_audio_err(ep->chip,
- "next package FIFO overflow EP 0x%x\n",
- ep->ep_num);
- notify_xrun(ep);
+ if (notify_xrun(ep)) {
+ usb_audio_err(ep->chip,
+ "next packet FIFO overflow EP 0x%x\n",
+ ep->ep_num);
+ }
return;
}
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 86c329632e39..17e49617218b 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2148,6 +2148,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
/* Device matches */
DEVICE_FLG(0x001f, 0x0b21, /* AB13X USB Audio */
QUIRK_FLAG_FORCE_IFACE_RESET | QUIRK_FLAG_IFACE_DELAY),
+ DEVICE_FLG(0x0020, 0x0b21, /* GHW-123P */
+ QUIRK_FLAG_FORCE_IFACE_RESET | QUIRK_FLAG_IFACE_DELAY),
DEVICE_FLG(0x03f0, 0x654a, /* HP 320 FHD Webcam */
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */