1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00

Compare commits

...

53 Commits

Author SHA1 Message Date
Linus Torvalds
ccd1cdca5c nfsd-6.19 fixes:
A set of NFSD fixes that arrived just a bit late for the 6.19 merge
 window.
 
 Issues reported with v6.19-rc:
 - Mark variable __maybe_unused to avoid W=1 build break
 
 Issues that need expedient stable backports:
 - NFSv4 file creation neglects setting ACL
 - Clear TIME_DELEG in the suppattr_exclcreat bitmap
 - Clear SECLABEL in the suppattr_exclcreat bitmap
 - Fix memory leak in nfsd_create_serv error paths
 - Bound check rq_pages index in inline path
 - Return 0 on success from svc_rdma_copy_inline_range
 - Use rc_pageoff for memcpy byte offset
 - Avoid NULL deref on zero length gss_token in gss_read_proxy_verf
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEKLLlsBKG3yQ88j7+M2qzM29mf5cFAmlKp+EACgkQM2qzM29m
 f5e0IhAAwkgBfMIKn9S9eIJ4jYIMAlZGTv24Pt4DkTHcSMYzwZ/8bnCNqL5S1UUV
 V8DeVe4pYKoMsXZYkFt9ZyPE77D6ZrWaOHdwHeq/UI624f1KIccOGrnDHfz6Xt+Q
 7xuWsfblKPQQMalRgbfiVq+mRfBfAzdR/cjT+11RaagMEEOP/jMdXIn0qel03Yuy
 v+4L92wg0gD5GIpQqKZiNXWsPWbYvw/kj1a1hIpOFv//4R9L5oPESC/2jXFweTUE
 fCKuAa+CntaagJcTqXHokPB7DO0lvSNoP5wt/eS/uFmrnnLFPTHu0q5+EAangIV7
 laqEJiIqT/QR/mfunJ1v07ifGGmXCeg209olyM95enkPgaBCVaYg1OU52YMgGFPY
 GxnUCCEDQVBjPVnETRN4LpvnTcnDlceuzwzw9O99x0A3pZ1++FCfFl0VtcGI227u
 BZu8+/1jfSCGTOqvx+bzHJ+XR9h9edKZMIFruceEXKfagOkyjvknbWaTBs1+lPsZ
 9EswllY7V9MzRsD951sd8KiCVChhtOvNFutuhRz30KHBxT+alrP8D90TQBAYpUrz
 wN3eNqDKkD+YOIx8T8P3Qn4MxLWd/xX8roG/9TzwgmqD+5c3D12IKouYo4tiNqc5
 d+cH/CpqhwMqsM72XNw4+RQvZFsZyfubrKPUnVidc0t0Ong73zM=
 =jkV1
 -----END PGP SIGNATURE-----

Merge tag 'nfsd-6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fixes from Chuck Lever:
 "A set of NFSD fixes that arrived just a bit late for the 6.19 merge
  window.

  Regression fixes:
   - Mark variable __maybe_unused to avoid W=1 build break

  Stable fixes:
   - NFSv4 file creation neglects setting ACL
   - Clear TIME_DELEG in the suppattr_exclcreat bitmap
   - Clear SECLABEL in the suppattr_exclcreat bitmap
   - Fix memory leak in nfsd_create_serv error paths
   - Bound check rq_pages index in inline path
   - Return 0 on success from svc_rdma_copy_inline_range
   - Use rc_pageoff for memcpy byte offset
   - Avoid NULL deref on zero length gss_token in gss_read_proxy_verf"

* tag 'nfsd-6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  NFSD: NFSv4 file creation neglects setting ACL
  NFSD: Clear TIME_DELEG in the suppattr_exclcreat bitmap
  NFSD: Clear SECLABEL in the suppattr_exclcreat bitmap
  nfsd: fix memory leak in nfsd_create_serv error paths
  nfsd: Mark variable __maybe_unused to avoid W=1 build break
  svcrdma: bound check rq_pages index in inline path
  svcrdma: return 0 on success from svc_rdma_copy_inline_range
  svcrdma: use rc_pageoff for memcpy byte offset
  SUNRPC: svcauth_gss: avoid NULL deref on zero length gss_token in gss_read_proxy_verf
2025-12-24 09:23:04 -08:00
Linus Torvalds
ce93692d68 Change since last update:
- Fix unexpected EIOs under memory pressure caused by recent
    incorrect error propagation logic
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEQ0A6bDUS9Y+83NPFUXZn5Zlu5qoFAmlKo9sRHHhpYW5nQGtl
 cm5lbC5vcmcACgkQUXZn5Zlu5qqPNw/+MXDqg6VYI2aykRHdHaQIhisL/zSyUM1Q
 WXn25/xCyIC6K+Szwk0st+F8lAviAnbpMZBQZvH2YLRUn7/M6ajZmizEtKPAe9z3
 nvRJmwG2EI37b3HgUzQ0ua+GPciUFV3l5EoB+c+2L8NIx6XSXe1JYUW9ik7XezBZ
 CsN0p6Crf/RxGuhhnqD9h1lHqWOA7XHkqezUn0CPz/W89OuOBwZ1HXMgKkIw7hSi
 vzCLz0/YBp37ZgN1BgY4EQAIw0/Uaop1QQ9LQ2RRyJVHxUt3HCpeIwUvh21YHOXT
 H/2aUK1NbcPFg1iuzFOHqd9O7HQxiCa3IbTdpB1YqdrYIHBtpeQCv1Ow2SJ+1n5v
 aQv3LC3lRqDj8OccfOjiWFKz8SxvZzmHuv3O47tkza1JOo5YozGYJ8/ZfnOZmFfV
 QZfCvwAUyychkV3pu1NdYoMbzNRbVOBkY9r0tTIu1xYL/b2SmxrWS7FNpaRB+5Dk
 YITGb1ARAqXhfsLMu2j7faa5bTCvnjVSgRYI4i1iQYq0oxdkyISRdupSky7IsoHe
 4Oe2VBcqQakhuN6rJUPLSQiiMPn9epS6iaCJnk2KffhLsidVh+KCzszsRaonDcII
 4VSNAftWekDm8QnlbuH7xX9Ovcam9QllON2MdpwhX4zb4qpzJekGaZRZOONAEHmW
 EsGOeC64ejs=
 =vMIs
 -----END PGP SIGNATURE-----

Merge tag 'erofs-for-6.19-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fix from Gao Xiang:
 "Junbeom reported that synchronous reads could hit unintended EIOs
  under memory pressure due to incorrect error propagation in
  z_erofs_decompress_queue(), where earlier physical clusters in the
  same decompression queue may be served for another readahead.

  This addresses the issue by decompressing each physical cluster
  independently as long as disk I/Os succeed, rather than being impacted
  by the error status of previous physical clusters in the same queue.

  Summary:

   - Fix unexpected EIOs under memory pressure caused by recent
     incorrect error propagation logic"

* tag 'erofs-for-6.19-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
  erofs: fix unexpected EIO under memory pressure
2025-12-24 09:15:30 -08:00
Linus Torvalds
ebb8719c1a sound fixes for 6.13-rc3
Likely the last PR in 2025, again a collection of lots of small fixes.
 Most of them are various device-specific small fixes.
 
 * An ASoC core fix for correcting the clamping behavior of *_SX mixer
   elements
 * Various fixes for ASoC fsl, SOF, etc
 * Usual HD- and USB-audio quirks / fix-ups
 * A couple of error-handling fixes for legacy PCMCIA drivers
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmlKYp8OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE/9kQ/8CGqzZrNJ/+ElfVb3NGK83T7mKUZtUCwesXo2
 87wznZ/QecZARGM2bckoW0oX/q9KxqUKQRGIwYjnOXCSnSLIQUOuyDLPC+PIGZZT
 8aY+WUJ6KgUnrnZSQdq1P6uhl6DwUC+8LOYIbJztJGUTob0WAky0S8qsb6rWgxBL
 IDV325TaeDNI9131XUxbBE34pxGCPnud7Q9SiUivBbAjiWbDIxfbqLoqG8bMxb28
 41XVEMXBN6iuwR5c6Ur9HMXHsRa4Q73T1w1HvnI972ACZlfe7Ojmjws1XoNffu/y
 iLrL5M6XOkb4ZDTQkwqk5o1B20EmmxVNIMh8YG6Fix8TgINCzhbT+LX0s0m/mimY
 HJdvUEk/VdxC/BmIXrAIBXs29nz5K3YAhxye2pEHkdFNEh88iR7W5q8L2YjtsiCu
 /BdqHNwET01G3kje39cEZDy3RnSmzNuNYOyLzr39YYqxlayFhToxNbbr/VIgP954
 KLXF7RPJLIUIDYRl4xLjJo3FWc6UslwAGBSEZM6YVYNWV9e++h8qHI1CQ4jryXAc
 hUhquR0ZggkKUkch7D7HtaVrT8RldfnTsxnd0a5DYELZt4aVBLX+fBlTr9vJpyZw
 4sgAVID1x2v/LIhuAwxpsDqweQzCRjUNlPqlQqAT2QK1kdulXcg1G9t6SERfEMu9
 secJMyY=
 =aBfc
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "Likely the last pull request in 2025, again a collection of lots of
  small fixes. Most of them are various device-specific small fixes:

   - An ASoC core fix for correcting the clamping behavior of *_SX mixer
     elements

   - Various fixes for ASoC fsl, SOF, etc

   - Usual HD- and USB-audio quirks / fix-ups

   - A couple of error-handling fixes for legacy PCMCIA drivers"

* tag 'sound-6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (35 commits)
  ALSA: hda/realtek: fix PCI SSID for one of the HP 200 G2i laptop
  ASoC: ops: fix snd_soc_get_volsw for sx controls
  ALSA: hda/realtek: Add Asus quirk for TAS amplifiers
  ASoC: Intel: soc-acpi-intel-mtl-match: Add 6 amp CS35L63 with feedback
  ASoC: Intel: soc-acpi-intel-mtl-match: Add 6 amp CS35L56 with feedback
  ASoC: fsl-asoc-card: Use of_property_present() for non-boolean properties
  ASoC: rt1320: update VC blind write settings
  ASoC: fsl_xcvr: provide regmap names
  ASoC: fsl_sai: Add missing registers to cache default
  ASoC: ak4458: remove the reset operation in probe and remove
  ASoC: fsl_asrc_dma: fix duplicate debugfs directory error
  ASoC: fsl_easrc: fix duplicate debugfs directory error
  ALSA: hda/realtek: fix micmute LED reversed on HP Abe and Bantie
  ALSA: hda/realtek: Add support for HP Clipper Laptop
  ALSA: hda/realtek: Add support for HP Trekker Laptop
  ALSA: usb-mixer: us16x08: validate meter packet indices
  ASoC: Intel: soc-acpi-intel-nvl-match: Drop rt722 l3 from the match table
  ASoC: soc-acpi / SOF: Add best_effort flag to get_function_tplg_files op
  ASoC: SOF: Intel: pci-mtl: Change the topology path to intel/sof-ipc4-tplg
  ASoC: SOF: ipc4-topology: set playback channel mask
  ...
2025-12-23 09:13:33 -08:00
Junbeom Yeom
4012d78562 erofs: fix unexpected EIO under memory pressure
erofs readahead could fail with ENOMEM under the memory pressure because
it tries to alloc_page with GFP_NOWAIT | GFP_NORETRY, while GFP_KERNEL
for a regular read. And if readahead fails (with non-uptodate folios),
the original request will then fall back to synchronous read, and
`.read_folio()` should return appropriate errnos.

However, in scenarios where readahead and read operations compete,
read operation could return an unintended EIO because of an incorrect
error propagation.

To resolve this, this patch modifies the behavior so that, when the
PCL is for read(which means pcl.besteffort is true), it attempts actual
decompression instead of propagating the privios error except initial EIO.

- Page size: 4K
- The original size of FileA: 16K
- Compress-ratio per PCL: 50% (Uncompressed 8K -> Compressed 4K)
[page0, page1] [page2, page3]
[PCL0]---------[PCL1]

- functions declaration:
  . pread(fd, buf, count, offset)
  . readahead(fd, offset, count)
- Thread A tries to read the last 4K
- Thread B tries to do readahead 8K from 4K
- RA, besteffort == false
- R, besteffort == true

        <process A>                   <process B>

pread(FileA, buf, 4K, 12K)
  do readahead(page3) // failed with ENOMEM
  wait_lock(page3)
    if (!uptodate(page3))
      goto do_read
                               readahead(FileA, 4K, 8K)
                               // Here create PCL-chain like below:
                               // [null, page1] [page2, null]
                               //   [PCL0:RA]-----[PCL1:RA]
...
  do read(page3)        // found [PCL1:RA] and add page3 into it,
                        // and then, change PCL1 from RA to R
...
                               // Now, PCL-chain is as below:
                               // [null, page1] [page2, page3]
                               //   [PCL0:RA]-----[PCL1:R]

                                 // try to decompress PCL-chain...
                                 z_erofs_decompress_queue
                                   err = 0;

                                   // failed with ENOMEM, so page 1
                                   // only for RA will not be uptodated.
                                   // it's okay.
                                   err = decompress([PCL0:RA], err)

                                   // However, ENOMEM propagated to next
                                   // PCL, even though PCL is not only
                                   // for RA but also for R. As a result,
                                   // it just failed with ENOMEM without
                                   // trying any decompression, so page2
                                   // and page3 will not be uptodated.
                ** BUG HERE ** --> err = decompress([PCL1:R], err)

                                   return err as ENOMEM
...
    wait_lock(page3)
      if (!uptodate(page3))
        return EIO      <-- Return an unexpected EIO!
...

Fixes: 2349d2fa02db ("erofs: sunset unneeded NOFAILs")
Cc: stable@vger.kernel.org
Reviewed-by: Jaewook Kim <jw5454.kim@samsung.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Junbeom Yeom <junbeom.yeom@samsung.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2025-12-22 00:18:53 +08:00
Chris Chiu
17753d1755 ALSA: hda/realtek: fix PCI SSID for one of the HP 200 G2i laptop
The PCI subsystem ID of the HP machine Abe A6U should be 0x8ee7
instead of 0x8eb7.

Fixes: a30fa8122222 ("ALSA: hda/realtek: fix mute/micmute LEDs don't work for more HP laptops")
Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Link: https://patch.msgid.link/20251218062251.2039592-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-21 11:19:31 +01:00
Takashi Iwai
24f171c7e1 ASoC: Fixes for v6.19
We've been quite busy with fixes since the merge window, though not in
 any particularly exciting ways - the standout thing is the fix for _SX
 controls which were broken by a change to how we do clamping, otherwise
 it's all fairly run of the mill fixes and quirks.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmlFbkgACgkQJNaLcl1U
 h9Bkvgf/adbAIa/nkcOb8FEba3Dc1eh8eDlosexH1AzEX11dUphTDV7NYFNsa9zt
 InrETvxHFmqFSN6ZmWGR3mFpPRwLVpbe8MTuazjDurwLZV5Y6XCWTiL/4m+8m+/E
 7N0eVCccS5v4vrd+2zNGG+1+lI8QOXzY5egGe5v3yhmhUmFXZP5dBO9EzRZX60Ks
 FUPMXlS37TdSXc+uiZaemkunKZqFOIwq+Pl+9wMt/d5QB9xFWMxb+k/cQONPt0Po
 wS7DynO4iAVh27B9kFu+UDrW2JR3kTCEZTjL+ImL10dOZkuiNeyU9SFOfmR6tIwD
 uODoFGR9ny6zUzwABlyDJzeipf3JUw==
 =7AM/
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.19-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.19

We've been quite busy with fixes since the merge window, though not in
any particularly exciting ways - the standout thing is the fix for _SX
controls which were broken by a change to how we do clamping, otherwise
it's all fairly run of the mill fixes and quirks.
2025-12-21 11:11:11 +01:00
Mark Brown
56d953a8d0
ASoC: Intel: mtl-match: Add 6-amp matches for CS35L56
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

These two commits add support for 6 amps with feedback, primarily for
the CDB35L56-EIGHT-C and CDB35L63-CB8 and similar hardware.
2025-12-19 13:25:16 +00:00
Mark Brown
01ad27827c
ASoC: fsl_easrc: Fix duplicate debufs entries
Merge series from Alexander Stein <alexander.stein@ew.tq-group.com>:

this series fixes the error regarding duplicate debugfs directory creation on
TQMa8MPxL (imx8mp) when easrc is enabled:
  debugfs: '30c90000.easrc' already exists in 'tqm-tlv320aic32'

This is caused because fsl_easrc adds two components which use the device name
as component name. Debugfs directories for each component is created, resulting
on name conflict. Fix this by adding the debugfs_prefix for both component
drivers.

Before:
$ ls /sys/kernel/debug/asoc/tqm-tlv320aic32/
30c30000.sai  30c90000.easrc  HiFi-ASRC-FE  dapm  dapm_pop_time
dma:30c30000.sai  tlv320aic32x4.1-0018

After:
$ ls /sys/kernel/debug/asoc/tqm-tlv320aic32/
30c30000.sai  HiFi-ASRC-FE  asrc:30c90000.easrc  dapm  dapm_pop_time
dma:30c30000.sai  easrc:30c90000.easrc  tlv320aic32x4.1-0018
2025-12-19 13:25:12 +00:00
Stefan Binding
095d621141
ASoC: ops: fix snd_soc_get_volsw for sx controls
SX controls are currently broken, since the clamp introduced in
commit a0ce874cfaaa ("ASoC: ops: improve snd_soc_get_volsw") does not
handle SX controls, for example where the min value in the clamp is
greater than the max value in the clamp.

Add clamp parameter to prevent clamping in SX controls.
The nature of SX controls mean that it wraps around 0, with a variable
number of bits, therefore clamping the value becomes complicated and
prone to error.

Fixes 35 kunit tests for soc_ops_test_access.

Fixes: a0ce874cfaaa ("ASoC: ops: improve snd_soc_get_volsw")

Co-developed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20251216134938.788625-1-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-18 18:18:18 +00:00
Chuck Lever
913f7cf77b NFSD: NFSv4 file creation neglects setting ACL
An NFSv4 client that sets an ACL with a named principal during file
creation retrieves the ACL afterwards, and finds that it is only a
default ACL (based on the mode bits) and not the ACL that was
requested during file creation. This violates RFC 8881 section
6.4.1.3: "the ACL attribute is set as given".

The issue occurs in nfsd_create_setattr(), which calls
nfsd_attrs_valid() to determine whether to call nfsd_setattr().
However, nfsd_attrs_valid() checks only for iattr changes and
security labels, but not POSIX ACLs. When only an ACL is present,
the function returns false, nfsd_setattr() is skipped, and the
POSIX ACL is never applied to the inode.

Subsequently, when the client retrieves the ACL, the server finds
no POSIX ACL on the inode and returns one generated from the file's
mode bits rather than returning the originally-specified ACL.

Reported-by: Aurélien Couderc <aurelien.couderc2002@gmail.com>
Fixes: c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs")
Cc: Roland Mainz <roland.mainz@nrubsig.org>
Cc: stable@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-12-18 11:19:11 -05:00
Chuck Lever
ad3cbbb0c1 NFSD: Clear TIME_DELEG in the suppattr_exclcreat bitmap
>From RFC 8881:

5.8.1.14. Attribute 75: suppattr_exclcreat

> The bit vector that would set all REQUIRED and RECOMMENDED
> attributes that are supported by the EXCLUSIVE4_1 method of file
> creation via the OPEN operation. The scope of this attribute
> applies to all objects with a matching fsid.

There's nothing in RFC 8881 that states that suppattr_exclcreat is
or is not allowed to contain bits for attributes that are clear in
the reported supported_attrs bitmask. But it doesn't make sense for
an NFS server to indicate that it /doesn't/ implement an attribute,
but then also indicate that clients /are/ allowed to set that
attribute using OPEN(create) with EXCLUSIVE4_1.

The FATTR4_WORD2_TIME_DELEG attributes are also not to be allowed
for OPEN(create) with EXCLUSIVE4_1. It doesn't make sense to set
a delegated timestamp on a new file.

Fixes: 7e13f4f8d27d ("nfsd: handle delegated timestamps in SETATTR")
Cc: stable@vger.kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-12-18 11:18:39 -05:00
Chuck Lever
27d17641ca NFSD: Clear SECLABEL in the suppattr_exclcreat bitmap
>From RFC 8881:

5.8.1.14. Attribute 75: suppattr_exclcreat

> The bit vector that would set all REQUIRED and RECOMMENDED
> attributes that are supported by the EXCLUSIVE4_1 method of file
> creation via the OPEN operation. The scope of this attribute
> applies to all objects with a matching fsid.

There's nothing in RFC 8881 that states that suppattr_exclcreat is
or is not allowed to contain bits for attributes that are clear in
the reported supported_attrs bitmask. But it doesn't make sense for
an NFS server to indicate that it /doesn't/ implement an attribute,
but then also indicate that clients /are/ allowed to set that
attribute using OPEN(create) with EXCLUSIVE4_1.

Ensure that the SECURITY_LABEL and ACL bits are not set in the
suppattr_exclcreat bitmask when they are also not set in the
supported_attrs bitmask.

Fixes: 8c18f2052e75 ("nfsd41: SUPPATTR_EXCLCREAT attribute")
Cc: stable@vger.kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-12-18 11:18:39 -05:00
Shardul Bankar
df8d829bba nfsd: fix memory leak in nfsd_create_serv error paths
When nfsd_create_serv() calls percpu_ref_init() to initialize
nn->nfsd_net_ref, it allocates both a percpu reference counter
and a percpu_ref_data structure (64 bytes). However, if the
function fails later due to svc_create_pooled() returning NULL
or svc_bind() returning an error, these allocations are not
cleaned up, resulting in a memory leak.

The leak manifests as:
- Unreferenced percpu allocation (8 bytes per CPU)
- Unreferenced percpu_ref_data structure (64 bytes)

Fix this by adding percpu_ref_exit() calls in both error paths
to properly clean up the percpu_ref_init() allocations.

This patch fixes the percpu_ref leak in nfsd_create_serv() seen
as an auxiliary leak in syzbot report 099461f8558eb0a1f4f3; the
prepare_creds() and vsock-related leaks in the same report
remain to be addressed separately.

Reported-by: syzbot+099461f8558eb0a1f4f3@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=099461f8558eb0a1f4f3
Fixes: 47e988147f40 ("nfsd: add nfsd_serv_try_get and nfsd_serv_put")
Signed-off-by: Shardul Bankar <shardul.b@mpiricsoftware.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-12-18 11:18:39 -05:00
Antheas Kapenekakis
f7cede182c ALSA: hda/realtek: Add Asus quirk for TAS amplifiers
By default, these devices use the quirk ALC294_FIXUP_ASUS_SPK. Not
using it causes the headphone jack to stop working. Therefore,
introduce a new quirk ALC287_FIXUP_TXNW2781_I2C_ASUS that binds
to the TAS amplifier while using that quirk.

Cc: stable@kernel.org
Fixes: 18a4895370a7 ("ALSA: hda/realtek: Add match for ASUS Xbox Ally projects")
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://patch.msgid.link/20251216211714.1116898-1-lkml@antheas.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-17 20:34:03 +01:00
Stefan Binding
26f637fa08
ASoC: Intel: soc-acpi-intel-mtl-match: Add 6 amp CS35L63 with feedback
Add match for 6x CS35L63, 3x on link 2 and 3x on link 3.

This is to support 6 amps on the CDB35L63-CB8 board.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251217163227.1186373-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 16:35:38 +00:00
Stefan Binding
e43aefb771
ASoC: Intel: soc-acpi-intel-mtl-match: Add 6 amp CS35L56 with feedback
Add a match for 6x CS35L56, 3x on link 0 and 3x on link 1.
To support the CDB35L56-EIGHT-C board using 6 amps.

This is the same as the existing 8-amp configuration
mtl_cs35l56_x8_link0_link1_fb, but reduced to 6 amps.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251217163227.1186373-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 16:35:37 +00:00
Chancel Liu
fa43ab13c5
ASoC: fsl-asoc-card: Use of_property_present() for non-boolean properties
The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.
Otherwise there'll be kernel warning:
[   29.018081] OF: /sound-wm8962: Read of boolean property 'hp-det-gpios' with a value.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20251216071656.648412-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 12:01:03 +00:00
Shuming Fan
d05d125f4e
ASoC: rt1320: update VC blind write settings
This patch updates blind write settings for VC version.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20251216090601.3955252-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 12:01:02 +00:00
Alexander Stein
08fd332eeb
ASoC: fsl_xcvr: provide regmap names
This driver uses multiple regmaps, which will causes name conflicts
in debugfs like:
  debugfs: '30cc0000.xcvr' already exists in 'regmap'
Fix this by adding a name for the non-core regmap configurations.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://patch.msgid.link/20251216084931.553328-1-alexander.stein@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 12:01:01 +00:00
Alexander Stein
90ed688792
ASoC: fsl_sai: Add missing registers to cache default
Drivers does cache sync during runtime resume, setting all writable
registers. Not all writable registers are set in cache default, resulting
in the erorr message:
  fsl-sai 30c30000.sai: using zero-initialized flat cache, this may cause
  unexpected behavior

Fix this by adding missing writable register defaults.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://patch.msgid.link/20251216102246.676181-1-alexander.stein@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 12:01:01 +00:00
Shengjiu Wang
00b960a83c
ASoC: ak4458: remove the reset operation in probe and remove
The reset_control handler has the reference count for usage, as there is
reset operation in runtime suspend and resume, then reset operation in
probe() would cause the reference count of reset not balanced.

Previously add reset operation in probe and remove is to fix the compile
issue with !CONFIG_PM, as the driver has been update to use
RUNTIME_PM_OPS(), so that change can be reverted.

Fixes: 1e0dff741b0a ("ASoC: ak4458: remove "reset-gpios" property handler")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20251216070201.358477-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 12:01:00 +00:00
Alexander Stein
4de6cea0d8
ASoC: fsl_asrc_dma: fix duplicate debugfs directory error
This driver registers a component for asrc. This is also used together
with easrc, both attached using the device name as component name.
Eventually debugfs directories with identical name are created in
soc_init_component_debugfs(), leading to error message:
  debugfs: '30c90000.easrc' already exists in 'tqm-tlv320aic32'
Fix this by adding the debugfs_prefix.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://patch.msgid.link/20251216094045.623184-3-alexander.stein@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 12:00:54 +00:00
Alexander Stein
9f5f3583ba
ASoC: fsl_easrc: fix duplicate debugfs directory error
This driver registers two components: asrc and easrc, both attached using
the device name as component name. Eventually debugfs directories with
identical name are created in soc_init_component_debugfs(), leading to
error message:
  debugfs: '30c90000.easrc' already exists in 'tqm-tlv320aic32'
Fix this by adding the debugfs_prefix.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://patch.msgid.link/20251216094045.623184-2-alexander.stein@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 12:00:53 +00:00
Dirk Su
70d6df5cb5 ALSA: hda/realtek: fix micmute LED reversed on HP Abe and Bantie
Quirk ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO make mute/micmute LEDs
on HP Abe and Bantie functional. But the micmute LED's function
is reversed, LED will be on when Mic enabled and off when Mic
disabled. Create a new function to fix the micmute LED reversed
issue.

Fixes: b72a6ddf6af2 ("ALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i")
Signed-off-by: Dirk Su <dirk.su@canonical.com>
Link: https://patch.msgid.link/20251217025257.44600-1-dirk.su@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-17 10:06:09 +01:00
Stefan Binding
108c422c49 ALSA: hda/realtek: Add support for HP Clipper Laptop
Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with I2C

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20251216164830.832148-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-17 10:04:19 +01:00
Stefan Binding
720eebd514 ALSA: hda/realtek: Add support for HP Trekker Laptop
Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with I2C

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20251216164830.832148-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-17 10:04:12 +01:00
Shipei Qu
5526c1c6ba ALSA: usb-mixer: us16x08: validate meter packet indices
get_meter_levels_from_urb() parses the 64-byte meter packets sent by
the device and fills the per-channel arrays meter_level[],
comp_level[] and master_level[] in struct snd_us16x08_meter_store.

Currently the function derives the channel index directly from the
meter packet (MUB2(meter_urb, s) - 1) and uses it to index those
arrays without validating the range. If the packet contains a
negative or out-of-range channel number, the driver may write past
the end of these arrays.

Introduce a local channel variable and validate it before updating the
arrays. We reject negative indices, limit meter_level[] and
comp_level[] to SND_US16X08_MAX_CHANNELS, and guard master_level[]
updates with ARRAY_SIZE(master_level).

Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk")
Reported-by: DARKNAVY (@DarkNavyOrg) <vr@darknavy.com>
Closes: https://lore.kernel.org/tencent_21C112743C44C1A2517FF219@qq.com
Signed-off-by: Shipei Qu <qu@darknavy.com>
Link: https://patch.msgid.link/20251217024630.59576-1-qu@darknavy.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-17 10:02:22 +01:00
Mark Brown
9a068c4a77
ASoC: SOF: ipc4-topology: fixes for 'exotic' format
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The introduction of 8bit and FLOAT formats missed to cover the
new corner cases they cause when the NHLT blobs are looked up.

The two patch in this series fixes the 8bit and FLOAT format caused
cases to be able to find the correct blob from NHLT.
2025-12-17 07:53:20 +00:00
Mark Brown
e3b88652b6
ASoC: Intel: common / SOF: Use function topologies for
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

support for NVL-S and the support using functional topology fragments for
Soundwire configurations is introduced in 6.19-rc1 in parallel.

The SOF projects plan is to not create individual topology files for NVL
as with SDCA and the functional topology support can handle most if not
all soundwire devices going forward.

However one issue have been identified with the functional topology only
support, which was masked by the presence of a single topology file:
if the device contains a dai link for which we don't have topology fragment,
then the probe will fail.
This worked with a fallback to a monolithic topology file - which made the
dai link to be ignored.

The first patch in the series adds a flag to instruct the function discovery
to make a best effort to form a card by ignoring functions without
corresponding fragment (and print this out for developers) in case there
is no fallback topology available.

The second patch removes the match entry to refer to a topology file which
will not be built by the SOF project.
2025-12-16 20:57:21 +00:00
Peter Ujfalusi
91b7f7d0ee
ASoC: Intel: soc-acpi-intel-nvl-match: Drop rt722 l3 from the match table
Revert "ASoC: Intel: soc-acpi-intel-nvl-match: add rt722 l3 support"

NVL should be only using functional topologies for products, no monolithic
topologies are planned to be released.

In parallel a feature has been landed [1] which allows to remove the
entries from the match table for sdca codecs to rely solely on function
fragments.

This reverts commit 41566e3de40616375e8dfe5455344558b79f9354.

Link: https://lore.kernel.org/linux-sound/20251014071335.3844631-1-yung-chuan.liao@linux.intel.com/
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20251215101036.9370-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-15 23:08:36 +09:00
Peter Ujfalusi
c8f3c9fa75
ASoC: soc-acpi / SOF: Add best_effort flag to get_function_tplg_files op
When there is no fallback possibility available for the function topology
use it is better to try to create  a profile for the card in best effort
manner, leaving out non supported links for example.

As an example: some laptops present SSPx-BT link but we don't have fragment
yet to support this. If we only have support for functional topology
without monolithic fallback then we would fail the card creation.
The reason why the monolithic topology works on the same device is that it
does not have the SSPx-BT link handled, it is ignored.

