07 Aug, 2020

1 commit

  • Pull sound updates from Takashi Iwai:
    "This became wide and scattered updates all over the sound tree as
    diffstat shows: lots of (still ongoing) refactoring works in ASoC,
    fixes and cleanups caught by static analysis, inclusive term
    conversions as well as lots of new drivers. Below are highlights:

    ASoC core:
    - API cleanups and conversions to the unified mute_stream() call
    - Simplify I/O helper functions
    - Use helper macros to retrieve RTD from substreams

    ASoC drivers:
    - Lots of fixes and cleanups in Intel ASoC drivers
    - Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S,
    Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards,
    nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries
    boards, TI J721e EVM

    ALSA core:
    - Minor code refacotring for SG-buffer handling

    HD-audio:
    - Generalization of mute-LED handling with LED classdev
    - Intel silent stream support for HDMI
    - Device-specific fixes: CA0132, Loongson-3

    Others:
    - Usual USB- and HD-audio quirks for various devices
    - Fixes for echoaudio DMA position handling
    - Various documents and trivial fixes for sparse warnings
    - Conversion to adopt inclusive terms"

    * tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (479 commits)
    ALSA: pci: delete repeated words in comments
    ALSA: isa: delete repeated words in comments
    ALSA: hda/tegra: Add 100us dma stop delay
    ALSA: hda: Add dma stop delay variable
    ASoC: hda/tegra: Set buffer alignment to 128 bytes
    ALSA: seq: oss: Serialize ioctls
    ALSA: hda/hdmi: Add quirk to force connectivity
    ALSA: usb-audio: add startech usb audio dock name
    ALSA: usb-audio: Add support for Lenovo ThinkStation P620
    Revert "ALSA: hda: call runtime_allow() for all hda controllers"
    ALSA: hda/ca0132 - Fix AE-5 microphone selection commands.
    ALSA: hda/ca0132 - Add new quirk ID for Recon3D.
    ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
    ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops
    ALSA: docs: fix typo
    ALSA: doc: use correct config variable name
    ASoC: core: Two step component registration
    ASoC: core: Simplify snd_soc_component_initialize declaration
    ASoC: core: Relocate and expose snd_soc_component_initialize
    ASoC: sh: Replace 'select' DMADEVICES 'with depends on'
    ...

    Linus Torvalds
     

17 Jul, 2020

