diff mbox

[1/4] ASoC: compress: Only assign compr->ops->copy once

Message ID 20180426163007.5632-1-ckeepax@opensource.cirrus.com (mailing list archive)
State Accepted
Commit ca76db6c7e9c4ab6a98fbe0f92f18bf1375e325d
Headers show

Commit Message

Charles Keepax April 26, 2018, 4:30 p.m. UTC
There are only one set of ops on the compressed stream so no need to
reassign the copy callback repeatedly, stop after copy is seen to be
necessary.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 sound/soc/soc-compress.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Vinod Koul May 3, 2018, 4:28 p.m. UTC | #1
On Thu, Apr 26, 2018 at 05:30:04PM +0100, Charles Keepax wrote:
> There are only one set of ops on the compressed stream so no need to
> reassign the copy callback repeatedly, stop after copy is seen to be
> necessary.

Except 2:

Acked-by: Vinod Koul <vkoul@kernel.org>
diff mbox

Patch

diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index ba56f87f96d4c..62875c6a93a14 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -973,6 +973,7 @@  int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
 			continue;
 
 		compr->ops->copy = soc_compr_copy;
+		break;
 	}