Lines Matching refs:lzo_ctx

1045 static int snd_soc_lzo_prepare(struct snd_soc_lzo_ctx *lzo_ctx)  in snd_soc_lzo_prepare()  argument
1047 lzo_ctx->wmem = kmalloc(LZO1X_MEM_COMPRESS, GFP_KERNEL); in snd_soc_lzo_prepare()
1048 if (!lzo_ctx->wmem) in snd_soc_lzo_prepare()
1053 static int snd_soc_lzo_compress(struct snd_soc_lzo_ctx *lzo_ctx) in snd_soc_lzo_compress() argument
1058 ret = lzo1x_1_compress(lzo_ctx->src, lzo_ctx->src_len, in snd_soc_lzo_compress()
1059 lzo_ctx->dst, &compress_size, lzo_ctx->wmem); in snd_soc_lzo_compress()
1060 if (ret != LZO_E_OK || compress_size > lzo_ctx->dst_len) in snd_soc_lzo_compress()
1062 lzo_ctx->dst_len = compress_size; in snd_soc_lzo_compress()
1066 static int snd_soc_lzo_decompress(struct snd_soc_lzo_ctx *lzo_ctx) in snd_soc_lzo_decompress() argument
1071 dst_len = lzo_ctx->dst_len; in snd_soc_lzo_decompress()
1072 ret = lzo1x_decompress_safe(lzo_ctx->src, lzo_ctx->src_len, in snd_soc_lzo_decompress()
1073 lzo_ctx->dst, &dst_len); in snd_soc_lzo_decompress()
1074 if (ret != LZO_E_OK || dst_len != lzo_ctx->dst_len) in snd_soc_lzo_decompress()
1080 struct snd_soc_lzo_ctx *lzo_ctx) in snd_soc_lzo_compress_cache_block() argument
1084 lzo_ctx->dst_len = lzo1x_worst_compress(PAGE_SIZE); in snd_soc_lzo_compress_cache_block()
1085 lzo_ctx->dst = kmalloc(lzo_ctx->dst_len, GFP_KERNEL); in snd_soc_lzo_compress_cache_block()
1086 if (!lzo_ctx->dst) { in snd_soc_lzo_compress_cache_block()
1087 lzo_ctx->dst_len = 0; in snd_soc_lzo_compress_cache_block()
1091 ret = snd_soc_lzo_compress(lzo_ctx); in snd_soc_lzo_compress_cache_block()
1098 struct snd_soc_lzo_ctx *lzo_ctx) in snd_soc_lzo_decompress_cache_block() argument
1102 lzo_ctx->dst_len = lzo_ctx->decompressed_size; in snd_soc_lzo_decompress_cache_block()
1103 lzo_ctx->dst = kmalloc(lzo_ctx->dst_len, GFP_KERNEL); in snd_soc_lzo_decompress_cache_block()
1104 if (!lzo_ctx->dst) { in snd_soc_lzo_decompress_cache_block()
1105 lzo_ctx->dst_len = 0; in snd_soc_lzo_decompress_cache_block()
1109 ret = snd_soc_lzo_decompress(lzo_ctx); in snd_soc_lzo_decompress_cache_block()