Commit Graph

50831 Commits

Author SHA1 Message Date
Linus Torvalds
071b34dcf7 sound updates for 6.13-rc1
This is a relatively calm cycle, and majority of changes are about
 ASoC.  There are little changes in the core side but we received
 lots of new drivers for new vendors.
 
 * ALSA Core:
 - The new accel operation mode for compress-offload API;
   only the core part, and the actual user will follow at next
 
 * ASoC:
 - Continued API simplification works
 - Renaming of the sh directory to Renesas
 - Factoring out of some of the common code for Realtek devices
 - Ussal ASoC Intel SOF, AMD and SoundWire updates
 - Support for Allwinner H616, AMD ACP 6.3 systems, AWInic AW88081,
   Cirrus Logic CS32L84, Everest ES8328, Iron Devices SMA1307,
   Longsoon I2S, NeoFidelity NTP8918 and NTP8835, Philips UDA1342,
   Qualcomm SM8750, RealTek RT721, and ST Microelectronics STM32MP25
 
 * HD- and USB-audio:
 - Clean up of IRQ handling in legacy HD-audio driver
 - Fix soft lockup at disconnection of non-standard USB drivers
 - Scarlett2 mixer improvements
 - New quirks and cleanups in HD- and USB-audio
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmc9yFUOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE8IMxAAoagGD3lQXQl6c7yoe0BATApiW71itLHP05SA
 KzVCeWtMMeROov9cWgzIJMqbj4d6fs/zxomYjYHzb+3IlTtMVkV+PWEIgtr0xck4
 WRPj9V3vb68+S6tFlVrmsv4LwdWfwPwUgLJpvXZM/aFUxa+8i0lb2/g8yKPYvser
 dfqU1Uwi7fn3txTQiFiI61Hx7Nn3ISUhVpY3DwZTHYuLaRNfJOR0HdJTrlehnYZG
 KmvTg2WnYud687yEMC5AV1WTItoUUhMkuPGbpxWxGwk8bOfkbxKNh/EgNOO2Hubz
 E8RgYtCaq2TA0OS5YdY6Mk9blG7snOZW3pMULm1kFuLr1BD7JGz2Q5duoX6NyrrS
 gqzXPxPYCCCkLLkS672HMy9UzhM3j03LrgT1JxV3wbUMZoJWjD0zn1Tfv6WJ1M7g
 CZsjaZrqATK8bexM8QrdKSZcZOB7B3ZX0hNyx/SKXycuvg8jC8evm/qfAPKvU79O
 B3vivSs/YgquR62R8dp6OJQ75C3IVLv9PrLbS/RXrOgzx2hRZFG5/PWKr+pC5zIp
 T8qdBPuQ/f/gzbIgGkL2sRYYWGL+tg+hlD2CA5jP47DoUwcdxm15AK4Gv1qqJgFr
 QCmg3WuipUumJqyMcSKdyVqUytIeCBFTZqM1PUsehfdueeRkp0ZgV6hDDc+jSjWm
 fjycRuw=
 =gOHc
 -----END PGP SIGNATURE-----

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

Pull sound updates from Takashi Iwai:
 "This is a relatively calm cycle, and majority of changes are about
  ASoC. There are little changes in the core side but we received lots
  of new drivers for new vendors.

  ALSA Core:
   - The new accel operation mode for compress-offload API; only the
     core part, the actual user will follow later

  ASoC:
   - Continued API simplification works
   - Renaming of the sh directory to Renesas
   - Factoring out of some of the common code for Realtek devices
   - Ussal ASoC Intel SOF, AMD and SoundWire updates
   - Support for Allwinner H616, AMD ACP 6.3 systems, AWInic AW88081,
     Cirrus Logic CS32L84, Everest ES8328, Iron Devices SMA1307,
     Longsoon I2S, NeoFidelity NTP8918 and NTP8835, Philips UDA1342,
     Qualcomm SM8750, RealTek RT721, and ST Microelectronics STM32MP25

  HD- and USB-audio:
   - Clean up of IRQ handling in legacy HD-audio driver
   - Fix soft lockup at disconnection of non-standard USB drivers
   - Scarlett2 mixer improvements
   - New quirks and cleanups in HD- and USB-audio"

* tag 'sound-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (278 commits)
  ALSA: hda: Poll jack events for LS7A HD-Audio
  ASoC: hdmi-codec: reorder channel allocation list
  ALSA: ump: Fix the wrong format specifier
  ASoC: Intel: soc-acpi-intel-lnl-match: add rt712_vb + rt1320 support
  ASoC: stm32: dfsdm: change rate upper limits
  ASoC: sma1307: fix uninitialized variable refence
  ASoC: dt-bindings: simple-mux: add idle-state property
  ASoc: simple-mux: add idle-state support
  ASoC: sdca: test adev before calling acpi_dev_for_each_child
  ASoC: SOF: ipc4-topology: remove redundant assignment to variable ret
  ASoC: amd: ps: fix the pcm device numbering for acp 6.3 platform
  ASoC: amd: acp: add soundwire machine driver for legacy stack
  ASoC: amd: acp: move get_acp63_cpu_pin_id() to common file
  ASoC: amd: ps: add soundwire machines for acp6.3 platform
  ASoC: amd: acp: add RT711, RT714 & RT1316 support for acp 6.3 platform
  ASoC: amd: acp: add rt722 based soundwire machines
  ALSA: compress_offload: Add missing descriptions in structs
  ALSA: 6fire: Release resources at card release
  ALSA: caiaq: Use snd_card_free_when_closed() at disconnection
  ALSA: us122l: Drop mmap_count field
  ...
