summaryrefslogtreecommitdiffstats
path: root/sound/drivers/pcsp/pcsp.c
Commit message (Collapse)AuthorAgeFilesLines
* sound: query dynamic DEBUG_PAGEALLOC settingJoonsoo Kim2016-03-171-4/+5
| | | | | | | | | | | | | | | | | | We can disable debug_pagealloc processing even if the code is compiled with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query whether it is enabled or not in runtime. [akpm@linux-foundation.org: export _debug_pagealloc_enabled to modules] Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: David Rientjes <rientjes@google.com> Acked-by: Takashi Iwai <tiwai@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Chris Metcalf <cmetcalf@ezchip.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ALSA: drivers: pcsp: Fix printout of resolutionThomas Gleixner2015-05-121-2/+2
| | | | | | | | The recent conversion of the hrtimer resolution failed to convert the printk format from %li to %u. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* sound: Use hrtimer_resolution instead of hrtimer_get_res()Thomas Gleixner2015-04-221-9/+6
| | | | | | | | | | | | | | | | | | No point in converting a timespec now that the value is directly accessible. Get rid of the null check while at it. Resolution is guaranteed to be > 0. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: alsa-devel@alsa-project.org Link: http://lkml.kernel.org/r/20150414203500.799133359@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/*Takashi Iwai2015-01-281-1/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: drivers: pcsp: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* ALSA: drivers: Convert to snd_card_new() with a device pointerTakashi Iwai2014-02-121-3/+1
| | | | | | Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcsp: Fix the order of input device unregistrationTakashi Iwai2013-11-141-1/+1
| | | | | | | | | The current code may access to the already freed object. The input device must be accessed and unregistered before freeing the top level sound object. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcsp: Fix initialization with nopcm=1Takashi Iwai2013-10-291-1/+2
| | | | | | | | | | | When nopcm=1 is set, some initializations based on hrtimer resolution might be bogus because the driver checks the resolution only when nopcm=0. Simply get the resolution always at first for fixing the bug. Spotted by coverity CID 139740. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcsp: Remove redundant platform_set_drvdata()Sachin Kamat2013-05-231-1/+0
| | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Stas Sergeev <stsp@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: drivers: remove __dev* attributesBill Pemberton2012-12-071-7/+7
| | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PMTakashi Iwai2012-08-091-2/+2
| | | | | | | | | | | When CONFIG_PM is set but CONFIG_PM_SLEEP is unset, SIMPLE_DEV_PM_OPS() ignores the given functions, and this leads to compile warnings. For avoiding this, simply check CONFIG_PM_SLEEP instead of CONFIG_PM. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: convert PM ops of platform_driver to new pm opsTakashi Iwai2012-07-031-4/+7
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: module_param: make bool parameters really boolRusty Russell2011-12-191-2/+2
| | | | | | | | | | | | module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: fix drivers needing module.h not moduleparam.hPaul Gortmaker2011-10-311-1/+1
| | | | | | | | | The implicit presence of module.h lured several users into incorrectly thinking that they only needed/used modparam.h but once we clean up the module.h presence, these will show up as build failures, so fix 'em now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* ALSA: snd-pcsp: add nopcm modeStas Sergeev2009-11-011-12/+20
| | | | | | | | | | | | Currently, if the high-res timers are unavailable, snd-pcsp does not initialize. People who choose it over pcspkr, loose their console beeps in that case and get annoyed. With this patch, the console beeps remain regardless of the high-res timers. Additionally, the "nopcm" modparam is added to forcibly disable the PCM capabilities of the driver. Signed-off-by: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/misc' into for-linusTakashi Iwai2009-03-241-1/+1
|\
| * ALSA: Add missing KERN_* prefix to printk in sound/driversTakashi Iwai2009-02-051-1/+1
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: Convert to snd_card_create() in other sound/*Takashi Iwai2009-01-121-3/+3
|/ | | | | | | Convert from snd_card_new() to the new snd_card_create() function in other sound subdirectories. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'timers-core-for-linus' of ↵Linus Torvalds2008-12-301-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: hrtimers: fix warning in kernel/hrtimer.c x86: make sure we really have an hpet mapping before using it x86: enable HPET on Fujitsu u9200 linux/timex.h: cleanup for userspace posix-timers: simplify de_thread()->exit_itimers() path posix-timers: check ->it_signal instead of ->it_pid to validate the timer posix-timers: use "struct pid*" instead of "struct task_struct*" nohz: suppress needless timer reprogramming clocksource, acpi_pm.c: put acpi_pm_read_slow() under CONFIG_PCI nohz: no softirq pending warnings for offline cpus hrtimer: removing all ur callback modes, fix hrtimer: removing all ur callback modes, fix hotplug hrtimer: removing all ur callback modes x86: correct link to HPET timer specification rtc-cmos: export second NVRAM bank Fixed up conflicts in sound/drivers/pcsp/pcsp.c and sound/core/hrtimer.c manually.
| * hrtimer: removing all ur callback modesPeter Zijlstra2008-11-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: cleanup, move all hrtimer processing into hardirq context This is an attempt at removing some of the hrtimer complexity by reducing the number of callback modes to 1. This means that all hrtimer callback functions will be ran from HARD-irq context. I went through all the 30 odd hrtimer callback functions in the kernel and saw only one that I'm not quite sure of, which is the one in net/can/bcm.c - hence I'm CC-ing the folks responsible for that code. Furthermore, the hrtimer core now calls callbacks directly with IRQs disabled in case you try to enqueue an expired timer. If this timer is a periodic timer (which should use hrtimer_forward() to advance its time) then it might be possible to end up in an inf. recursive loop due to the fact that hrtimer_forward() doesn't round up to the next timer granularity, and therefore keeps on calling the callback - obviously this needs a fix. Aside from that, this seems to compile and actually boot on my dual core test box - although I'm sure there are some bugs in, me not hitting any makes me certain :-) Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | ALSA: pcsp - Use HRTIMER_CB_IRQSAFE_UNLOCKEDTakashi Iwai2008-11-141-1/+1
| | | | | | | | | | | | | | HRTIMER_CB_IRQSAFE was removed in the upstream. Try to use HRTIMER_CB_IRQSAFE_UNLOCKED instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: pcsp - Fix locking messes in snd-pcspTakashi Iwai2008-10-201-5/+3
|/ | | | | | | | | | | | | | | | | | | snd-pcsp driver takes chip->substream_lock together with PCM substream lock. These are even mixed up with hrtimer's lock, resulting in messy lock depencies. Right now, snd-pcsp driver resolves the deadlock by using HRTIMER_CB_SOFTIRQ. However, this isn't nice for a really fast path like bit-flipping. This patch introduces a tasklet for PCM period handling so that the hrtimer callback can be handled fast. This also reduce the use of chip->substream_lock to avoid deadlocks. It's still used in pointer callback, but even this could be removed with a proper barrier. Another good solution is to introduce async trigger callback. But, this will involve with a major rewrite of the PCM core code, so I take first this easy fix. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* snd-pcsp: use HRTIMER_CB_SOFTIRQStas Sergeev2008-05-201-1/+1
| | | | | | | | | | | | | Change HRTIMER_CB_IRQSAFE to HRTIMER_CB_SOFTIRQ, as suggested by Thomas Gleixner. That solves the lock dependancy reported in Bug #10701. That also allows to call hrtimer_start() directly, tasklet "stupid hack" removed. Signed-off-by: Stas Sergeev <stsp@aknet.ru> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] pcsp: Fix build with CONFIG_PM=nJohann Felix Soden2008-05-051-0/+4
| | | | | | | | | sound/drivers/pcsp/pcsp.c: In function 'pcsp_suspend': sound/drivers/pcsp/pcsp.c:201: error: implicit declaration of function 'snd_pcm_suspend_all' Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net> CC: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] pcsp: fix wording in DEBUG_PAGEALLOC warningStas Sergeev2008-04-241-6/+2
| | | | | | Signed-off-by: Stas Sergeev <stsp@aknet.ru> (fixed invalid KERN_WARNING by tiwai) Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] sound/drivers/pcsp/pcsp.c build fixMariusz Kozlowski2008-04-241-0/+1
| | | | | | | | | | | sound/drivers/pcsp/pcsp.c: In function 'snd_pcsp_create': sound/drivers/pcsp/pcsp.c:54: error: 'loops_per_jiffy' undeclared (first use in\ this function) sound/drivers/pcsp/pcsp.c:54: error: (Each undeclared identifier is reported on\ ly once sound/drivers/pcsp/pcsp.c:54: error: for each function it appears in.) Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] pcsp: locking fixStas Sergeev2008-04-241-3/+2
| | | | | | | pcsp: locking fix. Signed-off-by: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] pcsp: improve "enable" option handlingStas Sergeev2008-04-241-11/+11
| | | | | | | Simplify init code. Signed-off-by: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] pcsp - clean upsStas Sergeev2008-04-241-2/+0
| | | | | | | | - make pcsp_start_timer_tasklet static - remove redundant includes. <asm/i8253.h> is not available on all platforms. Signed-off-by: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] Add PC-speaker sound driverStas Sergeev2008-04-241-0/+241
Added PC-speaker sound driver (snd-pcsp). Signed-off-by: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud