#
b29e5ef1 |
| 05-Nov-2019 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Convert to the common vmalloc memalloc
The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts t
ALSA: aloop: Convert to the common vmalloc memalloc
The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler
Link: https://lore.kernel.org/r/20191105151856.10785-10-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
1a59d1b8 |
| 27-May-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of th
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
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>
show more ...
|
#
50e09084 |
| 25-Mar-2019 |
Timo Wischer <twischer@de.adit-jv.com> |
ALSA: aloop: Support S24 sample formats
Currently snd_aloop supports only S16 and S32 audio sample formats. With this patch the S24 formats are also supported.
Signed-off-by: Timo Wischer <twischer
ALSA: aloop: Support S24 sample formats
Currently snd_aloop supports only S16 and S32 audio sample formats. With this patch the S24 formats are also supported.
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
815d808c |
| 04-Feb-2019 |
Takashi Iwai <tiwai@suse.de> |
ALSA: drivers: Clean up with new procfs helpers
Simplify the proc fs creation code with new helper functions, snd_card_ro_proc_new() and snd_card_rw_proc_new(). Just a code refactoring and no functi
ALSA: drivers: Clean up with new procfs helpers
Simplify the proc fs creation code with new helper functions, snd_card_ro_proc_new() and snd_card_rw_proc_new(). Just a code refactoring and no functional changes.
Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
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 Ky
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>
show more ...
|
#
fa84cf09 |
| 18-Jul-2018 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: Nuke snd_pcm_lib_mmap_vmalloc()
snd_pcm_lib_mmap_vmalloc() was supposed to be implemented with somewhat special for vmalloc handling, but in the end, this turned to just the default handl
ALSA: pcm: Nuke snd_pcm_lib_mmap_vmalloc()
snd_pcm_lib_mmap_vmalloc() was supposed to be implemented with somewhat special for vmalloc handling, but in the end, this turned to just the default handler, i.e. NULL. As the situation has never changed over decades, let's rip it off.
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
9f88058e |
| 27-May-2018 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Reduced duplicated PCM ops definition
The PCM ops defined for playback and capture are identical. Just use the single one for both.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
76b3421b |
| 30-Apr-2018 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Add missing cable lock to ctl API callbacks
Some control API callbacks in aloop driver are too lazy to take the loopback->cable_lock and it results in possible races of cable access whi
ALSA: aloop: Add missing cable lock to ctl API callbacks
Some control API callbacks in aloop driver are too lazy to take the loopback->cable_lock and it results in possible races of cable access while it's being freed. It eventually lead to a UAF, as reported by fuzzer recently.
This patch covers such control API callbacks and add the proper mutex locks.
Reported-by: DaeRyong Jeong <threeearcat@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
Revision tags: v4.16 |
|
#
306a4f3c |
| 26-Mar-2018 |
Robert Rosengren <robert.rosengren@axis.com> |
ALSA: aloop: Mark paused device as inactive
Show paused ALSA aloop device as inactive, i.e. the control "PCM Slave Active" set as false. Notification sent upon state change.
This makes it possible
ALSA: aloop: Mark paused device as inactive
Show paused ALSA aloop device as inactive, i.e. the control "PCM Slave Active" set as false. Notification sent upon state change.
This makes it possible for client capturing from aloop device to know if data is expected. Without it the client expects data even if playback is paused.
Signed-off-by: Robert Rosengren <robert.rosengren@axis.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
8e6b1a72 |
| 22-Mar-2018 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Fix access to not-yet-ready substream via cable
In loopback_open() and loopback_close(), we assign and release the substream object to the corresponding cable in a racy way. It's neith
ALSA: aloop: Fix access to not-yet-ready substream via cable
In loopback_open() and loopback_close(), we assign and release the substream object to the corresponding cable in a racy way. It's neither locked nor done in the right position. The open callback assigns the substream before its preparation finishes, hence the other side of the cable may pick it up, which may lead to the invalid memory access.
This patch addresses these: move the assignment to the end of the open callback, and wrap with cable->lock for avoiding concurrent accesses.
Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
67a01afa |
| 22-Mar-2018 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Sync stale timer before release
The aloop driver tries to stop the pending timer via timer_del() in the trigger callback and in the close callback. The former is correct, as it's an at
ALSA: aloop: Sync stale timer before release
The aloop driver tries to stop the pending timer via timer_del() in the trigger callback and in the close callback. The former is correct, as it's an atomic operation, while the latter expects that the timer gets really removed and proceeds the resource releases after that. But timer_del() doesn't synchronize, hence the running timer may still access the released resources.
A similar situation can be also seen in the prepare callback after trigger(STOP) where the prepare tries to re-initialize the things while a timer is still running.
The problems like the above are seen indirectly in some syzkaller reports (although it's not 100% clear whether this is the only cause, as the race condition is quite narrow and not always easy to trigger).
For addressing these issues, this patch adds the explicit alls of timer_del_sync() in some places, so that the pending timer is properly killed / synced.
Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
Revision tags: v4.15 |
|
#
898dfe46 |
| 04-Jan-2018 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Fix racy hw constraints adjustment
The aloop driver tries to update the hw constraints of the connected target on the cable of the opened PCM substream. This is done by adding the extr
ALSA: aloop: Fix racy hw constraints adjustment
The aloop driver tries to update the hw constraints of the connected target on the cable of the opened PCM substream. This is done by adding the extra hw constraints rules referring to the substream runtime->hw fields, while the other substream may update the runtime hw of another side on the fly.
This is, however, racy and may result in the inconsistent values when both PCM streams perform the prepare concurrently. One of the reason is that it overwrites the other's runtime->hw field; which is not only racy but also broken when it's called before the open of another side finishes. And, since the reference to runtime->hw isn't protected, the concurrent write may give the partial value update and become inconsistent.
This patch is an attempt to fix and clean up: - The prepare doesn't change the runtime->hw of other side any longer, but only update the cable->hw that is referred commonly. - The extra rules refer to the loopback_pcm object instead of the runtime->hw. The actual hw is deduced from cable->hw. - The extra rules take the cable_lock to protect against the race.
Fixes: b1c73fc8e697 ("ALSA: snd-aloop: Fix hw_params restrictions and checking") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
b088b53e |
| 05-Jan-2018 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Fix inconsistent format due to incomplete rule
The extra hw constraint rule for the formats the aloop driver introduced has a slight flaw, where it doesn't return a positive value when
ALSA: aloop: Fix inconsistent format due to incomplete rule
The extra hw constraint rule for the formats the aloop driver introduced has a slight flaw, where it doesn't return a positive value when the mask got changed. It came from the fact that it's basically a copy&paste from snd_hw_constraint_mask64(). The original code is supposed to be a single-shot and it modifies the mask bits only once and never after, while what we need for aloop is the dynamic hw rule that limits the mask bits.
This difference results in the inconsistent state, as the hw_refine doesn't apply the dependencies fully. The worse and surprisingly result is that it causes a crash in OSS emulation when multiple full-duplex reads/writes are performed concurrently (I leave why it triggers Oops to readers as a homework).
For fixing this, replace a few open-codes with the standard snd_mask_*() macros.
Reported-by: syzbot+3902b5220e8ca27889ca@syzkaller.appspotmail.com Fixes: b1c73fc8e697 ("ALSA: snd-aloop: Fix hw_params restrictions and checking") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
9685347a |
| 05-Jan-2018 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Release cable upon open error path
The aloop runtime object and its assignment in the cable are left even when opening a substream fails. This doesn't mean any memory leak, but it stil
ALSA: aloop: Release cable upon open error path
The aloop runtime object and its assignment in the cable are left even when opening a substream fails. This doesn't mean any memory leak, but it still keeps the invalid pointer that may be referred by the another side of the cable spontaneously, which is a potential Oops cause.
Clean up the cable assignment and the empty cable upon the error path properly.
Fixes: 597603d615d2 ("ALSA: introduce the snd-aloop module for the PCM loopback") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
Revision tags: v4.13.16, v4.14 |
|
#
bc47ba90 |
| 24-Oct-2017 |
Kees Cook <keescook@chromium.org> |
ALSA: drivers: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_tim
ALSA: drivers: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly.
Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
Revision tags: v4.13.5, v4.13 |
|
#
f9592582 |
| 18-Aug-2017 |
Arvind Yadav <arvind.yadav.cs@gmail.com> |
ALSA: drivers: constify snd_pcm_ops structures
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mar
ALSA: drivers: constify snd_pcm_ops structures
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
b6c0b715 |
| 17-Aug-2017 |
Bhumika Goyal <bhumirks@gmail.com> |
ALSA: drivers: make snd_pcm_hardware const
Make these const as they are only used in a copy operation. Done using Coccinelle.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takash
ALSA: drivers: make snd_pcm_hardware const
Make these const as they are only used in a copy operation. Done using Coccinelle.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
Revision tags: v4.12, v4.10.17, v4.10.16, v4.10.15, v4.10.14, v4.10.13, v4.10.12, v4.10.11, v4.10.10, v4.10.9, v4.10.8, v4.10.7, v4.10.6, v4.10.5, v4.10.4, v4.10.3, v4.10.2, v4.10.1, v4.10, v4.9, openbmc-4.4-20161121-1, v4.4.33, v4.4.32, v4.4.31, v4.4.30, v4.4.29, v4.4.28, v4.4.27, v4.7.10, openbmc-4.4-20161021-1, v4.7.9, v4.4.26, v4.7.8, v4.4.25, v4.4.24, v4.7.7, v4.8, v4.4.23, v4.7.6, v4.7.5, v4.4.22, v4.4.21, v4.7.4, v4.7.3, v4.4.20, v4.7.2, v4.4.19, openbmc-4.4-20160819-1, v4.7.1, v4.4.18, v4.4.17, openbmc-4.4-20160804-1, v4.4.16, v4.7, openbmc-4.4-20160722-1, openbmc-20160722-1, openbmc-20160713-1, v4.4.15, v4.6.4, v4.6.3, v4.4.14, v4.6.2, v4.4.13, openbmc-20160606-1, v4.6.1, v4.4.12, openbmc-20160521-1, v4.4.11, openbmc-20160518-1, v4.6, v4.4.10, openbmc-20160511-1, openbmc-20160505-1, v4.4.9, v4.4.8, v4.4.7, openbmc-20160329-2, openbmc-20160329-1, openbmc-20160321-1, v4.4.6, v4.5, v4.4.5, v4.4.4, v4.4.3, openbmc-20160222-1, v4.4.2, openbmc-20160212-1, openbmc-20160210-1, openbmc-20160202-2, openbmc-20160202-1, v4.4.1, openbmc-20160127-1, openbmc-20160120-1, v4.4, openbmc-20151217-1, openbmc-20151210-1, openbmc-20151202-1, openbmc-20151123-1, openbmc-20151118-1, openbmc-20151104-1, v4.3, openbmc-20151102-1, openbmc-20151028-1, v4.3-rc1, v4.2, v4.2-rc8, v4.2-rc7, v4.2-rc6, v4.2-rc5, v4.2-rc4, v4.2-rc3, v4.2-rc2, v4.2-rc1, v4.1, v4.1-rc8, v4.1-rc7, v4.1-rc6 |
|
#
41960d95 |
| 29-May-2015 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Drop unnecessary ifdef CONFIG_PROC_FS
Since the compiler can optimize away the unused code, we can reduce the messy ifdef.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
Revision tags: v4.1-rc5, v4.1-rc4, v4.1-rc3, v4.1-rc2, v4.1-rc1, v4.0, v4.0-rc7, v4.0-rc6, v4.0-rc5, v4.0-rc4, v4.0-rc3, v4.0-rc2, v4.0-rc1, v3.19, v3.19-rc7, v3.19-rc6 |
|
#
db974553 |
| 19-Jan-2015 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Use setup_timer() and mod_timer()
No functional change, refactoring with the standard helpers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
Revision tags: v3.19-rc5, v3.19-rc4, v3.19-rc3, v3.19-rc2, v3.19-rc1, v3.18, v3.18-rc7, v3.18-rc6, v3.18-rc5, v3.18-rc4, v3.18-rc3, v3.18-rc2 |
|
#
5d5638af |
| 20-Oct-2014 |
Wolfram Sang <wsa@the-dreams.de> |
ALSA: drivers: 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>
|
Revision tags: v3.18-rc1, v3.17, v3.17-rc7, v3.17-rc6, v3.17-rc5, v3.17-rc4, v3.17-rc3, v3.17-rc2, v3.17-rc1, v3.16, v3.16-rc7, v3.16-rc6, v3.16-rc5, v3.16-rc4, v3.16-rc3, v3.16-rc2, v3.16-rc1, v3.15, v3.15-rc8, v3.15-rc7, v3.15-rc6, v3.15-rc5, v3.15-rc4, v3.15-rc3, v3.15-rc2, v3.15-rc1, v3.14, v3.14-rc8, v3.14-rc7, v3.14-rc6, v3.14-rc5, v3.14-rc4, v3.14-rc3, v3.14-rc2, v3.14-rc1 |
|
#
5872f3f6 |
| 29-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>
|
Revision tags: v3.13, v3.13-rc8, v3.13-rc7, v3.13-rc6, v3.13-rc5, v3.13-rc4, v3.13-rc3, v3.13-rc2, v3.13-rc1, v3.12, v3.12-rc7, v3.12-rc6, v3.12-rc5, v3.12-rc4, v3.12-rc3, v3.12-rc2, v3.12-rc1, v3.11, v3.11-rc7, v3.11-rc6, v3.11-rc5, v3.11-rc4, v3.11-rc3, v3.11-rc2, v3.11-rc1, v3.10, v3.10-rc7, v3.10-rc6, v3.10-rc5, v3.10-rc4, v3.10-rc3, v3.10-rc2 |
|
#
5ed5824b |
| 20-May-2013 |
Sachin Kamat <sachin.kamat@linaro.org> |
ALSA: aloop: 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:
ALSA: aloop: 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: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
Revision tags: v3.10-rc1, v3.9 |
|
#
74c34ca1 |
| 22-Apr-2013 |
Eldad Zack <eldad@fogrefinery.com> |
ALSA: pcm_format_to_bits strong-typed conversion
Add a function to handle conversion from snd_pcm_format_t to bitwise with proper typing.
Change such conversions to use this function and silence sp
ALSA: pcm_format_to_bits strong-typed conversion
Add a function to handle conversion from snd_pcm_format_t to bitwise with proper typing.
Change such conversions to use this function and silence sparse warnings.
Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
Revision tags: v3.9-rc8, v3.9-rc7, v3.9-rc6, v3.9-rc5, v3.9-rc4, v3.9-rc3, v3.9-rc2, v3.9-rc1, v3.8, v3.8-rc7 |
|
#
edac8943 |
| 04-Feb-2013 |
Takashi Iwai <tiwai@suse.de> |
ALSA: aloop: Fix Oops while PM resume
snd-aloop driver has no proper PM implementation, thus the PM resume may trigger Oops due to leftover timer instance. This patch adds the missing suspend/resum
ALSA: aloop: Fix Oops while PM resume
snd-aloop driver has no proper PM implementation, thus the PM resume may trigger Oops due to leftover timer instance. This patch adds the missing suspend/resume implementation.
Reported-and-tested-by: El boulangero <elboulangero@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
Revision tags: v3.8-rc6, v3.8-rc5, v3.8-rc4, v3.8-rc3, v3.8-rc2, v3.8-rc1, v3.7 |
|
#
fbbb01a1 |
| 06-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, __devinitc
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>
show more ...
|