aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/sound/info.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-01-03ALSA: info: Make snd_info_entry_ops as constTakashi Iwai1-1/+1
The reference to snd_info_entry_ops is rather read-only, so declare it as a const pointer. This allows a bit more optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-29-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156Thomas Gleixner1-16/+1
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 <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-06ALSA: info: Drop unused snd_info_entry.card fieldTakashi Iwai1-1/+0
It's referred only in snd_card_id_read() which can receive the card object via private_data. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-02-06ALSA: info: Add standard helpers for card proc file entriesTakashi Iwai1-0/+35
Two new helper functions are added here for cleaning up the existing lengthy calls. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-27->poll() methods should return __poll_tAl Viro1-1/+1
The most common place to find POLL... bitmaps: return values of ->poll() and its subsystem counterparts. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-05-27ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FSJie Yang1-4/+4
We may disable proc fs only for sound part, to reduce ALSA memory footprint. So add CONFIG_SND_PROC_FS and replace the old CONFIG_PROC_FSs in alsa code. With sound proc fs disabled, we can save about 9KB memory size on X86_64 platform. Signed-off-by: Jie Yang <yang.jie@intel.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-24ALSA: core: Clean up OSS proc file managementTakashi Iwai1-3/+1
A few minor cleanups: - Move the call of snd_info_minor_register() into snd_info_init() so that we can call all proc-related stuff in a shot - Add missing __init prefix to snd_info_minor_register() - Return an error properly from snd_oss_info_register() - Drop snd_info_minor_unregister() that is superfluous now Acked-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-24ALSA: core: Remove child proc file elements recursivelyTakashi Iwai1-2/+7
This patch changes the way to manage the resource release of proc files: namely, let snd_info_free_entry() freeing the whole children. This makes it us possible to drop the snd_device_*() management. Then snd_card_proc_new() becomes merely a wrapper to snd_info_create_card_entry(). Together with this change, now you need to call snd_info_free_entry() for a proc entry created via snd_card_proc_new(), while it was freed via snd_device_free() beforehand. Acked-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-23ALSA: core: Use seq_file for text proc file readsTakashi Iwai1-3/+13
seq_file is _the_ standard interface for simple text proc files. Though, we still need to support the binary proc files and the text file write, and also we need to manage the device disconnection gracefully. Thus this patch just replaces the text file read code with seq_file while keeping the rest intact. snd_iprintf() helper function is now a macro to expand itself to seq_printf() to be compatible with the existing code. The seq_file object is stored to the unused entry->rbuffer->buffer pointer. When the output size is expected to be large (greater than PAGE_SIZE), the driver should set entry->size field beforehand. Then the given size will be preallocated and the multiple show calls can be avoided. Acked-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-03switch procfs to umode_t useAl Viro1-1/+1
both proc_dir_entry ->mode and populating functions Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-10-31treewide: use __printf not __attribute__((format(printf,...)))Joe Perches1-2/+2
Standardize the style for compiler based printf format verification. Standardized the location of __printf too. Done via script and a little typing. $ grep -rPl --include=*.[ch] -w "__attribute__" * | \ grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \ xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }' [akpm@linux-foundation.org: revert arch bits] Signed-off-by: Joe Perches <joe@perches.com> Cc: "Kirill A. Shutemov" <kirill@shutemov.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-04-13ALSA: info - Use standard types for info callbacksTakashi Iwai1-12/+12
Use loff_t, size_t and ssize_t for arguments of info callbacks to follow the standard procfs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08ALSA: Add const prefix to proc helper functionsTakashi Iwai1-2/+2
Add appropriate const prefix to char * arguments in proc helper functions. Also fixed the caller side to be proper const pointers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-12ALSA: include/sound/info.h - coding style changedJaroslav Kysela1-51/+57
Change coding style to be more acceptable by checkpatch.pl. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-12ALSA: when card identification is changed, change also /proc/asound symlinkJaroslav Kysela1-0/+2
Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] info_oss: move prototype of snd_card_info_read_oss to info.hMarcin Ślusarz1-0/+2
info_oss: move prototype of snd_card_info_read_oss to info.h Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com> 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>
2006-09-23[ALSA] Fix disconnection of proc interfaceTakashi Iwai1-3/+4
- 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>
2006-06-22[ALSA] Remove unneeded read/write_size fields in proc text opsTakashi Iwai1-5/+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>
2006-06-22[ALSA] Make buffer size of proc text interface variableTakashi Iwai1-3/+3
Make the read/write buffer size of proc text interface variable. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22[ALSA] semaphore -> mutex (core part)Ingo Molnar1-1/+1
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>
2006-01-03[ALSA] Optimize for config without PROC_FSTakashi Iwai1-4/+9
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>
2006-01-03[ALSA] Remove xxx_t typedefs: Proc handlerTakashi Iwai1-48/+46
Modules: ALSA Core Remove xxx_t typedefs from the core proc handler codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+193
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!