Skip to content

Commit f872501

Browse files
Jyri Sarhakv2019i
authored andcommitted
Audio: Google rtc: Memory, blob, and fast_get allocs to module API
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends. The change does not touch the google_rtc_audio_processing.h API or its mock implementation, that still uses rballoc() and rfree(). Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 955e1a6 commit f872501

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/audio/google/google_rtc_audio_processing.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,15 +512,15 @@ static int google_rtc_audio_processing_init(struct processing_module *mod)
512512
comp_info(dev, "google_rtc_audio_processing_init()");
513513

514514
/* Create private component data */
515-
cd = rzalloc(SOF_MEM_FLAG_USER, sizeof(*cd));
515+
cd = mod_zalloc(mod, sizeof(*cd));
516516
if (!cd) {
517517
ret = -ENOMEM;
518518
goto fail;
519519
}
520520

521521
md->private = cd;
522522

523-
cd->tuning_handler = comp_data_blob_handler_new(dev);
523+
cd->tuning_handler = mod_data_blob_handler_new(mod);
524524
if (!cd->tuning_handler) {
525525
ret = -ENOMEM;
526526
goto fail;
@@ -585,8 +585,8 @@ static int google_rtc_audio_processing_init(struct processing_module *mod)
585585
GoogleRtcAudioProcessingFree(cd->state);
586586
}
587587
GoogleRtcAudioProcessingDetachMemoryBuffer();
588-
comp_data_blob_handler_free(cd->tuning_handler);
589-
rfree(cd);
588+
mod_data_blob_handler_free(mod, cd->tuning_handler);
589+
mod_free(mod, cd);
590590
}
591591

592592
return ret;
@@ -601,8 +601,8 @@ static int google_rtc_audio_processing_free(struct processing_module *mod)
601601
GoogleRtcAudioProcessingFree(cd->state);
602602
cd->state = NULL;
603603
GoogleRtcAudioProcessingDetachMemoryBuffer();
604-
comp_data_blob_handler_free(cd->tuning_handler);
605-
rfree(cd);
604+
mod_data_blob_handler_free(mod, cd->tuning_handler);
605+
mod_free(mod, cd);
606606
return 0;
607607
}
608608

0 commit comments

Comments
 (0)