Skip to content

Commit

Permalink
google_rtc_audio_processing: Fixes for MTL branch
Browse files Browse the repository at this point in the history
Squashed fixups to this code from thesofproject#8571

Signed-off-by: Andy Ross <andyross@google.com>
  • Loading branch information
andyross committed Dec 11, 2023
1 parent a1f24c7 commit 259edac
Show file tree
Hide file tree
Showing 3 changed files with 400 additions and 307 deletions.
22 changes: 18 additions & 4 deletions src/audio/google/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ config COMP_GOOGLE_RTC_AUDIO_PROCESSING
bool "Google Real Time Communication Audio processing"
select COMP_BLOB
select GOOGLE_RTC_AUDIO_PROCESSING_MOCK if COMP_STUBS
depends on IPC_MAJOR_4
default n
help
Select for Google real-time communication audio processing. It
Expand All @@ -36,10 +35,11 @@ config COMP_GOOGLE_RTC_AUDIO_PROCESSING_SAMPLE_RATE_HZ
config COMP_GOOGLE_RTC_AUDIO_PROCESSING_NUM_CHANNELS
depends on COMP_GOOGLE_RTC_AUDIO_PROCESSING
int "Number of channels to process for Google Real Time Communication Audio processing"
default 4
default 2 if MT8195
default 1
help
Sets the number of channels to process in the Google real-time
communication audio processing.
Sets the number of input/mic channels to process in the
Google real-time communication audio processing.

config COMP_GOOGLE_RTC_AUDIO_PROCESSING_NUM_AEC_REFERENCE_CHANNELS
depends on COMP_GOOGLE_RTC_AUDIO_PROCESSING
Expand Down Expand Up @@ -81,4 +81,18 @@ config GOOGLE_RTC_AUDIO_PROCESSING_MOCK
Mock Google real-time communication audio processing.
It allows for compilation check and basic audio flow checking.

config GOOGLE_RTC_AUDIO_PROCESSING_MIC_BITS
int "Sample format for capture input/output"
default 16
help
Bits in the signed integer sample format used for the
capture stream. 16 or 32.

config GOOGLE_RTC_AUDIO_PROCESSING_REF_BITS
int "Sample format for reference input"
default 16
help
Bits in the signed integer sample format used for playback
reference. 16 or 32.

endmenu
4 changes: 4 additions & 0 deletions src/audio/google/google_hotword_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ static int ghd_setup_model(struct comp_dev *dev)
return 0;
}

#if CONFIG_IPC_MAJOR_3
static int ghd_ctrl_set_bin_data(struct comp_dev *dev,
struct sof_ipc_ctrl_data *cdata)
{
Expand Down Expand Up @@ -309,6 +310,7 @@ static int ghd_cmd(struct comp_dev *dev, int cmd, void *data,
return -EINVAL;
}
}
#endif

static int ghd_trigger(struct comp_dev *dev, int cmd)
{
Expand Down Expand Up @@ -459,7 +461,9 @@ static const struct comp_driver ghd_driver = {
.create = ghd_create,
.free = ghd_free,
.params = ghd_params,
#if CONFIG_IPC_MAJOR_3
.cmd = ghd_cmd,
#endif
.trigger = ghd_trigger,
.copy = ghd_copy,
.prepare = ghd_prepare,
Expand Down
Loading

0 comments on commit 259edac

Please sign in to comment.