[Sound-open-firmware] [PATCH] volume: fix frame bytes calculation.

Liam Girdwood liam.r.girdwood at linux.intel.com
Thu Nov 16 16:04:20 CET 2017


On Thu, 2017-11-16 at 14:57 +0000, Jie, Yang wrote:
> >-----Original Message-----
> >From: sound-open-firmware-bounces at alsa-project.org [mailto:sound-open-
> >firmware-bounces at alsa-project.org] On Behalf Of Liam Girdwood
> >Sent: Thursday, November 16, 2017 7:56 PM
> >To: sound-open-firmware at alsa-project.org
> >Cc: Liam Girdwood <liam.r.girdwood at linux.intel.com>
> >Subject: [Sound-open-firmware] [PATCH] volume: fix frame bytes calculation.
> >
> >Currently frame bytes is calculated as period bytes. Fix.
> >
> >Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
> >---
> > src/audio/volume.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/src/audio/volume.c b/src/audio/volume.c index fb8d9e7..b6872a7
> >100644
> >--- a/src/audio/volume.c
> >+++ b/src/audio/volume.c
> >@@ -656,7 +656,7 @@ static int volume_prepare(struct comp_dev *dev)
> > 		break;
> > 	}
> >
> >-	dev->frame_bytes = cd->sink_period_bytes;
> >+	dev->frame_bytes = cd->sink_period_bytes / dev->frames;
> 
> Can we change the naming to sink_frame_bytes? As the frame_bytes of
> its source buffer may be different, and naming "frame_bytes" is somewhat
> confused.

Ok, we can do that. Please send a patch.

Lam



More information about the Sound-open-firmware mailing list