18 Mar, 2018

5 commits

  • commit 099fd6ca0ad25bc19c5ade2ea4b25b8fadaa11b3 upstream.

    This patch adds missing initialisation for HP 2013 UltraSlim Dock
    Line-In/Out PINs and activates keyboard mute/micmute leds
    for HP ProBook 640 G2

    Signed-off-by: Dennis Wassenberg
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Dennis Wassenberg
     
  • commit aea808172018ca01abf53db808323aed23281835 upstream.

    This patch adds missing initialisation for HP 2013 UltraSlim Dock
    Line-In/Out PINs and activates keyboard mute/micmute leds
    for HP EliteBook 820 G3

    Signed-off-by: Dennis Wassenberg
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Dennis Wassenberg
     
  • commit e4c07b3b66b7d6a24c2fe3b1ddeff5cd9b378b3a upstream.

    One version of Lenovo Thinkpad T570 did not use ALC298
    (like other Kaby Lake devices). Instead it uses ALC292.
    In order to make the Lenovo dock working with that codec
    the dock quirk for ALC292 will be used.

    Signed-off-by: Dennis Wassenberg
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Dennis Wassenberg
     
  • commit e312a869cd726c698a75caca0d9e5c22fd3f1534 upstream.

    The dock line-out pin (NID 0x17 of ALC3254 codec) on Dell Precision
    7520 may route to three different DACs, 0x02, 0x03 and 0x06. The
    first two DACS have the volume amp controls while the last one
    doesn't. And unfortunately, the auto-parser assigns this pin to DAC3,
    resulting in the non-working volume control for the line out.

    Fix it by disabling the routing to DAC3 on the corresponding pin.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199029
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 85981dfd6b0a0fd9ed87ca4a525981b67c21f098 upstream.

    The internal mic boost on the T480 is too high. Fix this by applying the
    ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine to limit the gain.

    Signed-off-by: Benjamin Berg
    Tested-by: Benjamin Berg
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Berg
     

11 Mar, 2018

2 commits

  • commit 71db96ddfa72671bd43cacdcc99ca178d90ba267 upstream.

    We've added a quirk to enable the recent Lenovo dock support, where it
    overwrites the pin configs of NID 0x17 and 19, not only updating the
    pin config cache. It works right after the boot, but the problem is
    that the pin configs are occasionally cleared when the machine goes to
    PM. Meanwhile the quirk writes the pin configs only at the pre-probe,
    so this won't be applied any longer.

    For addressing that issue, this patch moves the code to overwrite the
    pin configs into HDA_FIXUP_ACT_INIT section so that it's always
    applied at both probe and resume time.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195161
    Fixes: 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform")
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 1ba8f9d308174e647b864c36209b4d7934d99888 upstream.

    On some boards setting power_save to a non 0 value leads to clicking /
    popping sounds when ever we enter/leave powersaving mode. Ideally we would
    figure out how to avoid these sounds, but that is not always feasible.

    This commit adds a blacklist for devices where powersaving is known to
    cause problems and disables it on these devices.

    Note I tried to put this blacklist in userspace first:
    https://github.com/systemd/systemd/pull/8128

    But the systemd maintainers rightfully pointed out that it would be
    impossible to then later remove entries once we actually find a way to
    make power-saving work on listed boards without issues. Having this list
    in the kernel will allow removal of the blacklist entry in the same commit
    which fixes the clicks / plops.

    The blacklist only applies to the default power_save module-option value,
    if a user explicitly sets the module-option then the blacklist is not
    used.

    [ added an ifdef CONFIG_PM for the build error -- tiwai]

    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=198611
    Cc: stable@vger.kernel.org
    Signed-off-by: Hans de Goede
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

25 Feb, 2018

1 commit

  • commit 46a049dae771b95e77ac6c823330f4a60f600236 upstream.

    gcc-7 caught what it considers a NULL pointer dereference:

    sound/pci/hda/patch_ca0132.c: In function 'dspio_scp.constprop':
    sound/pci/hda/patch_ca0132.c:1487:4: error: argument 1 null where non-null expected [-Werror=nonnull]

    This is plausible from looking at the function, as we compare 'reply'
    to NULL earlier in it. I have not tried to analyze if there are constraints
    that make it impossible to hit the bug, but adding another NULL check in
    the end kills the warning and makes the function more robust.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

22 Feb, 2018

3 commits

  • commit fdcc968a3b290407bcba9d4c90e2fba6d8d928f1 upstream.

    These laptops have a combined jack to attach headsets, the U727 on
    the left, the U757 on the right, but a headsets microphone doesn't
    work. Using hdajacksensetest I found that pin 0x19 changed the
    present state when plugging the headset, in addition to 0x21, but
    didn't have the correct configuration (shown as "Not connected").

    So this sets the configuration to the same values as the headphone
    pin 0x21 except for the device type microphone, which makes it
    work correctly. With the patch the configured pins for U727 are

    Pin 0x12 (Internal Mic, Mobile-In): present = No
    Pin 0x14 (Internal Speaker): present = No
    Pin 0x19 (Black Mic, Left side): present = No
    Pin 0x1d (Internal Aux): present = No
    Pin 0x21 (Black Headphone, Left side): present = No

    Signed-off-by: Jan-Marek Glogowski
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Jan-Marek Glogowski
     
  • commit 61fcf8ece9b6b09450250c4ca40cc3b81a96a68d upstream.

    Thinkpad Dock device support for ALC298 platform.
    It need to use SSID for the quirk table.
    Because IdeaPad also has ALC298 platform.
    Use verb for the quirk table will confuse.

    Signed-off-by: Kailang Yang
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Kailang Yang
     
  • commit 3f2f7c553d077be6a30cb96b2976a2c940bf5335 upstream.

    One of them has the codec of alc256 and the other one has the codec
    of alc289.

    Cc:
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     

24 Jan, 2018

2 commits

  • commit 031f335cda879450095873003abb03ae8ed3b74a upstream.

    iMac 14,1 requires the same quirk as iMac 12,2, using GPIO 2 and 3 for
    headphone and speaker output amps. Add the codec SSID quirk entry
    (106b:0600) accordingly.

    BugLink: http://lkml.kernel.org/r/CAEw6Zyteav09VGHRfD5QwsfuWv5a43r0tFBNbfcHXoNrxVz7ew@mail.gmail.com
    Reported-by: Freaky
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit e4c9fd10eb21376f44723c40ad12395089251c28 upstream.

    There is another Dell XPS 13 variant (SSID 1028:082a) that requires
    the existing fixup for reducing the headphone noise.
    This patch adds the quirk entry for that.

    BugLink: http://lkml.kernel.org/r/CAHXyb9ZCZJzVisuBARa+UORcjRERV8yokez=DP1_5O5isTz0ZA@mail.gmail.com
    Reported-and-tested-by: Francisco G.
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

03 Jan, 2018

1 commit


25 Dec, 2017

2 commits


30 Nov, 2017

3 commits

  • [ Upstream commit 972aa2c708703c21f14eb958b37e82aae2530e44 ]

    Setting shutup when the action is HDA_FIXUP_ACT_PRE_PROBE might
    not have the desired effect since it could be overridden by
    another more generic shutup function. Prevent this by setting
    the more specific shutup function on HDA_FIXUP_ACT_PROBE.

    Signed-off-by: Gabriele Mazzotta
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Gabriele Mazzotta
     
  • commit 2d7fe6185722b0817bb345f62ab06b76a7b26542 upstream.

    It maybe the typo for ALC700 support patch.
    To fix the bit value on this patch.

    Fixes: 6fbae35a3170 ("ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703")
    Signed-off-by: Kailang Yang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Kailang Yang
     
  • commit 9ceace3c9c18c67676e75141032a65a8e01f9a7a upstream.

    This commit adds PCI ID for Raven platform

    Signed-off-by: Vijendar Mukunda
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Vijendar Mukunda
     

21 Nov, 2017

