aboutsummaryrefslogtreecommitdiff
path: root/sound/core
AgeCommit message (Collapse)Author
2015-06-24snd/pcm: fix snd_pcm_stream_lock*() irqs_disabled() splatsMike Galbraith
Locking functions previously using read_lock_irq()/read_lock_irqsave() were changed to local_irq_disable/save(), leading to gripes. Use nort variants. |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 0, irqs_disabled(): 1, pid: 5947, name: alsa-sink-ALC88 |CPU: 5 PID: 5947 Comm: alsa-sink-ALC88 Not tainted 3.18.7-rt1 #9 |Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.404 11/06/2014 | ffff880409316240 ffff88040866fa38 ffffffff815bdeb5 0000000000000002 | 0000000000000000 ffff88040866fa58 ffffffff81073c86 ffffffffa03b2640 | ffff88040239ec00 ffff88040866fa78 ffffffff815c3d34 ffffffffa03b2640 |Call Trace: | [<ffffffff815bdeb5>] dump_stack+0x4f/0x9e | [<ffffffff81073c86>] __might_sleep+0xe6/0x150 | [<ffffffff815c3d34>] __rt_spin_lock+0x24/0x50 | [<ffffffff815c4044>] rt_read_lock+0x34/0x40 | [<ffffffffa03a2979>] snd_pcm_stream_lock+0x29/0x70 [snd_pcm] | [<ffffffffa03a355d>] snd_pcm_playback_poll+0x5d/0x120 [snd_pcm] | [<ffffffff811937a2>] do_sys_poll+0x322/0x5b0 | [<ffffffff81193d48>] SyS_ppoll+0x1a8/0x1c0 | [<ffffffff815c4556>] system_call_fastpath+0x16/0x1b Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-03-28ALSA: control: Add sanity checks for user ctl id name stringTakashi Iwai
[ Upstream commit be3bb8236db2d0fcd705062ae2e2a9d75131222f ] There was no check about the id string of user control elements, so we accepted even a control element with an empty string, which is obviously bogus. This patch adds more sanity checks of id strings. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2015-03-14ALSA: pcm: Don't leave PREPARED state after drainingTakashi Iwai
commit 70372a7566b5e552dbe48abdac08c275081d8558 upstream. When a PCM draining is performed to an empty stream that has been already in PREPARED state, the current code just ignores and leaves as it is, although the drain is supposed to set all such streams to SETUP state. This patch covers that overlooked case. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2015-02-05ALSA: seq-dummy: remove deadlock-causing events on closeClemens Ladisch
commit 0767e95bb96d7fdddcd590fb809e6975d93aebc5 upstream. When the last subscriber to a "Through" port has been removed, the subscribed destination ports might still be active, so it would be wrong to send "all sounds off" and "reset controller" events to them. The proper place for such a shutdown would be the closing of the actual MIDI port (and close_substream() in rawmidi.c already can do this). This also fixes a deadlock when dummy_unuse() tries to send events to its own port that is already locked because it is being freed. Reported-by: Peter Billam <peter@www.pjb.com.au> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-21ALSA: pcm: Add big-endian DSD sample formats and fix XMOS DSD sample formatJussi Laako
This patch fixes XMOS DSD sample format to DSD_U32_BE and also adds DSD_U16_BE and DSD_U32_BE sample formats. Signed-off-by: Jussi Laako <jussi@sonarnerd.net> Acked-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-28ALSA: pcm: Zero-clear reserved fields of PCM status ioctl in compat modeTakashi Iwai
In compat mode, we copy each field of snd_pcm_status struct but don't touch the reserved fields, and this leaves uninitialized values there. Meanwhile the native ioctl does zero-clear the whole structure, so we should follow the same rule in compat mode, too. Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: pcm: Fix false lockdep warningsTakashi Iwai
As PCM core handles the multiple linked streams in parallel, lockdep gets confused (partly because of weak annotations) and spews the false-positive warnings. This hasn't been a problem for long time but the latest PCM lock path update seems to have woken up a sleeping dog. Here is an attempt to paper over this issue: pass the lock subclass just calculated from the depth in snd_pcm_action_group(). Also, a (possibly) wrong lock subclass set in snd_pcm_action_lock_mutex() is dropped, too. Reported-and-tested-by: Arthur Marsh <arthur.marsh@internode.on.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-18ALSA: pcm: use the same dma mmap codepath both for arm and arm64Anatol Pomozov
This avoids following kernel crash when try to playback on arm64 [ 107.497203] [<ffffffc00046b310>] snd_pcm_mmap_data_fault+0x90/0xd4 [ 107.503405] [<ffffffc0001541ac>] __do_fault+0xb0/0x498 [ 107.508565] [<ffffffc0001576a0>] handle_mm_fault+0x224/0x7b0 [ 107.514246] [<ffffffc000092640>] do_page_fault+0x11c/0x310 [ 107.519738] [<ffffffc000081100>] do_mem_abort+0x38/0x98 Tested: backported to 3.14 and tried to playback on arm64 machine Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-14ALSA: pcm: Fix referred substream in snd_pcm_action_group() unlock loopTakashi Iwai
In the unlock loop of snd_pcm_action_group(), the object "s" is used as the check of nonatomic PCM, but it should be rather "s1", which is the iterator of the loop. This supposedly causes a kernel panic when the substreams in operatino are linked. Fixes: 257f8cce5d40 ('ALSA: pcm: Allow nonatomic trigger operations') Reported-and-tested-by: Arthur Marsh <arthur.marsh@internode.on.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-08ALSA: Allow pass NULL dev for snd_pci_quirk_lookup()Takashi Iwai
Add a NULL check in snd_pci_quirk_lookup() so that NULL can be passed as a pci_dev pointer. This fixes the possible NULL dereferences in HD-audio drivers. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-06Merge tag 'asoc-v3.18' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.18 - More componentisation work from Lars-Peter, this time mainly cleaning up the suspend and bias level transition callbacks. - Real system support for the Intel drivers and a bunch of fixes and enhancements for the associated CODEC drivers, this is going to need a lot quirks over time due to the lack of any firmware description of the boards. - Jack detect support for simple card from Dylan Reid. - A bunch of small fixes and enhancements for the Freescale drivers. - New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32, Everest Semiconductor ES8328 and Freescale cards using the ASRC in newer i.MX processors.
2014-09-22ALSA: pcm: fix fifo_size frame calculationClemens Ladisch
The calculated frame size was wrong because snd_pcm_format_physical_width() actually returns the number of bits, not bytes. Use snd_pcm_format_size() instead, which not only returns bytes, but also simplifies the calculation. Fixes: 8bea869c5e56 ("ALSA: PCM midlevel: improve fifo_size handling") Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-11Merge branch 'for-linus' into for-nextTakashi Iwai
Merging for-linus branch for syncing the latest STAC/IDT codec changes to be affected by the upcoming hda-jack rewrites.
2014-09-08ALSA: pcm: add new DSD sampleformat for native DSD playback on XMOS based ↵Jurgen Kramer
devices XMOS based USB DACs with native DSD support expose this feature via a USB alternate setting. The audio format is either 32-bit raw or a 32-bit PCM format. To utilize this feature on linux this patch introduces a new 32-bit DSD sampleformat DSD_U32_LE. A follow up patch will add a quirk for XMOS based devices to utilize the new format. Further patches will add support to alsa-lib. Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08Merge branch 'topic/pcm-nonatomic' into for-nextTakashi Iwai
This is a merge for exending PCM ops to be non-atomic.
2014-09-08ALSA: pcm: snd_interval_step: fix changes of open intervalsClemens Ladisch
Changing an interval boundary to a multiple of the step size makes that boundary exact. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08ALSA: pcm: snd_interval_step: drop the min parameterClemens Ladisch
The min parameter was not used by any caller. And if it were used, underflows in the calculations could lead to incorrect results. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: pcm: Uninline snd_pcm_stream_lock() and _unlock()Takashi Iwai
The previous commit for the non-atomic PCM ops added more codes to snd_pcm_stream_lock() and its variants. Since they are inlined functions, it resulted in a significant code size bloat. For reducing the size bloat, this patch changes the inline functions to the normal function calls. The export of rwlock and rwsem are removed as well, since they are referred only in pcm_native.c now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: pcm: Allow nonatomic trigger operationsTakashi Iwai
Currently, many PCM operations are performed in a critical section protected by spinlock, typically the trigger and pointer callbacks are assumed to be atomic. This is basically because some trigger action (e.g. PCM stop after drain or xrun) is done in the interrupt handler. If a driver runs in a threaded irq, however, this doesn't have to be atomic. And many devices want to handle trigger in a non-atomic context due to lengthy communications. This patch tries all PCM calls operational in non-atomic context. What it does is very simple: replaces the substream spinlock with the corresponding substream mutex when pcm->nonatomic flag is set. The driver that wants to use the non-atomic PCM ops just needs to set the flag and keep the rest as is. (Of course, it must not handle any PCM ops in irq context.) Note that the code doesn't check whether it's atomic-safe or not, but trust in 100% that the driver sets pcm->nonatomic correctly. One possible problem is the case where linked PCM substreams have inconsistent nonatomic states. For avoiding this, snd_pcm_link() returns an error if one tries to link an inconsistent PCM substream. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22ALSA: pcm: Fix the silence data for DSD formatsTakashi Iwai
Right now we set 0 as the silence data for DSD_U8 and DSD_U16 formats, but this is actually wrong. 0 is rather the most negative value. Alternatively, we may take the repeating 0x69 pattern like ffmpeg deploys. Reference: https://ffmpeg.org/pipermail/ffmpeg-cvslog/2014-April/076427.html Suggested-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22ALSA: core: fix buffer overflow in snd_info_get_line()Clemens Ladisch
snd_info_get_line() documents that its last parameter must be one less than the buffer size, but this API design guarantees that (literally) every caller gets it wrong. Just change this parameter to have its obvious meaning. Reported-by: Tommi Rantala <tt.rantala@gmail.com> Cc: <stable@vger.kernel.org> # v2.2.26+ Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04Merge tag 'asoc-v3.17' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v3.17 This has been a pretty exciting release in terms of the framework, we've finally got support for multiple CODECs attached to a single DAI link which has been something there's been interest in as long as I've been working on ASoC. A big thanks to Benoit and Misael for their work on this. Otherwise it's been a fairly standard release for development, including more componentisation work from Lars-Peter and a good selection of both CODEC and CPU drivers. - Support for multiple CODECs attached to a single DAI, enabling systems with for example multiple DAC/speaker drivers on a single link, contributed by Benoit Cousson based on work from Misael Lopez Cruz. - Support for byte controls larger than 256 bytes based on the use of TLVs contributed by Omair Mohammed Abdullah. - More componentisation work from Lars-Peter Clausen. - The remainder of the conversions of CODEC drivers to params_width() - Drivers for Cirrus Logic CS4265, Freescale i.MX ASRC blocks, Realtek RT286 and RT5670, Rockchip RK3xxx I2S controllers and Texas Instruments TAS2552. - Lots of updates and fixes, especially to the DaVinci, Intel, Freescale, Realtek, and rcar drivers.
2014-08-04Merge remote-tracking branches 'asoc/topic/tlv', 'asoc/topic/tlv320aic23', ↵Mark Brown
'asoc/topic/tlv320aic31xx' and 'asoc/topic/tlv320aic32x4' into asoc-next
2014-08-04Merge remote-tracking branch 'asoc/topic/dma' into asoc-nextMark Brown
2014-07-22Merge branch 'topic/monotonic' into for-nextTakashi Iwai
2014-07-21ALSA: pcm: Add tstamp_type and proto to sw_params compat layerTakashi Iwai
I forgot to add the new fields in sw_params to 32bit compat layer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-21ALSA: pcm: Introduce protocol version field to sw_paramsTakashi Iwai
For controlling the new fields more strictly, add sw_params.proto field indicating the protocol version of the user-space. User-space should fill the SNDRV_PCM_VERSION value it's built with, then kernel can know whether the new fields should be evaluated or not. And now tstamp_type field is evaluated only when the valid value is set there. This avoids the wrong override of tstamp_type to zero, which is SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-16ALSA: compress: fix an integer overflow checkDan Carpenter
I previously added an integer overflow check here but looking at it now, it's still buggy. The bug happens in snd_compr_allocate_buffer(). We multiply ".fragments" and ".fragment_size" and that doesn't overflow but then we save it in an unsigned int so it truncates the high bits away and we allocate a smaller than expected size. Fixes: b35cc8225845 ('ALSA: compress_core: integer overflow in snd_compr_allocate_buffer()') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-15ALSA: control: Define SNDRV_CTL_TLV_OP_* constantsTakashi Iwai
Instead of hard-coded magic numbers, define constants for op_flag to tlv callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14Merge branch 'topic/monotonic' into for-nextTakashi Iwai
2014-07-10ALSA: pcm: Add timestamp type to sw_paramsTakashi Iwai
For allowing adjusting the timestamp type on the fly, add it to sw_params. The existing ioctl is still kept for compatibility. Along with this, increment the PCM protocol version. The extension was suggested by Clemens Ladisch. Acked-by: Jaroslav Kysela <perex@perex.cz> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-10ALSA: pcm: simplify snd_pcm_tstamp()Takashi Iwai
No functional change. Acked-by: Jaroslav Kysela <perex@perex.cz> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-04ALSA: pcm_dmaengine: Correct support for 24bits physical sample widthsPeter Ujfalusi
In case of _3LE/_3BE formats the samples are stored in 3 consecutive bytes without padding it to 4 bytes. This means that the DMA needs to be able to support 3 bytes word length in order to read/write the samples from memory correctly. Originally the code treated 24 bits physical length samples as they were 32 bits which leads to corruption when playing or recording audio. The hw.formats field has already been prepared to exclude formats not supported by the DMA engine in use, which means that only on platforms where 3 bytes is supported by the DMA will be able to use this format. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-04ALSA: pcm_dmaengine: Use the available wrapper to get physical widthPeter Ujfalusi
params_physical_width() is available via pcm_params.h Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-23ALSA: seq: seq_memory.c: Fix closing brace followed by ifRasmus Villemoes
Add a newline and, while at it, remove a space and redundant braces. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18ALSA: control: Make sure that id->index does not overflowLars-Peter Clausen
The ALSA control code expects that the range of assigned indices to a control is continuous and does not overflow. Currently there are no checks to enforce this. If a control with a overflowing index range is created that control becomes effectively inaccessible and unremovable since snd_ctl_find_id() will not be able to find it. This patch adds a check that makes sure that controls with a overflowing index range can not be created. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18ALSA: control: Handle numid overflowLars-Peter Clausen
Each control gets automatically assigned its numids when the control is created. The allocation is done by incrementing the numid by the amount of allocated numids per allocation. This means that excessive creation and destruction of controls (e.g. via SNDRV_CTL_IOCTL_ELEM_ADD/REMOVE) can cause the id to eventually overflow. Currently when this happens for the control that caused the overflow kctl->id.numid + kctl->count will also over flow causing it to be smaller than kctl->id.numid. Most of the code assumes that this is something that can not happen, so we need to make sure that it won't happen Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18ALSA: control: Don't access controls outside of protected regionsLars-Peter Clausen
A control that is visible on the card->controls list can be freed at any time. This means we must not access any of its memory while not holding the controls_rw_lock. Otherwise we risk a use after free access. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18ALSA: control: Fix replacing user controlsLars-Peter Clausen
There are two issues with the current implementation for replacing user controls. The first is that the code does not check if the control is actually a user control and neither does it check if the control is owned by the process that tries to remove it. That allows userspace applications to remove arbitrary controls, which can cause a user after free if a for example a driver does not expect a control to be removed from under its feed. The second issue is that on one hand when a control is replaced the user_ctl_count limit is not checked and on the other hand the user_ctl_count is increased (even though the number of user controls does not change). This allows userspace, once the user_ctl_count limit as been reached, to repeatedly replace a control until user_ctl_count overflows. Once that happens new controls can be added effectively bypassing the user_ctl_count limit. Both issues can be fixed by instead of open-coding the removal of the control that is to be replaced to use snd_ctl_remove_user_ctl(). This function does proper permission checks as well as decrements user_ctl_count after the control has been removed. Note that by using snd_ctl_remove_user_ctl() the check which returns -EBUSY at beginning of the function if the control already exists is removed. This is not a problem though since the check is quite useless, because the lock that is protecting the control list is released between the check and before adding the new control to the list, which means that it is possible that a different control with the same settings is added to the list after the check. Luckily there is another check that is done while holding the lock in snd_ctl_add(), so we'll rely on that to make sure that the same control is not added twice. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18ALSA: control: Protect user controls against concurrent accessLars-Peter Clausen
The user-control put and get handlers as well as the tlv do not protect against concurrent access from multiple threads. Since the state of the control is not updated atomically it is possible that either two write operations or a write and a read operation race against each other. Both can lead to arbitrary memory disclosure. This patch introduces a new lock that protects user-controls from concurrent access. Since applications typically access controls sequentially than in parallel a single lock per card should be fine. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-12ALSA: core: Use ktime_get_ts()Thomas Gleixner
do_posix_clock_monotonic_gettime() is a leftover from the initial posix timer implementation which maps to ktime_get_ts(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-04ALSA: seq: Continue broadcasting events to ports if one of them failsAdam Goode
Sometimes PORT_EXIT messages are lost when a process is exiting. This happens if you subscribe to the announce port with client A, then subscribe to the announce port with client B, then kill client A. Client B will not see the PORT_EXIT message because client A's port is closing and is earlier in the announce port subscription list. The for each loop will try to send the announcement to client A and fail, then will stop trying to broadcast to other ports. Killing B works fine since the announcement will already have gone to A. The CLIENT_EXIT message does not get lost. How to reproduce problem: *** termA $ aseqdump -p 0:1 0:1 Port subscribed 0:1 -> 128:0 *** termB $ aseqdump -p 0:1 *** termA 0:1 Client start client 129 0:1 Port start 129:0 0:1 Port subscribed 0:1 -> 129:0 *** termB 0:1 Port subscribed 0:1 -> 129:0 *** termA ^C *** termB 0:1 Client exit client 128 <--- expected Port exit as well (before client exit) Signed-off-by: Adam Goode <agoode@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-04ALSA: seq: correctly detect input buffer overflowAdam Goode
snd_seq_event_dup returns -ENOMEM in some buffer-full conditions, but usually returns -EAGAIN. Make -EAGAIN trigger the overflow condition in snd_seq_fifo_event_in so that the fifo is cleared and -ENOSPC is returned to userspace as stated in the alsa-lib docs. Signed-off-by: Adam Goode <agoode@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-03Merge branch 'for-linus' into for-nextTakashi Iwai
Just to catch up a few small fixes for HD-audio and DMA engine.
2014-05-19ALSA: pcm_dmaengine: Add check during device suspendTushar Behera
Currently snd_dmaengine_pcm_trigger() calls dmaengine_pause() unconditinally during device suspend. In case where DMA controller doesn't support PAUSE/RESUME functionality, this call is not able to stop the DMA controller. In this scenario, audio playback doesn't resume after device resume. Calling dmaengine_pause/dmaengine_terminate_all conditionally fixes the issue. It has been tested with audio playback on Samsung platform having PL330 DMA controller which doesn't support PAUSE/RESUME. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-28ALSA: core: Fix format string mismatch in seq_midi.cMasanari Iida
Fix format string mismatch in snd_seq_midisynth_register_port(). Argument type of p is unsigned int. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-16ALSA: pcm: 'BUG:' message unnecessarily triggers kerneloopsTim Gardner
BugLink: http://bugs.launchpad.net/bugs/1305480 The kerneloops-daemon scans dmesg for common crash signatures, among which is 'BUG:'. The message emitted by the PCM library is really a warning, so the most expedient thing to do seems to be to change the string. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-31Merge branch 'for-next' into for-linusTakashi Iwai
2014-03-19ALSA: compress: Pass through return value of open ops callbackCharles Keepax
The snd_compr_open function would always return 0 even if the compressed ops open function failed, obviously this is incorrect. Looks like this was introduced by a small typo in: commit a0830dbd4e42b38aefdf3fb61ba5019a1a99ea85 ALSA: Add a reference counter to card instance This patch returns the value from the compressed op as it should. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-13Merge tag 'asoc-v3.15' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.15 Quite a busy release for ASoC this time, more on janitorial work than exciting new features but welcome nontheless: - Lots of cleanups from Takashi for enumerations; the original API for these was error prone so he's refactored lots of code to use more modern APIs which avoid issues. - Elimination of the ASoC level wrappers for I2C and SPI moving us closer to converting to regmap completely and avoiding some randconfig hassle. - Provide both manually and transparently locked DAPM APIs rather than a mix of the two fixing some concurrency issues. - Start converting CODEC drivers to use separate bus interface drivers rather than having them all in one file helping avoid dependency issues. - DPCM support for Intel Haswell and Bay Trail platforms. - Lots of work on improvements for simple-card, DaVinci and the Renesas rcar drivers. - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the CSR SiRF SoC.