[Sound-open-firmware] [PATCH v2 2/2] volume: fix calculation for source/sink period bytes
Ranjani Sridharan
ranjani.sridharan at linux.intel.com
Tue Sep 12 14:54:53 CEST 2017
This patch fixes the calculation for source/sink period_bytes to
use comp_frame_bytes().
Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
---
src/audio/volume.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/audio/volume.c b/src/audio/volume.c
index 363055d..b01473a 100644
--- a/src/audio/volume.c
+++ b/src/audio/volume.c
@@ -569,7 +569,7 @@ static int volume_prepare(struct comp_dev *dev)
sconfig = COMP_GET_CONFIG(sourceb->source);
cd->source_format = sconfig->frame_fmt;
cd->source_period_bytes = dev->frames *
- sourceb->source->frame_bytes;
+ comp_frame_bytes(sourceb->source);
break;
}
@@ -589,7 +589,7 @@ static int volume_prepare(struct comp_dev *dev)
sconfig = COMP_GET_CONFIG(sinkb->sink);
cd->sink_format = sconfig->frame_fmt;
cd->sink_period_bytes = dev->frames *
- sinkb->sink->frame_bytes;
+ comp_frame_bytes(sinkb->sink);
break;
}
--
2.11.0
More information about the Sound-open-firmware
mailing list