10 Jul, 2020

1 commit


07 Jul, 2020

1 commit


05 Jan, 2020

1 commit

  • Apply const prefix to each possible place: the static register tables,
    the coef tables, the string arrays, etc.

    Just for minor optimization and no functional changes.

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

    Takashi Iwai
     

03 Jan, 2020

3 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
     
  • Now snd_ac97_bus() takes the const ops pointer, so we can define the
    snd_ac97_bus_ops locally as const as well for further optimization.

    There should be no functional changes by this patch.

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

    Takashi Iwai
     
  • Now we may declare const for snd_device_ops definitions, so let's do
    it for optimization.

    There should be no functional changes by this patch.

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

    Takashi Iwai
     

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

    Takashi Iwai
     
  • Clean up the drivers with the new managed buffer allocation API.
    The superfluous snd_pcm_lib_malloc_pages() and
    snd_pcm_lib_free_pages() calls are dropped.

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

    Takashi Iwai
     

12 Nov, 2019

1 commit

  • The code change in commit 6974f8ad4494 ("ALSA: pci: Avoid non-standard
    macro usage") contained an incorrect conversion, which left the
    invalid pointer passed to the allocator for au88x0 driver. Fix it.

    Fixes: 6974f8ad4494 ("ALSA: pci: Avoid non-standard macro usage")
    Link: https://lore.kernel.org/r/20191112143243.22216-1-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.

    Link: https://lore.kernel.org/r/20191105151856.10785-24-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

  • Fix below issues reported by coccicheck

    sound/pci/au88x0/au88x0_a3d.c:821:8-15: Unneeded variable: "changed".
    Return "1" on line 834
    sound/pci/au88x0/au88x0_a3d.c:768:5-12: Unneeded variable: "changed".
    Return "1" on line 777
    sound/pci/au88x0/au88x0_a3d.c:804:5-12: Unneeded variable: "changed".
    Return "1" on line 813
    sound/pci/au88x0/au88x0_a3d.c:786:8-15: Unneeded variable: "changed".
    Return "1" on line 796

    Signed-off-by: Hariprasad Kelam
    Signed-off-by: Takashi Iwai

    Hariprasad Kelam
     

31 May, 2019

2 commits

  • 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
     
  • 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 library 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 10 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Reviewed-by: Armijn Hemel
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527063114.579638220@linutronix.de
    Link: https://lkml.kernel.org/r/20190524100843.303899865@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

1 commit

  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have MODULE_LICENCE("GPL*") inside which was used in the initial
    scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

12 Oct, 2018

1 commit

  • As a preparatory patch for the upcoming -Wimplicit-fallthrough
    compiler checks, add the "fall through" annotation in au88xx driver.

    Although the usages in both both functions vortex_adbdma_setbuffers()
    and vortex_wtdma_setbuffers() look a bit suspicious, we keep the
    behavior as before, just to be safer. If it were broken, we should
    have already received bug reports.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

27 Jul, 2018

1 commit

  • 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 vortex_alsafmt_aspfmt() with the proper snd_pcm_format_t
    type.

    This fixes the sparse warning like:
    sound/pci/au88x0/au88x0_core.c:2778:14: warning: restricted snd_pcm_format_t degrades to integer

    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
     

17 Oct, 2017

1 commit


17 Aug, 2017

1 commit


10 Aug, 2017

1 commit


09 Jun, 2017

1 commit


24 Mar, 2017

1 commit

  • 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

    Arnd Bergmann
     

22 Feb, 2017

1 commit

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

    @r1 disable optional_qualifier @
    identifier i;
    position p;
    @@
    static struct snd_kcontrol_new i@p = {...};

    @ok1@
    identifier r1.i;
    position p;
    expression e1;
    @@
    snd_ctl_new1(&i@p,e1)

    @bad@
    position p!={r1.p,ok1.p};
    identifier r1.i;
    @@
    i@p

    @depends on !bad disable optional_qualifier@
    identifier r1.i;
    @@
    +const
    struct snd_kcontrol_new i;

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

    Bhumika Goyal
     

14 Nov, 2016

1 commit


16 Sep, 2016

1 commit


29 Jun, 2016

1 commit


13 May, 2016

1 commit

  • There are a few calls of memset() to stream->resources, but they all
    are called in a wrong size, sizeof(unsigned char) * VORTEX_RESOURCE_LAST,
    while this field is a u32 array. This may leave the memories not
    zero-cleared.

    Fix it by replacing them with a simpler sizeof(stream->resources)
    instead.

    Reported-by: David Binderman
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

26 Apr, 2016

1 commit

  • au88x0 hardware seems returning the current pointer at the buffer
    boundary instead of going back to zero. This results in spewing
    warnings from PCM core.

    This patch corrects the return value from the pointer callback within
    the proper value range, just returning zero if the position is equal
    or above the buffer size.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

16 Apr, 2015

1 commit

  • Replace occurences of the pci api by appropriate call to the dma api.

    A simplified version of the semantic patch that finds this problem is as
    follows: (http://coccinelle.lip6.fr)

    @deprecated@
    idexpression id;
    position p;
    @@

    (
    pci_dma_supported@p ( id, ...)
    |
    pci_alloc_consistent@p ( id, ...)
    )

    @bad1@
    idexpression id;
    position deprecated.p;
    @@
    ...when != &id->dev
    when != pci_get_drvdata ( id )
    when != pci_enable_device ( id )
    (
    pci_dma_supported@p ( id, ...)
    |
    pci_alloc_consistent@p ( id, ...)
    )

    @depends on !bad1@
    idexpression id;
    expression direction;
    position deprecated.p;
    @@

    (
    - pci_dma_supported@p ( id,
    + dma_supported ( &id->dev,
    ...
    + , GFP_ATOMIC
    )
    |
    - pci_alloc_consistent@p ( id,
    + dma_alloc_coherent ( &id->dev,
    ...
    + , GFP_ATOMIC
    )
    )

    Signed-off-by: Quentin Lambert
    Signed-off-by: Takashi Iwai

    Quentin Lambert
     

29 Jan, 2015

1 commit


28 Jan, 2015

1 commit


29 Oct, 2014

1 commit


15 Oct, 2014

2 commits

  • pr_* macros replaced with dev_* as they are more preffered over pr_*.
    each file which had pr_* was reviewed manually and replaced with dev_*.
    here we have actually used the reference of the vortex which was added
    to some functions in the previous patch of this series.

    The prefix of the CARD_NAME and prefix of "vortex:" was also
    removed as the dev_* will print the device name.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Takashi Iwai

    Sudip Mukherjee
     
  • added a pointer of the vortex in the following functions :

    vortex_alsafmt_aspfmt
    vortex_Vort3D_InitializeSource
    a3dsrc_ZeroStateA3D

    so that we can have a reference of the vortex in the function.
    this reference of the vortex will actually be used in a later patch
    to convert the pr_* macro to dev_*.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Takashi Iwai

    Sudip Mukherjee
     

09 Sep, 2014

1 commit

  • as pr_* macros are more preffered over printk, so printk replaced
    with corresponding pr_* macros.
    this patch will generate warning from checkpatch as it only did printk
    replacement and didnot fixed other style issues.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Takashi Iwai

    Sudip Mukherjee
     

13 Aug, 2014

1 commit

  • We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
    meet kernel coding style guidelines. This issue was reported by checkpatch.

    A simplified version of the semantic patch that makes this change is as
    follows (http://coccinelle.lip6.fr/):

    //

    @@
    identifier i;
    declarer name DEFINE_PCI_DEVICE_TABLE;
    initializer z;
    @@

    - DEFINE_PCI_DEVICE_TABLE(i)
    + const struct pci_device_id i[]
    = z;

    //

    [bhelgaas: add semantic patch]
    Signed-off-by: Benoit Taine
    Signed-off-by: Bjorn Helgaas

    Benoit Taine
     

12 Feb, 2014

1 commit