In case when there is no fallback possibility we should try to create the
card with links that we support as best effort instead of failing and
leaving the user without a card.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20251215101036.9370-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-15 23:08:35 +09:00
Peter Ujfalusi
544c0494cd
ASoC: SOF: Intel: pci-mtl: Change the topology path to intel/sof-ipc4-tplg
The default topology path for IPC4 is intel/sof-ipc4-tplg with a symlink
to it as intel/sof-ace-tplg to support old kernels.
sof-bin has been released in this manner for almost two years now, it is
time to change the default path for MTL family.

Link: https://thesofproject.github.io/latest/getting_started/intel_debug/introduction.html#topology-file
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20251215130805.31146-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-15 23:07:30 +09:00
Bard Liao
da230e2323
ASoC: SOF: ipc4-topology: set playback channel mask
Currently, we send all channels to all amps and copy the channel_mask
to all ALH DMAs in playback. However, the amp may not have the
capability to run any process and SOF may need to split the channels
and send specific data channel to each amp. In that case, we need
to split the channel_mask in ALH DMA.
Copy the channel mask only if the widget channel count is the same
the FE channels for playback, otherwise, split the channels among the
aggregated DAIs. Like what we did in capture.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20251215130723.31081-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-15 23:07:29 +09:00
Peter Ujfalusi
8408513929
ASoC: SOF: topology: Add context when sink or source widget is missing
Add some context to the error prints when sink or source widget is not
found by printing the name of the other side of the connection.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20251215130741.31106-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-15 23:07:28 +09:00
Peter Ujfalusi
816f291fc2
ASoC: SOF: ipc4-topology: Convert FLOAT to S32 during blob selection
SSP/DMIC blobs have no support for FLOAT type, they are using S32 on data
bus.

Convert the format from FLOAT_LE to S32_LE to make sure that the correct
format is used within the path.

FLOAT conversion will be done on the host side (or within the path).

Fixes: f7c41911ad74 ("ASoC: SOF: ipc4-topology: Add support for float sample type")
Cc: stable@vger.kernel.org
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20251215120648.4827-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-15 23:07:22 +09:00
Peter Ujfalusi
26e4550649
ASoC: SOF: ipc4-topology: Prefer 32-bit DMIC blobs for 8-bit formats as well
With the introduction of 8-bit formats the DMIC blob lookup also needs to
be modified to prefer the 32-bit blob when 8-bit format is used on FE.

At the same time we also need to make sure that in case 8-bit format is
used, but only 16-bit blob is available for DMIC then we will not try to
look for 8-bit blob (which is invalid) as fallback, but for a 16-bit one.

Fixes: c04c2e829649 ("ASoC: SOF: ipc4-topology: Add support for 8-bit formats")
Cc: stable@vger.kernel.org
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20251215120648.4827-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-15 23:07:21 +09:00
Haotian Zhang
5032347c04 ALSA: pcmcia: Fix resource leak in snd_pdacf_probe error path
When pdacf_config() fails, snd_pdacf_probe() returns the error code
directly without freeing the sound card resources allocated by
snd_card_new(), which leads to a memory leak.

Add proper error handling to free the sound card and clear the card
list entry when pdacf_config() fails.

Fixes: 15b99ac17295 ("[PATCH] pcmcia: add return value to _config() functions")
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251215090433.211-1-vulab@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-15 10:11:19 +01:00
Haotian Zhang
2a03b40dea ALSA: vxpocket: Fix resource leak in vxpocket_probe error path
When vxpocket_config() fails, vxpocket_probe() returns the error code
directly without freeing the sound card resources allocated by
snd_card_new(), which leads to a memory leak.

Add proper error handling to free the sound card and clear the
allocation bit when vxpocket_config() fails.

Fixes: 15b99ac17295 ("[PATCH] pcmcia: add return value to _config() functions")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251215042652.695-1-vulab@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-15 09:16:54 +01:00
Bard Liao
cb0ae6f227
ASoC: sdw_utils: subtract the endpoint that is not present
When asoc_sdw_count_sdw_endpoints() count the num_ends, it doesn't skip
the unpresented endpoints. But, asoc_sdw_parse_sdw_endpoints() will skip
the unpresented endpoints either by quirk or the SDCA function doesn't
show up the endpoint. The endpoint number mismatches between count and
parse and the machine driver will show up a warning about it.

Fixes: 26ee34d2f5c7 ("ASoC: sdw_utils: Add codec_conf for every DAI")
Closes: https://github.com/thesofproject/linux/issues/5620
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251212121112.3313017-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14 19:32:41 +09:00
Chancel Liu
9f4d0899ef
ASoC: fsl_sai: Constrain sample rates from audio PLLs only in master mode
If SAI works in master mode it will generate clocks for external codec
from audio PLLs. Thus sample rates should be constrained according to
audio PLL clocks. While SAI works in slave mode which means clocks are
generated externally then constraints are independent of audio PLLs.

Fixes: 4edc98598be4 ("ASoC: fsl_sai: Add sample rate constraint")
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20251210062109.2577735-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14 19:32:40 +09:00
Robert Oscilowski
20c734cb67
ASoC: qcom: sdm845: set quaternary MI2S codec DAI to I2S format
We configure the codec DAI format for primary and secondary but not the
quaternery MI2S path. Add the missing configuration to enable speaker
codecs on the quaternary MI2S like the MAX9827 found on the OnePlus 6.

Signed-off-by: Robert Oscilowski <drgitx@gmail.com>
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20251115-sdm845-quaternary-v3-1-c16bf19128ac@ixit.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14 19:32:39 +09:00
Andrew Elantsev
e2cb8ef037
ASoC: amd: yc: Add quirk for Honor MagicBook X16 2025
Add a DMI quirk for the Honor MagicBook X16 2025 laptop
fixing the issue where the internal microphone was
not detected.

Signed-off-by: Andrew Elantsev <elantsew.andrew@gmail.com>
Link: https://patch.msgid.link/20251210203800.142822-1-elantsew.andrew@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14 19:32:38 +09:00
sheetal
4d4021b0bb
ASoC: tegra: Fix uninitialized flat cache warning in tegra210_ahub
The tegra210_ahub driver started triggering a warning after commit
e062bdfdd6ad ("regmap: warn users about uninitialized flat cache"),
which flags drivers using REGCACHE_FLAT without register defaults.
Since the driver omits default definitions because its registers are
zero initialized, the following warning is shown:

  WARNING KERN tegra210-ahub 2900800.ahub: using zero-initialized flat cache, this may cause unexpected behavior

Switch to REGCACHE_FLAT_S which is the recommended cache type for
sparse register maps without defaults. This cache type initializes
entries on-demand from hardware, eliminating the warning while using
memory efficiently.

Signed-off-by: sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20251208052040.4025612-1-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-14 19:32:37 +09:00
Kai Vehmanen
e64826e5e3 ALSA: hda/realtek: enable woofer speakers on Medion NM14LNL
The ALC233 codec on these Medion NM14LNL (SPRCHRGD 14 S2) systems
requires a quirk to enable all speakers.

Tested-by: davplsm <davpal@yahoo.com>
Link: https://github.com/thesofproject/linux/issues/5611
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20251212174658.752641-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-13 10:33:55 +01:00
Jussi Laako
7141cb1092 ALSA: usb-audio: Do not expose PCM and DSD on same altsetting unless DoP
Do not expose DSD altsetting as a PCM one, even if the descriptor claims
it to be PCM instead of special format.

Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251211152224.1780782-3-jussi@sonarnerd.net
2025-12-13 10:33:22 +01:00
Jussi Laako
7fde61795d ALSA: usb-audio: Reorder USB mode selection quirk
When using mode selection quirk, apply the quirk before rate setting.
Also apply this quirk on certain newer ITF interface devices.

Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251211152224.1780782-2-jussi@sonarnerd.net
2025-12-13 10:33:22 +01:00
Jussi Laako
da3a7efff6 ALSA: usb-audio: Update for native DSD support quirks
Maintenance patch for native DSD support.

Add set of missing device and vendor quirks; TEAC, Esoteric, Luxman and
Musical Fidelity.

Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251211152224.1780782-1-jussi@sonarnerd.net
2025-12-13 10:33:22 +01:00
Jiapeng Chong
cdc996667c ALSA: hda: Remove unnecessary print function dev_err()
The print function dev_err() is redundant because platform_get_irq()
already prints an error.

./sound/hda/controllers/cix-ipbloq.c:119:2-9: line 119 is redundant because platform_get_irq() already prints an error.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=28045
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://patch.msgid.link/20251212062410.3706839-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-13 10:32:48 +01:00
Andy Shevchenko
ebae102897 nfsd: Mark variable __maybe_unused to avoid W=1 build break
Clang is not happy about set but (in some cases) unused variable:

fs/nfsd/export.c:1027:17: error: variable 'inode' set but not used [-Werror,-Wunused-but-set-variable]

since it's used as a parameter to dprintk() which might be configured
a no-op. To avoid uglifying code with the specific ifdeffery just mark
the variable __maybe_unused.

The commit [1], which introduced this behaviour, is quite old and hence
the Fixes tag points to the first of the Git era.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=0431923fb7a1 [1]
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-12-08 10:56:34 -05:00
Joshua Rogers
d1bea0ce35 svcrdma: bound check rq_pages index in inline path
svc_rdma_copy_inline_range indexed rqstp->rq_pages[rc_curpage] without
verifying rc_curpage stays within the allocated page array. Add guards
before the first use and after advancing to a new page.

Fixes: d7cc73972661 ("svcrdma: support multiple Read chunks per RPC")
Cc: stable@vger.kernel.org
Signed-off-by: Joshua Rogers <linux@joshua.hu>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-12-08 10:51:26 -05:00
Joshua Rogers
94972027ab svcrdma: return 0 on success from svc_rdma_copy_inline_range
The function comment specifies 0 on success and -EINVAL on invalid
parameters. Make the tail return 0 after a successful copy loop.

Fixes: d7cc73972661 ("svcrdma: support multiple Read chunks per RPC")
Cc: stable@vger.kernel.org
Signed-off-by: Joshua Rogers <linux@joshua.hu>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-12-08 10:51:26 -05:00
Joshua Rogers
a8ee9099f3 svcrdma: use rc_pageoff for memcpy byte offset
svc_rdma_copy_inline_range added rc_curpage (page index) to the page
base instead of the byte offset rc_pageoff. Use rc_pageoff so copies
land within the current page.

