Skip to content
  1. Mar 26, 2020
  2. Mar 24, 2020
  3. Mar 15, 2020
  4. Mar 13, 2020
    • Takashi Iwai's avatar
      ALSA: hda: Use scnprintf() for string truncation · 0a7efa14
      Takashi Iwai authored
      
      
      snd_hdac_codec_modalias() truncates the string to the given size and
      returns its size, but it returned a wrong size from snprintf().
      snprintf() returns the would-be-output size, not the actual size.
      Use scnprintf() instead to return the correct size.
      
      Link: https://lore.kernel.org/r/20200313130241.8970-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0a7efa14
    • Takashi Iwai's avatar
      ALSA: pcm: Fix superfluous snprintf() usage · 296a37fd
      Takashi Iwai authored
      
      
      show_pcm_class() returns obviously a short string that can't overflow
      PAGE_SIZE.  And even if it were to overflow, using snprintf() there is
      just wrong, as it doesn't return the correct size.
      So simplify with sprintf() instead.
      
      Link: https://lore.kernel.org/r/20200313130223.8908-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      296a37fd
  5. Mar 11, 2020
  6. Mar 10, 2020
  7. Mar 09, 2020
    • Takashi Iwai's avatar
      ALSA: line6: Fix endless MIDI read loop · d683469b
      Takashi Iwai authored
      
      
      The MIDI input event parser of the LINE6 driver may enter into an
      endless loop when the unexpected data sequence is given, as it tries
      to continue the secondary bytes without termination.  Also, when the
      input data is too short, the parser returns a negative error, while
      the caller doesn't handle it properly.  This would lead to the
      unexpected behavior as well.
      
      This patch addresses those issues by checking the return value
      correctly and handling the one-byte event in the parser properly.
      
      The bug was reported by syzkaller.
      
      Reported-by: default avatar <syzbot+cce32521ee0a824c21f7@syzkaller.appspotmail.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/000000000000033087059f8f8fa3@google.com
      Link: https://lore.kernel.org/r/20200309095922.30269-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d683469b
    • Takashi Iwai's avatar
      ALSA: pcm: oss: Avoid plugin buffer overflow · f2ecf903
      Takashi Iwai authored
      
      
      Each OSS PCM plugins allocate its internal buffer per pre-calculation
      of the max buffer size through the chain of plugins (calling
      src_frames and dst_frames callbacks).  This works for most plugins,
      but the rate plugin might behave incorrectly.  The calculation in the
      rate plugin involves with the fractional position, i.e. it may vary
      depending on the input position.  Since the buffer size
      pre-calculation is always done with the offset zero, it may return a
      shorter size than it might be; this may result in the out-of-bound
      access as spotted by fuzzer.
      
      This patch addresses those possible buffer overflow accesses by simply
      setting the upper limit per the given buffer size for each plugin
      before src_frames() and after dst_frames() calls.
      
      Reported-by: default avatar <syzbot+e1fe9f44fb8ecf4fb5dd@syzkaller.appspotmail.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/000000000000b25ea005a02bcf21@google.com
      Link: https://lore.kernel.org/r/20200309082148.19855-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f2ecf903
  8. Mar 07, 2020
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v5.6-rc4' of... · 5a56996b
      Takashi Iwai authored
      Merge tag 'asoc-fix-v5.6-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v5.6
      
      More fixes that have arrived since the merge window, spread out all
      over.  There's a few things like the operation callback addition for
      rt1015 and the meson reset addition which add small new bits of
      functionality to fix non-working systems, they're all very small and for
      parts of newly added functionality.
      5a56996b
  9. Mar 06, 2020
    • Takashi Sakamoto's avatar
      ALSA: firewire: use KBUILD_MODNAME for struct driver.name instead of string · 9c0d16ac
      Takashi Sakamoto authored
      
      
      KBUILD_MODNAME is available to name kernel modules according to its object
      name. This commit uses the macro instead of string for name field of
      struct driver since drivers in ALSA firewire stack have the same name of
      each object name.
      
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Link: https://lore.kernel.org/r/20200306135229.11659-1-o-takashi@sakamocchi.jp
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9c0d16ac
    • Thomas Bogendoerfer's avatar
      ALSA: sgio2audio: Remove usage of dropped hw_params/hw_free functions · 95dbf14b
      Thomas Bogendoerfer authored
      Commit ee88f4eb ("ALSA: mips: Use managed buffer allocation") removed
      superfluous hw_params/hw_free callbacks, but forgot to remove them where
      they were used.
      
      Fixes: ee88f4eb
      
       ("ALSA: mips: Use managed buffer allocation")
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      Link: https://lore.kernel.org/r/20200306105837.31523-1-tsbogend@alpha.franken.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      95dbf14b
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix missing braces in some struct inits · d0ee674b
      Takashi Iwai authored
      
      
      The struct s1810c_state_packet contains the array in the first field
      hence zero-initialization requires a more couple of braces.  Fix the
      compile warning pointing it out:
         sound/usb/mixer_s1810c.c: In function 'snd_sc1810c_get_status_field':
         sound/usb/mixer_s1810c.c:178:9: warning: missing braces around initializer [-Wmissing-braces]
      
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Fixes: 8dc5efe3
      
       ("ALSA: usb-audio: Add support for Presonus Studio 1810c")
      Link: https://lore.kernel.org/r/202002210251.WgMfvKJP%lkp@intel.com
      Link: https://lore.kernel.org/r/20200306081231.7940-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d0ee674b
    • Alexander Tsoy's avatar
      ALSA: usb-audio: Add support for MOTU MicroBook IIc · 2edb84e3
      Alexander Tsoy authored
      
      
      MicroBook IIc operates in UAC2 mode by default. This patch addresses
      several issues with it:
      
      - MicroBook II and IIc shares the same USB ID. We can distinguish them
        by interface class.
      - MaxPacketsOnly attribute is erroneously set in endpoint descriptors.
        As a result this card produces noise with all sample rates other than
        96 KHz. This also causes issues like IOMMU page faults and other
        problems with host controller.
      - Sample rate changes takes more than 2 seconds for this device. Clock
        validity request returns false during that period, so the clock validity
        quirk is required.
      
      Signed-off-by: default avatarAlexander Tsoy <alexander@tsoy.me>
      Link: https://lore.kernel.org/r/20200229151815.14199-1-alexander@tsoy.me
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2edb84e3
    • Randy Dunlap's avatar
      ALSA: korg1212: fix if-statement empty body warnings · 66db2958
      Randy Dunlap authored
      
      
      Fix gcc warnings when -Wextra is used by using an empty do-while
      block instead of <nothing>.  Fixes these build warnings:
      
      ../sound/pci/korg1212/korg1212.c:674:44: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:708:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:730:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:853:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1013:44: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1035:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1052:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1066:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1087:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1094:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1208:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:2360:102: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Link: https://lore.kernel.org/r/91fb1e97-a773-5790-3f65-8198403341e1@infradead.org
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      66db2958
  10. Mar 05, 2020
  11. Mar 04, 2020
    • Olivier Moysan's avatar
      ASoC: stm32: sai: manage rebind issue · 0d6defc7
      Olivier Moysan authored
      The commit e894efef
      
       ("ASoC: core: add support to card rebind")
      allows to rebind the sound card after a rebind of one of its component.
      With this commit, the sound card is actually rebound,
      but may be no more functional. The following problems have been seen
      with STM32 SAI driver.
      
      1) DMA channel is not requested:
      
      With the sound card rebind the simplified call sequence is:
      stm32_sai_sub_probe
      	snd_soc_register_component
      		snd_soc_try_rebind_card
      			snd_soc_instantiate_card
      	devm_snd_dmaengine_pcm_register
      
      The problem occurs because the pcm must be registered,
      before snd_soc_instantiate_card() is called.
      
      Modify SAI driver, to change the call sequence as follows:
      stm32_sai_sub_probe
      	devm_snd_dmaengine_pcm_register
      	snd_soc_register_component
      		snd_soc_try_rebind_card
      
      2) DMA channel is not released:
      
      dma_release_channel() is not called when
      devm_dmaengine_pcm_release() is executed.
      This occurs because SND_DMAENGINE_PCM_DRV_NAME component,
      has already been released through devm_component_release().
      
      devm_dmaengine_pcm_release() should be called before
      devm_component_release() to avoid this problem.
      
      Call snd_dmaengine_pcm_unregister() and snd_soc_unregister_component()
      explicitly from SAI driver, to have the right sequence.
      
      Signed-off-by: default avatarOlivier Moysan <olivier.moysan@st.com>
      Message-Id: <20200304102406.8093-1-olivier.moysan@st.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0d6defc7
  12. Mar 03, 2020
  13. Mar 02, 2020
  14. Feb 29, 2020
  15. Feb 27, 2020
  16. Feb 25, 2020
  17. Feb 21, 2020
  18. Feb 20, 2020
  19. Feb 19, 2020