01 Oct, 2020

3 commits

  • commit 315c7ad7a701baba28c628c4c5426b3d9617ceed upstream.

    Needs the same delay as H650e

    Signed-off-by: Joakim Tjernlund
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200910085328.19188-1-joakim.tjernlund@infinera.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Joakim Tjernlund
     
  • [ Upstream commit 5c6cd7021a05a02fcf37f360592d7c18d4d807fb ]

    The Miditech MIDIFACE 16x16 (USB ID 1290:1749) has more than one extra
    endpoint descriptor.

    The first extra descriptor is: 0x06 0x30 0x00 0x00 0x00 0x00

    As the code in snd_usbmidi_get_ms_info() looks only at the
    first extra descriptor to find USB_DT_CS_ENDPOINT the device
    as such is recognized but there is neither input nor output
    configured.

    The patch iterates through the extra descriptors to find the
    proper one. With this patch the device is correctly configured.

    Signed-off-by: Andreas Steinmetz
    Link: https://lore.kernel.org/r/1c3b431a86f69e1d60745b6110cdb93c299f120b.camel@domdv.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Andreas Steinmetz
     
  • [ Upstream commit e9a0ef0b5ddcbc0d56c65aefc0f18d16e6f71207 ]

    Some USB-audio descriptors provide a bogus volume range (e.g. volume
    min and max are identical), which confuses user-space.
    This patch makes the driver skipping such a control element.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206221
    Link: https://lore.kernel.org/r/20200214144928.23628-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Takashi Iwai
     

10 Sep, 2020

1 commit

  • commit 7c5b892e0871655fea3294ffac6fa3cc3400b60d upstream.

    This uses the same quirk as the Motu and SSL2 devices.
    Tested on the UR22C.

    Fixes bug 208851.

    Signed-off-by: Joshua Sivec
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208851
    Cc:
    Link: https://lore.kernel.org/r/20200825165515.8239-1-sivec@posteo.net
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Joshua Sivec
     

03 Sep, 2020

2 commits

  • commit 74a2a7de81a2ef20732ec02087314e92692a7a1b upstream.

    As the recent fix addressed the channel swap problem more properly,
    update the comment as well.

    Fixes: 1b7ecc241a67 ("ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109")
    Signed-off-by: Hector Martin
    Link: https://lore.kernel.org/r/20200816084431.102151-1-marcan@marcan.st
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hector Martin
     
  • [ Upstream commit 470757f5b3a46bd85741bb0d8c1fd3f21048a2af ]

    Capture and playback endpoints on Saffire 6 (USB 1.1) resides on the same
    interface. This was not supported by the composite quirk back in the day
    when initial support for this device was added, thus only playback was
    enabled until now.

    Fixes: 11e424e88bd4 ("ALSA: usb-audio: Add support for Focusrite Saffire 6 USB")
    Signed-off-by: Alexander Tsoy
    Cc:
    Link: https://lore.kernel.org/r/20200815002103.29247-1-alexander@tsoy.me
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Alexander Tsoy
     

19 Aug, 2020

4 commits

  • commit 6e8596172ee1cd46ec0bfd5adcf4ff86371478b6 upstream.

    This is just another Pioneer device with fixed endpoints. Input is dummy
    but used as feedback (it always returns silence).

    Cc: stable@vger.kernel.org
    Signed-off-by: Hector Martin
    Link: https://lore.kernel.org/r/20200810082502.225979-1-marcan@marcan.st
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hector Martin
     
  • commit 1b7ecc241a67ad6b584e071bd791a54e0cd5f097 upstream.

    Further investigation of the L-R swap problem on the MS2109 reveals that
    the problem isn't that the channels are swapped, but rather that they
    are swapped and also out of phase by one sample. In other words, the
    issue is actually that the very first frame that comes from the hardware
    is a half-frame containing only the right channel, and after that
    everything becomes offset.

    So introduce a new quirk field to drop the very first 2 bytes that come
    in after the format is configured and a capture stream starts. This puts
    the channels in phase and in the correct order.

    Cc: stable@vger.kernel.org
    Signed-off-by: Hector Martin
    Link: https://lore.kernel.org/r/20200810082400.225858-1-marcan@marcan.st
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hector Martin
     
  • commit 14a720dc1f5332f3bdf30a23a3bc549e81be974c upstream.

    Matching by device matches all interfaces, which breaks the video/HID
    portions of the device depending on module load order.

    Fixes: e337bf19f6af ("ALSA: usb-audio: add quirk for MacroSilicon MS2109")
    Cc: stable@vger.kernel.org
    Signed-off-by: Hector Martin
    Link: https://lore.kernel.org/r/20200810045319.128745-1-marcan@marcan.st
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hector Martin
     
  • commit fec9008828cde0076aae595ac031bfcf49d335a4 upstream.

    Adds an entry for Creative USB X-Fi to the rc_config array in
    mixer_quirks.c to allow use of volume knob on the device.
    Adds support for newer X-Fi Pro card, known as "Model No. SB1095"
    with USB ID "041e:3263"

    Signed-off-by: Mirko Dietrich
    Cc:
    Link: https://lore.kernel.org/r/20200806124850.20334-1-buzz@l4m1.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Mirko Dietrich
     