Found by ZeroPath (https://zeropath.com)

Fixes: 8e122582680c ("svcrdma: Move svc_rdma_read_info::ri_pageno to struct svc_rdma_recv_ctxt")
Cc: stable@vger.kernel.org
Signed-off-by: Joshua Rogers <linux@joshua.hu>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-12-08 10:51:26 -05:00
Joshua Rogers
d4b69a6186 SUNRPC: svcauth_gss: avoid NULL deref on zero length gss_token in gss_read_proxy_verf
A zero length gss_token results in pages == 0 and in_token->pages[0]
is NULL. The code unconditionally evaluates
page_address(in_token->pages[0]) for the initial memcpy, which can
dereference NULL even when the copy length is 0. Guard the first
memcpy so it only runs when length > 0.

Fixes: 5866efa8cbfb ("SUNRPC: Fix svcauth_gss_proxy_init()")
Cc: stable@vger.kernel.org
Signed-off-by: Joshua Rogers <linux@joshua.hu>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-12-08 10:51:26 -05:00
36 changed files with 343 additions and 148 deletions

View File

@ -1262,7 +1262,7 @@ static int z_erofs_parse_in_bvecs(struct z_erofs_backend *be, bool *overlapped)
return err;
}
static int z_erofs_decompress_pcluster(struct z_erofs_backend *be, int err)
static int z_erofs_decompress_pcluster(struct z_erofs_backend *be, bool eio)
{
struct erofs_sb_info *const sbi = EROFS_SB(be->sb);
struct z_erofs_pcluster *pcl = be->pcl;
@ -1270,7 +1270,7 @@ static int z_erofs_decompress_pcluster(struct z_erofs_backend *be, int err)
const struct z_erofs_decompressor *alg =
z_erofs_decomp[pcl->algorithmformat];
bool try_free = true;
int i, j, jtop, err2;
int i, j, jtop, err2, err = eio ? -EIO : 0;
struct page *page;
bool overlapped;
const char *reason;
@ -1413,12 +1413,12 @@ static int z_erofs_decompress_queue(const struct z_erofs_decompressqueue *io,
.pcl = io->head,
};
struct z_erofs_pcluster *next;
int err = io->eio ? -EIO : 0;
int err = 0;
for (; be.pcl != Z_EROFS_PCLUSTER_TAIL; be.pcl = next) {
DBG_BUGON(!be.pcl);
next = READ_ONCE(be.pcl->next);
err = z_erofs_decompress_pcluster(&be, err) ?: err;
err = z_erofs_decompress_pcluster(&be, io->eio) ?: err;
}
return err;
}

View File

@ -1024,7 +1024,7 @@ exp_rootfh(struct net *net, struct auth_domain *clp, char *name,
{
struct svc_export *exp;
struct path path;
struct inode *inode;
struct inode *inode __maybe_unused;
struct svc_fh fh;
int err;
struct nfsd_net *nn = net_generic(net, nfsd_net_id);

View File

@ -3375,6 +3375,11 @@ static __be32 nfsd4_encode_fattr4_suppattr_exclcreat(struct xdr_stream *xdr,
u32 supp[3];
memcpy(supp, nfsd_suppattrs[resp->cstate.minorversion], sizeof(supp));
if (!IS_POSIXACL(d_inode(args->dentry)))
supp[0] &= ~FATTR4_WORD0_ACL;
if (!args->contextsupport)
supp[2] &= ~FATTR4_WORD2_SECURITY_LABEL;
supp[0] &= NFSD_SUPPATTR_EXCLCREAT_WORD0;
supp[1] &= NFSD_SUPPATTR_EXCLCREAT_WORD1;
supp[2] &= NFSD_SUPPATTR_EXCLCREAT_WORD2;

View File

@ -547,8 +547,14 @@ static inline bool nfsd_attrs_supported(u32 minorversion, const u32 *bmval)
#define NFSD_SUPPATTR_EXCLCREAT_WORD1 \
(NFSD_WRITEABLE_ATTRS_WORD1 & \
~(FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET))
/*
* The FATTR4_WORD2_TIME_DELEG attributes are not to be allowed for
* OPEN(create) with EXCLUSIVE4_1. It doesn't make sense to set a
* delegated timestamp on a new file.
*/
#define NFSD_SUPPATTR_EXCLCREAT_WORD2 \
NFSD_WRITEABLE_ATTRS_WORD2
(NFSD_WRITEABLE_ATTRS_WORD2 & \
~(FATTR4_WORD2_TIME_DELEG_ACCESS | FATTR4_WORD2_TIME_DELEG_MODIFY))
extern int nfsd4_is_junction(struct dentry *dentry);
extern int register_cld_notifier(void);

View File

@ -615,12 +615,15 @@ int nfsd_create_serv(struct net *net)
serv = svc_create_pooled(nfsd_programs, ARRAY_SIZE(nfsd_programs),
&nn->nfsd_svcstats,
nfsd_max_blksize, nfsd);
if (serv == NULL)
if (serv == NULL) {
percpu_ref_exit(&nn->nfsd_net_ref);
return -ENOMEM;
}
error = svc_bind(serv, net);
if (error < 0) {
svc_destroy(&serv);
percpu_ref_exit(&nn->nfsd_net_ref);
return error;
}
spin_lock(&nfsd_notifier_lock);

View File

@ -67,7 +67,8 @@ static inline bool nfsd_attrs_valid(struct nfsd_attrs *attrs)
struct iattr *iap = attrs->na_iattr;
return (iap->ia_valid || (attrs->na_seclabel &&
attrs->na_seclabel->len));
attrs->na_seclabel->len) ||
attrs->na_pacl || attrs->na_dpacl);
}
__be32 nfserrno (int errno);

View File

@ -203,6 +203,8 @@ struct snd_soc_acpi_link_adr {
* @mach: the pointer of the machine driver
* @prefix: the prefix of the topology file name. Typically, it is the path.
* @tplg_files: the pointer of the array of the topology file names.
* @best_effort: ignore non supported links and try to build the card in best effort
* with supported links
*/
/* Descriptor for SST ASoC machine driver */
struct snd_soc_acpi_mach {
@ -224,7 +226,8 @@ struct snd_soc_acpi_mach {
const u32 tplg_quirk_mask;
int (*get_function_tplg_files)(struct snd_soc_card *card,
const struct snd_soc_acpi_mach *mach,
const char *prefix, const char ***tplg_files);
const char *prefix, const char ***tplg_files,
bool best_effort);
};
#define SND_SOC_ACPI_MAX_CODECS 3

View File

@ -1083,7 +1083,8 @@ static int gss_read_proxy_verf(struct svc_rqst *rqstp,
}
length = min_t(unsigned int, inlen, (char *)xdr->end - (char *)xdr->p);
memcpy(page_address(in_token->pages[0]), xdr->p, length);
if (length)
memcpy(page_address(in_token->pages[0]), xdr->p, length);
inlen -= length;
to_offs = length;

View File

@ -841,6 +841,9 @@ static int svc_rdma_copy_inline_range(struct svc_rqst *rqstp,
for (page_no = 0; page_no < numpages; page_no++) {
unsigned int page_len;
if (head->rc_curpage >= rqstp->rq_maxpages)
return -EINVAL;
page_len = min_t(unsigned int, remaining,
PAGE_SIZE - head->rc_pageoff);
@ -848,7 +851,7 @@ static int svc_rdma_copy_inline_range(struct svc_rqst *rqstp,
head->rc_page_count++;
dst = page_address(rqstp->rq_pages[head->rc_curpage]);
memcpy(dst + head->rc_curpage, src + offset, page_len);
memcpy((unsigned char *)dst + head->rc_pageoff, src + offset, page_len);
head->rc_readbytes += page_len;
head->rc_pageoff += page_len;
@ -860,7 +863,7 @@ static int svc_rdma_copy_inline_range(struct svc_rqst *rqstp,
offset += page_len;
}
return -EINVAL;
return 0;
}
/**

View File

@ -1656,6 +1656,18 @@ static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
alc236_fixup_hp_micmute_led_vref(codec, fix, action);
}
static void alc236_fixup_hp_mute_led_micmute_gpio(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE)
spec->micmute_led_polarity = 1;
alc236_fixup_hp_mute_led_coefbit2(codec, fix, action);
alc_fixup_hp_gpio_led(codec, action, 0x00, 0x01);
}
static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
const unsigned short coefs[2])
{
@ -3753,6 +3765,7 @@ enum {
ALC295_FIXUP_DELL_TAS2781_I2C,
ALC245_FIXUP_TAS2781_SPI_2,
ALC287_FIXUP_TXNW2781_I2C,
ALC287_FIXUP_TXNW2781_I2C_ASUS,
ALC287_FIXUP_YOGA7_14ARB7_I2C,
ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT,
@ -5326,9 +5339,7 @@ static const struct hda_fixup alc269_fixups[] = {
},
[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc236_fixup_hp_mute_led_coefbit2,
.chained = true,
.chain_id = ALC236_FIXUP_HP_GPIO_LED,
.v.func = alc236_fixup_hp_mute_led_micmute_gpio,
},
[ALC236_FIXUP_LENOVO_INV_DMIC] = {
.type = HDA_FIXUP_FUNC,
@ -6053,6 +6064,12 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
},
[ALC287_FIXUP_TXNW2781_I2C_ASUS] = {
.type = HDA_FIXUP_FUNC,
.v.func = tas2781_fixup_txnw_i2c,
.chained = true,
.chain_id = ALC294_FIXUP_ASUS_SPK,
},
[ALC287_FIXUP_YOGA7_14ARB7_I2C] = {
.type = HDA_FIXUP_FUNC,
.v.func = yoga7_14arb7_fixup_i2c,
@ -6771,10 +6788,10 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8e8a, "HP NexusX", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8e9c, "HP 16 Clipper OmniBook X X360", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8e9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8e9e, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8eb6, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
SND_PCI_QUIRK(0x103c, 0x8eb7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
SND_PCI_QUIRK(0x103c, 0x8eb8, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
SND_PCI_QUIRK(0x103c, 0x8ec1, "HP 200 G2i", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
SND_PCI_QUIRK(0x103c, 0x8ec4, "HP Bantie I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
@ -6790,11 +6807,13 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8eda, "HP ZBook Firefly 16W", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8ee4, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
SND_PCI_QUIRK(0x103c, 0x8ee5, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
SND_PCI_QUIRK(0x103c, 0x8ee7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
SND_PCI_QUIRK(0x103c, 0x8f0c, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8f0e, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8f40, "HP ZBook 8 G2a 14", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8f41, "HP ZBook 8 G2a 16", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8f42, "HP ZBook 8 G2a 14W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8f57, "HP Trekker G7JC", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8f62, "HP ZBook 8 G2a 16W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
@ -6827,8 +6846,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x1314, "ASUS GA605K", ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC),
SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C),
SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C),
SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
@ -7296,6 +7315,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
SND_PCI_QUIRK(0x1e39, 0xca14, "MEDION NM14LNL", ALC233_FIXUP_MEDION_MTL_SPK),
SND_PCI_QUIRK(0x1ee7, 0x2078, "HONOR BRB-X M1010", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),

View File

@ -115,10 +115,8 @@ static int cix_ipbloq_hda_init(struct cix_ipbloq_hda *hda,
bus->addr = res->start;
irq_id = platform_get_irq(pdev, 0);
if (irq_id < 0) {
dev_err(hda->dev, "failed to get the irq, err = %d\n", irq_id);
if (irq_id < 0)
return irq_id;
}
err = devm_request_irq(hda->dev, irq_id, azx_interrupt,
0, KBUILD_MODNAME, chip);

View File

@ -131,7 +131,13 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
link->config_index = 1;
link->config_regs = PRESENT_OPTION;
return pdacf_config(link);
err = pdacf_config(link);
if (err < 0) {
card_list[i] = NULL;
snd_card_free(card);
return err;
}
return 0;
}

View File

@ -284,7 +284,13 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
vxp->p_dev = p_dev;
return vxpocket_config(p_dev);
err = vxpocket_config(p_dev);
if (err < 0) {
card_alloc &= ~(1 << i);
snd_card_free(card);
return err;
}
return 0;
}
static void vxpocket_detach(struct pcmcia_device *link)

View File

@ -661,6 +661,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7UCX"),
}
},
{
.driver_data = &acp6x_card,
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "HONOR"),
DMI_MATCH(DMI_PRODUCT_NAME, "GOH-X"),
}
},
{}
};

View File

@ -783,16 +783,12 @@ static int ak4458_i2c_probe(struct i2c_client *i2c)
pm_runtime_enable(&i2c->dev);
regcache_cache_only(ak4458->regmap, true);
ak4458_reset(ak4458, false);
return 0;
}
static void ak4458_i2c_remove(struct i2c_client *i2c)
{
struct ak4458_priv *ak4458 = i2c_get_clientdata(i2c);
ak4458_reset(ak4458, true);
pm_runtime_disable(&i2c->dev);
}

View File

@ -115,7 +115,8 @@ static const struct reg_sequence rt1320_blind_write[] = {
static const struct reg_sequence rt1320_vc_blind_write[] = {
{ 0xc003, 0xe0 },
{ 0xe80a, 0x01 },
{ 0xc5c3, 0xf3 },
{ 0xc5c3, 0xf2 },
{ 0xc5c8, 0x03 },
{ 0xc057, 0x51 },
{ 0xc054, 0x35 },
{ 0xca05, 0xd6 },
@ -126,8 +127,6 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
{ 0xc609, 0x40 },
{ 0xc046, 0xff },
{ 0xc045, 0xff },
{ 0xda81, 0x14 },
{ 0xda8d, 0x14 },
{ 0xc044, 0xff },
{ 0xc043, 0xff },
{ 0xc042, 0xff },
@ -136,8 +135,8 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
{ 0xcc10, 0x01 },
{ 0xc700, 0xf0 },
{ 0xc701, 0x13 },
{ 0xc901, 0x09 },
{ 0xc900, 0xd0 },
{ 0xc901, 0x04 },
{ 0xc900, 0x73 },
{ 0xde03, 0x05 },
{ 0xdd0b, 0x0d },
{ 0xdd0a, 0xff },
@ -153,6 +152,7 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
{ 0xf082, 0xff },
{ 0xf081, 0xff },
{ 0xf080, 0xff },
{ 0xe801, 0x01 },
{ 0xe802, 0xf8 },
{ 0xe803, 0xbe },
{ 0xc003, 0xc0 },
@ -202,7 +202,7 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
{ 0x3fc2bfc3, 0x00 },
{ 0x3fc2bfc2, 0x00 },
{ 0x3fc2bfc1, 0x00 },
{ 0x3fc2bfc0, 0x03 },
{ 0x3fc2bfc0, 0x07 },
{ 0x0000d486, 0x43 },
{ SDW_SDCA_CTL(FUNC_NUM_AMP, RT1320_SDCA_ENT_PDE23, RT1320_SDCA_CTL_REQ_POWER_STATE, 0), 0x00 },
{ 0x1000db00, 0x07 },
@ -241,9 +241,7 @@ static const struct reg_sequence rt1320_vc_blind_write[] = {
{ 0x1000db21, 0x00 },
{ 0x1000db22, 0x00 },
{ 0x1000db23, 0x00 },
{ 0x0000d540, 0x01 },
{ 0x0000c081, 0xfc },
{ 0x0000f01e, 0x80 },
{ 0x0000d540, 0x21 },
{ 0xc01b, 0xfc },
{ 0xc5d1, 0x89 },
{ 0xc5d8, 0x0a },

View File

@ -1045,8 +1045,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
* The notifier is initialized in snd_soc_card_jack_new(), then
* snd_soc_jack_notifier_register can be called.
*/
if (of_property_read_bool(np, "hp-det-gpios") ||
of_property_read_bool(np, "hp-det-gpio") /* deprecated */) {
if (of_property_present(np, "hp-det-gpios") ||
of_property_present(np, "hp-det-gpio") /* deprecated */) {
ret = simple_util_init_jack(&priv->card, &priv->hp_jack,
1, NULL, "Headphone Jack");
if (ret)
@ -1055,8 +1055,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
snd_soc_jack_notifier_register(&priv->hp_jack.jack, &hp_jack_nb);
}
if (of_property_read_bool(np, "mic-det-gpios") ||
of_property_read_bool(np, "mic-det-gpio") /* deprecated */) {
if (of_property_present(np, "mic-det-gpios") ||
of_property_present(np, "mic-det-gpio") /* deprecated */) {
ret = simple_util_init_jack(&priv->card, &priv->mic_jack,
0, NULL, "Mic Jack");
if (ret)

View File

@ -473,5 +473,8 @@ struct snd_soc_component_driver fsl_asrc_component = {
.pointer = fsl_asrc_dma_pcm_pointer,
.pcm_construct = fsl_asrc_dma_pcm_new,
.legacy_dai_naming = 1,
#ifdef CONFIG_DEBUG_FS
.debugfs_prefix = "asrc",
#endif
};
EXPORT_SYMBOL_GPL(fsl_asrc_component);

View File

@ -1577,6 +1577,9 @@ static const struct snd_soc_component_driver fsl_easrc_component = {
.controls = fsl_easrc_snd_controls,
.num_controls = ARRAY_SIZE(fsl_easrc_snd_controls),
.legacy_dai_naming = 1,
#ifdef CONFIG_DEBUG_FS
.debugfs_prefix = "easrc",
#endif
};
static const struct reg_default fsl_easrc_reg_defaults[] = {

View File

@ -917,8 +917,14 @@ static int fsl_sai_startup(struct snd_pcm_substream *substream,
tx ? sai->dma_params_tx.maxburst :
sai->dma_params_rx.maxburst);
ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE, &sai->constraint_rates);
if (sai->is_consumer_mode[tx])
ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE,
&fsl_sai_rate_constraints);
else
ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE,
&sai->constraint_rates);
return ret;
}
@ -1075,6 +1081,7 @@ static const struct reg_default fsl_sai_reg_defaults_ofs0[] = {
{FSL_SAI_TDR6, 0},
{FSL_SAI_TDR7, 0},
{FSL_SAI_TMR, 0},
{FSL_SAI_TTCTL, 0},
{FSL_SAI_RCR1(0), 0},
{FSL_SAI_RCR2(0), 0},
{FSL_SAI_RCR3(0), 0},
@ -1098,12 +1105,14 @@ static const struct reg_default fsl_sai_reg_defaults_ofs8[] = {
{FSL_SAI_TDR6, 0},
{FSL_SAI_TDR7, 0},
{FSL_SAI_TMR, 0},
{FSL_SAI_TTCTL, 0},
{FSL_SAI_RCR1(8), 0},
{FSL_SAI_RCR2(8), 0},
{FSL_SAI_RCR3(8), 0},
{FSL_SAI_RCR4(8), 0},
{FSL_SAI_RCR5(8), 0},
{FSL_SAI_RMR, 0},
{FSL_SAI_RTCTL, 0},
{FSL_SAI_MCTL, 0},
{FSL_SAI_MDIV, 0},
};

View File

@ -1323,6 +1323,7 @@ static const struct reg_default fsl_xcvr_phy_reg_defaults[] = {
};
static const struct regmap_config fsl_xcvr_regmap_phy_cfg = {
.name = "phy",
.reg_bits = 8,
.reg_stride = 4,
.val_bits = 32,
@ -1335,6 +1336,7 @@ static const struct regmap_config fsl_xcvr_regmap_phy_cfg = {
};
static const struct regmap_config fsl_xcvr_regmap_pllv0_cfg = {
.name = "pllv0",
.reg_bits = 8,
.reg_stride = 4,
.val_bits = 32,
@ -1345,6 +1347,7 @@ static const struct regmap_config fsl_xcvr_regmap_pllv0_cfg = {
};
static const struct regmap_config fsl_xcvr_regmap_pllv1_cfg = {
.name = "pllv1",
.reg_bits = 8,
.reg_stride = 4,
.val_bits = 32,

View File

@ -699,6 +699,69 @@ static const struct snd_soc_acpi_adr_device cs35l56_1_fb_adr[] = {
},
};
static const struct snd_soc_acpi_adr_device cs35l56_6amp_1_fb_adr[] = {
{
.adr = 0x00013701FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints),
.endpoints = cs35l56_r_fb_endpoints,
.name_prefix = "AMP6"
},
{
.adr = 0x00013601FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints),
.endpoints = cs35l56_3_fb_endpoints,
.name_prefix = "AMP5"
},
{
.adr = 0x00013501FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_5_fb_endpoints),
.endpoints = cs35l56_5_fb_endpoints,
.name_prefix = "AMP4"
},
};
static const struct snd_soc_acpi_adr_device cs35l63_6amp_3_fb_adr[] = {
{
.adr = 0x00033001FA356301ull,
.num_endpoints = ARRAY_SIZE(cs35l56_l_fb_endpoints),
.endpoints = cs35l56_l_fb_endpoints,
.name_prefix = "AMP1"
},
{
.adr = 0x00033201FA356301ull,
.num_endpoints = ARRAY_SIZE(cs35l56_2_fb_endpoints),
.endpoints = cs35l56_2_fb_endpoints,
.name_prefix = "AMP3"
},
{
.adr = 0x00033401FA356301ull,
.num_endpoints = ARRAY_SIZE(cs35l56_4_fb_endpoints),
.endpoints = cs35l56_4_fb_endpoints,
.name_prefix = "AMP5"
},
};
static const struct snd_soc_acpi_adr_device cs35l63_6amp_2_fb_adr[] = {
{
.adr = 0x00023101FA356301ull,
.num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints),
.endpoints = cs35l56_r_fb_endpoints,
.name_prefix = "AMP2"
},
{
.adr = 0x00023301FA356301ull,
.num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints),
.endpoints = cs35l56_3_fb_endpoints,
.name_prefix = "AMP4"
},
{
.adr = 0x00023501FA356301ull,
.num_endpoints = ARRAY_SIZE(cs35l56_5_fb_endpoints),
.endpoints = cs35l56_5_fb_endpoints,
.name_prefix = "AMP6"
},
};
static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = {
{
.adr = 0x00023201FA355601ull,
@ -1069,6 +1132,35 @@ static const struct snd_soc_acpi_link_adr mtl_cs35l56_x8_link0_link1_fb[] = {
{}
};
static const struct snd_soc_acpi_link_adr mtl_cs35l56_x6_link0_link1_fb[] = {
{
.mask = BIT(1),
.num_adr = ARRAY_SIZE(cs35l56_6amp_1_fb_adr),
.adr_d = cs35l56_6amp_1_fb_adr,
},
{
.mask = BIT(0),
/* First 3 amps in cs35l56_0_fb_adr */
.num_adr = 3,
.adr_d = cs35l56_0_fb_adr,
},
{}
};
static const struct snd_soc_acpi_link_adr mtl_cs35l63_x6_link2_link3_fb[] = {
{
.mask = BIT(3),
.num_adr = ARRAY_SIZE(cs35l63_6amp_3_fb_adr),
.adr_d = cs35l63_6amp_3_fb_adr,
},
{
.mask = BIT(2),
.num_adr = ARRAY_SIZE(cs35l63_6amp_2_fb_adr),
.adr_d = cs35l63_6amp_2_fb_adr,
},
{}
};
static const struct snd_soc_acpi_link_adr mtl_cs35l63_x2_link1_link3_fb[] = {
{
.mask = BIT(3),
@ -1189,6 +1281,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb8.tplg",
.get_function_tplg_files = sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0) | BIT(1),
.links = mtl_cs35l56_x6_link0_link1_fb,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb6.tplg"
},
{
.link_mask = BIT(0),
.links = mtl_cs42l43_l0,
@ -1202,6 +1300,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb8.tplg",
},
{
.link_mask = BIT(2) | BIT(3),
.links = mtl_cs35l63_x6_link2_link3_fb,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb6.tplg",
},
{
.link_mask = GENMASK(3, 0),
.links = mtl_3_in_1_sdca,

View File

@ -15,49 +15,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_nvl_machines[] = {
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_nvl_machines);
/*
* Multi-function codecs with three endpoints created for
* headset, amp and dmic functions.
*/
static const struct snd_soc_acpi_endpoint rt_mf_endpoints[] = {
{
.num = 0,
.aggregated = 0,
.group_position = 0,
.group_id = 0,
},
{
.num = 1,
.aggregated = 0,
.group_position = 0,
.group_id = 0,
},
{
.num = 2,
.aggregated = 0,
.group_position = 0,
.group_id = 0,
},
};
static const struct snd_soc_acpi_adr_device rt722_3_single_adr[] = {
{
.adr = 0x000330025d072201ull,
.num_endpoints = ARRAY_SIZE(rt_mf_endpoints),
.endpoints = rt_mf_endpoints,
.name_prefix = "rt722"
}
};
static const struct snd_soc_acpi_link_adr nvl_rt722_l3[] = {
{
.mask = BIT(3),
.num_adr = ARRAY_SIZE(rt722_3_single_adr),
.adr_d = rt722_3_single_adr,
},
{}
};
/* this table is used when there is no I2S codec present */
struct snd_soc_acpi_mach snd_soc_acpi_intel_nvl_sdw_machines[] = {
/* mockup tests need to be first */
@ -79,12 +36,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_nvl_sdw_machines[] = {
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-nvl-rt715-rt711-rt1308-mono.tplg",
},
{
.link_mask = BIT(3),
.links = nvl_rt722_l3,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-nvl-rt722.tplg",
},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_nvl_sdw_machines);

View File

@ -28,7 +28,7 @@ enum tplg_device_id {
#define SOF_INTEL_PLATFORM_NAME_MAX 4
int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach,
const char *prefix, const char ***tplg_files)
const char *prefix, const char ***tplg_files, bool best_effort)
{
struct snd_soc_acpi_mach_params mach_params = mach->mach_params;
struct snd_soc_dai_link *dai_link;
@ -87,6 +87,9 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
dev_dbg(card->dev,
"dai_link %s is not supported by separated tplg yet\n",
dai_link->name);
if (best_effort)
continue;
return 0;
}
if (tplg_mask & BIT(tplg_dev))

View File

@ -10,6 +10,6 @@
#define _SND_SOC_ACPI_INTEL_GET_TPLG_H
int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach,
const char *prefix, const char ***tplg_files);
const char *prefix, const char ***tplg_files, bool best_effort);
#endif

View File

@ -365,10 +365,12 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
break;
case QUATERNARY_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_QUAD_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;
case QUATERNARY_TDM_RX_0:

View File

@ -1534,8 +1534,10 @@ int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
* endpoint check is not necessary
*/
if (dai_info->quirk &&
!(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk)))
!(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk))) {
(*num_devs)--;
continue;
}
} else {
/* Check SDCA codec endpoint if there is no matching quirk */
ret = is_sdca_endpoint_present(dev, codec_info, adr_link, i, j);
@ -1543,8 +1545,10 @@ int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
return ret;
/* The endpoint is not present, skip */
if (!ret)
if (!ret) {
(*num_devs)--;
continue;
}
}
dev_dbg(dev,

View File

@ -111,7 +111,8 @@ int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol,
EXPORT_SYMBOL_GPL(snd_soc_put_enum_double);
static int sdca_soc_q78_reg_to_ctl(struct soc_mixer_control *mc, unsigned int reg_val,
unsigned int mask, unsigned int shift, int max)
unsigned int mask, unsigned int shift, int max,
bool sx)
{
int val = reg_val;
@ -141,20 +142,26 @@ static unsigned int sdca_soc_q78_ctl_to_reg(struct soc_mixer_control *mc, int va
}
static int soc_mixer_reg_to_ctl(struct soc_mixer_control *mc, unsigned int reg_val,
unsigned int mask, unsigned int shift, int max)
unsigned int mask, unsigned int shift, int max,
bool sx)
{
int val = (reg_val >> shift) & mask;
if (mc->sign_bit)
val = sign_extend32(val, mc->sign_bit);
val = clamp(val, mc->min, mc->max);
val -= mc->min;
if (sx) {
val -= mc->min; // SX controls intentionally can overflow here
val = min_t(unsigned int, val & mask, max);
} else {
val = clamp(val, mc->min, mc->max);
val -= mc->min;
}
if (mc->invert)
val = max - val;
return val & mask;
return val;
}
static unsigned int soc_mixer_ctl_to_reg(struct soc_mixer_control *mc, int val,
@ -280,9 +287,10 @@ static int soc_put_volsw(struct snd_kcontrol *kcontrol,
static int soc_get_volsw(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol,
struct soc_mixer_control *mc, int mask, int max)
struct soc_mixer_control *mc, int mask, int max, bool sx)
{
int (*reg_to_ctl)(struct soc_mixer_control *, unsigned int, unsigned int, unsigned int, int);
int (*reg_to_ctl)(struct soc_mixer_control *, unsigned int, unsigned int,
unsigned int, int, bool);
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
unsigned int reg_val;
int val;
@ -293,16 +301,16 @@ static int soc_get_volsw(struct snd_kcontrol *kcontrol,
reg_to_ctl = soc_mixer_reg_to_ctl;
reg_val = snd_soc_component_read(component, mc->reg);
val = reg_to_ctl(mc, reg_val, mask, mc->shift, max);
val = reg_to_ctl(mc, reg_val, mask, mc->shift, max, sx);
ucontrol->value.integer.value[0] = val;
if (snd_soc_volsw_is_stereo(mc)) {
if (mc->reg == mc->rreg) {
val = reg_to_ctl(mc, reg_val, mask, mc->rshift, max);
val = reg_to_ctl(mc, reg_val, mask, mc->rshift, max, sx);
} else {
reg_val = snd_soc_component_read(component, mc->rreg);
val = reg_to_ctl(mc, reg_val, mask, mc->shift, max);
val = reg_to_ctl(mc, reg_val, mask, mc->shift, max, sx);
}
ucontrol->value.integer.value[1] = val;
@ -371,7 +379,7 @@ int snd_soc_get_volsw(struct snd_kcontrol *kcontrol,
(struct soc_mixer_control *)kcontrol->private_value;
unsigned int mask = soc_mixer_mask(mc);
return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max - mc->min);
return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max - mc->min, false);
}
EXPORT_SYMBOL_GPL(snd_soc_get_volsw);
@ -413,7 +421,7 @@ int snd_soc_get_volsw_sx(struct snd_kcontrol *kcontrol,
(struct soc_mixer_control *)kcontrol->private_value;
unsigned int mask = soc_mixer_sx_mask(mc);
return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max);
return soc_get_volsw(kcontrol, ucontrol, mc, mask, mc->max, true);
}
EXPORT_SYMBOL_GPL(snd_soc_get_volsw_sx);

View File

@ -47,7 +47,7 @@ static const struct sof_dev_desc mtl_desc = {
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/mtl",
},
.default_tplg_path = {
[SOF_IPC_TYPE_4] = "intel/sof-ace-tplg",
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
},
.default_fw_filename = {
[SOF_IPC_TYPE_4] = "sof-mtl.ri",
@ -77,7 +77,7 @@ static const struct sof_dev_desc arl_desc = {
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/arl",
},
.default_tplg_path = {
[SOF_IPC_TYPE_4] = "intel/sof-ace-tplg",
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
},
.default_fw_filename = {
[SOF_IPC_TYPE_4] = "sof-arl.ri",
@ -107,7 +107,7 @@ static const struct sof_dev_desc arl_s_desc = {
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/arl-s",
},
.default_tplg_path = {
[SOF_IPC_TYPE_4] = "intel/sof-ace-tplg",
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
},
.default_fw_filename = {
[SOF_IPC_TYPE_4] = "sof-arl-s.ri",

View File

@ -1752,11 +1752,9 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
channel_count = params_channels(params);
sample_rate = params_rate(params);
bit_depth = params_width(params);
/*
* Look for 32-bit blob first instead of 16-bit if copier
* supports multiple formats
*/
if (bit_depth == 16 && !single_bitdepth) {
/* Prefer 32-bit blob if copier supports multiple formats */
if (bit_depth <= 16 && !single_bitdepth) {
dev_dbg(sdev->dev, "Looking for 32-bit blob first for DMIC\n");
format_change = true;
bit_depth = 32;
@ -1799,10 +1797,18 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
if (format_change) {
/*
* The 32-bit blob was not found in NHLT table, try to
* look for one based on the params
* look for 16-bit for DMIC or based on the params for
* SSP
*/
bit_depth = params_width(params);
format_change = false;
if (linktype == SOF_DAI_INTEL_DMIC) {
bit_depth = 16;
if (params_width(params) == 16)
format_change = false;
} else {
bit_depth = params_width(params);
format_change = false;
}
get_new_blob = true;
} else if (linktype == SOF_DAI_INTEL_DMIC && !single_bitdepth) {
/*
@ -1837,7 +1843,7 @@ out:
*len = cfg->size >> 2;
*dst = (u32 *)cfg->caps;
if (format_change) {
if (format_change || params_format(params) == SNDRV_PCM_FORMAT_FLOAT_LE) {
/*
* Update the params to reflect that different blob was loaded
* instead of the requested bit depth (16 -> 32 or 32 -> 16).
@ -2280,8 +2286,19 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
ch_map >>= 4;
}
step = ch_count / blob->alh_cfg.device_count;
mask = GENMASK(step - 1, 0);
if (swidget->id == snd_soc_dapm_dai_in && ch_count == out_ref_channels) {
/*
* For playback DAI widgets where the channel number is equal to
* the output reference channels, set the step = 0 to ensure all
* the ch_mask is applied to all alh mappings.
*/
mask = ch_mask;
step = 0;
} else {
step = ch_count / blob->alh_cfg.device_count;
mask = GENMASK(step - 1, 0);
}
/*
* Set each gtw_cfg.node_id to blob->alh_cfg.mapping[]
* for all widgets with the same stream name
@ -2316,8 +2333,9 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
}
/*
* Set the same channel mask for playback as the audio data is
* duplicated for all speakers. For capture, split the channels
* Set the same channel mask if the widget channel count is the same
* as the FE channels for playback as the audio data is duplicated
* for all speakers in this case. Otherwise, split the channels
* among the aggregated DAIs. For example, with 4 channels on 2
* aggregated DAIs, the channel_mask should be 0x3 and 0xc for the
* two DAI's.
@ -2326,10 +2344,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
* the tables in soc_acpi files depending on the _ADR and devID
* registers for each codec.
*/
if (w->id == snd_soc_dapm_dai_in)
blob->alh_cfg.mapping[i].channel_mask = ch_mask;
else
blob->alh_cfg.mapping[i].channel_mask = mask << (step * i);
blob->alh_cfg.mapping[i].channel_mask = mask << (step * i);
i++;
}

View File

@ -2106,8 +2106,8 @@ static int sof_route_load(struct snd_soc_component *scomp, int index,
/* source component */
source_swidget = snd_sof_find_swidget(scomp, (char *)route->source);
if (!source_swidget) {
dev_err(scomp->dev, "error: source %s not found\n",
route->source);
dev_err(scomp->dev, "source %s for sink %s is not found\n",
route->source, route->sink);
ret = -EINVAL;
goto err;
}
@ -2125,8 +2125,8 @@ static int sof_route_load(struct snd_soc_component *scomp, int index,
/* sink component */
sink_swidget = snd_sof_find_swidget(scomp, (char *)route->sink);
if (!sink_swidget) {
dev_err(scomp->dev, "error: sink %s not found\n",
route->sink);
dev_err(scomp->dev, "sink %s for source %s is not found\n",
route->sink, route->source);
ret = -EINVAL;
goto err;
}
@ -2506,12 +2506,28 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
if (!tplg_files)
return -ENOMEM;
/* Try to use function topologies if possible */
if (!sof_pdata->disable_function_topology && !disable_function_topology &&
sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) {
/*
* When the topology name contains 'dummy' word, it means that
* there is no fallback option to monolithic topology in case
* any of the function topologies might be missing.
* In this case we should use best effort to form the card,
* ignoring functionalities that we are missing a fragment for.
*
* Note: monolithic topologies also ignore these possibly
* missing functions, so the functionality of the card would be
* identical to the case if there would be a fallback monolithic
* topology created for the configuration.
*/
bool no_fallback = strstr(file, "dummy");
tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,
sof_pdata->machine,
tplg_filename_prefix,
&tplg_files);
&tplg_files,
no_fallback);
if (tplg_cnt < 0) {
kfree(tplg_files);
return tplg_cnt;

View File

@ -2077,7 +2077,7 @@ static const struct regmap_config tegra210_ahub_regmap_config = {
.val_bits = 32,
.reg_stride = 4,
.max_register = TEGRA210_MAX_REGISTER_ADDR,
.cache_type = REGCACHE_FLAT,
.cache_type = REGCACHE_FLAT_S,
};
static const struct regmap_config tegra186_ahub_regmap_config = {
@ -2085,7 +2085,7 @@ static const struct regmap_config tegra186_ahub_regmap_config = {
.val_bits = 32,
.reg_stride = 4,
.max_register = TEGRA186_MAX_REGISTER_ADDR,
.cache_type = REGCACHE_FLAT,
.cache_type = REGCACHE_FLAT_S,
};
static const struct regmap_config tegra264_ahub_regmap_config = {
@ -2094,7 +2094,7 @@ static const struct regmap_config tegra264_ahub_regmap_config = {
.reg_stride = 4,
.writeable_reg = tegra264_ahub_wr_reg,
.max_register = TEGRA264_MAX_REGISTER_ADDR,
.cache_type = REGCACHE_FLAT,
.cache_type = REGCACHE_FLAT_S,
};
static const struct tegra_ahub_soc_data soc_data_tegra210 = {

View File

@ -1481,6 +1481,10 @@ int snd_usb_endpoint_prepare(struct snd_usb_audio *chip,
return err;
}
err = snd_usb_select_mode_quirk(chip, ep->cur_audiofmt);
if (err < 0)
return err;
err = snd_usb_init_pitch(chip, ep->cur_audiofmt);
if (err < 0)
return err;
@ -1489,10 +1493,6 @@ int snd_usb_endpoint_prepare(struct snd_usb_audio *chip,
if (err < 0)
return err;
err = snd_usb_select_mode_quirk(chip, ep->cur_audiofmt);
if (err < 0)
return err;
/* for UAC2/3, enable the interface altset here at last */
if (!iface_first) {
err = endpoint_set_interface(chip, ep, true);

View File

@ -34,6 +34,7 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
{
int sample_width, sample_bytes;
u64 pcm_formats = 0;
u64 dsd_formats = 0;
switch (fp->protocol) {
case UAC_VERSION_1:
@ -154,7 +155,9 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
fp->iface, fp->altsetting, format);
}
pcm_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes);
dsd_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes);
if (dsd_formats && !fp->dsd_dop)
pcm_formats = dsd_formats;
return pcm_formats;
}

View File

@ -655,17 +655,25 @@ static void get_meter_levels_from_urb(int s,
u8 *meter_urb)
{
int val = MUC2(meter_urb, s) + (MUC3(meter_urb, s) << 8);
int ch = MUB2(meter_urb, s) - 1;
if (ch < 0)
return;
if (MUA0(meter_urb, s) == 0x61 && MUA1(meter_urb, s) == 0x02 &&
MUA2(meter_urb, s) == 0x04 && MUB0(meter_urb, s) == 0x62) {
if (MUC0(meter_urb, s) == 0x72)
store->meter_level[MUB2(meter_urb, s) - 1] = val;
if (MUC0(meter_urb, s) == 0xb2)
store->comp_level[MUB2(meter_urb, s) - 1] = val;
if (ch < SND_US16X08_MAX_CHANNELS) {
if (MUC0(meter_urb, s) == 0x72)
store->meter_level[ch] = val;
if (MUC0(meter_urb, s) == 0xb2)
store->comp_level[ch] = val;
}
}
if (MUA0(meter_urb, s) == 0x61 && MUA1(meter_urb, s) == 0x02 &&
MUA2(meter_urb, s) == 0x02 && MUB0(meter_urb, s) == 0x62)
store->master_level[MUB2(meter_urb, s) - 1] = val;
MUA2(meter_urb, s) == 0x02 && MUB0(meter_urb, s) == 0x62) {
if (ch < ARRAY_SIZE(store->master_level))
store->master_level[ch] = val;
}
}
/* Function to retrieve current meter values from the device.

View File

@ -2221,7 +2221,7 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_IFACE_DELAY),
DEVICE_FLG(0x0644, 0x8044, /* Esoteric D-05X */
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
QUIRK_FLAG_IFACE_DELAY),
QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET),
DEVICE_FLG(0x0644, 0x804a, /* TEAC UD-301 */
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
QUIRK_FLAG_IFACE_DELAY),
@ -2229,7 +2229,13 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_FORCE_IFACE_RESET),
DEVICE_FLG(0x0644, 0x806b, /* TEAC UD-701 */
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
QUIRK_FLAG_IFACE_DELAY),
QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET),
DEVICE_FLG(0x0644, 0x807d, /* TEAC UD-507 */
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET),
DEVICE_FLG(0x0644, 0x806c, /* Esoteric XD */
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY |
QUIRK_FLAG_IFACE_DELAY | QUIRK_FLAG_FORCE_IFACE_RESET),
DEVICE_FLG(0x06f8, 0xb000, /* Hercules DJ Console (Windows Edition) */
QUIRK_FLAG_IGNORE_CTL_ERROR),
DEVICE_FLG(0x06f8, 0xd002, /* Hercules DJ Console (Macintosh Edition) */
@ -2388,6 +2394,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_CTL_MSG_DELAY_1M),
DEVICE_FLG(0x30be, 0x0101, /* Schiit Hel */
QUIRK_FLAG_IGNORE_CTL_ERROR),
DEVICE_FLG(0x3255, 0x0000, /* Luxman D-10X */
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY),
DEVICE_FLG(0x339b, 0x3a07, /* Synaptics HONOR USB-C HEADSET */
QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE),
DEVICE_FLG(0x413c, 0xa506, /* Dell AE515 sound bar */
@ -2431,6 +2439,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_DSD_RAW),
VENDOR_FLG(0x2622, /* IAG Limited devices */
QUIRK_FLAG_DSD_RAW),
VENDOR_FLG(0x2772, /* Musical Fidelity devices */
QUIRK_FLAG_DSD_RAW),
VENDOR_FLG(0x278b, /* Rotel? */
QUIRK_FLAG_DSD_RAW),
VENDOR_FLG(0x292b, /* Gustard/Ess based devices */