[Sound-open-firmware] [PATCH v2 20/26] mixer: mixer_params(): set the sink buffer params to STREAM_FORMAT_S32_LE.
Keyon Jie
yang.jie at linux.intel.com
Thu Feb 9 16:04:12 CET 2017
As its sink won't be host/dai, it is alwasys internal component,
let's hard code it to STREAM_FORMAT_S32_LE ATM.
Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
---
src/audio/mixer.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/audio/mixer.c b/src/audio/mixer.c
index 4487862..57669a7 100644
--- a/src/audio/mixer.c
+++ b/src/audio/mixer.c
@@ -116,12 +116,18 @@ static void mixer_free(struct comp_dev *dev)
/* set component audio stream paramters */
static int mixer_params(struct comp_dev *dev, struct stream_params *params)
{
+ struct stream_params sink_params = *params;
+
/* dont do any params downstream setting for running mixer stream */
if (dev->state == COMP_STATE_RUNNING)
return 1;
+ /* suppose sink component won't be host/dai, so hard code it */
+ sink_params.pcm.format = STREAM_FORMAT_S32_LE;
+ sink_params.frame_size = 4 * params->channels; /* 32bit container */
+
/* dont do any data transformation */
- comp_set_sink_params(dev, params);
+ comp_set_sink_params(dev, &sink_params);
return 0;
}
--
2.7.4
More information about the Sound-open-firmware
mailing list