2024-11-21 14:39:31 -08:00
Linus Torvalds
e6de688e93 Devicetree updates for v6.13:
Bindings:
 
 - Enable dtc "interrupt_provider" warnings for binding examples.
   Fix the warnings in fsl,mu-msi and ti,sci-inta due to this.
 
 - Convert zii,rave-sp-wdt, zii,rave-sp-pwrbutton,  and
   altr,fpga-passive-serial to DT schema format
 
 - Add some documentation on the different forms of YAML text blocks
   which are a constant source of review comments
 
 - Fix some schema errors in constraints for arrays
 
 - Add compatibles for qcom,sar2130p-pdc and onnn,adt7462
 
 DT core:
 
 - Allow overlay kunit tests to run CONFIG_OF_OVERLAY=n
 
 - Add some warnings on deprecated address handling
 
 - Rework early_init_dt_scan() so the arch can pass in the phys address
   of the DTB as __pa() is not always valid to use. This fixes a warning
   for arm64 with kexec.
 
 - Add and use some new DT graph iterators for iterating over ports and
   endpoints
 
 - Rework reserved-memory handling to be sized dynamically for fixed
   regions
 
 - Optimize of_modalias() to avoid a strlen() call
 
 - Constify struct device_node and property pointers where ever possible
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAmc7qaoACgkQ+vtdtY28
 YcN54g/+Ifz4hQTSWV+VBhihovMMPiQUdxZ+MfJfPnPcZ7NJzaTf+zqhZyS4wQou
 v0pdtyR0B1fCM/EvKaYD+1aTTAQFEIT5Dqac+9ePwqaYqSk+yCTxyzW9m+P3rTPV
 THo8SGRss7T+Rs+2WaUGxphTJItMGIRdbBvoqK+82EdKFXXKw2BSD8tlJTWwbTam
 9xkrpUzw7f4FvVY8vVhRyOd5i8/v+FH8D65DMIT6ME9zRn4MzKVzCg6udgYeCBld
 C2XbV+wnyewtjrN2IX+2uQ2mheb7yJu3AEI3iFR5x/sRrsSLpisxrUl38xOOpxrM
 XxYtHgE3omjagQ+y+L2PMthlKvhFrXVXIvhUH8xxje5z1Vyq3VMfiABkHlMpAnys
 5LY4xEhvqDkPNo65UmjMiHxGW/xtcKsmAZBOp+HLerZfCJIFvl380fi8mNg/Sjvz
 7ExCSpzCPsHASZg7QCTplU3BUtg+067Ch/k8Hsn/Og73Pqm3xH4IezQZKwweN9ZT
 LC6OQBI7C3Yt1hom9qgUcA4H4/aaPxTVV7i0DGuAKh8Lon6SaoX2yFpweUBgbsL/
 c9DIW4vbYBIGASxxUbHlNMKvPCKACKmpFXhsnH5Waj+VWSOwsJ8bjGpH8PfMKdFW
 dyJB/r94GqCGpCW7+FC1qGmXiQJGkCo89pKBVjSf4Kj45ht/76o=
 =NCYS
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-for-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree updates from Rob Herring:
 "Bindings:

   - Enable dtc "interrupt_provider" warnings for binding examples. Fix
     the warnings in fsl,mu-msi and ti,sci-inta due to this.

   - Convert zii,rave-sp-wdt, zii,rave-sp-pwrbutton, and
     altr,fpga-passive-serial to DT schema format

   - Add some documentation on the different forms of YAML text blocks
     which are a constant source of review comments

   - Fix some schema errors in constraints for arrays

   - Add compatibles for qcom,sar2130p-pdc and onnn,adt7462

  DT core:

   - Allow overlay kunit tests to run CONFIG_OF_OVERLAY=n

   - Add some warnings on deprecated address handling

   - Rework early_init_dt_scan() so the arch can pass in the phys
     address of the DTB as __pa() is not always valid to use. This fixes
     a warning for arm64 with kexec.

   - Add and use some new DT graph iterators for iterating over ports
     and endpoints

   - Rework reserved-memory handling to be sized dynamically for fixed
     regions

   - Optimize of_modalias() to avoid a strlen() call

   - Constify struct device_node and property pointers where ever
     possible"

* tag 'devicetree-for-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (36 commits)
  of: Allow overlay kunit tests to run CONFIG_OF_OVERLAY=n
  dt-bindings: interrupt-controller: qcom,pdc: Add SAR2130P compatible
  of/address: Rework bus matching to avoid warnings
  of: WARN on deprecated #address-cells/#size-cells handling
  of/fdt: Don't use default address cell sizes for address translation
  dt-bindings: Enable dtc "interrupt_provider" warnings
  of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify
  dt-bindings: cache: qcom,llcc: Fix X1E80100 reg entries
  dt-bindings: watchdog: convert zii,rave-sp-wdt.txt to yaml format
  dt-bindings: input: convert zii,rave-sp-pwrbutton.txt to yaml
  media: xilinx-tpg: use new of_graph functions
  fbdev: omapfb: use new of_graph functions
  gpu: drm: omapdrm: use new of_graph functions
  ASoC: audio-graph-card2: use new of_graph functions
  ASoC: audio-graph-card: use new of_graph functions
  ASoC: test-component: use new of_graph functions
  of: property: use new of_graph functions
  of: property: add of_graph_get_next_port_endpoint()
  of: property: add of_graph_get_next_port()
  of: module: remove strlen() call in of_modalias()
  ...
