[Sound-open-firmware] [PATCH] volume: pass format change to downstream components.
The volume component can change the sink data format depending on sink component/pipeline topology configuration. This change is set locally, but not to the host params that are passed downstream.
Fix this so that downstream components can check params match their topology configuration.
Tested with test-passthrough-48k-vol-ssp2 and reef-byt-rt5651 topology files. Note that there are quite a few underflows likely added by recent changes, more work needed to identify what goes on.
(first fix for prepare() from Liam, additional update for the params() case by Pierre)
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/audio/volume.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/src/audio/volume.c b/src/audio/volume.c index 5ae1cce..572c88e 100644 --- a/src/audio/volume.c +++ b/src/audio/volume.c @@ -408,8 +408,13 @@ static void volume_free(struct comp_dev *dev) */ static int volume_params(struct comp_dev *dev) { + struct comp_data *cd = comp_get_drvdata(dev); + trace_volume("par");
+ /* rewrite params format for all downstream */ + dev->params.frame_fmt = cd->sink_format; + return 0; }
@@ -656,6 +661,8 @@ static int volume_prepare(struct comp_dev *dev) comp_frame_bytes(sinkb->sink); break; } + /* rewrite params format for all downstream */ + dev->params.frame_fmt = cd->sink_format;
dev->frame_bytes = cd->sink_period_bytes / dev->frames;
On Tue, 2017-12-12 at 22:22 -0600, Pierre-Louis Bossart wrote:
The volume component can change the sink data format depending on sink component/pipeline topology configuration. This change is set locally, but not to the host params that are passed downstream.
Fix this so that downstream components can check params match their topology configuration.
Tested with test-passthrough-48k-vol-ssp2 and reef-byt-rt5651 topology files. Note that there are quite a few underflows likely added by recent changes, more work needed to identify what goes on.
(first fix for prepare() from Liam, additional update for the params() case by Pierre)
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com
Applied
participants (2)
-
Liam Girdwood
-
Pierre-Louis Bossart