16 Nov, 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
     

10 Aug, 2020

1 commit

  • The USB device (0x17aa:0x1046) that support Lenovo P620 rear panel
    line-in claim to support volume control, but it doens't seem to have an
    AMP, so when line-in volume lowers below 80, nothing gets recorded
    anymore.

    Disable the volume control to workaround the issue.

    Fixes: f8c11eb7da4a ("ALSA: usb-audio: Add support for Lenovo ThinkStation P620")
    Signed-off-by: Kai-Heng Feng
    Link: https://lore.kernel.org/r/20200810133108.31580-1-kai.heng.feng@canonical.com
    Signed-off-by: Takashi Iwai

    Kai-Heng Feng
     

03 Aug, 2020

1 commit

  • Lenovo ThinkStation P620 is like other TRX40 boards, is equipped with
    two USB audio cards.

    USB device (17aa:104d) provides functionality for Internal Speaker and
    Front Headset. It's UAC v2, so it supports insertion control (jack
    detection). However, when trying to get the connector status of the
    speaker, an error occurs:
    [ 5.787405] usb 3-1: cannot get connectors status: req = 0x81, wValue = 0x200, wIndex = 0x1000, type = 0

    Since the insertion control works perfectly for the headset, the error
    for speaker is probably casued by connecting internally. So let's relax
    the error for a bit if it's a speaker, and always reports it's connected.

    USB device (17aa:1046) is for rear Line-in, Line-out and Microphone.
    The insertion control works for all three jacks. However, there's an
    Function Unit that doesn't work:
    [ 5.905415] usb 3-6: cannot get ctl value: req = 0x83, wValue = 0xc00, wIndex = 0x1300, type = 4
    [ 5.905418] usb 3-6: 19:0: cannot get min/max values for control 12 (id 19)

    So turn off the FU to avoid the error.

    Also, add specific card name for both devices, so userspace can easily
    indentify both cards.

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

    Kai-Heng Feng
     

20 Jul, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Link: https://lore.kernel.org/r/20200719151705.59624-1-grandmaster@al2klimov.de
    Signed-off-by: Takashi Iwai

    Alexander A. Klimov
     

27 May, 2020

1 commit

  • 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

    Takashi Iwai
     

04 May, 2020

1 commit

  • 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

    Andrew Oakley
     

22 Apr, 2020

1 commit

  • It turned out that ALC1220-VB USB-audio device gives the interrupt
    event to some PCM terminals while those don't allow the connector
    state request but only the actual I/O terminals return the request.
    The recent commit 7dc3c5a0172e ("ALSA: usb-audio: Don't create jack
    controls for PCM terminals") excluded those phantom terminals, so
    those events are ignored, too.

    My first thought was that this could be easily deduced from the
    associated terminals, but some of them have even no associate terminal
    ID, hence it's not too trivial to figure out.

    Since the number of such terminals are small and limited, this patch
    implements another quirk table for the simple mapping of the
    connectors. It's not really scalable, but let's hope that there will
    be not many such funky devices in future.

    Fixes: 7dc3c5a0172e ("ALSA: usb-audio: Don't create jack controls for PCM terminals")
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206873
    Link: https://lore.kernel.org/r/20200422113320.26664-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

20 Apr, 2020

1 commit

  • TRX40 mobos from MSI and others with ALC1220-VB USB-audio device need
    yet more quirks for the proper control names.

    This patch provides the mapping table for those boards, correcting the
    FU names for volume and mute controls as well as the terminal names
    for jack controls. It also improves build_connector_control() not to
    add the directional suffix blindly if the string is given from the
    mapping table.

    With this patch applied, the new UCM profiles will be effective.

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

    Takashi Iwai
     

12 Apr, 2020

1 commit

  • Add the mapping check to build_connector_control() so that the device
    specific quirk can provide the node to skip for the badly behaving
    connector controls. As an example, ALC1220-VB-based codec implements
    the skip entry for the broken SPDIF connector detection.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206873
    Cc:
    Link: https://lore.kernel.org/r/20200412081331.4742-5-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

08 Apr, 2020

1 commit

  • Some recent boards (supposedly with a new AMD platform) contain the
    USB audio class 2 device that is often tied with HD-audio. The device
    exposes an Input Gain Pad control (id=19, control=12) but this node
    doesn't behave correctly, returning an error for each inquiry of
    GET_MIN and GET_MAX that should have been mandatory.

    As a workaround, simply ignore this node by adding a usbmix_name_map
    table entry. The currently known devices are:
    * 0414:a002 - Gigabyte TRX40 Aorus Pro WiFi
    * 0b05:1916 - ASUS ROG Zenith II
    * 0b05:1917 - ASUS ROG Strix
    * 0db0:0d64 - MSI TRX40 Creator
    * 0db0:543d - MSI TRX40

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

    Takashi Iwai
     

05 Jan, 2020

1 commit

  • Apply const prefix to the remaining places: the static table for the
    unit information, the mixer maps, the validator tables, etc.

    Just for minor optimization and no functional changes.

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

    Takashi Iwai
     

28 Dec, 2019

1 commit

  • The Corsair Virtuoso RGB Wireless is a USB headset with a mic and a
    sidetone feature. Label its mixer appropriately instead of all
    "Headset", so that applications such as Pulseaudio don't just move
    the sidetone control when they intend the main Headset control.

    Signed-off-by: Chris Boyle
    Link: https://lore.kernel.org/r/20191227094053.GA12167@nova.chris.boyle.name
    Signed-off-by: Takashi Iwai

    Chris Boyle
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

13 May, 2018

1 commit

  • Recently released USB Audio Class 3.0 specification
    contains BADD (Basic Audio Device Definition) document
    which describes pre-defined UAC3 configurations.

    BADD support is mandatory for UAC3 devices, it should be
    implemented as a separate USB device configuration.
    As per BADD document, class-specific descriptors
    shall not be included in the Device’s Configuration
    descriptor ("inferred"), but host can guess them
    from BADD profile number, number of endpoints and
    their max packed sizes.

    This patch adds support of all BADD profiles from the spec

    Signed-off-by: Ruslan Bilovol
    Tested-by: Jorge Sanjuan
    Signed-off-by: Takashi Iwai

    Ruslan Bilovol
     

24 Apr, 2018

1 commit

  • The Dell Dock USB-audio device with 0bda:4014 is behaving notoriously
    bad, and we have already applied some workaround to avoid the firmware
    hiccup. Yet we still need to skip one thing, the Extension Unit at ID
    4, which doesn't react correctly to the mixer ctl access.

    Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1090658
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

17 Jun, 2016

1 commit

  • To allow for structure randomisation, replace the in order struct
    initialisation style with explicit field style.

    The Coccinelle semantic patch used to make this change is as follows:

    @decl@
    identifier i1,fld;
    type T;
    field list[n] fs;
    @@

    struct i1 {
    fs
    T fld;
    ...};

    @@
    identifier decl.i1,i2,decl.fld;
    expression e;
    position bad.p, bad.fix;
    @@

    struct i1 i2@p = { ...,
    + .fld = e
    - e@fix
    ,...};

    Signed-off-by: Amitoj Kaur Chawla
    Signed-off-by: Takashi Iwai

    Amitoj Kaur Chawla
     

12 Apr, 2016

1 commit

  • This is Dell usb dock audio workaround.
    It was fixed the master volume keep lower.

    [Some background: the patch essentially skips the controls of a couple
    of FU volumes. Although the firmware exposes the dB and the value
    information via the usb descriptor, changing the values (we set the
    min volume as default) screws up the device. Although this has been
    fixed in the newer firmware, the devices are shipped with the old
    firmware, thus we need the workaround in the driver side. -- tiwai]

    Signed-off-by: Kailang Yang
    Cc:
    Signed-off-by: Takashi Iwai

    Kailang Yang
     

14 Dec, 2015

1 commit

  • AudioQuest DragonFly DAC reports a volume control range of 0..50
    (0x0000..0x0032) which in USB Audio means a range of 0 .. 0.2dB, which
    is obviously incorrect and would cause software using the dB information
    in e.g. volume sliders to have a massive volume difference in 100..102%
    range.

    Commit 2d1cb7f658fb ("ALSA: usb-audio: add dB range mapping for some
    devices") added a dB range mapping for it with range 0..50 dB.

    However, the actual volume mapping seems to be neither linear volume nor
    linear dB scale, but instead quite close to the cubic mapping e.g.
    alsamixer uses, with a range of approx. -53...0 dB.

    Replace the previous quirk with a custom dB mapping based on some basic
    output measurements, using a 10-item range TLV (which will still fit in
    alsa-lib MAX_TLV_RANGE_SIZE).

    Tested on AudioQuest DragonFly HW v1.2. The quirk is only applied if the
    range is 0..50, so if this gets fixed/changed in later HW revisions it
    will no longer be applied.

    v2: incorporated Takashi Iwai's suggestion for the quirk application
    method

    Signed-off-by: Anssi Hannula
    Cc:
    Signed-off-by: Takashi Iwai

    Anssi Hannula
     

29 Jul, 2015

1 commit


03 Jun, 2015

1 commit


19 Dec, 2014

1 commit

  • The Arcam rPAC seems to have the same problem - whenever anything
    (alsamixer, udevd, 3.9+ kernel from 60af3d037eb8c, ..) attempts to
    access mixer / control interface of the card, the firmware "locks up"
    the entire device, resulting in
    SNDRV_PCM_IOCTL_HW_PARAMS failed (-5): Input/output error
    from alsa-lib.

    Other operating systems can somehow read the mixer (there seems to be
    playback volume/mute), but any manipulation is ignored by the device
    (which has hardware volume controls).

    Cc:
    Signed-off-by: Jiri Jaburek
    Signed-off-by: Takashi Iwai

    Jiri Jaburek
     

11 Nov, 2014

1 commit


17 Feb, 2014

1 commit


20 Dec, 2013

1 commit

  • Plantronics Gamecom 780 headset has a firmware problem, and when the
    FU 0x09 volume is changed, it results in either too loud or silence
    except for a very narrow range. This patch provides a workaround,
    ignoring the node, initialize the volume in a sane value and keep
    untouched.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65251
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

11 Feb, 2013

1 commit

  • Adds quirks and mixer support for the M-Audio Fast Track C600 USB
    audio interface. This device is very similar to the C400 - the C600
    simply has some more inputs and outputs, so the existing C400 support
    is extended to support this device as well.

    Signed-off-by: Matt Gruskin
    Signed-off-by: Takashi Iwai

    Matt Gruskin
     

14 Jan, 2013

1 commit


20 Jun, 2012

2 commits


15 Apr, 2012

1 commit


01 Jun, 2010

1 commit


12 Mar, 2010

1 commit