26 Mar, 2020

1 commit


18 Mar, 2020

2 commits


13 Mar, 2020

1 commit


11 Mar, 2020

1 commit

  • Commit 317d9313925c ("ALSA: hda/realtek - Set default power save node to
    0") makes the ALC225 have pop noise on S3 resume and cold boot.

    So partially revert this commit for ALC225 to fix the regression.

    Fixes: 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0")
    BugLink: https://bugs.launchpad.net/bugs/1866357
    Signed-off-by: Kai-Heng Feng
    Link: https://lore.kernel.org/r/20200311061328.17614-1-kai.heng.feng@canonical.com
    Signed-off-by: Takashi Iwai

    Kai-Heng Feng
     

05 Mar, 2020

5 commits


19 Feb, 2020

1 commit


18 Feb, 2020

2 commits

  • Some code in HD-audio driver calls snprintf() in a loop and still
    expects that the return value were actually written size, while
    snprintf() returns the expected would-be length instead. When the
    given buffer limit were small, this leads to a buffer overflow.

    Use scnprintf() for addressing those issues. It returns the actually
    written size unlike snprintf().

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

    Takashi Iwai
     
  • MSI GP65 laptop with SSID 1462:1293 requires the same quirk as other
    MSI models.

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

    Takashi Iwai
     

17 Feb, 2020

1 commit


12 Feb, 2020

2 commits


06 Feb, 2020

3 commits

  • Pull sound fixes from Takashi Iwai:
    "A collection of pending small fixes:

    ALSA core:
    - PCM memory leak fix

    ASoC:
    - Lots of SOF and Intel driver fixes
    - Addition of COMMON_CLK for wcd934x
    - Regression fixes for AMD and Tegra platforms

    HD-audio:
    - DP-MST HDMI regression fix, Tegra workarounds, HP quirk fix

    Others:
    - A few fixes relevant with the recent uapi-updates
    - Sparse warnings and endianness fixes"

    * tag 'sound-fix-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (35 commits)
    ALSA: hda: Clear RIRB status before reading WP
    ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported
    ASoC: wcd934x: Add missing COMMON_CLK dependency to SND_SOC_ALL_CODECS
    ALSA: hda - Fix DP-MST support for NVIDIA codecs
    ASoC: wcd934x: Add missing COMMON_CLK dependency
    MAINTAINERS: Remove the Bard Liao from the MAINTAINERS of Realtek CODECs
    ASoC: tegra: Revert 24 and 32 bit support
    ASoC: SOF: Intel: add PCI ID for JasperLake
    ALSA: hdsp: Make the firmware loading ioctl a bit more readable
    ALSA: emu10k1: Fix annotation and cast for the recent uapi header change
    ALSA: dummy: Fix PCM format loop in proc output
    ALSA: usb-audio: Annotate endianess in Scarlett gen2 quirk
    ALSA: usb-audio: Fix endianess in descriptor validation
    ALSA: hda: Add JasperLake PCI ID and codec vid
    ALSA: pcm: Fix sparse warnings wrt snd_pcm_state_t
    ALSA: pcm: Fix memory leak at closing a stream without hw_free
    ALSA: uapi: Fix sparse warning
    ASoC: rt715: Add __maybe_unused to PM callbacks
    ASoC: rt711: Add __maybe_unused to PM callbacks
    ASoC: rt700: Add __maybe_unused to PM callbacks
    ...

    Linus Torvalds
     
  • RIRB interrupt status getting cleared after the write pointer is read
    causes a race condition, where last response(s) into RIRB may remain
    unserviced by IRQ, eventually causing azx_rirb_get_response to fall
    back to polling mode. Clearing the RIRB interrupt status ahead of
    write pointer access ensures that this condition is avoided.

    Signed-off-by: Mohan Kumar
    Signed-off-by: Viswanath L
    Link: https://lore.kernel.org/r/1580983853-351-1-git-send-email-viswanathl@nvidia.com
    Signed-off-by: Takashi Iwai

    Mohan Kumar
     
  • HP want to keep BIOS verb table for release platform.
    So, it need to add 0x19 pin for quirk.

    Fixes: 5af29028fd6d ("ALSA: hda/realtek - Add Headset Mic supported for HP cPC")
    Signed-off-by: Kailang Yang
    Link: https://lore.kernel.org/r/74636ccb700a4cbda24c58a99dc430ce@realtek.com
    Signed-off-by: Takashi Iwai

    Kailang Yang
     

05 Feb, 2020

1 commit

  • If dyn_pcm_assign is set, different jack objects are being created
    for pcm and pins.

    If dyn_pcm_assign is set, generic_hdmi_build_jack() calls into
    add_hdmi_jack_kctl() to create and track separate jack object for
    pcm. Like sync_eld_via_acomp(), hdmi_present_sense_via_verbs() also
    need to report status change of the pcm jack.

    Rename pin_idx_to_jack() to pin_idx_to_pcm_jack(). Update
    hdmi_present_sense_via_verbs() to report plug state of pcm jack
    object. Unlike sync_eld_via_acomp(), for !acomp drivers the pcm
    jack's plug state must be consistent with plug state
    of pin's jack.

    Fixes: 5398e94fb753 ("ALSA: hda - Add DP-MST support for NVIDIA codecs")
    Reported-and-tested-by: Martin Regner
    Signed-off-by: Nikhil Mahale
    Reviewed-by: Kai Vehmanen
    Cc:
    Link: https://lore.kernel.org/r/20200204102746.1356-1-nmahale@nvidia.com
    Signed-off-by: Takashi Iwai

    Nikhil Mahale
     

02 Feb, 2020

2 commits

  • The firmware loading ioctl that is implemented for hdsp hwdep device
    takes the reference of the address pointer, hence the current code is
    rather confusing. Also, due to the recent change in uapi header,
    sparse also complains about the cast.

    This patch tries to improve the readability by converting the
    straightforward copy_from_user of the whole struct (which contains
    only the pointer).

    Fixes: d63e63d42107 ("ALSA: hdsp: Make uapi/hdsp.h compilable again")
    Link: https://lore.kernel.org/r/20200202090724.18232-2-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The recent sound/emu10k1.h uapi header change by the commit
    2e4688676392 ("ALSA: emu10k1: Make uapi/emu10k1.h compilable again")
    made sparse angry because of the inconsistency of __user annotation
    and the own ctl id struct that were changed in uapi header.

    This patch addresses those by adjusting the cast and annotations
    properly again.

    Fixes: 2e4688676392 ("ALSA: emu10k1: Make uapi/emu10k1.h compilable again")
    Link: https://lore.kernel.org/r/20200202090724.18232-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

01 Feb, 2020

1 commit

  • Add HD Audio Device PCI ID and codec vendor_id for the Intel JasperLake
    REV2/A0 silicon.

    Signed-off-by: Yong Zhi
    Signed-off-by: Pierre-Louis Bossart
    Cc:
    Link: https://lore.kernel.org/r/20200131204003.10153-1-pierre-louis.bossart@linux.intel.com
    Signed-off-by: Takashi Iwai

    Yong Zhi
     

29 Jan, 2020

1 commit

  • Pull sound updates from Takashi Iwai:
    "As the diffstat shows we've had again a lot of works done for this
    cycle: the majority of changes are the continued componentization and
    code refactoring in ASoC, the tree-wide PCM API updates and cleanups
    and SOF updates while a few ASoC driver updates are seen, too.

    Here we go, some highlights:

    Core:
    - Finally y2038 support landed to ALSA ABI; some ioctls have been
    extended and lots of tricks were applied
    - Applying the new managed PCM buffer API to all drivers; the API
    itself was already merged in 5.5
    - The already deprecated dimension support in ALSA control API is
    dropped completely now
    - Verification of ALSA control elements to catch API misuses

    ASoC:
    - Further code refactorings and moving things to the component level
    - Lots of updates and improvements on SOF / Intel drivers; now
    including common HDMI driver and SoundWire support
    - New driver support for Ingenic JZ4770, Mediatek MT6660, Qualcomm
    WCD934x and WSA881x, and Realtek RT700, RT711, RT715, RT1011,
    RT1015 and RT1308

    HD-audio:
    - Improved ring-buffer communications using waitqueue
    - Drop the superfluous buffer preallocation on x86

    Others:
    - Many code cleanups, mostly constifications over the whole tree
    - USB-audio: quirks for MOTU, Corsair Virtuoso, Line6 Helix
    - FireWire: code refactoring for oxfw and dice drivers"

    * tag 'sound-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (638 commits)
    ALSA: usb-audio: add quirks for Line6 Helix devices fw>=2.82
    ALSA: hda: Add Clevo W65_67SB the power_save blacklist
    ASoC: soc-core: remove null_snd_soc_ops
    ASoC: soc-pcm: add soc_rtd_trigger()
    ASoC: soc-pcm: add soc_rtd_hw_free()
    ASoC: soc-pcm: add soc_rtd_hw_params()
    ASoC: soc-pcm: add soc_rtd_prepare()
    ASoC: soc-pcm: add soc_rtd_shutdown()
    ASoC: soc-pcm: add soc_rtd_startup()
    ASoC: rt1015: add rt1015 amplifier driver
    ASoC: madera: Correct some kernel doc
    ASoC: topology: fix soc_tplg_fe_link_create() - link->dobj initialization order
    ASoC: Intel: skl_hda_dsp_common: Fix global-out-of-bounds bug
    ASoC: madera: Correct DMIC only input hook ups
    ALSA: cs46xx: fix spelling mistake "to" -> "too"
    ALSA: hda - Add docking station support for Lenovo Thinkpad T420s
    ASoC: Add MediaTek MT6660 Speaker Amp Driver
    ASoC: dt-bindings: rt5645: add suppliers
    ASoC: max98090: fix deadlock in max98090_dapm_put_enum_double()
    ASoC: dapm: add snd_soc_dapm_put_enum_double_locked
    ...

    Linus Torvalds
     

28 Jan, 2020

1 commit


26 Jan, 2020

2 commits


23 Jan, 2020

2 commits


21 Jan, 2020

1 commit

  • The initial snd_hda_get_sub_node() can fail on certain
    devices (e.g. some Chromebook models using Intel GLK).
    The failure rate is very low, but as this is is part of
    the probe process, end-user impact is high.

    In observed cases, related hardware status registers have
    expected values, but the node query still fails. Retrying
    the node query does seem to help, so fix the problem by
    adding retry logic to the query. This does not impact
    non-Intel platforms.

    BugLink: https://github.com/thesofproject/linux/issues/1642
    Signed-off-by: Kai Vehmanen
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200120160117.29130-4-kai.vehmanen@linux.intel.com
    Signed-off-by: Takashi Iwai

    Kai Vehmanen
     

20 Jan, 2020

2 commits

  • Resolved the merge conflict in HD-audio Tegra driver.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • It turned out that the recent simplification of HD-audio bus access
    helpers caused a regression on the virtual HD-audio device on QEMU
    with ARM platforms. The driver got a CORB/RIRB timeout and couldn't
    probe any codecs.

    The essential difference that caused a problem was the enforced
    aligned MMIO accesses by simplification. Since snd-hda-tegra driver
    is enabled on ARM, it enables CONFIG_SND_HDA_ALIGNED_MMIO, which makes
    the all HD-audio drivers using the aligned MMIO accesses. While this
    is mandatory for snd-hda-tegra, it seems that snd-hda-intel on ARM
    gets broken by this access pattern.

    For addressing the regression, this patch introduces a new flag,
    aligned_mmio, to hdac_bus object, and applies the aligned MMIO only
    when this flag is set. This change affects only platforms with
    CONFIG_SND_HDA_ALIGNED_MMIO set, i.e. mostly only for ARM platforms.

    Unfortunately the patch became a big bigger than it should be, just
    because the former calls didn't take hdac_bus object in the argument,
    hence we had to extend the call patterns.

    Fixes: 19abfefd4c76 ("ALSA: hda: Direct MMIO accesses")
    BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1161152
    Cc:
    Link: https://lore.kernel.org/r/20200120104127.28985-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

17 Jan, 2020

2 commits

  • HP ALC671 need to support Headset Mic.

    Signed-off-by: Kailang Yang
    Link: https://lore.kernel.org/r/06a9d2b176e14706976d6584cbe2d92a@realtek.com
    Signed-off-by: Takashi Iwai

    Kailang Yang
     
  • AD HD-audio codec driver has a few code lines invoking
    snd_get_num_conns() and using its return value as the array index
    without checking. This is basically safe in all those places; at the
    second and later calls snd_get_num_conns() returns the value cached
    from the first invocation, hence the value is always consistent.

    However, it looks a bit confusing as if a lack of the proper check.
    This patch introduces a new field num_smux_conns in ad198x_spec for
    simplifying the code. Now we store and refer to the value more
    locally without invoking the extra function at each time.

    Reported-by: Colin King
    Link: https://lore.kernel.org/r/20200115100035.22511-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

14 Jan, 2020

2 commits

  • make W=1 reports the following warnings, fix as suggested

    sound/pci/hda/patch_hdmi.c: In function ‘hdmi_non_intrinsic_event’:
    sound/pci/hda/patch_hdmi.c:824:3: warning: suggest braces around empty
    body in an ‘if’ statement [-Wempty-body]
    824 | ;
    | ^
    sound/pci/hda/patch_hdmi.c:826:3: warning: suggest braces around empty
    body in an ‘if’ statement [-Wempty-body]
    826 | ;
    | ^

    Signed-off-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200113211405.28070-3-pierre-louis.bossart@linux.intel.com
    Signed-off-by: Takashi Iwai

    Pierre-Louis Bossart
     
  • make W=1 throws warnings, provide missing documentation

    Signed-off-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200113211405.28070-2-pierre-louis.bossart@linux.intel.com
    Signed-off-by: Takashi Iwai

    Pierre-Louis Bossart
     

13 Jan, 2020

1 commit

  • In the commit 8e85def5723e ("ALSA: hda: enable regmap internal
    locking"), we re-enabled the regmap lock due to the reported
    regression that showed the possible concurrent accesses. It was a
    temporary workaround, and there are still a few opened races even
    after the revert. In this patch, we cover those still opened windows
    with a proper mutex lock and disable the regmap internal lock again.

    First off, the patch introduces a new snd_hdac_device.regmap_lock
    mutex that is applied for each snd_hdac_regmap_*() call, including
    read, write and update helpers. The mutex is applied carefully so
    that it won't block the self-power-up procedure in the helper
    function. Also, this assures the protection for the accesses without
    regmap, too.

    The snd_hdac_regmap_update_raw() is refactored to use the standard
    regmap_update_bits_check() function instead of the open-code. The
    non-regmap case is still open-coded but it's an easy part. The all
    read and write operations are in the single mutex protection, so it's
    now race-free.

    In addition, a couple of new helper functions are added:
    snd_hdac_regmap_update_raw_once() and snd_hdac_regmap_sync(). Both
    are called from HD-audio legacy driver. The former is to initialize
    the given verb bits but only once when it's not initialized yet. Due
    to this condition, the function invokes regcache_cache_only(), and
    it's now performed inside the regmap_lock (formerly it was racy) too.
    The latter function is for simply invoking regcache_sync() inside the
    regmap_lock, which is called from the codec resume call path.
    Along with that, the HD-audio codec driver code is slightly modified /
    simplified to adapt those new functions.

    And finally, snd_hdac_regmap_read_raw(), *_write_raw(), etc are
    rewritten with the helper macro. It's just for simplification because
    the code logic is identical among all those functions.

    Tested-by: Kai Vehmanen
    Link: https://lore.kernel.org/r/20200109090104.26073-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

12 Jan, 2020

1 commit

  • GCC reports the following warning with W=1

    sound/pci/hda/patch_realtek.c: In function ‘alc269_suspend’:
    sound/pci/hda/patch_realtek.c:3616:29: warning: suggest braces around
    empty body in an ‘if’ statement [-Wempty-body]
    3616 | alc5505_dsp_suspend(codec);
    | ^

    sound/pci/hda/patch_realtek.c: In function ‘alc269_resume’:
    sound/pci/hda/patch_realtek.c:3651:28: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
    3651 | alc5505_dsp_resume(codec);
    | ^

    This is a classic macro problem and can indeed lead to bad program
    flows.

    Fix by using the usual "do { } while (0)" pattern

    Signed-off-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200111214736.3002-2-pierre-louis.bossart@linux.intel.com
    Signed-off-by: Takashi Iwai

    Pierre-Louis Bossart
     

11 Jan, 2020

2 commits

  • Sync 5.5-devel branch once again for applying the HD-audio fixes.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • We've got quite a few bug reports showing the SOF driver being loaded
    unintentionally recently, and the reason seems to be that users didn't
    know the module option change: with the recent kernel, a new option
    dsp_driver=1 has to be passed to a new module snd-intel-dspcfg
    instead of snd_hda_intel.dmic_detect=0 option.

    That is, actually there are two tricky things here:
    - We changed the whole detection in another module and another
    option semantics.
    - The existing option for skipping the DSP probe was also renamed.

    For avoiding the confusion and giving user more hint, this patch
    reverts the renamed option dsp_driver back to dmic_detect for
    snd-hda-intel module, and show the warning about the module option
    change when the non-default value is passed.

    Fixes: 82d9d54a6c0e ("ALSA: hda: add Intel DSP configuration / probe code")
    Link: https://lore.kernel.org/r/20200109082000.26729-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai