Commit Graph

5 Commits (be3940c0a90265654d778394cafe2e2cec674df8)

Author SHA1 Message Date
Dan Carpenter 81cb324675 ALSA: compress_core: fix open flags test in snd_compr_open()
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-09-11 14:27:40 +02:00
Vinod Koul 8b21460ac6 ALSA: compress_core: cleanup pointers on stop
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-12 17:55:02 +02:00
Vinod Koul 6b18f79399 ALSA: compress_core: don't wake up on pause
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-06-12 17:54:42 +02:00
Jesper Juhl 769fab2a41 ALSA: Fix memory leak on error in snd_compr_set_params()
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>
2012-01-24 15:29:32 +01:00
Vinod Koul b21c60a4ed ALSA: core: add support for compress_offload
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>
2011-12-23 10:08:25 +01:00