aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/compress_offload.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-02-14ALSA: compress: add support for gapless playbackJeeja KP1-0/+96
this add new API for sound compress to support gapless playback. As noted in Documentation change, we add API to send metadata of encoder and padding delay to DSP. Also add API for indicating EOF and switching to subsequent track Also bump the compress API version Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-11ALSA: core: don't return uninitialized snd_compr_tstampRichard Fitzgerald1-6/+12
The snd_compr_update_tstamp() can only fill in the snd_compr_tstamp if the codec implements the pointer() function. If that happened the code was previously returning uninitialized garbage in the tstamp because it wasn't initialized anywhere. This change zero-fills the tstamp in the two places it is used before calling snd_compr_update_tstamp(), and also has snd_compr_update_tstamp() return an error indication if it can't provide a tstamp. For the case of snd_compr_calc_avail() it ignores this error because we still need to return info on the available buffer space even if we can't provide tstamp info - when the tstamp is not valid all fields are now guaranteed to be zero. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-30ALSA: Add a reference counter to card instanceTakashi Iwai1-2/+7
For more strict protection for wild disconnections, a refcount is introduced to the card instance, and let it up/down when an object is referred via snd_lookup_*() in the open ops. The free-after-last-close check is also changed to check this refcount instead of the empty list, too. Reported-by: Matthieu CASTET <matthieu.castet@parrot.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-17ALSA: Compress - add codec parameter checksVinod Koul1-0/+10
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-17ALSA: compress - move the buffer checkVinod Koul1-4/+16
Commit ALSA: compress_core: integer overflow in snd_compr_allocate_buffer() added a new error check for input params. this add new routine for input checks and moves buffer overflow check to this new routine. This allows the error value to be propogated to user space Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-14ALSA: compress_core: integer overflow in snd_compr_allocate_buffer()Dan Carpenter1-0/+4
These are 32 bit values that come from the user, we need to check for integer overflows or we could end up allocating a smaller buffer than expected. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11ALSA: compress_core: fix open flags test in snd_compr_open()Dan Carpenter1-5/+3
O_RDONLY is zero so the original test (f->f_flags & O_RDONLY) is always false and it will never do compress capture. The test for O_WRONLY is also slightly off. The original test would consider "->flags = (O_WRONLY | O_RDWR)" as write only instead of rejecting it as invalid. I've also removed the pr_err() because that could flood dmesg. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-12ALSA: compress_core: cleanup pointers on stopVinod Koul1-0/+4
as the start can be called after stop again, we need to reset state Signed-off-by: Namarta Kohli <namartax.kohli@intel.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-12ALSA: compress_core: don't wake up on pauseVinod Koul1-3/+1
during pause the core should maintain the status-quo on the device and pointers and not wake up. If app needs it should call DROP explcitly. Signed-off-by: Namarta Kohli <namartax.kohli@intel.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-24ALSA: Fix memory leak on error in snd_compr_set_params()Jesper Juhl1-5/+8
If copy_from_user() does not return 0 we'll leak the memory we allocated for 'params' when that variable goes out of scope. Also a small CodingStyle cleanup: Use braces on both branches of if/else when one branch needs it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-23ALSA: core: add support for compress_offloadVinod Koul1-0/+765
This patch adds core.c, the file which implements the ioctls and registers the devices Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>