08 Oct, 2020

1 commit


10 Sep, 2020

2 commits

  • The tasklet is an old API that should be deprecated, usually can be
    converted to another decent API. In HDSP-MADI driver, a tasklet is
    still used for offloading the MIDI I/O handling (optional via mixer
    switch). It can be achieved gracefully with a work queued, too.

    This patch replaces the tasklet usage in HDSP-MADI driver with a
    simple work. The conversion is fairly straightforward. The only
    significant difference is that the work initialization is moved to the
    right place in snd_hdspm_create() and cancel_work_sync() is always
    called in snd_hdspm_free() to assure killing the pending works.

    Link: https://lore.kernel.org/r/20200903104131.21097-8-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 HDSP driver, a tasklet is still
    used for offloading the MIDI I/O handling (optional via mixer
    switch). It can be achieved gracefully with a work queued, too.

    This patch replaces the tasklet usage in HDSP driver with a simple
    work. The conversion is fairly straightforward. The only significant
    difference is that a superfluous tasklet_kill() call is removed from
    snd_hdap_midi_input_trigger().

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

    Takashi Iwai
     

02 Sep, 2020

1 commit

  • In preparation for unconditionally passing the
    struct tasklet_struct pointer to all tasklet
    callbacks, switch to using the new tasklet_setup()
    and from_tasklet() to pass the tasklet pointer explicitly.

    Signed-off-by: Romain Perier
    Signed-off-by: Allen Pais
    Link: https://lore.kernel.org/r/20200902040221.354941-6-allen.lkml@gmail.com
    Signed-off-by: Takashi Iwai

    Allen Pais
     

07 Jul, 2020

1 commit

  • Fix W=1 warning:

    sound/pci/rme9652/hdspm.c: In function ‘hdspm_autosync_ref’:
    sound/pci/rme9652/hdspm.c:3030:16: warning: comparison of unsigned
    expression >= 0 is always true [-Wtype-limits]
    3030 | if ((syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD) &&
    | ^~

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

    Pierre-Louis Bossart
     

10 Feb, 2020

1 commit

  • Variable err is being assigned with a value that is never read, it is
    assigned a new value in the next statement. The assignment is redundant
    and can be removed.

    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King
    Link: https://lore.kernel.org/r/20200208222006.37376-1-colin.king@canonical.com
    Signed-off-by: Takashi Iwai

    Colin Ian King
     

06 Feb, 2020

1 commit

  • 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
     

02 Feb, 2020

1 commit

  • 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
     

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
     

06 Jan, 2020

1 commit


05 Jan, 2020

3 commits

  • Apply const prefix to the channel map tables.

    Just for minor optimization and no functional changes.

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

    Takashi Iwai
     
  • Apply const prefix to each possible place: the string arrays, the
    channel map tables and callers.

    Just for minor optimization and no functional changes.

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

    Takashi Iwai
     
  • Apply const prefix to each channel map table and its callers.

    Just for minor optimization and no functional changes.

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

    Takashi Iwai
     

03 Jan, 2020

2 commits

  • Most of snd_kcontrol_new definitions are read-only and passed as-is.
    Let's declare them as const for further optimization.

    There should be no functional changes by this patch.

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

    Takashi Iwai
     
  • Most of snd_pcm_hardware definitions are just copied to another object
    as-is, hence we can define them as const for further optimization.

    There should be no functional changes by this patch.

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

    Takashi Iwai
     

20 Dec, 2019

1 commit

  • Recently alsa-lib updated its content of sound/hdsp.h just by copying
    the latest Linus kernel uapi/*.h, and this broke the build of
    alsa-tools programs. We used to modify the headers so that they can
    be built without asoundlib.h and linux kernel headers, and the
    verbatim copy doesn't work as is.

    This patch removes again the linux/types.h inclusion and drop __user
    prefix that broke the build and adjusts the corresponding code.

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

    Takashi Iwai
     

11 Dec, 2019

1 commit

  • The driver invokes snd_pcm_period_elapsed() simply from the interrupt
    handler. Set card->sync_irq for enabling the missing sync_stop PCM
    operation.

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

    Takashi Iwai
     

06 Nov, 2019

2 commits

  • Pass the device pointer from the PCI pointer directly, instead of a
    non-standard macro. The macro didn't give any better readability.

    Along with it, drop the unnecessary assignment before the
    snd_dma_alloc_pages() call and simplify by returning the error code
    directly.

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

    Takashi Iwai
     
  • snd_pcm_sgbuf_ops_page is no longer needed to be set explicitly to PCM
    page ops since the recent change in the PCM core (*). Leaving it NULL
    should work as long as the preallocation has been done properly.

    This patch drops the redundant lines.

    (*) 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the
    default mmap handler

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

    Takashi Iwai
     

15 Jul, 2019

1 commit


08 Jul, 2019

1 commit

  • …/sound into for-linus

    ASoC: Updates for v5.3

    This is a very big update, mainly thanks to Morimoto-san's refactoring
    work and some fairly large new drivers.

    - Lots more work on moving towards a component based framework from
    Morimoto-san.
    - Support for force disconnecting muxes from Jerome Brunet.
    - New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant
    CX2072X, Realtek RT1011 and RT1308.

    Signed-off-by: Takashi Iwai <tiwai@suse.de>

    Takashi Iwai
     

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
     

24 May, 2019

1 commit

  • By taking into account the mapping from logical to DMA channels when
    enabling or disabling audio channels, ADAT channels 3 to 8 on the RME
    HDSPe AIO card are now correctly captured and played back in single speed
    mode.

    Since the mapping is an identity mapping for all cards except AIO and
    RayDAT, only those cards should be affected by this patch. It was tested on
    an AIO card. The patch needs testing on other cards, in particular RayDAT.

    Note: this patch does not solve ADAT capture and playback issues in double
    or triple speed mode. That seems to be another problem.

    Signed-off-by: Philippe Bekaert
    Signed-off-by: Takashi Iwai

    Philippe Bekaert
     

08 Feb, 2019

1 commit


07 Feb, 2019

1 commit


06 Feb, 2019

1 commit


19 Dec, 2018

1 commit

  • info->channel is indirectly controlled by user-space, hence leading to
    a potential exploitation of the Spectre variant 1 vulnerability.

    This issue was detected with the help of Smatch:

    sound/pci/rme9652/hdsp.c:4100 snd_hdsp_channel_info() warn: potential spectre issue 'hdsp->channel_map' [r] (local cap)

    Fix this by sanitizing info->channel before using it to index hdsp->channel_map

    Notice that given that speculation windows are large, the policy is
    to kill the speculation on the first load and not worry if it can be
    completed with a dependent load/store [1].

    Also, notice that I refactored the code a bit in order to get rid of the
    following checkpatch warning:

    ERROR: do not use assignment in if condition
    FILE: sound/pci/rme9652/hdsp.c:4103:
    if ((mapped_channel = hdsp->channel_map[info->channel]) < 0)

    [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2

    Cc: stable@vger.kernel.org
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Takashi Iwai

    Gustavo A. R. Silva
     

27 Aug, 2018

1 commit


25 Apr, 2018

2 commits

  • As recently Smatch suggested, one place in RME9652 driver may expand
    the array directly from the user-space value with speculation:
    sound/pci/rme9652/rme9652.c:2074 snd_rme9652_channel_info() warn: potential spectre issue 'rme9652->channel_map' (local cap)

    This patch puts array_index_nospec() for hardening against it.

    BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2
    Reported-by: Dan Carpenter
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • As recently Smatch suggested, a couple of places in HDSP MADI driver
    may expand the array directly from the user-space value with
    speculation:
    sound/pci/rme9652/hdspm.c:5717 snd_hdspm_channel_info() warn: potential spectre issue 'hdspm->channel_map_out' (local cap)
    sound/pci/rme9652/hdspm.c:5734 snd_hdspm_channel_info() warn: potential spectre issue 'hdspm->channel_map_in' (local cap)

    This patch puts array_index_nospec() for hardening against them.

    BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2
    Reported-by: Dan Carpenter
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

13 Nov, 2017

1 commit

  • …e/sound into for-linus

    ASoC: Updates for v4.15

    The biggest thing this release has been the conversion of the AC98 bus
    to the driver model, that's been a long time coming so thanks to Robert
    Jarzmik for his dedication there. Due to there being some AC97 MFD
    there's a few fairly large changes in input and the MFD layer, mainly to
    the wm97xx driver.

    There's also some drivers/drm changes to support the new AMD Stoney
    platform, these are shared with the DRM subsystem and should be being
    merged via both.

    Within the subsystem the overwhelming bulk of the changes is in the
    Intel drivers which continue to need lots of cleanups and fixes, this
    release they've also gained support for their open source firmware.
    There's also some large changs in the core as Morimoto-san continues to
    mirror operations into the component level in preparation for conversion
    of drivers to that.

    - The AC97 bus has finally caught up with the driver model thanks to
    some dedicated and persistent work from Robert Jarzmik.
    - Continued work from Morimoto-san on moving us towards being able to
    use components for everything.
    - Lots of cleanups for the Intel platform code, including support for
    their open source audio firmware.
    - Support for scaling MCLK with sample rate in simple-card.
    - Support for AMD Stoney platform.

    Takashi Iwai
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

26 Oct, 2017

1 commit

  • In preparation for unconditionally passing the struct timer_list
    pointer to all timer callbacks, switch to using the new timer_setup()
    and from_timer() to pass the timer pointer explicitly. These are all the
    "mechanical" changes remaining in the sound subsystem.

    Signed-off-by: Kees Cook
    Acked-by: Mark Brown
    Signed-off-by: Takashi Iwai

    Kees Cook
     

07 Sep, 2017

2 commits


15 Aug, 2017

1 commit


13 Aug, 2017

4 commits