2024-11-20 13:19:25 -08:00
Linus Torvalds
bf9aa14fc5 A rather large update for timekeeping and timers:
- The final step to get rid of auto-rearming posix-timers
 
     posix-timers are currently auto-rearmed by the kernel when the signal
     of the timer is ignored so that the timer signal can be delivered once
     the corresponding signal is unignored.
 
     This requires to throttle the timer to prevent a DoS by small intervals
     and keeps the system pointlessly out of low power states for no value.
     This is a long standing non-trivial problem due to the lock order of
     posix-timer lock and the sighand lock along with life time issues as
     the timer and the sigqueue have different life time rules.
 
     Cure this by:
 
      * Embedding the sigqueue into the timer struct to have the same life
        time rules. Aside of that this also avoids the lookup of the timer
        in the signal delivery and rearm path as it's just a always valid
        container_of() now.
 
      * Queuing ignored timer signals onto a seperate ignored list.
 
      * Moving queued timer signals onto the ignored list when the signal is
        switched to SIG_IGN before it could be delivered.
 
      * Walking the ignored list when SIG_IGN is lifted and requeue the
        signals to the actual signal lists. This allows the signal delivery
        code to rearm the timer.
 
     This also required to consolidate the signal delivery rules so they are
     consistent across all situations. With that all self test scenarios
     finally succeed.
 
   - Core infrastructure for VFS multigrain timestamping
 
     This is required to allow the kernel to use coarse grained time stamps
     by default and switch to fine grained time stamps when inode attributes
     are actively observed via getattr().
 
     These changes have been provided to the VFS tree as well, so that the
     VFS specific infrastructure could be built on top.
 
   - Cleanup and consolidation of the sleep() infrastructure
 
     * Move all sleep and timeout functions into one file
 
     * Rework udelay() and ndelay() into proper documented inline functions
       and replace the hardcoded magic numbers by proper defines.
 
     * Rework the fsleep() implementation to take the reality of the timer
       wheel granularity on different HZ values into account. Right now the
       boundaries are hard coded time ranges which fail to provide the
       requested accuracy on different HZ settings.
 
     * Update documentation for all sleep/timeout related functions and fix
       up stale documentation links all over the place
 
     * Fixup a few usage sites
 
   - Rework of timekeeping and adjtimex(2) to prepare for multiple PTP clocks
 
     A system can have multiple PTP clocks which are participating in
     seperate and independent PTP clock domains. So far the kernel only
     considers the PTP clock which is based on CLOCK TAI relevant as that's
     the clock which drives the timekeeping adjustments via the various user
     space daemons through adjtimex(2).
 
     The non TAI based clock domains are accessible via the file descriptor
     based posix clocks, but their usability is very limited. They can't be
     accessed fast as they always go all the way out to the hardware and
     they cannot be utilized in the kernel itself.
 
     As Time Sensitive Networking (TSN) gains traction it is required to
     provide fast user and kernel space access to these clocks.
 
     The approach taken is to utilize the timekeeping and adjtimex(2)
     infrastructure to provide this access in a similar way how the kernel
     provides access to clock MONOTONIC, REALTIME etc.
 
     Instead of creating a duplicated infrastructure this rework converts
     timekeeping and adjtimex(2) into generic functionality which operates
     on pointers to data structures instead of using static variables.
 
     This allows to provide time accessors and adjtimex(2) functionality for
     the independent PTP clocks in a subsequent step.
 
   - Consolidate hrtimer initialization
 
     hrtimers are set up by initializing the data structure and then
     seperately setting the callback function for historical reasons.
 
     That's an extra unnecessary step and makes Rust support less straight
     forward than it should be.
 
     Provide a new set of hrtimer_setup*() functions and convert the core
     code and a few usage sites of the less frequently used interfaces over.
 
     The bulk of the htimer_init() to hrtimer_setup() conversion is already
     prepared and scheduled for the next merge window.
 
   - Drivers:
 
     * Ensure that the global timekeeping clocksource is utilizing the
       cluster 0 timer on MIPS multi-cluster systems.
 
       Otherwise CPUs on different clusters use their cluster specific
       clocksource which is not guaranteed to be synchronized with other
       clusters.
 
     * Mostly boring cleanups, fixes, improvements and code movement
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmc7kPITHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoZKkD/9OUL6fOJrDUmOYBa4QVeMyfTef4EaL
 tvwIMM/29XQFeiq3xxCIn+EMnHjXn2lvIhYGQ7GKsbKYwvJ7ZBDpQb+UMhZ2nKI9
 6D6BP6WomZohKeH2fZbJQAdqOi3KRYdvQdIsVZUexkqiaVPphRvOH9wOr45gHtZM
 EyMRSotPlQTDqcrbUejDMEO94GyjDCYXRsyATLxjmTzL/N4xD4NRIiotjM2vL/a9
 8MuCgIhrKUEyYlFoOxxeokBsF3kk3/ez2jlG9b/N8VLH3SYIc2zgL58FBgWxlmgG
 bY71nVG3nUgEjxBd2dcXAVVqvb+5widk8p6O7xxOAQKTLMcJ4H0tQDkMnzBtUzvB
 DGAJDHAmAr0g+ja9O35Pkhunkh4HYFIbq0Il4d1HMKObhJV0JumcKuQVxrXycdm3
 UZfq3seqHsZJQbPgCAhlFU0/2WWScocbee9bNebGT33KVwSp5FoVv89C/6Vjb+vV
 Gusc3thqrQuMAZW5zV8g4UcBAA/xH4PB0I+vHib+9XPZ4UQ7/6xKl2jE0kd5hX7n
 AAUeZvFNFqIsY+B6vz+Jx/yzyM7u5cuXq87pof5EHVFzv56lyTp4ToGcOGYRgKH5
 JXeYV1OxGziSDrd5vbf9CzdWMzqMvTefXrHbWrjkjhNOe8E1A8O88RZ5uRKZhmSw
 hZZ4hdM9+3T7cg==
 =2VC6
 -----END PGP SIGNATURE-----

Merge tag 'timers-core-2024-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner:
 "A rather large update for timekeeping and timers:

   - The final step to get rid of auto-rearming posix-timers

     posix-timers are currently auto-rearmed by the kernel when the
     signal of the timer is ignored so that the timer signal can be
     delivered once the corresponding signal is unignored.

     This requires to throttle the timer to prevent a DoS by small
     intervals and keeps the system pointlessly out of low power states
     for no value. This is a long standing non-trivial problem due to
     the lock order of posix-timer lock and the sighand lock along with
     life time issues as the timer and the sigqueue have different life
     time rules.

     Cure this by:

       - Embedding the sigqueue into the timer struct to have the same
         life time rules. Aside of that this also avoids the lookup of
         the timer in the signal delivery and rearm path as it's just a
         always valid container_of() now.

       - Queuing ignored timer signals onto a seperate ignored list.

       - Moving queued timer signals onto the ignored list when the
         signal is switched to SIG_IGN before it could be delivered.

       - Walking the ignored list when SIG_IGN is lifted and requeue the
         signals to the actual signal lists. This allows the signal
         delivery code to rearm the timer.

     This also required to consolidate the signal delivery rules so they
     are consistent across all situations. With that all self test
     scenarios finally succeed.

   - Core infrastructure for VFS multigrain timestamping

     This is required to allow the kernel to use coarse grained time
     stamps by default and switch to fine grained time stamps when inode
     attributes are actively observed via getattr().

     These changes have been provided to the VFS tree as well, so that
     the VFS specific infrastructure could be built on top.

   - Cleanup and consolidation of the sleep() infrastructure

       - Move all sleep and timeout functions into one file

       - Rework udelay() and ndelay() into proper documented inline
         functions and replace the hardcoded magic numbers by proper
         defines.

       - Rework the fsleep() implementation to take the reality of the
         timer wheel granularity on different HZ values into account.
         Right now the boundaries are hard coded time ranges which fail
         to provide the requested accuracy on different HZ settings.

       - Update documentation for all sleep/timeout related functions
         and fix up stale documentation links all over the place

       - Fixup a few usage sites

   - Rework of timekeeping and adjtimex(2) to prepare for multiple PTP
     clocks

     A system can have multiple PTP clocks which are participating in
     seperate and independent PTP clock domains. So far the kernel only
     considers the PTP clock which is based on CLOCK TAI relevant as
     that's the clock which drives the timekeeping adjustments via the
     various user space daemons through adjtimex(2).

     The non TAI based clock domains are accessible via the file
     descriptor based posix clocks, but their usability is very limited.
     They can't be accessed fast as they always go all the way out to
     the hardware and they cannot be utilized in the kernel itself.

     As Time Sensitive Networking (TSN) gains traction it is required to
     provide fast user and kernel space access to these clocks.

     The approach taken is to utilize the timekeeping and adjtimex(2)
     infrastructure to provide this access in a similar way how the
     kernel provides access to clock MONOTONIC, REALTIME etc.

     Instead of creating a duplicated infrastructure this rework
     converts timekeeping and adjtimex(2) into generic functionality
     which operates on pointers to data structures instead of using
     static variables.

     This allows to provide time accessors and adjtimex(2) functionality
     for the independent PTP clocks in a subsequent step.

   - Consolidate hrtimer initialization

     hrtimers are set up by initializing the data structure and then
     seperately setting the callback function for historical reasons.

     That's an extra unnecessary step and makes Rust support less
     straight forward than it should be.

     Provide a new set of hrtimer_setup*() functions and convert the
     core code and a few usage sites of the less frequently used
     interfaces over.

     The bulk of the htimer_init() to hrtimer_setup() conversion is
     already prepared and scheduled for the next merge window.

   - Drivers:

       - Ensure that the global timekeeping clocksource is utilizing the
         cluster 0 timer on MIPS multi-cluster systems.

         Otherwise CPUs on different clusters use their cluster specific
         clocksource which is not guaranteed to be synchronized with
         other clusters.

       - Mostly boring cleanups, fixes, improvements and code movement"

* tag 'timers-core-2024-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (140 commits)
  posix-timers: Fix spurious warning on double enqueue versus do_exit()
  clocksource/drivers/arm_arch_timer: Use of_property_present() for non-boolean properties
  clocksource/drivers/gpx: Remove redundant casts
  clocksource/drivers/timer-ti-dm: Fix child node refcount handling
  dt-bindings: timer: actions,owl-timer: convert to YAML
  clocksource/drivers/ralink: Add Ralink System Tick Counter driver
  clocksource/drivers/mips-gic-timer: Always use cluster 0 counter as clocksource
  clocksource/drivers/timer-ti-dm: Don't fail probe if int not found
  clocksource/drivers:sp804: Make user selectable
  clocksource/drivers/dw_apb: Remove unused dw_apb_clockevent functions
  hrtimers: Delete hrtimer_init_on_stack()
  alarmtimer: Switch to use hrtimer_setup() and hrtimer_setup_on_stack()
  io_uring: Switch to use hrtimer_setup_on_stack()
  sched/idle: Switch to use hrtimer_setup_on_stack()
  hrtimers: Delete hrtimer_init_sleeper_on_stack()
  wait: Switch to use hrtimer_setup_sleeper_on_stack()
  timers: Switch to use hrtimer_setup_sleeper_on_stack()
  net: pktgen: Switch to use hrtimer_setup_sleeper_on_stack()
  futex: Switch to use hrtimer_setup_sleeper_on_stack()
  fs/aio: Switch to use hrtimer_setup_sleeper_on_stack()
  ...
2024-11-19 16:35:06 -08:00
Linus Torvalds
0f25f0e4ef the bulk of struct fd memory safety stuff
Making sure that struct fd instances are destroyed in the same
 scope where they'd been created, getting rid of reassignments
 and passing them by reference, converting to CLASS(fd{,_pos,_raw}).
 
 We are getting very close to having the memory safety of that stuff
 trivial to verify.
 
 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCZzdikAAKCRBZ7Krx/gZQ
 69nJAQCmbQHK3TGUbQhOw6MJXOK9ezpyEDN3FZb4jsu38vTIdgEA6OxAYDO2m2g9
 CN18glYmD3wRyU6Bwl4vGODouSJvDgA=
 =gVH3
 -----END PGP SIGNATURE-----

Merge tag 'pull-fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull 'struct fd' class updates from Al Viro:
 "The bulk of struct fd memory safety stuff

  Making sure that struct fd instances are destroyed in the same scope
  where they'd been created, getting rid of reassignments and passing
  them by reference, converting to CLASS(fd{,_pos,_raw}).

  We are getting very close to having the memory safety of that stuff
  trivial to verify"

* tag 'pull-fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (28 commits)
  deal with the last remaing boolean uses of fd_file()
  css_set_fork(): switch to CLASS(fd_raw, ...)
  memcg_write_event_control(): switch to CLASS(fd)
  assorted variants of irqfd setup: convert to CLASS(fd)
  do_pollfd(): convert to CLASS(fd)
  convert do_select()
  convert vfs_dedupe_file_range().
  convert cifs_ioctl_copychunk()
  convert media_request_get_by_fd()
  convert spu_run(2)
  switch spufs_calls_{get,put}() to CLASS() use
  convert cachestat(2)
  convert do_preadv()/do_pwritev()
  fdget(), more trivial conversions
  fdget(), trivial conversions
  privcmd_ioeventfd_assign(): don't open-code eventfd_ctx_fdget()
  o2hb_region_dev_store(): avoid goto around fdget()/fdput()
  introduce "fd_pos" class, convert fdget_pos() users to it.
  fdget_raw() users: switch to CLASS(fd_raw)
  convert vmsplice() to CLASS(fd)
  ...
