Skip to content

Commit 36e7e1b

Browse files
committed
codec_adapter: correct the way to get the scheduling period
Scheduling period should be acquired from dev->pipeline->period Signed-off-by: CY Kuei <cyk@waves.com> Signed-off-by: Mac Chiang <mac.chiang@intel.com> (backport from commit 285df36)
1 parent 0560990 commit 36e7e1b

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/audio/codec_adapter/codec/waves.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,10 @@ static int waves_effect_init(struct comp_dev *dev)
330330
waves_codec->o_format = waves_codec->i_format;
331331

332332
waves_codec->sample_size_in_bytes = sample_bytes;
333-
waves_codec->buffer_samples = (src_fmt->rate * 2) / 1000; /* 2 ms io buffers */
333+
/* Prepare a buffer for 1 period worth of data
334+
* dev->pipeline->period stands for the scheduling period in us
335+
*/
336+
waves_codec->buffer_samples = src_fmt->rate * dev->pipeline->period / 1000000;
334337
waves_codec->buffer_bytes = waves_codec->buffer_samples * src_fmt->channels *
335338
waves_codec->sample_size_in_bytes;
336339

tools/topology/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ set(TPLGS
147147
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015-xperi\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-rt1015\;-DINCLUDE_IIR_EQ=1"
148148
"sof-jsl-rt5682\;sof-jsl-rt5682-mx98360a\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-dedede"
149149
"sof-jsl-rt5682\;sof-jsl-cs42l42-mx98360a\;-DHEADPHONE=cs42l42\;-DPLATFORM=jsl-dedede"
150-
"sof-jsl-rt5682\;sof-jsl-rt5682\;-DHEADPHONE=rt5682\;-DPLATFORM=icl\;-DNO_AMP"
151-
"sof-jsl-rt5682\;sof-jsl-rt5650\;-DHEADPHONE=rt5650\;-DPLATFORM=jsl-rt1015"
150+
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015-waves\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-rt1015\;-DWAVES=1"
152151
)
153152

154153
add_custom_target(topologies ALL)

0 commit comments

Comments
 (0)