13 Jan, 2021

1 commit

  • commit c06ccf3ebb7503706ea49fd248e709287ef385a3 upstream.

    The calculation of in_cables and out_cables bitmaps are done with the
    bit shift by the value from the descriptor, which is an arbitrary
    value, and can lead to UBSAN shift-out-of-bounds warnings.

    Fix it by filtering the bad descriptor values with the check of the
    upper bound 0x10 (the cable bitmaps are 16 bits).

    Reported-by: syzbot+92e45ae45543f89e8c88@syzkaller.appspotmail.com
    Cc:
    Link: https://lore.kernel.org/r/20201223174557.10249-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

30 Dec, 2020

3 commits

  • commit 525d9c57d0eeeb660d9b25e5b2d1c95975e3ba95 upstream.

    ASUS PRIME TRX40 PRO-S mobo with 0b05:1918 needs the same quirk alias
    for another ASUS mobo (0b05:1917) for the proper mixer mapping, etc.
    Add the corresponding entry.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210783
    Cc:
    Link: https://lore.kernel.org/r/20201221080159.24468-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 9df28edce7c6ab38050235f6f8b43dd7ccd01b6d upstream.

    Some buggy firmware don't give the current sample rate but leaves
    zero. Handle this case more gracefully without warning but just skip
    the current rate verification from the next time.

    Cc:
    Link: https://lore.kernel.org/r/20201218145858.2357-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 725124d10d00b2f56bb5bd08b431cc74ab3b3ace upstream.

    Add VID to support native DSD reproduction on FiiO devices.

    Tested-by: Amadej Kastelic
    Signed-off-by: Emilio Moretti
    Signed-off-by: Amadej Kastelic
    Cc:
    Link: https://lore.kernel.org/r/X9j7wdXSr4XyK7Bd@ryzen.localdomain
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Amadej Kastelic
     

21 Dec, 2020

2 commits

  • commit c6dde8ffd071aea9d1ce64279178e470977b235c upstream.

    The current channel-map control implementation in USB-audio driver may
    lead to an error message like
    "control 3:0:0:Playback Channel Map:0: access overflow"
    when CONFIG_SND_CTL_VALIDATION is set. It's because the chmap get
    callback clears the whole array no matter which count is set, and
    rather the false-positive detection.

    This patch fixes the problem by clearing only the needed array range
    at usb_chmap_ctl_get().

    Cc:
    Link: https://lore.kernel.org/r/20201211130048.6358-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 43d5ca88dfcd35e43010fdd818e067aa9a55f5ba upstream.

    syzbot spotted a potential out-of-bounds shift in the USB-audio format
    parser that receives the arbitrary shift value from the USB
    descriptor.

    Add a range check for avoiding the undefined behavior.

    Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com
    Cc:
    Link: https://lore.kernel.org/r/20201209084552.17109-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

27 Nov, 2020

1 commit

  • The level meter control returns 34 integers of info. This fixes:

    snd-usb-audio 3-1:1.0: control 2:0:0:Level Meter:0: access overflow

    Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk")
    Cc: stable@vger.kernel.org
    Signed-off-by: Hector Martin
    Link: https://lore.kernel.org/r/20201127132635.18947-1-marcan@marcan.st
    Signed-off-by: Takashi Iwai

    Hector Martin
     

17 Nov, 2020

1 commit

  • Found one more Logitech device, BCC950 ConferenceCam, which needs
    the same delay here. This makes 3 out of 3 devices I have tried.

    Therefore, add a delay for all Logitech devices as it does not hurt.

    Signed-off-by: Joakim Tjernlund
    Cc: # 4.19.y, 5.4.y
    Link: https://lore.kernel.org/r/20201117122803.24310-1-joakim.tjernlund@infinera.com
    Signed-off-by: Takashi Iwai

    Joakim Tjernlund
     

16 Nov, 2020

1 commit


05 Nov, 2020

1 commit


04 Nov, 2020

2 commits


27 Oct, 2020

1 commit

  • The Zoom UAC-2 USB audio interface provides an async playback endpoint
    ("1 OUT (ASYNC)") and capture endpoint ("2 IN (ASYNC)"), both with
    2-channel S32_LE in 44.1, 48, 88.2, 96, 176.4, or 192
    kilosamples/s. The device provides explicit feedback to adjust the
    host's playback rate, but the feedback appears unstable and biased
    relative to the device's capture rate.

    "alsaloop -t 1000" experiences playback underruns and tries to
    resample the captured audio to match the varying playback
    rate. Forcing the kernel to use implicit feedback appears to
    produce more stable results. This causes the host to transmit one
    playback sample for each capture sample received. (Zoom North America
    has been notified of this change.)

    Signed-off-by: Keith Winstein
    Tested-by: Keith Winstein
    Cc:
    BugLink: https://lore.kernel.org/r/20201027071841.GA164525@trolley.csail.mit.edu
    Signed-off-by: Takashi Iwai

    Keith Winstein
     

24 Oct, 2020

1 commit


20 Oct, 2020

1 commit


16 Oct, 2020

1 commit

  • Pull sound updates from Takashi Iwai:
    "The amount of changes is smaller at this round (what a surprise), but
    lots of activity is seen. Most of changes are about ASoC driver
    development, especially Intel platforms. Here are some highlights:

    General:
    - Replace all tasklet usages with other alternatives
    - Cleanup of the ASoC error unwinding code
    - Fixes for trivial issues caught by static checker
    - Spell fixes allover the places

    ALSA Core:
    - Lockdep fix for control devices
    - Fix for potential OSS sequencer mutex stalls

    HD-audio and USB-audio:
    - SoundBlaster AE-7 support
    - Changes in quirk table for the rename handling
    - Quirks for HP and ASUS machines, Pioneer DJ DJM-250MK2.

    ASoC:
    - Lots of updates for Intel SOF and SoundWire enablement
    - Replacement of the DSP driver for some older x86 systems; the new
    code was written from scratch, better maintenance expected
    - Helpers for parsing auxiluary devices from the device tree
    - New support for AllWinner A64, Cirrus Logic CS4234, Mediatek MT6359
    Microchip S/PDIF TX and RX controllers, Realtek RT1015P, and Texas
    Instruments J721E, TAS2110, TAS2564 and TAS2764"

    * tag 'sound-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (498 commits)
    ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close
    ALSA: hda: fix jack detection with Realtek codecs when in D3
    ALSA: fireworks: use semicolons rather than commas to separate statements
    ALSA: hda: use semicolons rather than commas to separate statements
    ALSA: hda/i915 - fix list corruption with concurrent probes
    ASoC: dmaengine: Document support for TX only or RX only streams
    ASoC: mchp-spdiftx: remove 'TX' from playback stream name
    ASoC: ti: davinci-mcasp: Use &pdev->dev for early dev_warn
    ASoC: tas2764: Add the driver for the TAS2764
    dt-bindings: tas2764: Add the TAS2764 binding doc
    ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency
    ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled
    ASoC: stm32: dfsdm: add actual resolution trace
    ASoC: stm32: dfsdm: change rate limits
    ASoC: qcom: sc7180: Add support for audio over DP
    Asoc: qcom: lpass-platform : Increase buffer size
    ASoC: qcom: Add support for lpass hdmi driver
    Asoc: qcom: lpass:Update lpaif_dmactl members order
    Asoc:qcom:lpass-cpu:Update dts property read API
    ASoC: dt-bindings: Add dt binding for lpass hdmi
    ...

    Linus Torvalds
     

12 Oct, 2020

1 commit


07 Oct, 2020

1 commit


05 Oct, 2020

1 commit


02 Oct, 2020

1 commit


25 Sep, 2020

8 commits

  • The usb_control_msg_send() call can return an error if a "short" write
    happens, so move the driver over to using that call instead.

    v2: API change of use usb_control_msg_send()

    Cc: Jaroslav Kysela
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200914153756.3412156-10-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman
    Link: https://lore.kernel.org/r/20200923134348.23862-14-oneukum@suse.com
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The usb_control_msg_send() and usb_control_msg_recv() calls can return
    an error if a "short" write/read happens, and they can handle data off
    of the stack, so move the driver over to using those calls instead,
    saving some logic when dynamically allocating memory.

    v2: API change of use usb_control_msg_send() and usb_control_msg_recv()

    Cc: Jaroslav Kysela
    Cc: Vasily Khoruzhick
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200914153756.3412156-9-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman
    Link: https://lore.kernel.org/r/20200923134348.23862-13-oneukum@suse.com
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The usb_control_msg_send() and usb_control_msg_recv() calls can return
    an error if a "short" write/read happens, so move the driver over to
    using those calls instead, saving some logic in the wrapper functions
    that were being used in this driver.

    This also resolves a long-staging bug where data on the stack was being
    sent in a USB control message, which was not allowed.

    v2: API change of usb_control_msg_send()

    Cc: Jaroslav Kysela
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200914153756.3412156-8-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman
    Link: https://lore.kernel.org/r/20200923134348.23862-11-oneukum@suse.com
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The usb_control_msg_send() call can handle data on the stack, as well as
    returning an error if a "short" write happens, so move the driver over
    to using that call instead. This ends up removing a helper function
    that is no longer needed.

    v2: API change in usb_control_msg_send()

    Cc: Jaroslav Kysela
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200914153756.3412156-7-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman
    Link: https://lore.kernel.org/r/20200923134348.23862-10-oneukum@suse.com
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This reverts commit ec8eeceb06b7a6efb6d924fd2f4ba4ec79ddc7bf.
    The API has to be changed.

    Signed-off-by: Oliver Neukum
    Link: https://lore.kernel.org/r/20200923134348.23862-7-oneukum@suse.com
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • This reverts commit aea67cc1418252d07b9b56688f1b5fa70fcae813.
    The API has to be changed.

    Signed-off-by: Oliver Neukum
    Link: https://lore.kernel.org/r/20200923134348.23862-6-oneukum@suse.com
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • This reverts commit f7ef7614f89e943d7511ee121b0b849f27b60cb2.
    The API has to be changed.
    Signed-off-by: Oliver Neukum
    Link: https://lore.kernel.org/r/20200923134348.23862-5-oneukum@suse.com
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • This reverts commit 119ae38a5cdfbefdf926b34fbf65cd60dc82c95e.
    The API has to be changed.

    Signed-off-by: Oliver Neukum
    Link: https://lore.kernel.org/r/20200923134348.23862-4-oneukum@suse.com
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     

23 Sep, 2020

1 commit


22 Sep, 2020

1 commit

  • This reverts commit 34dedd2a83b241ba6aeb290260313c65dc58660e.

    According to Realtek, volume FU works for line-in.

    I can confirm volume control works after device firmware is updated.

    Fixes: 34dedd2a83b2 ("ALSA: usb-audio: Disable Lenovo P620 Rear line-in volume control")
    Signed-off-by: Kai-Heng Feng
    Link: https://lore.kernel.org/r/20200915103925.12777-1-kai.heng.feng@canonical.com
    Signed-off-by: Takashi Iwai

    Kai-Heng Feng
     

21 Sep, 2020

1 commit


16 Sep, 2020

6 commits

  • A USB device will always haev a bi-directional endpoint 0, that's just
    how the devices work, so no need to check for that in a few quirk tests
    as it will always pass.

    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Alexander Tsoy
    Reported-by: Alan Stern
    Link: https://lore.kernel.org/r/20200914153756.3412156-12-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The usb_control_msg_send() call can return an error if a "short" write
    happens, so move the driver over to using that call instead.

    Cc: Jaroslav Kysela
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200914153756.3412156-10-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The usb_control_msg_send() and usb_control_msg_recv() calls can return
    an error if a "short" write/read happens, and they can handle data off
    of the stack, so move the driver over to using those calls instead,
    saving some logic when dynamically allocating memory.

    Cc: Jaroslav Kysela
    Cc: Vasily Khoruzhick
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200914153756.3412156-9-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The usb_control_msg_send() and usb_control_msg_recv() calls can return
    an error if a "short" write/read happens, so move the driver over to
    using those calls instead, saving some logic in the wrapper functions
    that were being used in this driver.

    This also resolves a long-staging bug where data on the stack was being
    sent in a USB control message, which was not allowed.

    Cc: Jaroslav Kysela
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200914153756.3412156-8-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The usb_control_msg_send() call can handle data on the stack, as well as
    returning an error if a "short" write happens, so move the driver over
    to using that call instead. This ends up removing a helper function
    that is no longer needed.

    Cc: Jaroslav Kysela
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200914153756.3412156-7-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • snd_usb_pipe_sanity_check() is a great function, so let's move it into
    the USB core so that other parts of the kernel, including the USB core,
    can call it.

    Name it usb_pipe_type_check() to match the existing
    usb_urb_ep_type_check() call, which now uses this function.

    Cc: Jaroslav Kysela
    Cc: "Gustavo A. R. Silva"
    Cc: Eli Billauer
    Cc: Emiliano Ingrassia
    Cc: Alan Stern
    Cc: Alexander Tsoy
    Cc: "Geoffrey D. Bennett"
    Cc: Jussi Laako
    Cc: Nick Kossifidis
    Cc: Dmitry Panchenko
    Cc: Chris Wulff
    Cc: Jesus Ramos
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200914153756.3412156-2-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

10 Sep, 2020

3 commits

  • The tasklet is an old API that should be deprecated, usually can be
    converted to another decent API. In UA101 driver, a tasklet is still
    used for handling the output URBs. It can be achieved gracefully with
    a work queued in the high-prio system workqueue, too.

    This patch replaces the tasklet usage in UA101 driver with a simple
    work.

    Link: https://lore.kernel.org/r/20200903104131.21097-5-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The tasklet is an old API that should be deprecated, usually can be
    converted to another decent API. In USB-audio driver, a tasklet is
    still used in MIDI interface code for handling the output byte
    stream. It can be achieved gracefully with a work queued in the
    high-prio system workqueue.

    This patch replaces the tasklet usage in USB-audio driver with a
    simple work.

    Link: https://lore.kernel.org/r/20200903104131.21097-4-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Back-merge to apply the tasklet conversion patches that are based
    on the already applied tasklet API changes on 5.9-rc4.

    Signed-off-by: Takashi Iwai

    Takashi Iwai