aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/core.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-10-25Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6Linus Torvalds1-1/+1
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (365 commits) ALSA: hda - Disable sticky PCM stream assignment for AD codecs ALSA: usb - Creative USB X-Fi volume knob support ALSA: ca0106: Use card specific dac id for mute controls. ALSA: ca0106: Allow different sound cards to use different SPI channel mappings. ALSA: ca0106: Create a nice spot for mapping channels to dacs. ALSA: ca0106: Move enabling of front dac out of hardcoded setup sequence. ALSA: ca0106: Pull out dac powering routine into separate function. ALSA: ca0106 - add Sound Blaster 5.1vx info. ASoC: tlv320dac33: Use usleep_range for delays ALSA: usb-audio: add Novation Launchpad support ALSA: hda - Add workarounds for CT-IBG controllers ALSA: hda - Fix wrong TLV mute bit for STAC/IDT codecs ASoC: tpa6130a2: Error handling for broken chip ASoC: max98088: Staticise m98088_eq_band ASoC: soc-core: Fix codec->name memory leak ALSA: hda - Apply ideapad quirk to Acer laptops with Cxt5066 ALSA: hda - Add some workarounds for Creative IBG ALSA: hda - Fix wrong SPDIF NID assignment for CA0110 ALSA: hda - Fix codec rename rules for ALC662-compatible codecs ALSA: hda - Add alc_init_jacks() call to other codecs ...
2010-10-22driver core: remove CONFIG_SYSFS_DEPRECATED_V2 but keep it for block devicesKay Sievers1-6/+0
This patch removes the old CONFIG_SYSFS_DEPRECATED_V2 config option, but it keeps the logic around to handle block devices in the old manner as some people like to run new kernel versions on old (pre 2007/2008) distros. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: "James E.J. Bottomley" <James.Bottomley@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-17ALSA: fix unused warnings with snd_power_get_stateMike Frysinger1-1/+1
If we compile the ASoC code with PM disabled, we hit stuff like: sound/soc/soc-dapm.c: In function 'snd_soc_dapm_suspend_check': sound/soc/soc-dapm.c:440: warning: unused variable 'codec' So tweak the stub macro to avoid these issues. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-14ALSA: Add snd_pci_quirk_lookup_id()Takashi Iwai1-0/+3
Added a new function to look up a quirk entry with the given PCI SSID instead of a pci device pointer. This can be used when the searched ID is overridden for debugging or such a purpose. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-10Merge branch 'topic/snd-printk' into for-linusTakashi Iwai1-24/+14
* topic/snd-printk: ALSA: Fixed a typo of printk() ALSA: Add debug module option ALSA: core - strip too long file names in snd_print*()
2009-09-07ALSA: Remove unneeded ifdef from sound/core.hTakashi Iwai1-4/+0
Remove the old hack that was needed for building alsa-driver modules externally for old kernels. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-07ALSA: Remove struct snd_monitor_file from public sound/core.hTakashi Iwai1-9/+0
The struct snd_monitor_file is used locally only in sound/core/init.c, thus it should be moved there from the public sound/core.h. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-28ALSA: Fixed a typo of printk()Takashi Iwai1-1/+1
Fixed a silly typo of printk() included in the previous patch... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-27ALSA: Add debug module optionTakashi Iwai1-24/+14
Add debug module option to snd core. This controls the debug print level. When CONFIG_SND_DEBUG_VERBOSE is set, you can suppress the debug messages by giving or changing this parameter to a lower value. debug=0 means no debug messsages. As default, it's set to the verbose level 2. Since this option can be changed dynamically via sysfs file, you can suppress the verbose debug messages on the fly, which wasn't possible before. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-10Merge branch 'topic/cleanup' into for-linusTakashi Iwai1-10/+0
* topic/cleanup: ALSA: Remove deprecated include/sound/driver.h ALSA: Remove deprecated snd_card_new()
2009-06-02ALSA: Core - add snd_card_set_id() functionJaroslav Kysela1-0/+1
Introduce snd_card_set_id() function to allow lowlevel drivers to set default identification name for card slot. The function checks also for identification name collisions and tries to create unique name. Also, the snd_card_create() function is simplified, because this new function is used. As bonus, proper name collision checks are evaluated at the card create time. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21ALSA: Remove deprecated snd_card_new()Takashi Iwai1-10/+0
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-24Merge branch 'topic/ctl-list-cleanup' into for-linusTakashi Iwai1-3/+3
2009-03-24Merge branch 'topic/quirk-cleanup' into for-linusTakashi Iwai1-2/+14
2009-03-09ALSA: Clean up snd_monitor_file managementTakashi Iwai1-3/+3
Use the standard linked list for snd_monitor_file management. Also, move the list deletion of shutdown_list element into snd_disconnect_release() (for simplification). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-09ALSA: Add subdevice_mask field to quirk entriesTakashi Iwai1-2/+14
Introduced a new field, subdevice_mask, which specifies the bitmask to match with the given subdevice ID. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: Introduce snd_card_create()Takashi Iwai1-1/+13
Introduced snd_card_create() function as a replacement of snd_card_new(). The new function returns a negative error code so that the probe callback can return the proper error code, while snd_card_new() can give only NULL check. The old snd_card_new() is still provided as an inline function but with __deprecated attribute. It'll be removed soon later. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-26Merge branch 'topic/misc' into topic/pcsp-fixTakashi Iwai1-3/+25
Conflicts: sound/drivers/pcsp/pcsp_lib.c
2008-11-10Merge branches 'topic/fix/misc' and 'topic/fix/hda' into for-linusTakashi Iwai1-3/+7
2008-11-07ALSA: Document debug macrosTakashi Iwai1-1/+23
Add descriptions of snd_BUG() and snd_BUG_ON(). Also fixed a typo in the comment of snd_printk(), too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-07ALSA: Evaluate condition in snd_BUG_ON() in non-debugging caseTakashi Iwai1-2/+2
Change snd_BUG_ON() to evaluate the given condition, at least, in syntax for avoiding compile warnings such as unused variables. The compiler should optimize out the condition evaluation in the real code, though. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-07alsa: fix snd_BUG_on() and friendsAndrew Morton1-3/+7
sound/pci/pcxhr/pcxhr_core.c: In function 'pcxhr_set_pipe_cmd_params': sound/pci/pcxhr/pcxhr_core.c:700: warning: statement with no effect sound/pci/pcxhr/pcxhr_core.c:706: warning: statement with no effect sound/pci/pcxhr/pcxhr_core.c:710: warning: statement with no effect Due to try to fix this, and be more conventional about the empty stubs. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-11Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6David S. Miller1-25/+7
Conflicts: sound/core/memalloc.c
2008-10-10ALSA: Increase components array sizeTakashi Iwai1-1/+1
Increase the card components[] (and thus snd_card_info.components[], too) array size from 80 to 128 chars so that more strings can be stored. The 80 chars aren't enough for more than 2 HD-audio codecs, and this hits an ugly snd_BUG() as reported by Wu Fegguang for HP 2230s. The control protocol number is increased to 2.0.6 as well, in case it matters. Reported-by: Wu Fengguang <wfg@linux.intel.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-29alsa: Remove special SBUS dma support code.David S. Miller1-3/+0
No longer used. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-13ALSA: Clean up snd_BUG()Takashi Iwai1-5/+1
Use the standard WARN() macro for snd_BUG(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-13ALSA: Kill snd_assert() definitionTakashi Iwai1-19/+0
Remove snd_assert() completely now. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-13ALSA: Introduce snd_BUG_ON() macroTakashi Iwai1-0/+4
Introduced snd_BUG_ON() macro as a replacement of snd_assert() macro. snd_assert() is pretty ugly as it has the control flow in its argument. OTOH, snd_BUG_ON() behaves like a normal conditional, thus it's much easier to read the flow. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-29ALSA: Add jack reporting APIMark Brown1-0/+1
Currently very few systems provide information about jack status to user space, even though many have hardware facilities to do detection. Those systems that do use an input device with the existing SW_HEADPHONE_INSERT switch type to do so, often independently of ALSA. This patch introduces a standard method for representing jacks to user space into ALSA. It allows drivers to register jacks for a sound card with the input subsystem, binding the input device to the card to help user space associate the input devices with their sound cards. The created input devices are named in the form "card longname jack" where jack is provided by the driver when allocating a jack. By default the parent for the input device is the sound card but this can be overridden by the card driver. The existing user space API with SW_HEADPHONE_INSERT is preserved. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-27[ALSA] Replace CONFIG_SND_DEBUG_DETECT with CONFIG_SND_DEBUG_VERBOSETakashi Iwai1-4/+4
Replace CONFIG_SND_DEBUG_DETECT with CONFIG_SND_DEBUG_VERBOSE to represent its meaning more better. This config isn't provided only for the detection but for more verbose debug prints in general. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] sound/core.h: evil #ifdefsPavel Machek1-2/+2
snd_minor_info_oss_* is an function returning int _or_ comment, depending on config parameters. That is truly evil, fix it. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] fix comments in sound/core.hPavel Machek1-3/+3
Two sentences seem to be spliced into one in comment, fix that and fix english. Also fix codingstyle. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai1-0/+10
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 Kysela1-1/+1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-02-09[PATCH] Fix breakage with CONFIG_SYSFS_DEPRECATEDTakashi Iwai1-1/+1
The fix for sysfs breakage with CONFIG_SYSFS_DEPRECATED was flown away by the conflicted merge of the ALSA git tree. The patch below fixes it again. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] Add PCI quirk list helper functionTakashi Iwai1-0/+25
Added a helper function snd_pci_quirk_lookup() to look up PCI SSID quirk list. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] Remove obsolete typedefs.hTakashi Iwai1-2/+0
Removed obsolete typedefs.h. It existes only for backward compatibility, and now all codes should be free from such typedefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] allow registering an alsa device with struct device pointerJohannes Berg1-3/+34
This patch adds snd_register_device_for_dev taking a struct device pointer to link the new device to and makes snd_register_device a simple static inline wrapper around it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-01-29[PATCH] ALSA: Fix sysfs breakageTakashi Iwai1-3/+15
The recent change for a new sysfs tree with card* object breaks the /sys/class/sound tree if CONFIG_SYSFS_DEPRECATED is enabled. The device in each entry doesn't point the correct device object: /sys/class/sound ... |-- pcmC0D0c | |-- dev | |-- device -> ../../../class/sound/card0 | |-- pcm_class | |-- power | | `-- wakeup | |-- subsystem -> ../../../class/sound | `-- uevent Also, this change breaks some drivers (like sound/arm/*) referring card->dev directly to obtain the device object for memory handling. This patch reverts the semantics of card->dev to the former version, which points to a real device object. The card* object is stored in a new card->card_dev field, instead. The device parent is chosen either card->dev or card->card_dev according to CONFIG_SYSFS_DEPRECATED to keep the tree compatibility. Also, card* isn't created if CONFIG_SYSFS_DEPRECATED is enabled. The reason of card* object is a root of all beloing devices, and it makes little sense if each sound device points to the real device object directly. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Monty Montgomery <xiphmont@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert sound core to use struct deviceGreg Kroah-Hartman1-3/+5
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. It also makes the struct sound_card to show up as a "real" device where all the different sound class devices are placed as childs and different card attribute files can hang off of. /sys/class/sound is still a flat directory, but the symlink targets of all devices belonging to the same card, point the the /sys/devices tree below the new card device object. Thanks to Kay for the updates to this patch. Signed-off-by: Kay Sievers <kay.sievers@novell.com> Acked-by: Jaroslav Kysela <perex@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-06[ALSA] Handle file operations during snd_card disconnects using static file->f_opKarsten Wiese1-2/+2
Alsa used to kmalloc one file->f_op per file per disconnecting snd_card. This led to oopses sometimes when file->f_op was freed before __fput() finished. Patch adds a virtual device for disconnect: VDD. VDD consists of: LIST_HEAD(shutdown_files) protected by DEFINE_SPINLOCK(shutdown_mutex) static struct file_operations snd_shutdown_f_ops and functions assigned to it Additions to struct snd_monitor_file to specify if instance is hidden by VDD or not. A VDD's instance is created in snd_card_disconnect() under the card->files_lock. cleaned up in snd_card_file_remove() under the card->files_lock. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] Add pcm_class attribute to PCM sysfs entryTakashi Iwai1-0/+4
This patch adds a new attribute, pcm_class, to each PCM sysfs entry. It's useful to detect what kind of PCM stream is, for example, HAL can check whether it's a modem or not. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] Deprecate snd_card_free_in_thread()Takashi Iwai1-3/+0
Deprecated snd_card_free_in_thread(), replaced with snd_card_free_when_closed(). 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 Iwai1-1/+2
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-07-12[ALSA] remove unused snd_minor.name fieldClemens Ladisch1-2/+0
Drop the snd_minor structure's name field that was just a helper for devfs device deregistration. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-22[ALSA] Fix rwlock around snd_iprintf() in sound coreTakashi Iwai1-2/+1
Fixed rwlock around snd_iprintf() in sound core part. Replaced with mutex. Also, make mutex and flags static variables with addition of snd_card_locked() function (just for sound.c). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-02Update dummy snd_power_wait() function for new calling conventionLinus Torvalds1-1/+1
Apparently nobody had tried to compile the ALSA CVS tree without power management enabled. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-31[ALSA] Cleanup unused argument for snd_power_wait()Takashi Iwai1-1/+1
Removed the unused file argument of snd_power_wait(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-28[PATCH] mark f_ops const in the inodeArjan van de Ven1-3/+3
Mark the f_ops members of inodes as const, as well as fix the ripple-through this causes by places that copy this f_ops and then "do stuff" with it. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22[ALSA] semaphore -> mutex (core part)Ingo Molnar1-4/+4
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>