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


03 Jun, 2017

1 commit


25 May, 2017

1 commit

  • In design of ALSA pcm core, 'struct snd_pcm_ops.copy' is expected to
    copy PCM frames, according to frame alignment on intermediate buffer for
    userspace and dedicated buffer for data transmission. In this callback,
    value of 'channel' argument depends on the frame alignment, which drivers
    registers to runtime of PCM substream. When target devices can handle
    non-interleaved buffer, this value has positive value, otherwise negative.

    ALSA driver for PCM component of EMU8000 chip is programmed with local
    macro to switch the frame alignment. The 'copy' operation in
    non-interleaved side has evaluation of the 'channel' argument (actually
    it's 'voice' argument). This is useless.

    This commit remove the evaluation.

    [tiwai: the negative channel argument was the inheritance from the old
    code where -1 was meant for interleaved mode. The mix-up was dropped
    meanwhile, thus it's correct to assume that we receive no longer -1
    there, and it's safe to cleanup the relevant code.

    Also, voice=0 for channel==1 is trivial, and it can be dropped, too.]

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

21 May, 2017

1 commit

  • Declare snd_kcontrol_new structures as const as they are only passed an
    argument to the function snd_ctl_new1. This argument is of type const,
    so snd_kcontrol_new structures having this property can be made const.
    Done using Coccinelle:

    @r disable optional_qualifier@
    identifier x;
    position p;
    @@
    static struct snd_kcontrol_new x@p={...};

    @ok@
    identifier r.x;
    position p;
    @@
    snd_ctl_new1(&x@p,...)

    @bad@
    position p != {r.p,ok.p};
    identifier r.x;
    @@
    x@p

    @depends on !bad disable optional_qualifier@
    identifier r.x;
    @@
    +const
    struct snd_kcontrol_new x;

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Takashi Iwai

    Bhumika Goyal
     

17 May, 2017

1 commit


20 Apr, 2017

1 commit

  • When the kernel is running in secure boot mode, we lock down the kernel to
    prevent userspace from modifying the running kernel image. Whilst this
    includes prohibiting access to things like /dev/mem, it must also prevent
    access by means of configuring driver modules in such a way as to cause a
    device to access or modify the kernel image.

    To this end, annotate module_param* statements that refer to hardware
    configuration and indicate for future reference what type of parameter they
    specify. The parameter parser in the core sees this information and can
    skip such parameters with an error message if the kernel is locked down.
    The module initialisation then runs as normal, but just sees whatever the
    default values for those parameters is.

    Note that we do still need to do the module initialisation because some
    drivers have viable defaults set in case parameters aren't specified and
    some drivers support automatic configuration (e.g. PNP or PCI) in addition
    to manually coded parameters.

    This patch annotates drivers in sound/isa/.

    Suggested-by: Alan Cox
    Signed-off-by: David Howells
    cc: Jaroslav Kysela
    cc: Takashi Iwai
    cc: alsa-devel@alsa-project.org

    David Howells
     

02 Mar, 2017

1 commit


12 Jan, 2017

1 commit


01 Jun, 2016

2 commits


12 Feb, 2015

1 commit

  • This patch moves the driver object initialization and allocation to
    each driver's module init/exit code like other normal drivers. The
    snd_seq_driver struct is now published in seq_device.h, and each
    driver is responsible to define it with proper driver attributes
    (name, probe and remove) with snd_seq_driver specific attributes as id
    and argsize fields. The helper functions snd_seq_driver_register(),
    snd_seq_driver_unregister() and module_snd_seq_driver() are used for
    simplifying codes.

    Signed-off-by: Takashi Iwai

    Takashi Iwai