24 Mar, 2020

1 commit

  • A new small helper to get the current state of the device registration
    for the given object. It'll be used for USB-audio driver to check the
    delayed device registrations.

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

    Takashi Iwai
     

03 Jan, 2020

1 commit

  • This is a preliminary patch to allow const for snd_device_ops
    definitions in each driver's code. The ops reference is read-only,
    hence it can be declared as const for further optimization.

    There should be no functional changes by this patch.

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

    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
     

17 May, 2018

1 commit

  • The commit 289ca025ee1d ("ALSA: Use priority list for managing device
    list") changed the way to register/disconnect/free devices via a
    single priority list. This helped to make behavior consistent, but it
    also changed a slight behavior change: namely, the control device is
    registered earlier than others, while it was supposed to be the very
    last one.

    I've put SNDRV_DEV_CONTROL in the current position as the release of
    ctl elements often conflict with the private ctl elements some PCM or
    other components may create, which often leads to a double-free.
    But, the order of register and disconnect should be indeed fixed as
    expected in the early days: the control device gets registered at
    last, and disconnected at first.

    This patch changes the priority list order to move SNDRV_DEV_CONTROL
    as the last guy to assure the register / disconnect order. Meanwhile,
    for keeping the messy resource release order, manually treat the
    control and lowlevel devices as last freed one.

    Additional note:
    The lowlevel device is the device where a card driver creates at
    probe. And, we still keep the release order control -> lowlevel, as
    there might be link from a control element back to a lowlevel object.

    Fixes: 289ca025ee1d ("ALSA: Use priority list for managing device list")
    Reported-by: Tzung-Bi Shih
    Tested-by: Tzung-Bi Shih
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

07 Sep, 2017

1 commit


16 Mar, 2015

1 commit


10 Mar, 2015

1 commit


03 Mar, 2015

1 commit


25 Feb, 2014

2 commits

  • A few code cleanups and optimizations. In addition, drop
    snd_device_disconnect() that isn't used at all, and drop the return
    values from snd_device_free*().

    Another slight difference by this change is that now the device state
    will become always SNDRV_DEV_REGISTERED no matter whether dev_register
    ops is present or not. It's for better consistency. There should be
    no impact for the current tree, as the state isn't checked.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Basically, the device type specifies the priority of the device to be
    registered / freed, too. However, the priority value isn't well
    utilized but only it's checked as a group. This results in
    inconsistent register and free order (where each of them should be in
    reversed direction).

    This patch simplifies the device list management code by simply
    inserting a list entry at creation time in an incremental order for
    the priority value. Since we can just follow the link for register,
    disconnect and free calls, we don't have to specify the group; so the
    whole enum definitions are also simplified as well.

    The visible change to outside is that the priorities of some object
    types are revisited. For example, now the SNDRV_DEV_LOWLEVEL object
    is registered before others (control, PCM, etc) and, in return,
    released after others. Similarly, SNDRV_DEV_CODEC is in a lower
    priority than SNDRV_DEV_BUS for ensuring the dependency.

    Also, the unused SNDRV_DEV_TOPLEVEL, SNDRV_DEV_LOWLEVEL_PRE and
    SNDRV_DEV_LOWLEVEL_NORMAL are removed as a cleanup.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

14 Feb, 2014

2 commits


12 Mar, 2013

1 commit

  • script/kernel-doc reports the following type of warnings (when run in verbose
    mode):

    Warning(sound/core/init.c:152): No description found for return value of
    'snd_card_create'

    To fix that:
    - add missing descriptions of function return values
    - use "Return:" sections to describe those return values

    Along the way:
    - complete some descriptions
    - fix some typos

    Signed-off-by: Yacine Belkadi
    Signed-off-by: Takashi Iwai

    Yacine Belkadi
     

01 Nov, 2011

1 commit


15 Feb, 2011

1 commit

  • Change the core code where sparse complains. In most cases, this means
    just adding annotations to confirm that we indeed want to do the dirty
    things we're doing.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

16 Oct, 2008

1 commit


13 Aug, 2008

1 commit


01 Feb, 2008

1 commit

  • This header file exists only for some hacks to adapt alsa-driver
    tree. It's useless for building in the kernel. Let's move a few
    lines in it to sound/core.h and remove it.
    With this patch, sound/driver.h isn't removed but has just a single
    compile warning to include it. This should be really killed in
    future.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     

16 Oct, 2007

1 commit


09 Feb, 2007

1 commit

  • This patch converts most uses of list_for_each to list_for_each_entry all
    across alsa. In some place apparently an item can be on a list with
    different pointers so of course that isn't compatible with list_for_each, I
    therefore didn't touch those places.

    Signed-off-by: Johannes Berg
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Johannes Berg
     

23 Sep, 2006

1 commit

  • Orignally proposed by Sam Revitch .
    Unregister device files at disconnection to avoid the futher accesses.
    Also, the dev_unregister callback is removed and replaced with the
    combination of disconnect + free.
    A new function snd_card_free_when_closed() is introduced, which is
    used in USB disconnect callback.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     

23 Jun, 2006

1 commit


04 Jan, 2006

1 commit


03 Jan, 2006

3 commits


12 Sep, 2005

1 commit


28 Jul, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds