Skip to content
  1. Jun 19, 2023
  2. Jun 16, 2023
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v6.4-rc6-2' of... · 227d2c31
      Takashi Iwai authored
      Merge tag 'asoc-fix-v6.4-rc6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v6.4
      
      A couple more fixes for v6.4, one fixing a misleading error log and
      another stopping us seeing spurious failures setting the master volume
      on some Tegra systems introduced by a change to how we calculate delay
      times.
      227d2c31
    • Lukasz Tyl's avatar
      ALSA: usb-audio: Add quirk flag for HEM devices to enable native DSD playback · 122e2cb7
      Lukasz Tyl authored
      
      
      This commit adds new DEVICE_FLG with QUIRK_FLAG_DSD_RAW and Vendor Id for
      HEM devices which supports native DSD. Prior to this change Linux kernel
      was not enabling native DSD playback for HEM devices, and as a result,
      DSD audio was being converted to PCM "on the fly". HEM devices,
      when connected to the system, would only play audio in PCM format,
      even if the source material was in DSD format. With the addition of new
      VENDOR_FLG in the quircks.c file, the devices are now correctly
      recognized, and raw DSD data is transmitted to the device,
      allowing for native DSD playback.
      
      Signed-off-by: default avatarLukasz Tyl <ltyl@hem-e.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20230614122524.30271-1-ltyl@hem-e.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      122e2cb7
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix broken resume due to UAC3 power state · 8ba61c9f
      Takashi Iwai authored
      As reported in the bugzilla below, the PM resume of a UAC3 device may
      fail due to the incomplete power state change, stuck at D1.  The
      reason is that the driver expects the full D0 power state change only
      at hw_params, while the normal PCM resume procedure doesn't call
      hw_params.
      
      For fixing the bug, we add the same power state update to D0 at the
      prepare callback, which is certainly called by the resume procedure.
      
      Note that, with this change, the power state change in the hw_params
      becomes almost redundant, since snd_usb_hw_params() doesn't touch the
      parameters (at least it tires so).  But dropping it is still a bit
      risky (e.g. we have the media-driver binding), so I leave the D0 power
      state change in snd_usb_hw_params() as is for now.
      
      Fixes: a0a4959e
      
       ("ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks")
      Cc: <stable@vger.kernel.org>
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=217539
      Link: https://lore.kernel.org/r/20230612132818.29486-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8ba61c9f
    • Takashi Iwai's avatar
      ALSA: seq: oss: Fix racy open/close of MIDI devices · 297224fc
      Takashi Iwai authored
      
      
      Although snd_seq_oss_midi_open() and snd_seq_oss_midi_close() can be
      called concurrently from different code paths, we have no proper data
      protection against races.  Introduce open_mutex to each seq_oss_midi
      object for avoiding the races.
      
      Reported-by: default avatar"Gong, Sishuai" <sishuai@purdue.edu>
      Closes: https://lore.kernel.org/r/7DC9AF71-F481-4ABA-955F-76C535661E33@purdue.edu
      Link: https://lore.kernel.org/r/20230612125533.27461-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      297224fc
  3. Jun 13, 2023
    • Jon Hunter's avatar
      ASoC: tegra: Fix Master Volume Control · f9fd804a
      Jon Hunter authored
      Commit 3ed2b549 ("ALSA: pcm: fix wait_time calculations") corrected
      the PCM wait_time calculations and in doing so reduced the calculated
      wait_time. This exposed an issue with the Tegra Master Volume Control
      (MVC) device where the reduced wait_time caused the MVC to fail. For now
      fix this by setting the default wait_time for Tegra to be 500ms.
      
      Fixes: 3ed2b549
      
       ("ALSA: pcm: fix wait_time calculations")
      Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Link: https://lore.kernel.org/r/20230613093453.13927-1-jonathanh@nvidia.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      f9fd804a
  4. Jun 10, 2023
  5. Jun 06, 2023
  6. Jun 05, 2023
  7. Jun 02, 2023
    • Chancel Liu's avatar
      ASoC: fsl_sai: Enable BCI bit if SAI works on synchronous mode with BYP asserted · 32cf0046
      Chancel Liu authored
      
      
      There's an issue on SAI synchronous mode that TX/RX side can't get BCLK
      from RX/TX it sync with if BYP bit is asserted. It's a workaround to
      fix it that enable SION of IOMUX pad control and assert BCI.
      
      For example if TX sync with RX which means both TX and RX are using clk
      form RX and BYP=1. TX can get BCLK only if the following two conditions
      are valid:
      1. SION of RX BCLK IOMUX pad is set to 1
      2. BCI of TX is set to 1
      
      Signed-off-by: default avatarChancel Liu <chancel.liu@nxp.com>
      Acked-by: default avatarShengjiu Wang <shengjiu.wang@gmail.com>
      Link: https://lore.kernel.org/r/20230530103012.3448838-1-chancel.liu@nxp.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      32cf0046
    • Robert Hancock's avatar
      ASoC: simple-card-utils: fix PCM constraint error check · 635071f5
      Robert Hancock authored
      The code in asoc_simple_startup was treating any non-zero return from
      snd_pcm_hw_constraint_minmax as an error, when this can return 1 in some
      normal cases and only negative values indicate an error.
      
      When this happened, it caused asoc_simple_startup to disable the clocks
      it just enabled and return 1, which was not treated as an error by the
      calling code which only checks for negative return values. Then when the
      PCM is eventually shut down, it causes the clock framework to complain
      about disabling clocks that were not enabled.
      
      Fix the check for snd_pcm_hw_constraint_minmax return value to only
      treat negative values as an error.
      
      Fixes: 5ca2ab45
      
       ("ASoC: simple-card-utils: Add new system-clock-fixed flag")
      Signed-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
      Link: https://lore.kernel.org/r/20230602011936.231931-1-robert.hancock@calian.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      635071f5
  8. Jun 01, 2023
  9. May 31, 2023
  10. May 30, 2023
  11. May 26, 2023
  12. May 24, 2023
    • Bin Li's avatar
      ALSA: hda/realtek: Enable headset onLenovo M70/M90 · 4ca110ca
      Bin Li authored
      
      
      Lenovo M70/M90 Gen4 are equipped with ALC897, and they need
      ALC897_FIXUP_HEADSET_MIC_PIN quirk to make its headset mic work.
      The previous quirk for M70/M90 is for Gen3.
      
      Signed-off-by: default avatarBin Li <bin.li@canonical.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20230524113755.1346928-1-bin.li@canonical.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4ca110ca
    • Srinivas Kandagatla's avatar
      ASoC: codecs: wcd938x-sdw: do not set can_multi_write flag · 2d7c2f92
      Srinivas Kandagatla authored
      
      
      regmap-sdw does not support multi register writes, so there is
      no point in setting this flag. This also leads to incorrect
      programming of WSA codecs with regmap_multi_reg_write() call.
      
      This invalid configuration should have been rejected by regmap-sdw.
      
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Link: https://lore.kernel.org/r/20230523165414.14560-1-srinivas.kandagatla@linaro.org
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      2d7c2f92
    • Srinivas Kandagatla's avatar
      ASoC: codecs: wsa881x: do not set can_multi_write flag · 6e7a6d47
      Srinivas Kandagatla authored
      regmap-sdw does not support multi register writes, so there is
      no point in setting this flag. This also leads to incorrect
      programming of WSA codecs with regmap_multi_reg_write() call.
      
      This invalid configuration should have been rejected by regmap-sdw.
      
      Fixes: a0aab9e1
      
       ("ASoC: codecs: add wsa881x amplifier support")
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Link: https://lore.kernel.org/r/20230523154605.4284-2-srinivas.kandagatla@linaro.org
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      6e7a6d47
    • Srinivas Kandagatla's avatar
      ASoC: codecs: wsa883x: do not set can_multi_write flag · 40ba0411
      Srinivas Kandagatla authored
      regmap-sdw does not support multi register writes, so there is
      no point in setting this flag. This also leads to incorrect
      programming of WSA codecs with regmap_multi_reg_write() call.
      
      This invalid configuration should have been rejected by regmap-sdw.
      
      Fixes: 43b8c7dc
      
       ("ASoC: codecs: add wsa883x amplifier support")
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Link: https://lore.kernel.org/r/20230523154605.4284-1-srinivas.kandagatla@linaro.org
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      40ba0411
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v6.4-rc3' of... · bac4d822
      Takashi Iwai authored
      Merge tag 'asoc-fix-v6.4-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v6.4
      
      A collection of fixes for v6.4, mostly driver specific but there's also
      one fix for DPCM to avoid incorrectly repeated calls to prepare() which
      can trigger issues on some systems.
      bac4d822
    • Maxim Kochetkov's avatar
      ASoC: dwc: move DMA init to snd_soc_dai_driver probe() · 011a8719
      Maxim Kochetkov authored
      
      
      When using DMA mode we are facing with Oops:
      [  396.458157] Unable to handle kernel access to user memory without uaccess routines at virtual address 000000000000000c
      [  396.469374] Oops [#1]
      [  396.471839] Modules linked in:
      [  396.475144] CPU: 0 PID: 114 Comm: arecord Not tainted 6.0.0-00164-g9a8eccdaf2be-dirty #68
      [  396.483619] Hardware name: YMP ELCT FPGA (DT)
      [  396.488156] epc : dmaengine_pcm_open+0x1d2/0x342
      [  396.493227]  ra : dmaengine_pcm_open+0x1d2/0x342
      [  396.498140] epc : ffffffff807fe346 ra : ffffffff807fe346 sp : ffffffc804e138f0
      [  396.505602]  gp : ffffffff817bf730 tp : ffffffd8042c8ac0 t0 : 6500000000000000
      [  396.513045]  t1 : 0000000000000064 t2 : 656e69676e65616d s0 : ffffffc804e13990
      [  396.520477]  s1 : ffffffd801b86a18 a0 : 0000000000000026 a1 : ffffffff816920f8
      [  396.527897]  a2 : 0000000000000010 a3 : fffffffffffffffe a4 : 0000000000000000
      [  396.535319]  a5 : 0000000000000000 a6 : ffffffd801b87040 a7 : 0000000000000038
      [  396.542740]  s2 : ffffffd801b94a00 s3 : 0000000000000000 s4 : ffffffd80427f5e8
      [  396.550153]  s5 : ffffffd80427f5e8 s6 : ffffffd801b44410 s7 : fffffffffffffff5
      [  396.557569]  s8 : 0000000000000800 s9 : 0000000000000001 s10: ffffffff8066d254
      [  396.564978]  s11: ffffffd8059cf768 t3 : ffffffff817d5577 t4 : ffffffff817d5577
      [  396.572391]  t5 : ffffffff817d5578 t6 : ffffffc804e136e8
      [  396.577876] status: 0000000200000120 badaddr: 000000000000000c cause: 000000000000000d
      [  396.586007] [<ffffffff806839f4>] snd_soc_component_open+0x1a/0x68
      [  396.592439] [<ffffffff807fdd62>] __soc_pcm_open+0xf0/0x502
      [  396.598217] [<ffffffff80685d86>] soc_pcm_open+0x2e/0x4e
      [  396.603741] [<ffffffff8066cea4>] snd_pcm_open_substream+0x442/0x68e
      [  396.610313] [<ffffffff8066d1ea>] snd_pcm_open+0xfa/0x212
      [  396.615868] [<ffffffff8066d39c>] snd_pcm_capture_open+0x3a/0x60
      [  396.622048] [<ffffffff8065b35a>] snd_open+0xa8/0x17a
      [  396.627421] [<ffffffff801ae036>] chrdev_open+0xa0/0x218
      [  396.632893] [<ffffffff801a5a28>] do_dentry_open+0x17c/0x2a6
      [  396.638713] [<ffffffff801a6d9a>] vfs_open+0x1e/0x26
      [  396.643850] [<ffffffff801b8544>] path_openat+0x96e/0xc96
      [  396.649518] [<ffffffff801b9390>] do_filp_open+0x7c/0xf6
      [  396.655034] [<ffffffff801a6ff2>] do_sys_openat2+0x8a/0x11e
      [  396.660765] [<ffffffff801a735a>] sys_openat+0x50/0x7c
      [  396.666068] [<ffffffff80003aca>] ret_from_syscall+0x0/0x2
      [  396.674964] ---[ end trace 0000000000000000 ]---
      
      It happens because of play_dma_data/capture_dma_data pointers are NULL.
      Current implementation assigns these pointers at snd_soc_dai_driver
      startup() callback and reset them back to NULL at shutdown(). But
      soc_pcm_open() sequence uses DMA pointers in dmaengine_pcm_open()
      before snd_soc_dai_driver startup().
      Most generic DMA capable I2S drivers use snd_soc_dai_driver probe()
      callback to init DMA pointers only once at probe. So move DMA init
      to dw_i2s_dai_probe and drop shutdown() and startup() callbacks.
      
      Signed-off-by: default avatarMaxim Kochetkov <fido_max@inbox.ru>
      Link: https://lore.kernel.org/r/20230512110343.66664-1-fido_max@inbox.ru
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      011a8719
    • Stefan Binding's avatar
      ASoC: cs35l41: Fix default regmap values for some registers · e2d035f5
      Stefan Binding authored
      
      
      Several values do not match the defaults of CS35L41, fix them.
      
      Signed-off-by: default avatarStefan Binding <sbinding@opensource.cirrus.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Link: https://lore.kernel.org/r/20230414152552.574502-4-sbinding@opensource.cirrus.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      e2d035f5