Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab8dd73a authored by Liam Girdwood's avatar Liam Girdwood Committed by Gerrit - the friendly Code Review server
Browse files

ALSA: compress: Add snd_compress_free()



We are not currently freeing the compressed devices at module
unload time. This could be used to help, but more investigation
needs to be done to resolve this issue.

This patch is WIP

Change-Id: I6cf8bcc56e4d446d83e9a0e63b79db3da378a901
Signed-off-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
Git-commit: b2ebfd20ecb255b8e575ea8b6fad8d1affc2ea77
Git-repo: https://android.googlesource.com/kernel/msm


Signed-off-by: default avatarDhananjay Kumar <dhakumar@codeaurora.org>
[bgoswami@codeaurora.org: resolved merge conflicts]
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: default avatarMeng Wang <mwang@codeaurora.org>
parent 80a53b1f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ int snd_compress_register(struct snd_compr *device);
int snd_compress_deregister(struct snd_compr *device);
int snd_compress_new(struct snd_card *card, int device,
			int type, const char *id, struct snd_compr *compr);
void snd_compress_free(struct snd_card *card, struct snd_compr *compr);

/* dsp driver callback apis
 * For playback: driver should call snd_compress_fragment_elapsed() to let the
+11 −0
Original line number Diff line number Diff line
@@ -1095,6 +1095,17 @@ int snd_compress_new(struct snd_card *card, int device,
}
EXPORT_SYMBOL_GPL(snd_compress_new);

/*
 * snd_compress_free: free compress device
 * @card: sound card pointer
 * @compr: compress device pointer
 */
void snd_compress_free(struct snd_card *card, struct snd_compr *compr)
{
	snd_device_free(card, compr);
}
EXPORT_SYMBOL(snd_compress_free);

static int snd_compress_add_device(struct snd_compr *device)
{
	int ret;