aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/hwdep.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: Avoid endless sleep after disconnectTakashi Iwai2012-11-171-0/+7
| | | | | | | | | | | commit 0914f7961babbf28aaa2f19b453951fb4841c03f upstream. When disconnect callback is called, each component should wake up sleepers and check card->shutdown flag for avoiding the endless sleep blocking the proper resource release. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ALSA: Add a reference counter to card instanceTakashi Iwai2012-11-171-1/+4
| | | | | | | | | | | | | | | commit a0830dbd4e42b38aefdf3fb61ba5019a1a99ea85 upstream. For more strict protection for wild disconnections, a refcount is introduced to the card instance, and let it up/down when an object is referred via snd_lookup_*() in the open ops. The free-after-last-close check is also changed to check this refcount instead of the empty list, too. Reported-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ALSA: hwdep - Make open callback optionalTakashi Iwai2009-02-051-4/+5
| | | | | | | Don't require the open callback as mandatory. Now all hwdeps ops can be optional. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Kill snd_assert() in sound/core/*Takashi Iwai2008-08-131-6/+10
| | | | | | | | 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>
* [ALSA] Remove sound/driver.hTakashi Iwai2008-01-311-1/+0
| | | | | | | | | | | | 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>
* [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela2007-10-161-2/+2
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* header cleaning: don't include smp_lock.h when not usedRandy Dunlap2007-05-081-1/+0
| | | | | | | | | | | | Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] mark struct file_operations const 9Arjan van de Ven2007-02-121-1/+1
| | | | | | | | | | | Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [ALSA] snd_hwdep_release() racefixKarsten Wiese2007-02-091-4/+5
| | | | | | | | | | snd_card_file_remove() can free the snd_card. Touch hw->* only before calling snd_card_file_remove(). Unrelated: Allow hwdep devices not to have own ops.release(); Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] alsa core: convert to list_for_each_entry*Johannes Berg2007-02-091-8/+2
| | | | | | | | | | | 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>
* [ALSA] Dereference after free in snd_hwdep_release()Florin Malita2006-10-061-1/+2
| | | | | | | | | | snd_card_file_remove() may free hw->card so we can't dereference hw->card->module after that. Coverity ID 1420. Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Unregister device files at disconnectionTakashi Iwai2006-09-231-5/+5
| | | | | | | | | | | | 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>
* [ALSA] Fix disconnection of proc interfaceTakashi Iwai2006-09-231-1/+1
| | | | | | | | | | - Add the linked list to each proc entry to enable a single-shot disconnection (unregister) - Deprecate snd_info_unregister(), use snd_info_free_entry() - Removed NULL checks of snd_info_free_entry() Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Remove unneeded read/write_size fields in proc text opsTakashi Iwai2006-06-221-1/+0
| | | | | | | Remove unneeded read/write_size fields in proc text ops. snd_info_set_text_ops() is fixed, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] semaphore -> mutex (core part)Ingo Molnar2006-03-221-21/+22
| | | | | | | | | | | Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] Optimize for config without PROC_FSTakashi Iwai2006-01-031-10/+23
| | | | | | | | Modules: HWDEP Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel Optimize the code when compiled without CONFIG_PROC_FS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] dynamic minors (3/6): store device-specific object pointers dynamicallyClemens Ladisch2006-01-031-49/+42
| | | | | | | | | | Instead of storing the pointers to the device-specific structures in an array, put them into the struct snd_minor, and look them up dynamically. This makes the device type modules independent of the minor number encoding. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* [ALSA] dynamic minors (1/6): store device type in struct snd_minorClemens Ladisch2006-01-031-8/+3
| | | | | | | | | | Instead of a comment string, store the device type in the snd_minor structure. This makes snd_minor more flexible, and has the nice side effect that we don't need anymore to create a separate snd_minor template for registering a device but can pass the file_operations directly to snd_register_device(). Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* [ALSA] Add error messagesTakashi Iwai2006-01-031-3/+4
| | | | | | Add error messages in the critial error path to be more verbose. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] Remove xxx_t typedefs: HwdepTakashi Iwai2006-01-031-41/+49
| | | | | | | | Modules: HWDEP Midlevel Remove xxx_t typedefs from the core hwdep codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] fix improper CONFIG_SND_MAJOR usageClemens Ladisch2005-11-041-7/+3
| | | | | | | | Modules: HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel,ALSA Core Replace usage of CONFIG_SND_MAJOR with snd_major, where appropriate. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* [ALSA] Replace with kzalloc() - core stuffTakashi Iwai2005-09-121-1/+1
| | | | | | | | 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>
* Linux-2.6.12-rc2Linus Torvalds2005-04-161-0/+524
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!