2024-11-18 12:24:06 -08:00
Huacai Chen
e3f8064d8b ALSA: hda: Poll jack events for LS7A HD-Audio
LS7A HD-Audio disable interrupts and use polling mode due to hardware
drawbacks. As a result, unsolicited jack events are also unusable. If
we want to support headphone hotplug, we need to also poll jack events.

Here we use 1500ms as the poll interval if no module parameter specify
it.

Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/20241115150653.2819100-1-chenhuacai@loongson.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-11-18 14:40:01 +01:00
Takashi Iwai
40d6b7e0f4 Merge branch 'for-linus' into for-next
Pull 6.12 devel branch for further HD-audio and USB-audio fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-11-18 14:39:29 +01:00
Takashi Iwai
1a7585c3a4 ASoC: Updates for v6.13
This release was mainly about new drivers, there's a very large batch of
 new drivers and devices including quite a few from newer vendors which
 is great to see.  Other than the new drivers and the usual routine fixes
 and enhancements the bulk of the work has been Morimoto-san's continuing
 work on simplifiying APIs, plus a few other bits:
 
  - More API simplifications from Morimoto-san.
  - Renaming of the sh directory to Renesas to reflect the focus on other
    architectures.
  - Factoring out of some of the common code for Realtek devices.
  - Support for Allwinner H616, AMD ACP 6.3 systems, AWInic AW88081,
    Cirrus Logic CS32L84, Everest ES8328, Iron Devices SMA1307, Longsoon
    I2S, NeoFidelity NTP8918 and NTP8835, Philips UDA1342, Qualcomm
    SM8750, RealTek RT721, and ST Microelectronics STM32MP25.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmc7NioACgkQJNaLcl1U
 h9CQpQf/R0SfnI7RKkYNwyqiH+aHn75bMOAq5xyGqfUIithkWXFRwi+4r08wW0yF
 3u6GLgwuzjHAGzupN+TxWTucglMdzwdaL+Z+JbVwhejK0ugTz/EJOS/Y0IW+pIoX
 /icQuE3fcW1ODDrDoBp8KkkjkCGwUddR6Oth75oDMEFG++ug7x8zxJEEvhZ6deFr
 7UOAa22BqdCRNFWGmYJvJH31SKsapQcA237/bRTHitiNhwxIYRnQ7VvaOES7BdcT
 BtL2yCjgU2o3MGwdJdj5r/tm0HC6M1o7mJF2bb3i9dos6NB4uOM9UV4dKNcdKth9
 TGIbd62noD5h03HzBCplREfA3ynrsA==
 =6HJR
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v6.13

This release was mainly about new drivers, there's a very large batch of
new drivers and devices including quite a few from newer vendors which
is great to see.  Other than the new drivers and the usual routine fixes
and enhancements the bulk of the work has been Morimoto-san's continuing
work on simplifiying APIs, plus a few other bits:

 - More API simplifications from Morimoto-san.
 - Renaming of the sh directory to Renesas to reflect the focus on other
   architectures.
 - Factoring out of some of the common code for Realtek devices.
 - Support for Allwinner H616, AMD ACP 6.3 systems, AWInic AW88081,
   Cirrus Logic CS32L84, Everest ES8328, Iron Devices SMA1307, Longsoon
   I2S, NeoFidelity NTP8918 and NTP8835, Philips UDA1342, Qualcomm
   SM8750, RealTek RT721, and ST Microelectronics STM32MP25.
2024-11-18 14:34:54 +01:00
Jonas Karlman
82ff5abc2e
ASoC: hdmi-codec: reorder channel allocation list
The ordering in hdmi_codec_get_ch_alloc_table_idx() results in
wrong channel allocation for a number of cases, e.g. when ELD
reports FL|FR|LFE|FC|RL|RR or FL|FR|LFE|FC|RL|RR|RC|RLC|RRC:

ca_id 0x01 with speaker mask FL|FR|LFE is selected instead of
ca_id 0x03 with speaker mask FL|FR|LFE|FC for 4 channels

and

ca_id 0x04 with speaker mask FL|FR|RC gets selected instead of
ca_id 0x0b with speaker mask FL|FR|LFE|FC|RL|RR for 6 channels

Fix this by reordering the channel allocation list with most
specific speaker masks at the top.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://patch.msgid.link/20241115044344.3510979-1-christianshewitt@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-15 13:43:00 +00:00
Takashi Iwai
5ec23a1b53 ASoC: Fixes for v6.12
Some last updates for v6.12, one quirk plus a couple of fixes.  One is a
 minor fix for a relatively obscure driver and the other is a relatively
 important fix for boot hangs with some audio graph based cards.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmc1/0UACgkQJNaLcl1U
 h9BFWwf8DVjYujeDc/qCC1k4mbgc1m4GSvUhowUbm7S+crHYrc1YD2q4Fu+HGWr9
 ADj3qRWsFu66RjbXA+0Dg3yEkDp2xDAhfZ+hThlwf+0CyOY42YsnlPF0/Y87uLOS
 2w/qFaSeYFrSgCJ9UjMtCVtBKJKkFmILm8sS8NrAYUsMmAl5L+HquskqBapT0tNM
 Beicvth+V0sbo1aq7pdxEGu35DeJmwvXu60hmdIrwKvf5roNXV2Tn/xr4TFyo1uY
 B1oyTRrhaLNrR/l0hjq20B0mkkYwH/wblp81q5Bm2mb/MmDPBDH0vYYG2rB4Y97j
 lvmYCgoYEAqCPd+8hHrmOq9jhegZqg==
 =kQ4k
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v6.12

Some last updates for v6.12, one quirk plus a couple of fixes.  One is a
minor fix for a relatively obscure driver and the other is a relatively
important fix for boot hangs with some audio graph based cards.
2024-11-14 16:40:15 +01:00
Mark Brown
9a5a75bf1f
ASoc: simple-mux: Allow to specify an idle-state
Merge series from "Hendrik v. Raven" <h.v.raven@merzmedtech.de>:

This series adds support for the idle-state property from the mux
framework to the simple-mux audio variant. It allows to specify the state
of the mux when it is not in use.
2024-11-14 15:36:46 +00:00
Mark Brown
f3f9f0de30
Add generic AMD Soundwire machine driver for Legacy(No
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:

This patch series add SoundWire machines for RT711, RT714, RT1316 and
RT722 codecs for ACP 6.3 platform. Also, it adds a generic SoundWire
machine driver code for legacy(No DSP) stack.
2024-11-14 15:36:39 +00:00
zhang jiao
9b4662d0df ALSA: ump: Fix the wrong format specifier
The format specifier of "unsigned int" in snprintf()
should be "%u", not "%d".

Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241114075822.41614-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-11-14 14:38:40 +01:00
Bard Liao
a59360466a
ASoC: Intel: soc-acpi-intel-lnl-match: add rt712_vb + rt1320 support
Realtek Gen6 AIOC supports rt712_vb on SoundWire link 2 and rt1320 on
SoundWire link 1.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20241113064418.162592-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-14 11:42:43 +00:00
Olivier Moysan
ba88845082
ASoC: stm32: dfsdm: change rate upper limits
Increase rate upper limit to 192kHz to reflect the rate range actually
supported by the STM32 DFSDM peripheral.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20241114102851.2497942-1-olivier.moysan@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-14 11:42:42 +00:00
Arnd Bergmann
c48a449735
ASoC: sma1307: fix uninitialized variable refence
When firmware loading is disabled, gcc warns that the local
'fw' variable fails to get initialized:

sound/soc/codecs/sma1307.c: In function 'sma1307_setting_loaded.isra':
sound/soc/codecs/sma1307.c:1717:12: error: 'fw' is used uninitialized [-Werror=uninitialized]
 1717 |         if (!fw) {
      |            ^
sound/soc/codecs/sma1307.c:1712:32: note: 'fw' was declared here
 1712 |         const struct firmware *fw;

Check the return code from request_firmware() to ensure that the
firmware is correctly set, and drop the incorrect release_firmware()
on that uninitialized data.

Fixes: 576c57e6b4 ("ASoC: sma1307: Add driver for Iron Device SMA1307")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20241113175734.2443315-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-14 11:42:41 +00:00
Mark Brown
07db6d5e12
ASoC: Merge up fixes
Needed for new Intel board file changes.
2024-11-14 11:39:47 +00:00
Hendrik v. Raven
2b974284aa
ASoc: simple-mux: add idle-state support
So far the mux changes it state immediately, even when not in use. Allow
overriding this behaviour by specifying an optional idle-state. This
state is used whenever the mux is powered down, only switching to the
selected state on power up. If unspecified it defaults to as-is,
maintaining the previous behaviour.

Signed-off-by: Hendrik v. Raven <h.v.raven@merzmedtech.de>
Link: https://patch.msgid.link/20241114-simple-mux-idle-state-v2-1-a30cb37d2be2@merzmedtech.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-14 11:39:22 +00:00
Bard Liao
de35b06bf1
ASoC: sdca: test adev before calling acpi_dev_for_each_child
sdca_lookup_functions may be called by a Peripheral that is not listed
in the ACPI table. Testing adev is required to avoid kernel NULL pointer
dereference.

Fixes: 3a513da1ae ("ASoC: SDCA: add initial module")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241113064133.162501-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13 13:53:09 +00:00
Colin Ian King
fb5e67c9d0
ASoC: SOF: ipc4-topology: remove redundant assignment to variable ret
The variable ret is being assigned a zero value however the value is
never read because ret is being re-assigned later after the end of
the switch statement. The assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20241113130807.1386754-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13 13:53:09 +00:00
Vijendar Mukunda
76b5a3b2af
ASoC: amd: ps: fix the pcm device numbering for acp 6.3 platform
Fixed PCM device numbering is required for defining common alsa ucm
changes for generic soundwire machine driver for legacy(No DSP) stack.

Ex: For Headphone playback use case, use PCM device number as 0.
For Headset mic Capture use case, PCM device number as 1.

Set the 'use_dai_pcm_id' flag true in soundwire dma driver for acp 6.3
platform. This will fix the pcm device numbering based on dai_link->id.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20241113115223.3274868-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13 13:52:30 +00:00
Vijendar Mukunda
2981d9b078
ASoC: amd: acp: add soundwire machine driver for legacy stack
Add SoundWire machine driver for legacy(No DSP) stack for ACP6.3 platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20241113115223.3274868-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13 13:52:29 +00:00
Vijendar Mukunda
393347cc10
ASoC: amd: acp: move get_acp63_cpu_pin_id() to common file
get_acp63_cpu_pin_id() is the common SoundWire machine driver
helper function will be used for AMD Legacy(No DSP) generic
SoundWire machine driver as well.
Move get_acp63_cpu_pin_id() function to common place holder.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20241113115223.3274868-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13 13:52:28 +00:00
Vijendar Mukunda
56d540befd
ASoC: amd: ps: add soundwire machines for acp6.3 platform
Add SoundWire machines for acp 6.3 platform for legacy(No DSP)
stack.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20241113115223.3274868-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13 13:52:27 +00:00
Vijendar Mukunda
7d3fe292ef
ASoC: amd: acp: add RT711, RT714 & RT1316 support for acp 6.3 platform
This patch add supports for corresponding codecs on acp6.3 platform
hardware configuration.
SDW0: RT711 Jack
SDW0: RT1316 Left Speaker
SDW0: RT1316 Right Speaker
SDW1: RT714 DMIC

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20241113115223.3274868-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13 13:52:26 +00:00
Vijendar Mukunda
804aaa9df6
ASoC: amd: acp: add rt722 based soundwire machines
Add RT722 based soundwire machines for legacy(NO DSP) stack
for acp 6.3 platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20241113115223.3274868-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13 13:52:26 +00:00
Takashi Iwai
a0810c3d6d ALSA: 6fire: Release resources at card release
The current 6fire code tries to release the resources right after the
call of usb6fire_chip_abort().  But at this moment, the card object
might be still in use (as we're calling snd_card_free_when_closed()).

For avoid potential UAFs, move the release of resources to the card's
private_free instead of the manual call of usb6fire_chip_destroy() at
the USB disconnect callback.

Fixes: c6d43ba816 ("ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USB")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241113111042.15058-6-tiwai@suse.de
2024-11-13 13:33:47 +01:00
Takashi Iwai
b04dcbb7f7 ALSA: caiaq: Use snd_card_free_when_closed() at disconnection
The USB disconnect callback is supposed to be short and not too-long
waiting.  OTOH, the current code uses snd_card_free() at
disconnection, but this waits for the close of all used fds, hence it
can take long.  It eventually blocks the upper layer USB ioctls, which
may trigger a soft lockup.

An easy workaround is to replace snd_card_free() with
snd_card_free_when_closed().  This variant returns immediately while
the release of resources is done asynchronously by the card device
release at the last close.

This patch also splits the code to the disconnect and the free phases;
the former is called immediately at the USB disconnect callback while
the latter is called from the card destructor.

Fixes: 523f1dce37 ("[ALSA] Add Native Instrument usb audio device support")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241113111042.15058-5-tiwai@suse.de
2024-11-13 13:33:47 +01:00
Takashi Iwai
f86af06306 ALSA: us122l: Drop mmap_count field
us122l.mmap_count field was used for counting the hwdep mmap opens and
syncing at disconnection.  But such a manual sync isn't needed, as the
refcount check is done in the ALSA core side.  So let's drop it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241113111042.15058-4-tiwai@suse.de
2024-11-13 13:33:47 +01:00
Takashi Iwai
b7df09bb34 ALSA: us122l: Use snd_card_free_when_closed() at disconnection
The USB disconnect callback is supposed to be short and not too-long
waiting.  OTOH, the current code uses snd_card_free() at
disconnection, but this waits for the close of all used fds, hence it
can take long.  It eventually blocks the upper layer USB ioctls, which
may trigger a soft lockup.

An easy workaround is to replace snd_card_free() with
snd_card_free_when_closed().  This variant returns immediately while
the release of resources is done asynchronously by the card device
release at the last close.

The loop of us122l->mmap_count check is dropped as well.  The check is
useless for the asynchronous operation with *_when_closed().

Fixes: 030a07e441 ("ALSA: Add USB US122L driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241113111042.15058-3-tiwai@suse.de
2024-11-13 13:33:47 +01:00
Takashi Iwai
dafb28f02b ALSA: usx2y: Use snd_card_free_when_closed() at disconnection
The USB disconnect callback is supposed to be short and not too-long
waiting.  OTOH, the current code uses snd_card_free() at
disconnection, but this waits for the close of all used fds, hence it
can take long.  It eventually blocks the upper layer USB ioctls, which
may trigger a soft lockup.

An easy workaround is to replace snd_card_free() with
snd_card_free_when_closed().  This variant returns immediately while
the release of resources is done asynchronously by the card device
release at the last close.

Fixes: 230cd5e248 ("[ALSA] prevent oops & dead keyboard on usb unplugging while the device is be ing used")
Reported-by: syzbot+73582d08864d8268b6fd@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=73582d08864d8268b6fd
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241113111042.15058-2-tiwai@suse.de
2024-11-13 13:33:46 +01:00
Takashi Iwai
f69c2861b0 ALSA: pcm: Define snd_pcm_mmap_data_{open|close}() locally
snd_pcm_mmap_data_open() and _close() are defined as inline functions
in the public sound/pcm.h, but those are used only locally in
pcm_native.c, hence they should be better placed there.

Also, those are referred as callbacks, the useless inline is dropped.

Link: https://patch.msgid.link/20241113111628.17069-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-11-13 13:33:28 +01:00
Kailang Yang
2143c8ae42 ALSA: hda/realtek - update set GPIO3 to default for Thinkpad with ALC1318
If user no update BIOS, the speaker will no sound.
This patch support old BIOS to have sound from speaker.

Fixes: 1e707769df ("ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-11-13 07:42:29 +01:00
Maksym Glubokiy
96409eeab8 ALSA: hda/realtek: fix mute/micmute LEDs for a HP EliteBook 645 G10
HP EliteBook 645 G10 uses ALC236 codec and need the
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED and
micmute LED work.

Signed-off-by: Maksym Glubokiy <maxgl.kernel@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20241112154815.10888-1-maxgl.kernel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-11-13 07:35:46 +01:00
Kailang Yang
42ee87df85 ALSA: hda/realtek - Fixed Clevo platform headset Mic issue
Clevo platform with ALC255 Headset Mic was disable by default.
Assigned verb table for Mic pin will enable it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/b2dcac3e09ef4f82b36d6712194e1ea4@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-11-12 15:39:44 +01:00
Eryk Zagorski
6f891ca15b ALSA: usb-audio: Fix Yamaha P-125 Quirk Entry
This patch switches the P-125 quirk entry to use a composite quirk as the
P-125 supplies both MIDI and Audio like many of the other Yamaha
keyboards

Signed-off-by: Eryk Zagorski <erykzagorski@gmail.com>
Link: https://patch.msgid.link/20241111164520.9079-2-erykzagorski@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-11-12 15:39:06 +01:00
Mark Brown
2ae6da569e
ASoC: max9768: Fix event generation for playback mute
The max9768 has a custom control for playback mute which unconditionally
returns 0 from the put() operation, rather than returning 1 on change to
ensure notifications are generated to userspace. Check to see if the value
has changed and return appropriately.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20241112-asoc-max9768-event-v1-1-ba5d50599787@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-12 13:16:37 +00:00
Kuninori Morimoto
add2332795
ASoC: simple-card-utils: care simple_util_dai for dummy DAI
Simple Card Utils has simple_util_dai which is paired to snd_soc_dai,
and assmus that CPU/Codec DAI and its paired simple_util_dai are same
order for CPU/Codec

	simple_util_dai[0] <--> snd_soc_dai[0]
	simple_util_dai[1] <--> snd_soc_dai[1]
	...

So, it is using same index in for_each loop.

(X) gets simple_util_dai
(Y) gets snd_soc_dai

(Y)	for_each_rtd_cpu_dais(.., i, ..) {
(X)(A)		udai = simple_props_to_dai_cpu(.., i);
	}

(X)	for_each_prop_dai_cpu(.., i, ...) {
(Y)		dai = snd_soc_rtd_to_cpu(.., i);
		...
	}

But current Simple Card Utils didn't have simple_util_dai for
dummy DAI. So above (A) will get NULL pointer in such case.
This patch cares simple_util_dai for dummy DAI.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87msi5maz3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-12 13:08:31 +00:00
John Watts
c853e96308
ASoC: test-component: Support continuous rates for test component
There's no reason to limit the supported rates of the test component
to specific ones as if it's a real piece of hardware. Set the rates to
continuous to aid in testing different rates.

Signed-off-by: John Watts <contact@jookia.org>
Link: https://patch.msgid.link/20241112-alsa_test_rates-v1-1-95cf529db871@jookia.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-12 13:08:30 +00:00
Marek Vasut
d0621105ef
ASoC: max98088: Add headphone mixer switch
Add enable/disable headphone output mixers knob.

Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://patch.msgid.link/20241111165523.113142-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-11 17:00:37 +00:00
Marek Vasut
14c7f4867b
ASoC: max98088: Add left/right DAC volume control
Add left/right DAC digital volume control knob.

Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://patch.msgid.link/20241111165435.113086-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-11 17:00:36 +00:00
Suraj Sonawane
9a59718a53
ASoc: SOF: ipc4-pcm: fix uninit-value in sof_ipc4_pcm_dai_link_fixup_rate
Fix an issue detected by the Smatch tool:

sound/soc/sof/ipc4-pcm.c: sof_ipc4_pcm_dai_link_fixup_rate()
error: uninitialized symbol 'be_rate'.

The warning highlights a case where `be_rate` could remain uninitialized
if `num_input_formats` is zero, which would cause undefined behavior
when setting `rate->min` and `rate->max` based on `be_rate`.

To address this issue, a `WARN_ON_ONCE(!num_input_formats)` check was
added to ensure `num_input_formats` is greater than zero. If this
condition fails, the function returns `-EINVAL`, preventing the use of
an uninitialized `be_rate`.

This change improves the robustness of the function by catching an
invalid state early and providing better feedback during development.

Signed-off-by: Suraj Sonawane <surajsonawane0215@gmail.com>
Link: https://patch.msgid.link/20241107063609.11627-1-surajsonawane0215@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-11 14:45:42 +00:00
Kuninori Morimoto
1bd775da9b
ASoC: add symmetric_ prefix for dai->rate/channels/sample_bits
snd_soc_dai has rate/channels/sample_bits parameter, but it is only valid
if symmetry is being enforced by symmetric_xxx flag on driver.

It is very difficult to know about it from current naming, and easy to
misunderstand it. add symmetric_ prefix for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87zfmd8bnf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-11 14:45:41 +00:00
Marek Vasut
725570f963
ASoC: max98088: Remove duplicate DACs
This codec only has one set of left and right DACs, remove the duplicate
DACs with duplicated bits controlling them as the userspace can set those
controls to mismatched value. This most likely does break userspace ABI,
but there seem to be no in-kernel users.

Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://patch.msgid.link/20241108235453.196289-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-11 11:47:09 +00:00
Deep Harsora
d859923fae
ASoC: intel: sof_sdw: add quirk for Dell SKU
This patch adds a quirk to include the codec amplifier function for this
Dell SKU.

Note: In this SKU '0CF1', the RT722 codec amplifier is
excluded, and an external amplifier is used instead.

Signed-off-by: Deep Harsora <deep_harsora@dell.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241111070618.5414-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-11 11:47:05 +00:00
John Watts
f8da001ae7
ASoC: audio-graph-card2: Purge absent supplies for device tree nodes
The audio graph card doesn't mark its subnodes such as multi {}, dpcm {}
and c2c {} as not requiring any suppliers. This causes a hang as Linux
waits for these phantom suppliers to show up on boot.
Make it clear these nodes have no suppliers.

Example error message:
[   15.208558] platform 2034000.i2s: deferred probe pending: platform: wait for supplier /sound/multi
[   15.208584] platform sound: deferred probe pending: asoc-audio-graph-card2: parse error

Signed-off-by: John Watts <contact@jookia.org>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20241108-graph_dt_fix-v1-1-173e2f9603d6@jookia.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-11 11:47:04 +00:00
Mark Brown
125d0f698a
ASoC: stm32: i2s: add stm32mp25 support
Merge series from Olivier Moysan <olivier.moysan@foss.st.com>:

Update STM32 I2S driver and binding to support STM32MP25 SoCs.
2024-11-09 01:49:05 +00:00
Mark Brown
b3ea5bec75
ASoC: stm32: sai: add stm32mp25 support
Merge series from Olivier Moysan <olivier.moysan@foss.st.com>:

Update STM32 SAI driver and binding to support STM32MP25 SoCs.
2024-11-09 01:48:58 +00:00
Mark Brown
79ef7a4cd6
ASoC: Intel: Fix Kconfig for ACPI=n
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Hi,

A recent attempt to fix a missing symbol when
CONFIG_SND_SOC_SDCA=m and CONFIG_SND_SOC_ACPI_INTEL_SDCA_QUIRKS=y
caused unmet direct dependency warning with randconig.

The reason is that SND_SOC_ACPI_INTEL_MATCH is needed to be compilable
even if ACPI is not selected, modules have dependency on exported
symbols from it.

The only solution for these kconfig dependencies seams to be to
only select SND_SOC_SDCA if ACPI is enabled  from
SND_SOC_ACPI_INTEL_SDCA_QUIRKS.

Regards,
Peter
---
Peter Ujfalusi (2):
  ASoC: Intel: Kconfig: Only select SND_SOC_SDCA if ACPI is enabled
  ASoC: Intel: Kconfig: Revert make SND_SOC_ACPI_INTEL_MATCH depend on
    ACPI

 sound/soc/intel/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--
2.47.0
2024-11-09 01:48:51 +00:00
Alexey Klimov
ed7bca5b2b
ASoC: qcom: sm8250: add handling of secondary MI2S clock
Add handling of clock related to secondary MI2S_RX in
sm8250_snd_startup().

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Link: https://patch.msgid.link/20241018025452.1362293-2-alexey.klimov@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-09 00:05:18 +00:00
Luo Yifan
eab936aa85 ALSA: ump: remove unnecessary check on blk
The unsigned expression 'blk' will never be negative, so remove the
unnecessary check.

Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241108032702.217168-1-luoyifan@cmss.chinamobile.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-11-08 15:07:33 +01:00