05 Aug, 2020

1 commit

  • commit 3da87ec67a491b9633a82045896c076b794bf938 upstream.

    As expected, this requires the same quirk as the SSL2+ in order for the
    clock to sync. This was suggested by, and tested on an SSL2, by Dmitry.

    Suggested-by: Dmitry
    Signed-off-by: Laurence Tratt
    Cc:
    Link: https://lore.kernel.org/r/20200621075005.52mjjfc6dtdjnr3h@overdrive.tratt.net
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Laurence Tratt
     

22 Jul, 2020

9 commits

  • commit 9b7e5208a941e2e491a83eb5fa83d889e888fa2f upstream.

    USB MIDI driver has an error recovery mechanism to resubmit the URB in
    the delayed timer handler, and this may race with the standard start /
    stop operations. Although both start and stop operations themselves
    don't race with each other due to the umidi->mutex protection, but
    this isn't applied to the timer handler.

    For fixing this potential race, the following changes are applied:

    - Since the timer handler can't use the mutex, we apply the
    umidi->disc_lock protection at each input stream URB submission;
    this also needs to change the GFP flag to GFP_ATOMIC
    - Add a check of the URB refcount and skip if already submitted
    - Move the timer cancel call at disconnection to the beginning of the
    procedure; this assures the in-flight timer handler is gone properly
    before killing all pending URBs

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

    Takashi Iwai
     
  • commit 68359a1ad8447c99732ebeab8c169bfed543667a upstream.

    Recently syzkaller reported a UAF in LINE6 driver, and it's likely
    because we call cancel_delayed_work() at the disconnect callback
    instead of cancel_delayed_work_sync(). Let's use the correct one
    instead.

    Reported-by: syzbot+145012a46658ac00fc9e@syzkaller.appspotmail.com
    Suggested-by: Alan Stern
    Cc:
    Link: https://lore.kernel.org/r/s5hlfjr4gio.wl-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 6e8a914ad619042c5f25a4feb663357c4170fd8d upstream.

    LINE6 drivers create stream URBs with a fixed pipe without checking
    its validity, and this may lead to a kernel WARNING at the submission
    when a malformed USB descriptor is passed.

    For avoiding the kernel warning, perform the similar sanity checks for
    each pipe type at creating a URB.

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

    Takashi Iwai
     
  • [ Upstream commit 73094608b8e214952444fb104651704c98a37aeb ]

    Similar to the Kingston HyperX AMP, the Kingston HyperX Cloud
    Alpha S (0951:0x16ea) uses two interfaces, but only the second
    interface contains the capture stream. This patch delays the
    registration until the second interface appears.

    Signed-off-by: Christoffer Nielsen
    Cc:
    Link: https://lore.kernel.org/r/CAOtG2YHOM3zy+ed9KS-J4HkZo_QGzcUG9MigSp4e4_-13r6B=Q@mail.gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Christoffer Nielsen
     
  • [ Upstream commit 6f4ea2074ddf689ac6f892afa58515032dabf2e4 ]

    Force it to use asynchronous playback.

    Same quirk has already been added for Focusrite Scarlett Solo (2nd gen)
    with a commit 46f5710f0b88 ("ALSA: usb-audio: Add quirk for Focusrite
    Scarlett Solo").

    This also seems to prevent regular clicks when playing at 44100Hz
    on Scarlett 2i2 (2nd gen). I did not notice any side effects.

    Moved both quirks to snd_usb_audioformat_attributes_quirk() as suggested.

    Signed-off-by: Gregor Pintar
    Reviewed-by: Alexander Tsoy
    Link: https://lore.kernel.org/r/20200420214030.2361-1-grpintar@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Gregor Pintar
     
  • [ Upstream commit fd60e0683e8e9107e09cd2e4798f3e27e85d2705 ]

    Similar to the Kingston HyperX AMP, the Kingston HyperX Cloud
    Alpha S (0951:16d8) uses two interfaces, but only the second
    interface contains the capture stream. This patch delays the
    registration until the second interface appears.

    Signed-off-by: Emmanuel Pescosta
    Link: https://lore.kernel.org/r/20200404153843.9288-1-emmanuelpescosta099@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Emmanuel Pescosta
     
  • [ Upstream commit d8695bc5b1fe88305396b1f788d3b5f218e28a30 ]

    A slight refactoring of the registration quirk code. Now it uses the
    table lookup for easy additions in future. Also the return type was
    changed to bool, and got a few more comments.

    Link: https://lore.kernel.org/r/20200325103322.2508-2-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Takashi Iwai
     
  • [ Upstream commit 55f7326170d9e83e2d828591938e1101982a679c ]

    Create a quirk that allows special processing and/or
    skipping the call to snd_card_register.

    For HyperX AMP, which uses two interfaces, but only has
    a capture stream in the second, this allows the capture
    stream to merge with the first PCM.

    Signed-off-by: Chris Wulff
    Link: https://lore.kernel.org/r/20200314165449.4086-3-crwulff@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Chris Wulff
     
  • [ Upstream commit 2edb84e3047b93da2f2b234219cdc304df042d9e ]

    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: Alexander Tsoy
    Link: https://lore.kernel.org/r/20200229151815.14199-1-alexander@tsoy.me
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Alexander Tsoy
     

16 Jul, 2020

2 commits

  • commit b6a1e78b96a5d7f312f08b3a470eb911ab5feec0 upstream.

    USB Audio analyzer RTX6001 uses the same implicit feedback quirk
    as other XMOS-based devices.

    Signed-off-by: Pavel Hofman
    Tested-by: Pavel Hofman
    Cc:
    Link: https://lore.kernel.org/r/822f0f20-1886-6884-a6b2-d11c685cbafa@ivitera.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Pavel Hofman
     
  • commit e337bf19f6af38d5c3fa6d06cd594e0f890ca1ac upstream.

    These devices claim to be 96kHz mono, but actually are 48kHz stereo with
    swapped channels and unaligned transfers.

    Cc: stable@vger.kernel.org
    Signed-off-by: Hector Martin
    Link: https://lore.kernel.org/r/20200702071433.237843-1-marcan@marcan.st
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hector Martin
     

09 Jul, 2020

1 commit

  • This reverts commit aba41867dd66939d336fdf604e4d73b805d8039f which is
    commit f0bd62b64016508938df9babe47f65c2c727d25c upstream.

    It causes a number of reported issues and a fix for it has not hit
    Linus's tree yet. Revert this to resolve those problems.

    Cc: Alexander Tsoy
    Cc: Takashi Iwai
    Cc: Sasha Levin
    Cc: Hans de Goede
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

01 Jul, 2020

5 commits

  • commit 220345e98f1cdc768eeb6e3364a0fa7ab9647fe7 upstream.

    The USB-audio mixer code holds a linked list of usb_mixer_elem_list,
    and several operations are performed for each mixer element. A few of
    them (snd_usb_mixer_notify_id() and snd_usb_mixer_interrupt_v2())
    assume each mixer element being a usb_mixer_elem_info object that is a
    subclass of usb_mixer_elem_list, cast via container_of() and access it
    members. This may result in an out-of-bound access when a
    non-standard list element has been added, as spotted by syzkaller
    recently.

    This patch adds a new field, is_std_info, in usb_mixer_elem_list to
    indicate that the element is the usb_mixer_elem_info type or not, and
    skip the access to such an element if needed.

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

    Takashi Iwai
     
  • commit a32a1fc99807244d920d274adc46ba04b538cc8a upstream.

    We've found Samsung USBC Headset (AKG) (VID: 0x04e8, PID: 0xa051)
    need a tiny delay after each class compliant request.
    Otherwise the device might not be able to be recognized each times.

    Signed-off-by: Chihhao Chen
    Signed-off-by: Macpaul Lin
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/1592910203-24035-1-git-send-email-macpaul.lin@mediatek.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Macpaul Lin
     
  • commit c9808bbfed3cfc911ecb60fe8e80c0c27876c657 upstream.

    fix error "clock source 41 is not valid, cannot use"

    [] New USB device found, idVendor=154e, idProduct=1002, bcdDevice= 1.00
    [] New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [] Product: DCD-1500RE
    [] Manufacturer: D & M Holdings Inc.
    []
    [] clock source 41 is not valid, cannot use
    [] usbcore: registered new interface driver snd-usb-audio

    Signed-off-by: Yick W. Tse
    Cc:
    Link: https://lore.kernel.org/r/1373857985.210365.1592048406997@mail.yahoo.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Yick W. Tse
     
  • commit e7585db1b0b5b4e4eb1967bb1472df308f7ffcbf upstream.

    This uses the same quirk as the Motu M2 and M4 to ensure the driver uses the
    audio interface's clock. Tested on an SSL2+.

    Signed-off-by: Laurence Tratt
    Cc:
    Link: https://lore.kernel.org/r/20200612111807.dgnig6rwhmsl2bod@overdrive.tratt.net
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Laurence Tratt
     
  • [ Upstream commit ff58bbc7b9704a5869204176f804eff57307fef0 ]

    With the recent full-duplex support of implicit feedback streams, an
    endpoint can be still running after closing the capture stream as long
    as the playback stream with the sync-endpoint is running. In such a
    state, the URBs are still be handled and they may call retire_data_urb
    callback, which tries to transfer the data from the PCM buffer. Since
    the PCM stream gets closed, this may lead to use-after-free.

    This patch adds the proper clearance of the callback at stopping the
    capture stream for addressing the possible UAF above.

    Fixes: 10ce77e4817f ("ALSA: usb-audio: Add duplex sound support for USB devices using implicit feedback")
    Link: https://lore.kernel.org/r/20200616120921.12249-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Takashi Iwai
     

24 Jun, 2020

3 commits

  • [ Upstream commit 10ce77e4817fef99e1166be7e6685a80c63bf77f ]

    For USB sound devices using implicit feedback the endpoint used for
    this feedback should be able to be opened twice, once for required
    feedback and second time for audio data. This way these devices can be
    put in duplex audio mode. Since this only works if the settings of the
    endpoint don't change a check is included for this.

    This fixes bug 207023 ("MOTU M2 regression on duplex audio") and
    should also fix bug 103751 ("M-Audio Fast Track Ultra usb audio device
    will not operate full-duplex")

    Fixes: c249177944b6 ("ALSA: usb-audio: add implicit fb quirk for MOTU M Series")
    Signed-off-by: Erwin Burema
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207023
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=103751
    Link: https://lore.kernel.org/r/2410739.SCZni40SNb@alpha-wolf
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Erwin Burema
     
  • [ Upstream commit 5b6cc38f3f3f37109ce72b60bda215a5f6892c0b ]

    The linked list entry from FIFO is peeked at
    queue_pending_output_urbs() but the actual element pop-out is
    performed outside the spinlock, and it's potentially racy.

    Do delete the link at the right place inside the spinlock.

    Fixes: 8fdff6a319e7 ("ALSA: snd-usb: implement new endpoint streaming model")
    Link: https://lore.kernel.org/r/20200424074016.14301-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Takashi Iwai
     
  • [ Upstream commit f0bd62b64016508938df9babe47f65c2c727d25c ]

    For computation of the the next frame size current value of fs/fps and
    accumulated fractional parts of fs/fps are used, where values are stored
    in Q16.16 format. This is quite natural for computing frame size for
    asynchronous endpoints driven by explicit feedback, since in this case
    fs/fps is a value provided by the feedback endpoint and it's already in
    the Q format. If an error is accumulated over time, the device can
    adjust fs/fps value to prevent buffer overruns/underruns.

    But for synchronous endpoints the accuracy provided by these computations
    is not enough. Due to accumulated error the driver periodically produces
    frames with incorrect size (+/- 1 audio sample).

    This patch fixes this issue by implementing a different algorithm for
    frame size computation. It is based on accumulating of the remainders
    from division fs/fps and it doesn't accumulate errors over time. This
    new method is enabled for synchronous and adaptive playback endpoints.

    Signed-off-by: Alexander Tsoy
    Link: https://lore.kernel.org/r/20200424022449.14972-1-alexander@tsoy.me
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Alexander Tsoy
     

17 Jun, 2020

2 commits

  • commit 0c5086f5699906ec8e31ea6509239489f060f2dc upstream.

    The HP Thunderbolt Dock has two separate USB devices, one is for speaker
    and one is for headset. Add names for them so userspace can apply UCM
    settings.

    Signed-off-by: Kai-Heng Feng
    Cc:
    Link: https://lore.kernel.org/r/20200608062630.10806-1-kai.heng.feng@canonical.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Kai-Heng Feng
     
  • commit 862b2509d157c629dd26d7ac6c6cdbf043d332eb upstream.

    When a USB-audio interface gets runtime-suspended via auto-pm feature,
    the driver suspends all functionality and increment
    chip->num_suspended_intf. Later on, when the system gets suspended to
    S3, the driver increments chip->num_suspended_intf again, skips the
    device changes, and sets the card power state to
    SNDRV_CTL_POWER_D3hot. In return, when the system gets resumed from
    S3, the resume callback decrements chip->num_suspended_intf. Since
    this refcount is still not zero (it's been runtime-suspended), the
    whole resume is skipped. But there is a small pitfall here.

    The problem is that the driver doesn't restore the card power state
    after this resume call, leaving it as SNDRV_CTL_POWER_D3hot. So,
    even after the system resume finishes, the card instance still appears
    as if it were system-suspended, and this confuses many ioctl accesses
    that are blocked unexpectedly.

    In details, we have two issues behind the scene: one is that the card
    power state is changed only when the refcount becomes zero, and
    another is that the prior auto-suspend check is kept in a boolean
    flag. Although the latter problem is almost negligible since the
    auto-pm feature is imposed only on the primary interface, but this can
    be a potential problem on the devices with multiple interfaces.

    This patch addresses those issues by the following:

    - Replace chip->autosuspended boolean flag with chip->system_suspend
    counter

    - At the first system-suspend, chip->num_suspended_intf is recorded to
    chip->system_suspend

    - At system-resume, the card power state is restored when the
    chip->num_suspended_intf refcount reaches to chip->system_suspend,
    i.e. the state returns to the auto-suspended

    Also, the patch fixes yet another hidden problem by the code
    refactoring along with the fixes above: namely, when some resume
    procedure failed, the driver left chip->num_suspended_intf that was
    already decreased, and it might lead to the refcount unbalance.
    In the new code, the refcount decrement is done after the whole resume
    procedure, and the problem is avoided as well.

    Fixes: 0662292aec05 ("ALSA: usb-audio: Handle normal and auto-suspend equally")
    Reported-and-tested-by: Macpaul Lin
    Cc:
    Link: https://lore.kernel.org/r/20200603153709.6293-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

03 Jun, 2020

3 commits

  • [ Upstream commit 7f5ad9c9003425175f46c94df380e8c9e558cfb5 ]

    Gigabyte TRX40 Aorus Master is equipped with two USB-audio devices,
    a Realtek ALC1220-VB codec (USB ID 0414:a001) and an ESS SABRE9218 DAC
    (USB ID 0414:a000). The latter serves solely for the headphone output
    on the front panel while the former serves for the rest I/Os (mostly
    for the I/Os in the rear panel but also including the front mic).

    Both chips do work more or less with the unmodified USB-audio driver,
    but there are a few glitches. The ALC1220-VB returns an error for an
    inquiry to some jacks, as already seen on other TRX40-based mobos.
    However this machine has a slightly incompatible configuration, hence
    the existing mapping cannot be used as is.

    Meanwhile the ESS chip seems working without any quirk. But since
    both audio devices don't provide any specific names, both cards appear
    as "USB-Audio", and it's quite confusing for users.

    This patch is an attempt to overcome those issues:

    - The specific mapping table for ALC1220-VB is provided, reducing the
    non-working nodes and renaming the badly chosen controls.
    The connector map isn't needed here unlike other TRX40 quirks.

    - For both USB IDs (0414:a000 and 0414:a001), provide specific card
    name strings, so that user-space can identify more easily; and more
    importantly, UCM profile can be applied to each.

    Reported-by: Linus Torvalds
    Cc:
    Link: https://lore.kernel.org/r/20200526082810.29506-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Takashi Iwai
     
  • [ Upstream commit 4020d1ccbe55bdf67b31d718d2400506eaf4b43f ]

    The Asus USB DAC is a USB type-C audio dongle for connecting to
    the headset and headphone. The volume minimum value -23040 which
    is 0xa600 in hexadecimal with the resolution value 1 indicates
    this should be endianness issue caused by the firmware bug. Add
    a volume quirk to fix the volume control problem.

    Also fixes this warning:
    Warning! Unlikely big volume range (=23040), cval->res is probably wrong.
    [5] FU [Headset Capture Volume] ch = 1, val = -23040/0/1
    Warning! Unlikely big volume range (=23040), cval->res is probably wrong.
    [7] FU [Headset Playback Volume] ch = 1, val = -23040/0/1

    Signed-off-by: Chris Chiu
    Cc:
    Link: https://lore.kernel.org/r/20200526062613.55401-1-chiu@endlessm.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Chris Chiu
     
  • [ Upstream commit da7a8f1a8fc3e14c6dcc52b4098bddb8f20390be ]

    This is another TRX40 based motherboard with ALC1220-VB USB-audio
    that requires a static mapping table.

    This motherboard also has a PCI device which advertises no codecs. The
    PCI ID is 1022:1487 and PCI SSID is 1022:d102. As this is using the AMD
    vendor ID, don't blacklist for now in case other boards have a working
    audio device with the same ssid.

    alsa-info.sh report for this board:
    http://alsa-project.org/db/?f=0a742f89066527497b77ce16bca486daccf8a70c

    Signed-off-by: Andrew Oakley
    Link: https://lore.kernel.org/r/20200503141639.35519-1-andrew@adoakley.name
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Andrew Oakley
     

20 May, 2020

1 commit


06 May, 2020

2 commits

  • commit cc18b2f4f3f1d7ed3125ac1840794f9feab0325c upstream.

    Apparently interface 1 is control interface akin to HD500X,
    setting LINE6_CAP_CONTROL and choosing it as ctrl_if fixes
    audio playback on POD HD500.

    Signed-off-by: Vasily Khoruzhick
    Cc:
    Link: https://lore.kernel.org/r/20200425201115.3430-1-anarsoul@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Vasily Khoruzhick
     
  • commit 547d2c9cf4f1f72adfecacbd5b093681fb0e8b3e upstream.

    The USB vendor ID of NuPrime DAC-10 is not 16b0 but 16d0.

    Fixes: f656891c6619 ("ALSA: usb-audio: add more quirks for DSD interfaces")
    Cc:
    Link: https://lore.kernel.org/r/20200430124755.15940-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

29 Apr, 2020

1 commit

  • commit 1c826792586f526a5a5cd21d55aad388f5bb0b23 upstream.

    Many Focusrite devices supports a limited set of sample rates per
    altsetting. These includes audio interfaces with ADAT ports:
    - Scarlett 18i6, 18i8 1st gen, 18i20 1st gen;
    - Scarlett 18i8 2nd gen, 18i20 2nd gen;
    - Scarlett 18i8 3rd gen, 18i20 3rd gen;
    - Clarett 2Pre USB, 4Pre USB, 8Pre USB.

    Maximum rate is exposed in the last 4 bytes of Format Type descriptor
    which has a non-standard bLength = 10.

    Tested-by: Alexey Skobkin
    Signed-off-by: Alexander Tsoy
    Cc:
    Link: https://lore.kernel.org/r/20200418175815.12211-1-alexander@tsoy.me
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Alexander Tsoy