History log of /linux-master/sound/drivers/pcsp/pcsp.c
Revision Date Author Comments
# 19e332e5 07-Feb-2024 Takashi Iwai <tiwai@suse.de>

ALSA: pcsp: Replace with DEFINE_SIMPLE_DEV_PM_OPS()

Use the new DEFINE_SIMPLE_DEV_PM_OPS() instead of SIMPLE_DEV_PM_OPS()
for code-simplification. We need no longer CONFIG_PM_SLEEP ifdefs.
Just a cleanup, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240207155140.18238-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3a1e341c 15-Jul-2021 Takashi Iwai <tiwai@suse.de>

ALSA: pcsp: Allocate resources with device-managed APIs

Use the new snd_devm_card_new() for the card object allocation and the
devres version for the input device, and clean up the superfluous
remove callback.

Link: https://lore.kernel.org/r/20210715075941.23332-80-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6417f031 16-Mar-2021 Leon Romanovsky <leon@kernel.org>

module: remove never implemented MODULE_SUPPORTED_DEVICE

MODULE_SUPPORTED_DEVICE was added in pre-git era and never was
implemented. We can safely remove it, because the kernel has grown
to have many more reliable mechanisms to determine if device is
supported or not.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 34273b23 03-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: drivers: Constify snd_device_ops definitions

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 09c434b8 19-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Add SPDX license identifier for more missed files

Add SPDX license identifiers to all files which:

- Have no license information of any form

- Have MODULE_LICENCE("GPL*") inside which was used in the initial
scan/conversion to ignore the file

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3c40dfeb 11-Jan-2019 Takashi Iwai <tiwai@suse.de>

ALSA: drivers: Remove superfluous snd_pcm_suspend*() calls

The call of snd_pcm_suspend_all() & co became superfluous since we
call it in the PCM PM ops. Let's remove them.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2cded8c8 22-Aug-2017 Markus Elfring <elfring@users.sourceforge.net>

ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe()

Add a jump target so that a bit of exception handling can be better reused
at the end of this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 505f6d22 17-Mar-2016 Joonsoo Kim <iamjoonsoo.kim@lge.com>

sound: query dynamic DEBUG_PAGEALLOC setting

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>


# c78c8818 12-May-2015 Thomas Gleixner <tglx@linutronix.de>

ALSA: drivers: pcsp: Fix printout of resolution

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>


# 447fbbdc 14-Apr-2015 Thomas Gleixner <tglx@linutronix.de>

sound: Use hrtimer_resolution instead of hrtimer_get_res()

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>


# 976412fb 28-Jan-2015 Takashi Iwai <tiwai@suse.de>

ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/*

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cb4fe8ae 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

ALSA: drivers: pcsp: drop owner assignment from platform_drivers

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>


# 5872f3f6 28-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: drivers: Convert to snd_card_new() with a device pointer

Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6408eac2 14-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: pcsp: Fix the order of input device unregistration

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>


# 75415df8 29-Oct-2013 Takashi Iwai <tiwai@suse.de>

ALSA: pcsp: Fix initialization with nopcm=1

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>


# a4302ede 20-May-2013 Sachin Kamat <sachin.kamat@linaro.org>

ALSA: pcsp: Remove redundant platform_set_drvdata()

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>


# fbbb01a1 05-Dec-2012 Bill Pemberton <wfp5p@virginia.edu>

ALSA: drivers: remove __dev* attributes

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>


# d34e4e00 09-Aug-2012 Takashi Iwai <tiwai@suse.de>

ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PM

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>


# 284e7ca7 02-Jul-2012 Takashi Iwai <tiwai@suse.de>

ALSA: convert PM ops of platform_driver to new pm ops

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a67ff6a5 14-Dec-2011 Rusty Russell <rusty@rustcorp.com.au>

ALSA: module_param: make bool parameters really bool

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>


# 65a77217 15-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com>

sound: fix drivers needing module.h not moduleparam.h

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>


# bcc2c6b7 01-Nov-2009 Stas Sergeev <stsp@aknet.ru>

ALSA: snd-pcsp: add nopcm mode

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>


# 45203832 05-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: Add missing KERN_* prefix to printk in sound/drivers

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bd7dd77c 28-Dec-2008 Takashi Iwai <tiwai@alsa3.local>

ALSA: Convert to snd_card_create() in other sound/*

Convert from snd_card_new() to the new snd_card_create() function
in other sound subdirectories.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca109491 24-Nov-2008 Peter Zijlstra <peterz@infradead.org>

hrtimer: removing all ur callback modes

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>


# 8a75f4fb 14-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: pcsp - Use HRTIMER_CB_IRQSAFE_UNLOCKED

HRTIMER_CB_IRQSAFE was removed in the upstream.
Try to use HRTIMER_CB_IRQSAFE_UNLOCKED instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 96c7d478 11-Aug-2008 Takashi Iwai <tiwai@suse.de>

ALSA: pcsp - Fix locking messes in snd-pcsp

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>


# 4b7afb0d 20-May-2008 Stas Sergeev <stsp@aknet.ru>

snd-pcsp: use HRTIMER_CB_SOFTIRQ

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>


# 983e0972 02-May-2008 Johann Felix Soden <johfel@users.sourceforge.net>

[ALSA] pcsp: Fix build with CONFIG_PM=n

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>


# efd89d9d 23-Apr-2008 Stas Sergeev <stsp@aknet.ru>

[ALSA] pcsp: fix wording in DEBUG_PAGEALLOC warning

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
(fixed invalid KERN_WARNING by tiwai)
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9ecaedae 18-Mar-2008 Mariusz Kozlowski <m.kozlowski@tuxland.pl>

[ALSA] sound/drivers/pcsp/pcsp.c build fix

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>


# 1bc1f305 12-Mar-2008 Stas Sergeev <stsp@aknet.ru>

[ALSA] pcsp: locking fix

pcsp: locking fix.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 52337310 06-Mar-2008 Stas Sergeev <stsp@aknet.ru>

[ALSA] pcsp: improve "enable" option handling

Simplify init code.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a91605b8 04-Mar-2008 Stas Sergeev <stsp@aknet.ru>

[ALSA] pcsp - clean ups

- 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>


# 9ab4d072 03-Mar-2008 Stas Sergeev <stsp@aknet.ru>

[ALSA] Add PC-speaker sound driver

Added PC-speaker sound driver (snd-pcsp).

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>