1 commit

  • Using uninitialized_var() is dangerous as it papers over real bugs[1]
    (or can in the future), and suppresses unrelated compiler warnings
    (e.g. "unused variable"). If the compiler thinks it is uninitialized,
    either simply initialize the variable or make compiler changes.

    In preparation for removing[2] the[3] macro[4], remove all remaining
    needless uses with the following script:

    git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
    xargs perl -pi -e \
    's/\buninitialized_var\(([^\)]+)\)/\1/g;
    s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'

    drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
    pathological white-space.

    No outstanding warnings were found building allmodconfig with GCC 9.3.0
    for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
    alpha, and m68k.

    [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
    [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
    [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
    [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

    Reviewed-by: Leon Romanovsky # drivers/infiniband and mlx4/mlx5
    Acked-by: Jason Gunthorpe # IB
    Acked-by: Kalle Valo # wireless drivers
    Reviewed-by: Chao Yu # erofs
    Signed-off-by: Kees Cook

    Kees Cook
     

09 Jul, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva
    Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor
    Signed-off-by: Takashi Iwai

    Gustavo A. R. Silva
     

10 Feb, 2020

1 commit

  • Fixes the sparse warnings. The cast to __user pointer needs __force:
    sound/isa/sb/emu8000_pcm.c:528:9: warning: cast removes address space '' of expression

    No functional changes, just sparse warning fixes.

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

    Takashi Iwai
     

05 Jan, 2020

1 commit

  • Apply const prefix to each possible place: the static tables for the
    resources, controls, registers, values and parameters.

    Just for minor optimization and no functional changes.

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

    Takashi Iwai
     

03 Jan, 2020

2 commits


11 Dec, 2019

3 commits

  • 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-47-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • PCM core deals the empty ioctl field now as default(*).
    Let's kill the redundant lines.

    (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops")

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

    Takashi Iwai
     
  • Clean up the driver with the new managed buffer allocation API.
    The hw_params and hw_free callbacks became superfluous and got
    dropped.

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

    Takashi Iwai
     

14 Aug, 2019

1 commit


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
     

16 Mar, 2019

1 commit


07 Feb, 2019

1 commit


02 Feb, 2019

1 commit

  • We used to pass NULL to memory allocators for ISA devices due to
    historical reasons. But we prefer rather a proper device object to be
    assigned, so let's fix it by replacing snd_dma_isa_data() call with
    card->dev reference, and kill snd_dma_isa_data() definition.

    Reviewed-by: Christoph Hellwig
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

19 Jan, 2019

1 commit


16 Jan, 2019

1 commit


07 Jan, 2019

1 commit


04 Jan, 2019

1 commit

  • Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
    of the user address range verification function since we got rid of the
    old racy i386-only code to walk page tables by hand.

    It existed because the original 80386 would not honor the write protect
    bit when in kernel mode, so you had to do COW by hand before doing any
    user access. But we haven't supported that in a long time, and these
    days the 'type' argument is a purely historical artifact.

    A discussion about extending 'user_access_begin()' to do the range
    checking resulted this patch, because there is no way we're going to
    move the old VERIFY_xyz interface to that model. And it's best done at
    the end of the merge window when I've done most of my merges, so let's
    just get this done once and for all.

    This patch was mostly done with a sed-script, with manual fix-ups for
    the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.

    There were a couple of notable cases:

    - csky still had the old "verify_area()" name as an alias.

    - the iter_iov code had magical hardcoded knowledge of the actual
    values of VERIFY_{READ,WRITE} (not that they mattered, since nothing
    really used it)

    - microblaze used the type argument for a debug printout

    but other than those oddities this should be a total no-op patch.

    I tried to fix up all architectures, did fairly extensive grepping for
    access_ok() uses, and the changes are trivial, but I may have missed
    something. Any missed conversion should be trivially fixable, though.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

02 Oct, 2018

1 commit


03 Aug, 2018

1 commit

  • For a sake of code simplification, remove the init and the exit
    entries that do nothing.

    Notes for readers: actually it's OK to remove *both* init and exit,
    but not OK to remove the exit entry. By removing only the exit while
    keeping init, the module becomes permanently loaded; i.e. you cannot
    unload it any longer!

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

02 Aug, 2018

1 commit

  • There was a typo of COPY_USER in the dead code (that is disabled
    as default).

    Fixes: 4b83eff81c81 ("ALSA: sb: Convert to the new PCM ops")
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

27 Jul, 2018

3 commits

  • The data types defined in SB CSP driver code are all in little-endian,
    hence the proper type like __le32 should be used.

    Spotted by sparse, a warning like:
    sound/isa/sb/sb16_csp.c:330:14: warning: cast to restricted __le32

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The PCM format type is with __bitwise, and it can't be converted from
    integer implicitly. Instead of an ugly cast, declare the function
    argument of snd_sb_csp_autoload() with the proper snd_pcm_format_t
    type.

    This fixes the sparse warnings like:
    sound/isa/sb/sb16_csp.c:743:22: warning: restricted snd_pcm_format_t degrades to integer

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The PCM format type in snd_pcm_format_t can't be treated as integer
    implicitly since it's with __bitwise. We have already a helper
    function to get the bit index of the given type, and use it in each
    place instead.

    This fixes sparse warnings like:
    sound/isa/sb/sb16_main.c:61:44: warning: restricted snd_pcm_format_t degrades to integer

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

17 Jul, 2018

1 commit


16 Jul, 2018

1 commit


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
     

25 Oct, 2017

2 commits

  • Currently the SB8 MIDI code sets up the timer object at each time
    before scheduling it at trigger callback, but basically this is
    superfluous once after set up. Also, the code misses the
    del_timer_sync() call that may leave a race condition for
    use-after-free.

    This patch addresses these issues, moving timer_setup() to
    snd_sb8dsp_midi(), and adding the del_timer_sync() call at
    snd_sb8dsp_midi_output_trigger() to make sure.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • 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.

    [Re-use the existing chip->midi_substream_output instead of assigning
    a new field to struct snd_sb -- tiwai]

    Signed-off-by: Kees Cook
    Signed-off-by: Takashi Iwai

    Kees Cook
     

17 Aug, 2017

2 commits


15 Aug, 2017

1 commit


13 Aug, 2017

3 commits


12 Jun, 2017

1 commit

  • Many drivers bind the sequencer stuff in off-load by another driver
    module, so that it's loaded only on demand. In the current code, this
    mechanism doesn't work when the driver is built-in while the sequencer
    is module. We check with IS_REACHABLE() and enable only when the
    sequencer is in the same level of build.

    However, this is basically a overshoot. The binder code
    (snd-seq-device) is an individual module from the sequencer core
    (snd-seq), and we just have to make the former a built-in while
    keeping the latter a module for allowing the scenario like the above.

    This patch achieves that by rewriting Kconfig slightly. Now, a driver
    that provides the manual sequencer device binding should select
    CONFIG_SND_SEQ_DEVICE in a way as
    select SND_SEQ_DEVICE if SND_SEQUENCER != n

    Note that the "!=n" is needed here to avoid the influence of the
    sequencer core is module while the driver is built-in.

    Also, since rawmidi.o may be linked with snd_seq_device.o when
    built-in, we have to shuffle the code to make the linker happy.
    (the kernel linker isn't smart enough yet to handle such a case.)
    That is, snd_seq_device.c is moved to sound/core from sound/core/seq,
    as well as Makefile.

    Last but not least, the patch replaces the code using IS_REACHABLE()
    with IS_ENABLED(), since now the condition meets always when enabled.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

10 Jun, 2017

1 commit

  • Currently OSS sequencer emulation is tied with ALSA sequencer core,
    both are built in the same level; i.e. when CONFIG_SND_SEQUENCER=y,
    the OSS sequencer emulation is also always built-in, even though the
    functionality can be built as an individual module.

    This patch changes the rule and allows users to build snd-seq-oss
    module while others are built-in. Essentially, it's just a few simple
    changes in Kconfig and Makefile. Some driver codes like opl3 need to
    convert from the simple ifdef to IS_ENABLED(). But that's all.

    You might wonder how about the dependency: right, it can be messy, but
    it still works. Since we rewrote the sequencer binding with the
    standard bus, the driver can be bound at any time on demand. So, the
    synthesizer driver module can be loaded individually from the OSS
    emulation core before/after it.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

09 Jun, 2017

1 commit