summaryrefslogtreecommitdiff
path: root/sound/core/device.c
AgeCommit message (Collapse)Author
2015-03-16Merge branch 'topic/hda-unbind' into for-nextTakashi Iwai
2015-03-10ALSA: core: Drop superfluous error/debug messages after malloc failuresTakashi Iwai
The kernel memory allocators already report the errors when the requested allocation fails, thus we don't need to warn it again in each caller side. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-03ALSA: core: Re-add snd_device_disconnect()Takashi Iwai
Revive snd_device_disconnect() again so that it can be called from the individual driver. This time, HD-audio will need it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-25ALSA: Clean up snd_device_*() codesTakashi Iwai
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 <tiwai@suse.de>
2014-02-25ALSA: Use priority list for managing device listTakashi 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 <tiwai@suse.de>
2014-02-14ALSA: Drop __bitwise and typedefs for snd_device attributesTakashi Iwai
Using __bitwise and typedefs for the attributes of snd_device struct isn't so useful, and rather it worsens the readability. Let's drop them and use the straightforward enum. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14ALSA: core: Use standard printk helpersTakashi Iwai
Use dev_err() & co as much as possible. If not available (no device assigned at the calling point), use pr_xxx() helpers instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-12ALSA: add/change some comments describing function return valuesYacine Belkadi
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 <yacine.belkadi.1@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where neededPaul Gortmaker
These aren't modules, but they do make use of these macros, so they will need export.h to get that definition. Previously, they got it via the implicit module.h inclusion. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-02-14ALSA: core: sparse cleanupsClemens Ladisch
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 <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-16ALSA: Print function symbol in the error messagesTakashi Iwai
Use the new %pF for error messages in snd_device_*() functions to give more understandable results. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-13ALSA: Kill snd_assert() in sound/core/*Takashi Iwai
Kill snd_assert() in sound/core/*, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai
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 <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16[ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-02-09[ALSA] alsa core: convert to list_for_each_entry*Johannes Berg
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 <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] Unregister device files at disconnectionTakashi Iwai
Orignally proposed by Sam Revitch <sam.revitch@gmail.com>. 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 <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-22[ALSA] Clean up EXPORT_SYMBOL()s in snd moduleTakashi Iwai
Move EXPORT_SYMBOL()s to places adjacent to functions/variables. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-04[ALSA] Revert the nested-device patchTakashi Iwai
Modules: ALSA Core Revert the nested-device patch to keep the compatibility with the current HAL configuration. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Nest sound devicesClemens Ladisch
Modules: ALSA Core Make the control device parent of all other ALSA devices of a card. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] Add error messagesTakashi Iwai
Add error messages in the critial error path to be more verbose. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: Core componentTakashi Iwai
Modules: ALSA Core Remove xxx_t typedefs from the core component. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] Replace with kzalloc() - core stuffTakashi Iwai
Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel Timer Midlevel,ALSA<-OSS emulation Replace kcalloc(1,..) with kzalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-07-28[ALSA] Fix two typos and changes on snd_assert()Henrik Kretzschmar
ALSA Core Both typos were in the kerneldocs. I splitted the snd_assert() calls in one-expression-per-call for better debugging. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds
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!