2 commits

  • [ Upstream commit 28f1f9b26cee161ddd3985b3eb78e3ffada08dda ]

    ALC299 was similar as ALC225.
    Add headset support for ALC299.
    ALC3271 was for Dell rename.

    Signed-off-by: Kailang Yang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Kailang Yang
     
  • [ Upstream commit 874e1f6fad9a5184b67f4cee37c1335cd2cc5677 ]

    The pseudo DMA transfer codes in VX222 and VX-pocket driver have a
    slight bug where they check the buffer boundary wrongly, and may
    overflow. Also, the zero sample count might be handled badly for the
    playback (although it shouldn't happen in theory). This patch
    addresses these issues.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=141541
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

02 Nov, 2017

2 commits


27 Oct, 2017

1 commit

  • commit 6bf88a343db2b3c160edf9b82a74966b31cc80bd upstream.

    While converting the error messages to the standard macros in the
    commit 4e76a8833fac ("ALSA: hda - Replace with standard printk"), a
    superfluous '-' slipped in the code mistakenly. Its influence is
    almost negligible, merely shows a dB value as negative integer instead
    of positive integer (or vice versa) in the rare error message.
    So let's kill this embarrassing byte to show more correct value.

    Fixes: 4e76a8833fac ("ALSA: hda - Replace with standard printk")
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

21 Oct, 2017

1 commit

  • [ Upstream commit 126cfa2f5e15ae2ca7f70be71b07e6cd8d2b44d1 ]

    Geminilake HDMI codec 0x280d is similar to previous platforms, so add it with
    similar ops as previous.

    Signed-off-by: Senthilnathan Veppur
    Signed-off-by: Vinod Koul
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Vinod Koul
     

12 Oct, 2017

1 commit

  • …nd total number of members"

    commit 51db452df07bb4c5754b73789253ba21681d9dc2 upstream.

    This reverts commit 275353bb684e to fix a regression which can abort
    'alsactl' program in alsa-utils due to assertion in alsa-lib.

    alsactl: control.c:2513: snd_ctl_elem_value_get_integer: Assertion `idx < sizeof(obj->value.integer.value) / sizeof(obj->value.integer.value[0])' failed.

    alsactl: control.c:2976: snd_ctl_elem_value_get_integer: Assertion `idx < ARRAY_SIZE(obj->value.integer.value)' failed.

    This commit is a band-aid. In a point of usage of ALSA control interface,
    the drivers still bring an issue that they prevent userspace applications
    to have a consistent way to parse each levels of the dimension information
    via ALSA control interface.

    Let me investigate this issue. Current implementation of the drivers
    have three control element sets with dimension information:
    * 'Monitor Mixer Volume' (type: integer)
    * 'VMixer Volume' (type: integer)
    * 'VU-meters' (type: boolean)

    Although the number of elements named as 'Monitor Mixer Volume' differs
    depending on drivers in this group, it can be calculated by macros
    defined by each driver (= (BX_NUM - BX_ANALOG_IN) * BX_ANALOG_IN). Each
    of the elements has one member for value and has dimension information
    with 2 levels (= BX_ANALOG_IN * (BX_NUM - BX_ANALOG_IN)). For these
    elements, userspace applications are expected to handle the dimension
    information so that all of the elements construct a matrix where the
    number of rows and columns are represented by the dimension information.

    The same way is applied to elements named as 'VMixer Volume'. The number
    of these elements can also be calculated by macros defined by each
    drivers (= PX_ANALOG_IN * BX_ANALOG_IN). Each of the element has one
    member for value and has dimension information with 2 levels
    (= BX_ANALOG_IN * PX_ANALOG_IN). All of the elements construct a matrix
    with the dimension information.

    An element named as 'VU-meters' gets a different way in a point of
    dimension information. The element includes 96 members for value. The
    element has dimension information with 3 levels (= 3 or 2 * 16 * 2). For
    this element, userspace applications are expected to handle the dimension
    information so that all of the members for value construct a matrix
    where the number of rows and columns are represented by the dimension
    information. This is different from the way for the former.

    As a summary, the drivers were not designed to produce a consistent way to
    parse the dimension information. This makes it hard for general userspace
    applications such as amixer to parse the information by a consistent way,
    and actually no userspace applications except for 'echomixer' utilize the
    dimension information. Additionally, no drivers excluding this group use
    the information.

    The reverted commit was written based on the latter way. A commit
    860c1994a70a ('ALSA: control: add dimension validator for userspace
    elements') is written based on the latter way, too. The patch should be
    reconsider too in the same time to re-define a consistent way to parse the
    dimension information.

    Reported-by: Mark Hills <mark@xwax.org>
    Reported-by: S. Christian Collins <s.chriscollins@gmail.com>
    Fixes: 275353bb684e ('ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members')
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    Takashi Sakamoto
     

08 Oct, 2017

1 commit

  • commit 13f99ebdd602ebdafb909e15ec6ffb1e34690167 upstream.

    The latest gcc-7.0.1 snapshot points out that we if nr_ch is zero, we never
    initialize some variables:

    sound/pci/au88x0/au88x0_core.c: In function 'vortex_adb_allocroute':
    sound/pci/au88x0/au88x0_core.c:2304:68: error: 'mix[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    sound/pci/au88x0/au88x0_core.c:2305:58: error: 'src[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]

    I assume this can never happen in practice, but adding a check here doesn't
    hurt either and avoids the warning. The code has been unchanged since
    the start of git history.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

30 Aug, 2017

1 commit


11 Aug, 2017

1 commit


07 Aug, 2017

2 commits

  • commit 74ec118152ea494a25ebb677cbc83a75c982ac5f upstream.

    Add codec IDs for several recently released, pending, and historical
    NVIDIA GPU audio controllers to the patch table, to allow the correct
    patch functions to be selected for them.

    Signed-off-by: Daniel Dadap
    Reviewed-by: Andy Ritger
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Daniel Dadap
     
  • commit 610e1ae9b533be82b3aa118b907e0a703256913d upstream.

    The commit b56fa687e02b ("ALSA: fm801: detect FM-only card earlier")
    rearranged initialization calls, i.e. it makes snd_fm801_chip_init() to
    be called before we register interrupt handler and set PCI bus
    mastering.

    Somehow it prevents FM801-AU to work properly. Thus, partially revert
    initialization order changed by commit mentioned above.

    Fixes: b56fa687e02b ("ALSA: fm801: detect FM-only card earlier")
    Reported-by: Émeric MASCHINO
    Tested-by: Émeric MASCHINO
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Andy Shevchenko
     

05 Jul, 2017

2 commits

  • commit a8f20fd25bdce81a8e41767c39f456d346b63427 upstream.

    Recently we met a problem, the codec has valid adcs and input pins,
    and they can form valid input paths, but the driver does not build
    valid controls for them like "Mic boost", "Capture Volume" and
    "Capture Switch".

    Through debugging, I found the driver needs to shrink the invalid
    adcs and input paths for this machine, so it will move the whole
    column bitmap value to the previous column, after moving it, the
    driver forgets to set the original column bitmap value to zero, as a
    result, the driver will invalidate the path whose index value is the
    original colume bitmap value. After executing this function, all
    valid input paths are invalidated by a mistake, there are no any
    valid input paths, so the driver won't build controls for them.

    Fixes: 3a65bcdc577a ("ALSA: hda - Fix inconsistent input_paths after ADC reduction")
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     
  • commit d94815f917da770d42c377786dc428f542e38f71 upstream.

    azx_codec_configure() loops over the codecs found on the given
    controller via a linked list. The code used to work in the past, but
    in the current version, this may lead to an endless loop when a codec
    binding returns an error.

    The culprit is that the snd_hda_codec_configure() unregisters the
    device upon error, and this eventually deletes the given codec object
    from the bus. Since the list is initialized via list_del_init(), the
    next object points to the same device itself. This behavior change
    was introduced at splitting the HD-audio code code, and forgotten to
    adapt it here.

    For fixing this bug, just use a *_safe() version of list iteration.

    Fixes: d068ebc25e6e ("ALSA: hda - Move some codes up to hdac_bus struct")
    Reported-by: Daniel Vetter
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

07 Jun, 2017

1 commit

  • commit 1fc2e41f7af4572b07190f9dec28396b418e9a36 upstream.

    This model is actually called 92XXM2-8 in Windows driver. But since pin
    configs for M22 and M28 are identical, just reuse M22 quirk.

    Fixes external microphone (tested) and probably docking station ports
    (not tested).

    Signed-off-by: Alexander Tsoy
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Alexander Tsoy
     

14 May, 2017

1 commit

  • commit ab949d519601880fd46e8bc1445d6a453bf2dc09 upstream.

    Imre Deak reported a deadlock of HD-audio driver at unbinding while
    it's still in probing. Since we probe the codecs asynchronously in a
    work, the codec driver probe may still be kicked off while the
    controller itself is being unbound. And, azx_remove() tries to
    process all pending tasks via cancel_work_sync() for fixing the other
    races (see commit [0b8c82190c12: ALSA: hda - Cancel probe work instead
    of flush at remove]), now we may meet a bizarre deadlock:

    Unbind snd_hda_intel via sysfs:
    device_release_driver() ->
    device_lock(snd_hda_intel) ->
    azx_remove() ->
    cancel_work_sync(azx_probe_work)

    azx_probe_work():
    codec driver probe() ->
    __driver_attach() ->
    device_lock(snd_hda_intel)

    This deadlock is caused by the fact that both device_release_driver()
    and driver_probe_device() take both the device and its parent locks at
    the same time. The codec device sets the controller device as its
    parent, and this lock is taken before the probe() callback is called,
    while the controller remove() callback gets called also with the same
    lock.

    In this patch, as an ugly workaround, we unlock the controller device
    temporarily during cancel_work_sync() call. The race against another
    bind call should be still suppressed by the parent's device lock.

    Reported-by: Imre Deak
    Fixes: 0b8c82190c12 ("ALSA: hda - Cancel probe work instead of flush at remove")
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

08 Apr, 2017

1 commit

  • commit 2f726aec19a9d2c63bec9a8a53a3910ffdcd09f8 upstream.

    On this Dell AIO machine, the lineout jack does not work.

    We found the pin 0x1a is assigned to lineout on this machine, and in
    the past, we applied ALC298_FIXUP_DELL1_MIC_NO_PRESENCE to fix the
    heaset-set mic problem for this machine, this fixup will redefine
    the pin 0x1a to headphone-mic, as a result the lineout doesn't
    work anymore.

    After consulting with Dell, they told us this machine doesn't support
    microphone via headset jack, so we add a new fixup which only defines
    the pin 0x18 as the headset-mic.

    [rearranged the fixup insertion position by tiwai in order to make the
    merge with other branches easier -- tiwai]

    Fixes: 59ec4b57bcae ("ALSA: hda - Fix headset mic detection problem for two dell machines")
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     

30 Mar, 2017

2 commits

  • commit 3f307834e695f59dac4337a40316bdecfb9d0508 upstream.

    A new Dell laptop needs to apply ALC269_FIXUP_DELL1_MIC_NO_PRESENCE to
    fix the headset problem, and the pin definiton of this machine is not
    in the pin quirk table yet, now adding it to the table.

    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     
  • commit f363a06642f28caaa78cb6446bbad90c73fe183c upstream.

    In the commit [15c75b09f8d1: ALSA: ctxfi: Fallback DMA mask to 32bit],
    I forgot to put "!" at dam_set_mask() call check in cthw20k1.c (while
    cthw20k2.c is OK). This patch fixes that obvious bug.

    (As a side note: although the original commit was completely wrong,
    it's still working for most of machines, as it sets to 32bit DMA mask
    in the end. So the bug severity is low.)

    Fixes: 15c75b09f8d1 ("ALSA: ctxfi: Fallback DMA mask to 32bit")
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

12 Mar, 2017

2 commits