From cdfa47e4e620f30ec6aa588f5abf4474723355c3 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Mon, 16 Nov 2026 12:05:46 +0000 Subject: [PATCH 1/6] topology2: eqiir: add highpass filter bundle and presets Add IIR highpass filter presets (20/30/40/50/100 Hz, 30/40 dB, 16/48 kHz) and bundle.conf for topology2 pipelines. Signed-off-by: Seppo Ingalsuo --- .../include/components/eqiir/bundle.conf | 60 +++++++++++++++++++ .../eqiir/highpass_100hz_30db_16khz.conf | 20 +++++++ .../eqiir/highpass_100hz_30db_48khz.conf | 20 +++++++ .../eqiir/highpass_100hz_40db_16khz.conf | 20 +++++++ .../eqiir/highpass_100hz_40db_48khz.conf | 20 +++++++ .../eqiir/highpass_20hz_30db_16khz.conf | 20 +++++++ .../eqiir/highpass_20hz_30db_48khz.conf | 20 +++++++ .../eqiir/highpass_20hz_40db_16khz.conf | 20 +++++++ .../eqiir/highpass_20hz_40db_48khz.conf | 20 +++++++ .../eqiir/highpass_30hz_30db_16khz.conf | 20 +++++++ .../eqiir/highpass_30hz_30db_48khz.conf | 20 +++++++ .../eqiir/highpass_30hz_40db_16khz.conf | 20 +++++++ .../eqiir/highpass_30hz_40db_48khz.conf | 20 +++++++ .../eqiir/highpass_40hz_30db_16khz.conf | 20 +++++++ .../eqiir/highpass_40hz_30db_48khz.conf | 20 +++++++ .../eqiir/highpass_40hz_40db_16khz.conf | 20 +++++++ .../eqiir/highpass_40hz_40db_48khz.conf | 20 +++++++ .../eqiir/highpass_50hz_30db_16khz.conf | 20 +++++++ .../eqiir/highpass_50hz_30db_48khz.conf | 20 +++++++ .../eqiir/highpass_50hz_40db_16khz.conf | 20 +++++++ .../eqiir/highpass_50hz_40db_48khz.conf | 20 +++++++ 21 files changed, 460 insertions(+) create mode 100644 tools/topology/topology2/include/components/eqiir/bundle.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_100hz_30db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_100hz_30db_48khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_100hz_40db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_100hz_40db_48khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_20hz_30db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_20hz_30db_48khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_20hz_40db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_20hz_40db_48khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_30hz_30db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_30hz_30db_48khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_30hz_40db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_30hz_40db_48khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_40hz_30db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_40hz_30db_48khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_40hz_40db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_40hz_40db_48khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_50hz_30db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_50hz_30db_48khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_50hz_40db_16khz.conf create mode 100644 tools/topology/topology2/include/components/eqiir/highpass_50hz_40db_48khz.conf diff --git a/tools/topology/topology2/include/components/eqiir/bundle.conf b/tools/topology/topology2/include/components/eqiir/bundle.conf new file mode 100644 index 000000000000..aad925d507c5 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/bundle.conf @@ -0,0 +1,60 @@ +# Bundle of responses flat/loud/bass/band/high, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x98,0x01,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x98,0x01,0x00,0x00,0x02,0x00,0x00,0x00, + 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x9e,0x73,0x13,0x20, + 0x00,0x00,0x00,0x00,0xb2,0x7f,0x00,0x00, + 0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x1c,0x5a,0xff,0xc0,0xb4,0xc1,0xff,0x7e, + 0x9f,0xb7,0xb4,0x11,0x2d,0x0a,0x35,0xdc, + 0x90,0xb0,0x16,0x12,0x00,0x00,0x00,0x00, + 0x00,0x40,0x00,0x00,0x21,0xf8,0xd5,0xc4, + 0xf0,0x6b,0x14,0x7b,0x27,0xb8,0x9d,0x0e, + 0xb9,0x24,0x18,0xe1,0xa9,0xf7,0x54,0x10, + 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, + 0xff,0xaf,0xc0,0xf4,0x17,0xa2,0x2d,0xf6, + 0x35,0xa4,0x1f,0x04,0x58,0x87,0x20,0xf9, + 0xb9,0x3e,0xcb,0x15,0xfc,0xff,0xff,0xff, + 0x7c,0x63,0x00,0x00,0x02,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf1,0xbc,0x5a,0xc0, + 0x8f,0x02,0xa5,0x7f,0x83,0xae,0xfc,0x1f, + 0xfa,0xa2,0x06,0xc0,0x83,0xae,0xfc,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, + 0x6f,0x82,0x53,0xc2,0x3e,0x77,0xa1,0x7d, + 0x1f,0x86,0xa2,0x09,0xe8,0xa3,0x18,0xec, + 0x7d,0x5c,0x4a,0x0a,0xfe,0xff,0xff,0xff, + 0x06,0x6d,0x00,0x00,0x02,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x8e,0x6f,0xa8,0xc5, + 0xb3,0x81,0x14,0x7a,0xae,0x14,0xa0,0x1e, + 0xa5,0xd6,0xbf,0xc2,0xae,0x14,0xa0,0x1e, + 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, + 0x3e,0xac,0x84,0xe6,0xc3,0x9a,0xfd,0x46, + 0xcf,0x1e,0x51,0x02,0x9d,0x3d,0xa2,0x04, + 0xcf,0x1e,0x51,0x02,0xfc,0xff,0xff,0xff, + 0x85,0x5e,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xbd,0x82,0x2c,0xc1, + 0x2e,0xb5,0xd0,0x7e,0x0c,0xcc,0xc7,0x1f, + 0xe9,0x67,0x70,0xc0,0x0c,0xcc,0xc7,0x1f, + 0xf9,0xff,0xff,0xff,0xc5,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_100hz_30db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_100hz_30db_16khz.conf new file mode 100644 index 000000000000..ddb9015290f6 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_100hz_30db_16khz.conf @@ -0,0 +1,20 @@ +# 100 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x18,0x75,0xc3, + 0x6b,0x52,0x72,0x7c,0x6e,0x92,0x32,0x1f, + 0x24,0xdb,0x9a,0xc1,0x6e,0x92,0x32,0x1f, + 0xfb,0xff,0xff,0xff,0x33,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_100hz_30db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_100hz_30db_48khz.conf new file mode 100644 index 000000000000..6d059520212a --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_100hz_30db_48khz.conf @@ -0,0 +1,20 @@ +# 100 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xbd,0x82,0x2c,0xc1, + 0x2e,0xb5,0xd0,0x7e,0x0c,0xcc,0xc7,0x1f, + 0xe9,0x67,0x70,0xc0,0x0c,0xcc,0xc7,0x1f, + 0xfb,0xff,0xff,0xff,0x33,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_100hz_40db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_100hz_40db_16khz.conf new file mode 100644 index 000000000000..79dec06b3c4e --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_100hz_40db_16khz.conf @@ -0,0 +1,20 @@ +# 100 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x18,0x75,0xc3, + 0x6b,0x52,0x72,0x7c,0x6e,0x92,0x32,0x1f, + 0x24,0xdb,0x9a,0xc1,0x6e,0x92,0x32,0x1f, + 0xf9,0xff,0xff,0xff,0xc5,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_100hz_40db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_100hz_40db_48khz.conf new file mode 100644 index 000000000000..8946939f9fc3 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_100hz_40db_48khz.conf @@ -0,0 +1,20 @@ +# 100 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xbd,0x82,0x2c,0xc1, + 0x2e,0xb5,0xd0,0x7e,0x0c,0xcc,0xc7,0x1f, + 0xe9,0x67,0x70,0xc0,0x0c,0xcc,0xc7,0x1f, + 0xf9,0xff,0xff,0xff,0xc5,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_20hz_30db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_20hz_30db_16khz.conf new file mode 100644 index 000000000000..5ca1a45706b4 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_20hz_30db_16khz.conf @@ -0,0 +1,20 @@ +# 20 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x3c,0xf9,0xb4,0xc0, + 0x79,0x05,0x4a,0x7f,0x92,0xf9,0xe5,0x1f, + 0xdc,0x0c,0x34,0xc0,0x92,0xf9,0xe5,0x1f, + 0xfb,0xff,0xff,0xff,0x31,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_20hz_30db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_20hz_30db_48khz.conf new file mode 100644 index 000000000000..ad35e3134581 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_20hz_30db_48khz.conf @@ -0,0 +1,20 @@ +# 20 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x4a,0x8c,0x3c,0xc0, + 0x04,0x57,0xc3,0x7f,0xc0,0x43,0x04,0x20, + 0x80,0x78,0xf7,0xbf,0xc0,0x43,0x04,0x20, + 0xfb,0xff,0xff,0xff,0x31,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_20hz_40db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_20hz_40db_16khz.conf new file mode 100644 index 000000000000..841697d7df43 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_20hz_40db_16khz.conf @@ -0,0 +1,20 @@ +# 20 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x3c,0xf9,0xb4,0xc0, + 0x79,0x05,0x4a,0x7f,0x92,0xf9,0xe5,0x1f, + 0xdc,0x0c,0x34,0xc0,0x92,0xf9,0xe5,0x1f, + 0xf9,0xff,0xff,0xff,0xc3,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_20hz_40db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_20hz_40db_48khz.conf new file mode 100644 index 000000000000..776b1f1ea43e --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_20hz_40db_48khz.conf @@ -0,0 +1,20 @@ +# 20 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x4a,0x8c,0x3c,0xc0, + 0x04,0x57,0xc3,0x7f,0xc0,0x43,0x04,0x20, + 0x80,0x78,0xf7,0xbf,0xc0,0x43,0x04,0x20, + 0xf9,0xff,0xff,0xff,0xc3,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_30hz_30db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_30hz_30db_16khz.conf new file mode 100644 index 000000000000..5493411e2980 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_30hz_30db_16khz.conf @@ -0,0 +1,20 @@ +# 30 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x98,0xb5,0x0e,0xc1, + 0x17,0x09,0xef,0x7e,0xbf,0x54,0xcf,0x1f, + 0x82,0x56,0x61,0xc0,0xbf,0x54,0xcf,0x1f, + 0xfb,0xff,0xff,0xff,0x31,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_30hz_30db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_30hz_30db_48khz.conf new file mode 100644 index 000000000000..f1fcc31376b4 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_30hz_30db_48khz.conf @@ -0,0 +1,20 @@ +# 30 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf1,0xbc,0x5a,0xc0, + 0x8f,0x02,0xa5,0x7f,0x83,0xae,0xfc,0x1f, + 0xfa,0xa2,0x06,0xc0,0x83,0xae,0xfc,0x1f, + 0xfb,0xff,0xff,0xff,0x31,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_30hz_40db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_30hz_40db_16khz.conf new file mode 100644 index 000000000000..13f8aa510bd7 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_30hz_40db_16khz.conf @@ -0,0 +1,20 @@ +# 30 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x98,0xb5,0x0e,0xc1, + 0x17,0x09,0xef,0x7e,0xbf,0x54,0xcf,0x1f, + 0x82,0x56,0x61,0xc0,0xbf,0x54,0xcf,0x1f, + 0xf9,0xff,0xff,0xff,0xc3,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_30hz_40db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_30hz_40db_48khz.conf new file mode 100644 index 000000000000..de7ba3836313 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_30hz_40db_48khz.conf @@ -0,0 +1,20 @@ +# 30 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf1,0xbc,0x5a,0xc0, + 0x8f,0x02,0xa5,0x7f,0x83,0xae,0xfc,0x1f, + 0xfa,0xa2,0x06,0xc0,0x83,0xae,0xfc,0x1f, + 0xf9,0xff,0xff,0xff,0xc3,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_40hz_30db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_40hz_30db_16khz.conf new file mode 100644 index 000000000000..d09355069352 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_40hz_30db_16khz.conf @@ -0,0 +1,20 @@ +# 40 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xba,0xf2,0x67,0xc1, + 0xc3,0x0d,0x94,0x7e,0xff,0xbf,0xb8,0x1f, + 0x03,0x80,0x8e,0xc0,0xff,0xbf,0xb8,0x1f, + 0xfb,0xff,0xff,0xff,0x31,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_40hz_30db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_40hz_30db_48khz.conf new file mode 100644 index 000000000000..1cfc8ee9c8a1 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_40hz_30db_48khz.conf @@ -0,0 +1,20 @@ +# 40 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x4c,0xdf,0x78,0xc0, + 0x23,0xae,0x86,0x7f,0x12,0x1b,0xf5,0x1f, + 0xdb,0xc9,0x15,0xc0,0x12,0x1b,0xf5,0x1f, + 0xfb,0xff,0xff,0xff,0x31,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_40hz_40db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_40hz_40db_16khz.conf new file mode 100644 index 000000000000..20c5f62b2d1b --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_40hz_40db_16khz.conf @@ -0,0 +1,20 @@ +# 40 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xba,0xf2,0x67,0xc1, + 0xc3,0x0d,0x94,0x7e,0xff,0xbf,0xb8,0x1f, + 0x03,0x80,0x8e,0xc0,0xff,0xbf,0xb8,0x1f, + 0xf9,0xff,0xff,0xff,0xc3,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_40hz_40db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_40hz_40db_48khz.conf new file mode 100644 index 000000000000..aee5db3b7e23 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_40hz_40db_48khz.conf @@ -0,0 +1,20 @@ +# 40 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x4c,0xdf,0x78,0xc0, + 0x23,0xae,0x86,0x7f,0x12,0x1b,0xf5,0x1f, + 0xdb,0xc9,0x15,0xc0,0x12,0x1b,0xf5,0x1f, + 0xf9,0xff,0xff,0xff,0xc3,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_50hz_30db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_50hz_30db_16khz.conf new file mode 100644 index 000000000000..73cc45adb973 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_50hz_30db_16khz.conf @@ -0,0 +1,20 @@ +# 50 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x57,0xb1,0xc0,0xc1, + 0xd2,0x13,0x39,0x7e,0x45,0x3b,0xa2,0x1f, + 0x76,0x89,0xbb,0xc0,0x45,0x3b,0xa2,0x1f, + 0xfb,0xff,0xff,0xff,0x31,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_50hz_30db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_50hz_30db_48khz.conf new file mode 100644 index 000000000000..31caf5a824f5 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_50hz_30db_48khz.conf @@ -0,0 +1,20 @@ +# 50 Hz second order high-pass, gain 30 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x63,0xf3,0x96,0xc0, + 0xc6,0x59,0x68,0x7f,0x6d,0x89,0xed,0x1f, + 0x27,0xed,0x24,0xc0,0x6d,0x89,0xed,0x1f, + 0xfb,0xff,0xff,0xff,0x31,0x7e,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_50hz_40db_16khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_50hz_40db_16khz.conf new file mode 100644 index 000000000000..c92e441b6deb --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_50hz_40db_16khz.conf @@ -0,0 +1,20 @@ +# 50 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x57,0xb1,0xc0,0xc1, + 0xd2,0x13,0x39,0x7e,0x45,0x3b,0xa2,0x1f, + 0x76,0x89,0xbb,0xc0,0x45,0x3b,0xa2,0x1f, + 0xf9,0xff,0xff,0xff,0xc3,0x63,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/eqiir/highpass_50hz_40db_48khz.conf b/tools/topology/topology2/include/components/eqiir/highpass_50hz_40db_48khz.conf new file mode 100644 index 000000000000..e24f89cfaef3 --- /dev/null +++ b/tools/topology/topology2/include/components/eqiir/highpass_50hz_40db_48khz.conf @@ -0,0 +1,20 @@ +# 50 Hz second order high-pass, gain 40 dB, created with sof_example_iir_eq.m 21-Oct-2026 +# cd src/audio/eq_iir/tune; octave --no-window-system sof_example_iir_eq.m +Object.Base.data."iir_eq" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x58,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x63,0xf3,0x96,0xc0, + 0xc6,0x59,0x68,0x7f,0x6d,0x89,0xed,0x1f, + 0x27,0xed,0x24,0xc0,0x6d,0x89,0xed,0x1f, + 0xf9,0xff,0xff,0xff,0xc3,0x63,0x00,0x00" +} From af534d22b0f2f092e91266271eb421b55d4852ac Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Mon, 16 Nov 2026 12:05:46 +0000 Subject: [PATCH 2/6] topology2: mfcc: add mel40/mel80 PCAN and AGC8 configurations Add mel40/mel80 PCAN and 8-bit soft AGC MFCC component configuration blobs and align existing MFCC config parameter headers. Signed-off-by: Seppo Ingalsuo Co-authored-by: Liam Girdwood Signed-off-by: Liam Girdwood --- .../components/mfcc/ceps13_compress_dtx.conf | 8 +++--- .../include/components/mfcc/default.conf | 8 +++--- .../include/components/mfcc/mel40.conf | 24 +++++++++++++++++ .../include/components/mfcc/mel40_10ms.conf | 24 +++++++++++++++++ .../mfcc/mel40_10ms_agc8_compress.conf | 26 +++++++++++++++++++ .../components/mfcc/mel40_10ms_compress.conf | 25 ++++++++++++++++++ .../mfcc/mel40_10ms_pcan_compress.conf | 26 +++++++++++++++++++ .../components/mfcc/mel40_compress.conf | 24 +++++++++++++++++ .../include/components/mfcc/mel80.conf | 16 ++++++------ .../components/mfcc/mel80_compress.conf | 16 ++++++------ .../components/mfcc/mel80_compress_dtx.conf | 16 ++++++------ .../components/mfcc/mel80_pcan_compress.conf | 24 +++++++++++++++++ 12 files changed, 205 insertions(+), 32 deletions(-) create mode 100644 tools/topology/topology2/include/components/mfcc/mel40.conf create mode 100644 tools/topology/topology2/include/components/mfcc/mel40_10ms.conf create mode 100644 tools/topology/topology2/include/components/mfcc/mel40_10ms_agc8_compress.conf create mode 100644 tools/topology/topology2/include/components/mfcc/mel40_10ms_compress.conf create mode 100644 tools/topology/topology2/include/components/mfcc/mel40_10ms_pcan_compress.conf create mode 100644 tools/topology/topology2/include/components/mfcc/mel40_compress.conf create mode 100644 tools/topology/topology2/include/components/mfcc/mel80_pcan_compress.conf diff --git a/tools/topology/topology2/include/components/mfcc/ceps13_compress_dtx.conf b/tools/topology/topology2/include/components/mfcc/ceps13_compress_dtx.conf index 7056b9e7cb4b..306d0bca002a 100644 --- a/tools/topology/topology2/include/components/mfcc/ceps13_compress_dtx.conf +++ b/tools/topology/topology2/include/components/mfcc/ceps13_compress_dtx.conf @@ -1,4 +1,4 @@ -# Exported MFCC configuration 26-May-2026 +# Exported MFCC configuration 16-Sep-2026 # cd src/audio/mfcc/tune; octave setup_mfcc.m Object.Base.data."mfcc_config" { bytes " @@ -8,7 +8,7 @@ Object.Base.data."mfcc_config" { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x14,0x00,0xf4,0x01, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -17,8 +17,8 @@ Object.Base.data."mfcc_config" { 0xc3,0x35,0x00,0x2c,0x00,0x00,0x00,0x00, 0x90,0x01,0xa0,0x00,0x00,0x00,0x14,0x00, 0x0d,0x00,0x17,0x00,0x00,0x00,0x00,0x64, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x01,0x01,0x01, 0x01,0x00,0x00,0x00,0x01,0x01,0x01,0x01, 0x00,0x00,0x00,0x00" } diff --git a/tools/topology/topology2/include/components/mfcc/default.conf b/tools/topology/topology2/include/components/mfcc/default.conf index 0ac19fa71d04..297c4ec13581 100644 --- a/tools/topology/topology2/include/components/mfcc/default.conf +++ b/tools/topology/topology2/include/components/mfcc/default.conf @@ -1,4 +1,4 @@ -# Exported MFCC configuration 26-May-2026 +# Exported MFCC configuration 16-Sep-2026 # cd src/audio/mfcc/tune; octave setup_mfcc.m Object.Base.data."mfcc_config" { bytes " @@ -8,7 +8,7 @@ Object.Base.data."mfcc_config" { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -17,8 +17,8 @@ Object.Base.data."mfcc_config" { 0xc3,0x35,0x00,0x2c,0x00,0x00,0x00,0x00, 0x90,0x01,0xa0,0x00,0x00,0x00,0x14,0x00, 0x0d,0x00,0x17,0x00,0x00,0x00,0x00,0x64, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x01,0x01,0x01, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00" } diff --git a/tools/topology/topology2/include/components/mfcc/mel40.conf b/tools/topology/topology2/include/components/mfcc/mel40.conf new file mode 100644 index 000000000000..abede8b58913 --- /dev/null +++ b/tools/topology/topology2/include/components/mfcc/mel40.conf @@ -0,0 +1,24 @@ +# Exported MFCC configuration 16-Sep-2026 +# cd src/audio/mfcc/tune; octave setup_mfcc.m +Object.Base.data."mfcc_config" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x00,0x02,0x00,0x04, + 0x00,0x00,0xa4,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0x01,0x40,0x01,0x40,0x1f,0x00,0x00, + 0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x28, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x00,0x01,0x01, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/mfcc/mel40_10ms.conf b/tools/topology/topology2/include/components/mfcc/mel40_10ms.conf new file mode 100644 index 000000000000..bf2bdd39bb5f --- /dev/null +++ b/tools/topology/topology2/include/components/mfcc/mel40_10ms.conf @@ -0,0 +1,24 @@ +# Exported MFCC configuration 11-Sep-2026 +# cd src/audio/mfcc/tune; octave setup_mfcc.m +Object.Base.data."mfcc_config" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x00,0x02,0x00,0x04, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0x01,0xa0,0x00,0x4c,0x1d,0x7d,0x00, + 0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x04, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, + 0x01,0x00,0x00,0x01,0x01,0x00,0x01,0x00, + 0x00,0x00,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/mfcc/mel40_10ms_agc8_compress.conf b/tools/topology/topology2/include/components/mfcc/mel40_10ms_agc8_compress.conf new file mode 100644 index 000000000000..38f41919e11e --- /dev/null +++ b/tools/topology/topology2/include/components/mfcc/mel40_10ms_agc8_compress.conf @@ -0,0 +1,26 @@ +# Exported MFCC configuration 02-Nov-2026 +# cd src/audio/mfcc/tune; octave setup_mfcc.m +# enable_vad=1 enable_dtx=0 update_controls=0: VAD runs to populate energy/vad_flag +# for the AGC release and MWW gating; DTX off so every hop is still emitted. +Object.Base.data."mfcc_config" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x00,0x00,0x66,0x06, + 0x00,0x00,0xa4,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x80,0x01,0x80,0xff, + 0x52,0x27,0x4f,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0x01,0xa0,0x00,0x4c,0x1d,0x7d,0x00, + 0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x28, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x00,0x01,0x01, + 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x01, + 0x00,0x01,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/mfcc/mel40_10ms_compress.conf b/tools/topology/topology2/include/components/mfcc/mel40_10ms_compress.conf new file mode 100644 index 000000000000..453a1cb7e412 --- /dev/null +++ b/tools/topology/topology2/include/components/mfcc/mel40_10ms_compress.conf @@ -0,0 +1,25 @@ +# Exported MFCC configuration 16-Sep-2026 +# cd src/audio/mfcc/tune; octave setup_mfcc.m +# enable_vad=0 enable_dtx=0: streaming MWW must see every hop, and VAD is not run. +Object.Base.data."mfcc_config" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x00,0x02,0x00,0x04, + 0x00,0x00,0xa4,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0x01,0xa0,0x00,0x4c,0x1d,0x7d,0x00, + 0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x28, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x00,0x01,0x01, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01, + 0x00,0x00,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/mfcc/mel40_10ms_pcan_compress.conf b/tools/topology/topology2/include/components/mfcc/mel40_10ms_pcan_compress.conf new file mode 100644 index 000000000000..8ab315ed1ac4 --- /dev/null +++ b/tools/topology/topology2/include/components/mfcc/mel40_10ms_pcan_compress.conf @@ -0,0 +1,26 @@ +# Exported MFCC configuration 16-Sep-2026 +# cd src/audio/mfcc/tune; octave setup_mfcc.m +# enable_vad=1 enable_dtx=0 update_controls=0: VAD runs to populate energy/vad_flag +# for MWW gating; DTX off so every hop is still emitted; no kcontrol notifications. +Object.Base.data."mfcc_config" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x10, + 0x00,0x00,0xa4,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0x01,0xa0,0x00,0x4c,0x1d,0x7d,0x00, + 0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x00,0x01,0x01, + 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x01, + 0x01,0x00,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/mfcc/mel40_compress.conf b/tools/topology/topology2/include/components/mfcc/mel40_compress.conf new file mode 100644 index 000000000000..c4881ac0060f --- /dev/null +++ b/tools/topology/topology2/include/components/mfcc/mel40_compress.conf @@ -0,0 +1,24 @@ +# Exported MFCC configuration 16-Sep-2026 +# cd src/audio/mfcc/tune; octave setup_mfcc.m +Object.Base.data."mfcc_config" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x00,0x02,0x00,0x04, + 0x00,0x00,0xa4,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0x01,0x40,0x01,0x40,0x1f,0x00,0x00, + 0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x28, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x00,0x01,0x01, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01, + 0x00,0x00,0x00,0x00" +} diff --git a/tools/topology/topology2/include/components/mfcc/mel80.conf b/tools/topology/topology2/include/components/mfcc/mel80.conf index b18baadd459b..16b9d12fabed 100644 --- a/tools/topology/topology2/include/components/mfcc/mel80.conf +++ b/tools/topology/topology2/include/components/mfcc/mel80.conf @@ -1,4 +1,4 @@ -# Exported MFCC configuration 26-May-2026 +# Exported MFCC configuration 16-Sep-2026 # cd src/audio/mfcc/tune; octave setup_mfcc.m Object.Base.data."mfcc_config" { bytes " @@ -7,18 +7,18 @@ Object.Base.data."mfcc_config" { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x74,0x00,0x00,0x00,0x00,0x02,0x00,0x04, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xa4,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x90,0x01,0xa0,0x00,0x40,0x1f,0x00,0x00, - 0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x04, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, - 0x01,0x00,0x00,0x01,0x01,0x00,0x01,0x00, + 0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x28, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x00,0x01,0x01, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00" } diff --git a/tools/topology/topology2/include/components/mfcc/mel80_compress.conf b/tools/topology/topology2/include/components/mfcc/mel80_compress.conf index f26f2af6980c..e104b3579e75 100644 --- a/tools/topology/topology2/include/components/mfcc/mel80_compress.conf +++ b/tools/topology/topology2/include/components/mfcc/mel80_compress.conf @@ -1,4 +1,4 @@ -# Exported MFCC configuration 26-May-2026 +# Exported MFCC configuration 16-Sep-2026 # cd src/audio/mfcc/tune; octave setup_mfcc.m Object.Base.data."mfcc_config" { bytes " @@ -7,18 +7,18 @@ Object.Base.data."mfcc_config" { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x74,0x00,0x00,0x00,0x00,0x02,0x00,0x04, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xa4,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x90,0x01,0xa0,0x00,0x40,0x1f,0x00,0x00, - 0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x04, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, - 0x01,0x00,0x00,0x01,0x01,0x00,0x01,0x01, + 0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x28, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x00,0x01,0x01, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x00,0x00,0x00,0x00" } diff --git a/tools/topology/topology2/include/components/mfcc/mel80_compress_dtx.conf b/tools/topology/topology2/include/components/mfcc/mel80_compress_dtx.conf index d225811ca4d1..c3e53b28c1fb 100644 --- a/tools/topology/topology2/include/components/mfcc/mel80_compress_dtx.conf +++ b/tools/topology/topology2/include/components/mfcc/mel80_compress_dtx.conf @@ -1,4 +1,4 @@ -# Exported MFCC configuration 26-May-2026 +# Exported MFCC configuration 16-Sep-2026 # cd src/audio/mfcc/tune; octave setup_mfcc.m Object.Base.data."mfcc_config" { bytes " @@ -7,18 +7,18 @@ Object.Base.data."mfcc_config" { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x74,0x00,0x00,0x00,0x00,0x02,0x00,0x04, - 0x00,0x00,0x00,0x00,0x14,0x00,0xf4,0x01, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xa4,0x00,0x14,0x00,0xf4,0x01, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x90,0x01,0xa0,0x00,0x40,0x1f,0x00,0x00, - 0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x04, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, - 0x01,0x00,0x00,0x01,0x01,0x01,0x01,0x01, + 0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x28, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x00,0x01,0x01, + 0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x01, 0x00,0x00,0x00,0x00" } diff --git a/tools/topology/topology2/include/components/mfcc/mel80_pcan_compress.conf b/tools/topology/topology2/include/components/mfcc/mel80_pcan_compress.conf new file mode 100644 index 000000000000..4892bf431b6c --- /dev/null +++ b/tools/topology/topology2/include/components/mfcc/mel80_pcan_compress.conf @@ -0,0 +1,24 @@ +# Exported MFCC configuration 16-Sep-2026 +# cd src/audio/mfcc/tune; octave setup_mfcc.m +Object.Base.data."mfcc_config" { + bytes " + 0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x01,0xd0,0x01,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x74,0x00,0x00,0x00,0x00,0x02,0x00,0x04, + 0x00,0x00,0xa4,0x00,0x00,0x00,0x00,0x00, + 0x33,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x3e,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x90,0x01,0xa0,0x00,0x40,0x1f,0x00,0x00, + 0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x28, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9a,0x79, + 0x00,0x28,0x15,0x00,0x00,0x00,0x01,0x01, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01, + 0x01,0x00,0x00,0x00" +} From dc31143c00b185a59a2a612672e576bf82e6ffa1 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 16 Nov 2026 12:05:46 +0000 Subject: [PATCH 3/6] topology2: include: add wov-arbiter, ecns, mww, kpb, and pipeline configs Add topology2 component and cAVS pipeline building blocks for multi-slot Wake-on-Voice, ECNS, microWakeWord, KPB, and the WOV arbiter. Signed-off-by: Liam Girdwood Co-authored-by: Naveen Manohar Signed-off-by: Naveen Manohar Co-authored-by: Seppo Ingalsuo Signed-off-by: Seppo Ingalsuo --- .../include/common/common_definitions.conf | 4 + .../topology2/include/components/ecns.conf | 95 +++++++++++++++ .../include/components/host-copier.conf | 2 + .../topology2/include/components/kpb.conf | 44 ++++++- .../topology2/include/components/mfcc.conf | 1 + .../topology2/include/components/mww.conf | 76 ++++++++++++ .../include/components/mww/score_enum.conf | 27 +++++ .../include/components/wov-arbiter.conf | 114 ++++++++++++++++++ .../topology2/include/components/wov.conf | 53 ++++---- .../include/pipelines/cavs/dai-kpb-be.conf | 15 +++ .../include/pipelines/cavs/dai-mixin-be.conf | 64 ++++++++++ .../include/pipelines/cavs/wov-kpb-be.conf | 36 ++++++ 12 files changed, 506 insertions(+), 25 deletions(-) create mode 100644 tools/topology/topology2/include/components/ecns.conf create mode 100644 tools/topology/topology2/include/components/mww.conf create mode 100644 tools/topology/topology2/include/components/mww/score_enum.conf create mode 100644 tools/topology/topology2/include/components/wov-arbiter.conf create mode 100644 tools/topology/topology2/include/pipelines/cavs/dai-mixin-be.conf create mode 100644 tools/topology/topology2/include/pipelines/cavs/wov-kpb-be.conf diff --git a/tools/topology/topology2/include/common/common_definitions.conf b/tools/topology/topology2/include/common/common_definitions.conf index 06f0f425c5e2..16129203c406 100644 --- a/tools/topology/topology2/include/common/common_definitions.conf +++ b/tools/topology/topology2/include/common/common_definitions.conf @@ -75,4 +75,8 @@ Define { SDW_JACK_COMPR_AUDIO_FEATURE_CAPTURE false # No compress audio features capture for jack SDW_DMIC_AUDIO_FEATURE_CAPTURE false # No audio features capture for microphone SDW_DMIC_COMPR_AUDIO_FEATURE_CAPTURE false # No compress audio features capture for microphone + SDW_DMIC_WOV_SINGLE false # No single-slot WoV on SoundWire DMIC + + KPB_BUFF_TIME_MS "none" # Default for kpb: no blob, later override in Manifest + } diff --git a/tools/topology/topology2/include/components/ecns.conf b/tools/topology/topology2/include/components/ecns.conf new file mode 100644 index 000000000000..b0d878aecab9 --- /dev/null +++ b/tools/topology/topology2/include/components/ecns.conf @@ -0,0 +1,95 @@ +# +# ecns widget class +# +# Data Processing (DP) Echo Cancellation & Noise Suppression module. +# Accepts 4 channels (2 mics + 2 echo ref) and produces: +# Pin 0: 1 channel mono clean mic -> KPB +# Pin 1: 2 channel stereo clean mics -> Host Copier +# +# Usage: +# +# Object.Widget.ecns."1" { +# uuid "6c:8a:4f:21:3a:49:1e:4b:8b:1e:0d:3b:6f:8a:2c:15" +# num_input_pins 1 +# num_output_pins 2 +# num_input_audio_formats 1 +# num_output_audio_formats 2 +# } +# + + + +Class.Widget."ecns" { + + DefineAttribute."index" {} + DefineAttribute."instance" {} + + DefineAttribute."cpc" { + token_ref "comp.word" + } + + + + DefineAttribute."is_pages" { + token_ref "comp.word" + } + + attributes { + !constructor [ + "index" + "instance" + ] + + !mandatory [ + "no_pm" + "uuid" + "num_input_audio_formats" + "num_output_audio_formats" + ] + + !immutable [ + "type" + ] + + unique "instance" + } + + # + # ECNS switch controls: capture boost selecting the boosted (+30 dB Pin 0, + # +20 dB Pin 1) or the 0 dB high-pass filter responses, and test signal on + # KPB mono output pin (Pin 0) + # + Object.Control { + mixer."1" { + name "ECNS capture boost" + Object.Base.channel.1 { + name "fc" + shift 0 + } + Object.Base.ops.1 { + name "ctl" + info "volsw" + get 259 + put 259 + } + max 1 + } + mixer."2" { + name "ecns_kpb_test_signal" + Object.Base.channel.1 { + name "fc" + shift 0 + } + Object.Base.ops.1 { + name "ctl" + info "volsw" + get 259 + put 259 + } + max 1 + } + } + + no_pm "true" + type "effect" +} diff --git a/tools/topology/topology2/include/components/host-copier.conf b/tools/topology/topology2/include/components/host-copier.conf index 896ab30bb1a2..69dba4f96b15 100644 --- a/tools/topology/topology2/include/components/host-copier.conf +++ b/tools/topology/topology2/include/components/host-copier.conf @@ -91,6 +91,8 @@ Class.Widget."host-copier" { token_ref "stream.bool" } + # D0I3 compatibility: stream stays active during S0iX when set. + # Required for Wake-on-Voice capture streams (IPC4, see SOF kernel ipc4-topology.c). DefineAttribute."capture_compatible_d0i3" { token_ref "stream.bool" } diff --git a/tools/topology/topology2/include/components/kpb.conf b/tools/topology/topology2/include/components/kpb.conf index 03f7989be8ac..223308b2d6d8 100644 --- a/tools/topology/topology2/include/components/kpb.conf +++ b/tools/topology/topology2/include/components/kpb.conf @@ -59,6 +59,43 @@ Class.Widget."kpb" { unique "instance" } + Object.Control.bytes."1" { + name "kpb_cfg_$index" + access [ + tlv_read + tlv_write + tlv_callback + ] + Object.Base.extops."extctl" { + get 258 + put 258 + } + max 64 + Object.Base.data."1" { + IncludeByKey.KPB_BUFF_TIME_MS { + # sof_abi_hdr{magic, type=KP_BUF_CFG_BUFF_TIME_MS=2, size=4, abi=4.0} + u32 ms + # 6000 ms = 0x00001770 + '6000' {bytes "0x53, 0x4f, 0x46, 0x34, 0x02, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x17, 0x00, 0x00"} + # 4000 ms = 0x00000FA0 + '4000' {bytes "0x53, 0x4f, 0x46, 0x34, 0x02, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa0, 0x0f, 0x00, 0x00"} + # 2100 ms = 0x00000834 + '2100' {bytes "0x53, 0x4f, 0x46, 0x34, 0x02, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x34, 0x08, 0x00, 0x00"} + } + } + } + # # Default attributes for kpb # @@ -67,8 +104,11 @@ Class.Widget."kpb" { num_input_audio_formats 1 num_output_audio_formats 1 - #UUID: D8218443-5FF3-4A4C-B388-6CFE07B9562E - uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:2e" + # Changed from the legacy dynamic-load KPB UUID to the IPC4 static-module UUID + # (kpb4) so the IPC4 host driver can bind the WOV multi-pin topology without a + # module-library lookup. Must match the UUID in src/audio/kpb.toml. + #UUID: a8a0cb32-4a77-4db1-85c753d7ee07bce6 (kpb4 static module) + uuid "32:cb:a0:a8:77:4a:b1:4d:85:c7:53:d7:ee:07:bc:e6" no_pm "true" cpc 720000 num_input_pins 1 diff --git a/tools/topology/topology2/include/components/mfcc.conf b/tools/topology/topology2/include/components/mfcc.conf index bf908e685048..5748c7e3743a 100644 --- a/tools/topology/topology2/include/components/mfcc.conf +++ b/tools/topology/topology2/include/components/mfcc.conf @@ -71,6 +71,7 @@ Class.Widget."mfcc" { put 259 } max 1 + invert "true" } } diff --git a/tools/topology/topology2/include/components/mww.conf b/tools/topology/topology2/include/components/mww.conf new file mode 100644 index 000000000000..49d7c1ac82ce --- /dev/null +++ b/tools/topology/topology2/include/components/mww.conf @@ -0,0 +1,76 @@ +# +# A microWakeWord keyword-spotting component for SOF. All attributes defined +# herein are namespaced by alsatplg to "Object.Widget.mww.attribute_name" +# + + + +Class.Widget."mww" { + # + # Pipeline ID + # + DefineAttribute."index" { + type "integer" + } + + # + # Unique instance for MWW widget + # + DefineAttribute."instance" { + type "integer" + } + + # Include common widget attributes definition + + + attributes { + !constructor [ + "index" + "instance" + ] + !mandatory [ + "num_input_pins" + "num_output_pins" + "num_input_audio_formats" + "num_output_audio_formats" + ] + + !immutable [ + "uuid" + ] + !deprecated [ + "preload_count" + ] + unique "instance" + } + + # + # MWW Widget switch control for synthetic fake wake debug trigger + # + Object.Control { + mixer."1" { + name "wovdebug_$index" + Object.Base.channel.1 { + name "fc" + shift 0 + } + Object.Base.ops.1 { + name "ctl" + info "volsw" + get 259 + put 259 + } + max 1 + } + } + + # + # Default attributes for mww + # UUID: 4067fe1d-cd63-4877-966b-a06ded1719ce + # + uuid "1d:fe:67:40:63:cd:77:48:96:6b:a0:6d:ed:17:19:ce" + type "effect" + no_pm "true" + num_input_pins 1 + num_output_pins 1 +} diff --git a/tools/topology/topology2/include/components/mww/score_enum.conf b/tools/topology/topology2/include/components/mww/score_enum.conf new file mode 100644 index 000000000000..f2d07e553687 --- /dev/null +++ b/tools/topology/topology2/include/components/mww/score_enum.conf @@ -0,0 +1,27 @@ +Object.Base { + channel.1 { + name "fc" + } + text.0 { + name "mww_score_enum_text" + !values [ + "0%" + "10%" + "20%" + "30%" + "40%" + "50%" + "60%" + "70%" + "80%" + "90%" + "100%" + ] + } + ops.1 { + name "ctl" + info "enum" + get 257 + put 257 + } +} diff --git a/tools/topology/topology2/include/components/wov-arbiter.conf b/tools/topology/topology2/include/components/wov-arbiter.conf new file mode 100644 index 000000000000..754f612c1afb --- /dev/null +++ b/tools/topology/topology2/include/components/wov-arbiter.conf @@ -0,0 +1,114 @@ +# +# wov-arbiter widget +# +# Routes the drain output of one of N WOV detector paths to the single host +# PCM copier. Idle inputs are consumed (discarded) so their buffers never +# stall. Detection and pause/resume coordination is done via SOF notifier. +# +# +# Exposes detector controls and a call-state gate. Call-state status confirms +# detector gating only; pipeline teardown remains host-owned. +# Override name to "Jack In Phrase Detect ID" for headset instances. +# +# Usage: +# +# Object.Widget.wov-arbiter."N" { +# uuid "4a5b6c7d-8e9f-4a1b-2c3d-4e5f60718293" +# num_input_audio_formats 1 +# num_output_audio_formats 1 +# } +# +# Where N is the unique instance number within the same alsaconf node. + + + +Class.Widget."wov-arbiter" { + + DefineAttribute."index" {} + DefineAttribute."instance" {} + + DefineAttribute."cpc" { + token_ref "comp.word" + } + + + + DefineAttribute."is_pages" { + token_ref "comp.word" + } + + attributes { + !constructor [ + "index" + "instance" + ] + + !mandatory [ + "no_pm" + "uuid" + "num_input_audio_formats" + "num_output_audio_formats" + ] + + !immutable [ + "type" + ] + + unique "instance" + } + + # Volatile detector-status and slot-filter enum. + Object.Control.enum."1" { + name "DMIC Phrase Detect ID" + Object.Base { + channel.1 { + name "fc" + } + text.0 { + name "wov_active_slot_enum_text" + !values [ + "Listening" + "Slot 1" + "Slot 2" + "Slot 3" + ] + } + ops.1 { + name "ctl" + info "enum" + get 257 + put 257 + } + } + } + + # Host call-state request and DSP acknowledgement. + Object.Control.enum."2" { + name "DMIC WoV Call State" + Object.Base { + channel.1 { + name "fc" + } + text.0 { + name "wov_call_state_enum_text" + !values [ + "Listening" + "Call Active" + ] + } + ops.1 { + name "ctl" + info "enum" + get 257 + put 257 + } + } + } + + # 1 detector input (from mixout), 1 host-copier output + type "effect" + no_pm "true" + num_input_pins 1 + num_output_pins 1 + +} diff --git a/tools/topology/topology2/include/components/wov.conf b/tools/topology/topology2/include/components/wov.conf index fccf2066be6e..7d5bc0e0e6a0 100644 --- a/tools/topology/topology2/include/components/wov.conf +++ b/tools/topology/topology2/include/components/wov.conf @@ -14,6 +14,8 @@ # # Where N is the unique instance number for the wov object within the same alsaconf node. + + Class.Widget."wov" { # # Pipeline ID for the wov object @@ -68,30 +70,35 @@ Class.Widget."wov" { unique "instance" } - Object.Control.bytes."1" { - name wov_init - access [ - tlv_read - tlv_callback - ] - Object.Base.extops."extctl" { - get 258 - put 0 + + Object.Control.mixer."1" { + name "wov_mute_$index" + Object.Base.channel.1 { + name "fc" + shift 0 + } + Object.Base.ops.1 { + name "ctl" + info "volsw" + get 259 + put 259 + } + max 1 + } + + Object.Control.mixer."2" { + name "wov_test_$index" + Object.Base.channel.1 { + name "fc" + shift 0 } - max 4096 - Object.Base.data."1" { - IncludeByKey.WOV_UUID { - '1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67' {bytes "0x53, 0x4f, 0x46, 0x34, 0x02, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, - 0x34, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00" - } - } + Object.Base.ops.1 { + name "ctl" + info "volsw" + get 259 + put 259 } + max 1 } # @@ -100,5 +107,5 @@ Class.Widget."wov" { type "effect" no_pm "true" num_input_pins 1 - num_output_pins 0 + num_output_pins 1 } diff --git a/tools/topology/topology2/include/pipelines/cavs/dai-kpb-be.conf b/tools/topology/topology2/include/pipelines/cavs/dai-kpb-be.conf index 64823ed4e573..5f484c7f8972 100644 --- a/tools/topology/topology2/include/pipelines/cavs/dai-kpb-be.conf +++ b/tools/topology/topology2/include/pipelines/cavs/dai-kpb-be.conf @@ -40,6 +40,11 @@ Class.Pipeline."dai-kpb-be" { Object.Widget { dai-copier."1" { type dai_in + # dai_type, copier_type, and stream_name default to DMIC. + # Override at instantiation for other DAI backends. + dai_type "DMIC" + copier_type "DMIC" + stream_name $DMIC1_NAME node_type $HDA_LINK_OUTPUT_CLASS num_input_audio_formats 3 num_output_audio_formats 3 @@ -47,8 +52,11 @@ Class.Pipeline."dai-kpb-be" { Object.Base.input_audio_format [ { + in_channels 4 in_bit_depth 32 in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 } { in_channels 4 @@ -125,6 +133,13 @@ Class.Pipeline."dai-kpb-be" { } } + Object.Base { + route."1" { + source $DMIC_WOV_DAI_PIPELINE_SRC + sink "kpb.$index.1" + } + } + time_domain "timer" dynamic_pipeline 1 } diff --git a/tools/topology/topology2/include/pipelines/cavs/dai-mixin-be.conf b/tools/topology/topology2/include/pipelines/cavs/dai-mixin-be.conf new file mode 100644 index 000000000000..2748538ae656 --- /dev/null +++ b/tools/topology/topology2/include/pipelines/cavs/dai-mixin-be.conf @@ -0,0 +1,64 @@ +# +# DAI BE capture pipeline for multi-KPB WOV topology. +# Default: dai-copier only (no KPB). Manifest adds mixin and +# overrides the dai-copier with the correct HDA/DMIC type and formats. +# No internal routes — all routes defined by the manifest. +# + + + + + + +Class.Pipeline."dai-mixin-be" { + + + + attributes { + !constructor [ + "index" + ] + + + unique "instance" + } + + Object.Widget { + dai-copier."1" { + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + stream_name $DMIC1_NAME + node_type $HDA_LINK_INPUT_CLASS + num_input_audio_formats 1 + num_output_audio_formats 1 + num_output_pins 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + pipeline."1" { + priority 0 + lp_mode 0 + } + } + + direction "capture" + dynamic_pipeline 1 + time_domain "timer" +} diff --git a/tools/topology/topology2/include/pipelines/cavs/wov-kpb-be.conf b/tools/topology/topology2/include/pipelines/cavs/wov-kpb-be.conf new file mode 100644 index 000000000000..a7d881fbdd0f --- /dev/null +++ b/tools/topology/topology2/include/pipelines/cavs/wov-kpb-be.conf @@ -0,0 +1,36 @@ +# +# KPB pipeline for multi-KPB WOV topology. +# No default DAI copier or internal routes — all widgets/routes defined +# by the manifest instance (mixout, kpb, wov-detect, output_pin_binding). +# + + + + + + + +Class.Pipeline."wov-kpb-be" { + + + + attributes { + !constructor [ + "index" + ] + + + unique "instance" + } + + Object.Widget { + pipeline."1" { + priority 0 + lp_mode 0 + } + } + + direction "capture" + dynamic_pipeline 1 + time_domain "timer" +} From 3414c9f88b56c117185d8e0b8159486c46536c39 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Mon, 16 Nov 2026 12:05:47 +0000 Subject: [PATCH 4/6] topology2: add SoundWire DMIC single-slot and nocodec WOV topologies Add SoundWire DMIC single-slot WoV (sdw-dmic-wov-single.conf) and PTL nocodec WoV loopback (cavs-nocodec-wov.conf) topologies and enable the SDCA target. Signed-off-by: Seppo Ingalsuo --- .../topology/topology2/cavs-nocodec-wov.conf | 751 ++++++++++++++++++ .../platform/intel/sdw-dmic-wov-single.conf | 517 ++++++++++++ .../tplg-targets-sdca-generic.cmake | 3 + tools/topology/validator/known-issues.txt | 1 + 4 files changed, 1272 insertions(+) create mode 100644 tools/topology/topology2/cavs-nocodec-wov.conf create mode 100644 tools/topology/topology2/platform/intel/sdw-dmic-wov-single.conf diff --git a/tools/topology/topology2/cavs-nocodec-wov.conf b/tools/topology/topology2/cavs-nocodec-wov.conf new file mode 100644 index 000000000000..6a595bb0969b --- /dev/null +++ b/tools/topology/topology2/cavs-nocodec-wov.conf @@ -0,0 +1,751 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Lean NoCodec (SSP0) topology for microWakeWord (MWW) bring-up on PTL / TGL. +# +# Playback (passthrough): +# PCM0 "Port0" -> host-copier -> dai-copier -> SSP0 (with LBM loopback mode) +# +# Capture (Wake-on-Voice with WOV Arbiter): +# SSP0 (LBM loopback) -> dai-copier (48kHz 2ch S16_LE) -> +# micsel (stereo -> mono 48kHz 16-bit) -> +# SRC (48kHz -> 16kHz mono 16-bit) -> +# KPB (2000ms 16kHz mono 16-bit) -> +# pin 0 -> detector copier (16-bit -> 16-bit) -> +# MFCC (Mel-40 10ms) -> +# microWakeWord (MWW) -> +# WOV Arbiter (pin 1) +# pin 1 -> WOV Arbiter (pin 0, 16-bit) -> +# host-copier -> PCM 12 (D0i3-compatible, S16_LE) +# +# Everything the base cavs-nocodec.conf carries for codecs, DMIC, mixers, +# gain, smart-amp and deep buffer is intentionally dropped. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Class.Pipeline."custom-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 0 + } + + period 1000 + direction "capture" + time_domain "timer" + dynamic_pipeline 1 +} + +# --------------------------------------------------------------------------- +# Default parameters +# --------------------------------------------------------------------------- +Define { + MCLK 24576000 + PLATFORM "ptl" + # 8-bit Mel feature type from MFCC for the MWW models: "pcan" or "agc8" + MWW_FEATURES "pcan" + + WOV_ARBITER_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + + # Playback (passthrough) + SSP0_PLAYBACK_PCM_ID 0 + SSP0_PLAYBACK_HOST_PIPELINE_ID 1 + SSP0_PLAYBACK_DAI_PIPELINE_ID 2 + + # Capture DAI feeding the Wake-on-Voice branch + SSP0_CAPTURE_DAI_PIPELINE_ID 3 + + # Wake-on-Voice branch pipeline IDs (aligning with sdw-dmic-wov-single.conf) + WOV_SLOT0_PIPELINE_ID 111 + WOV_ARB_PIPELINE_ID 114 + WOV_KPB_PIPELINE_ID 116 + + WOV_CORE_ID 0 + KWD_CPC 100000 + WOV_ARB_CPC 20000 + KPB_BUFF_TIME_MS "2000" + + # WoV Capture PCM definitions + SSP0_WOV_PCM_NAME "Microphone WoV" + SSP0_WOV_PCM_ID 12 + SSP0_WOV_PCM_CAPS "Gain Capture 12" + SSP0_WOV_FORMAT "s16le" + + # Control names + SSP0_WOV_MICSEL_BYTES_NAME "SSP0 WoV Micsel bytes" + SSP0_WOV_MFCC_BYTES_NAME "Microphone MFCC bytes" + SSP0_WOV_MFCC_VAD_NAME "Microphone MFCC VAD" + SSP0_WOV_MWW_BYTES_NAME "Microphone MWW bytes" + SSP0_WOV_MWW_SCORE_NAME "Microphone MWW Score" + SSP0_WOV_PHRASE_DETECT_ID_NAME "DMIC Phrase Detect ID" +} + +IncludeByKey.MWW_FEATURES { + "pcan" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } + "agc8" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } +} + +# override defaults with platform-specific config +IncludeByKey.PLATFORM { + "tgl" "platform/intel/tgl.conf" + "adl" "platform/intel/tgl.conf" + "mtl" "platform/intel/mtl.conf" + "lnl" "platform/intel/lnl.conf" + "ptl" "platform/intel/ptl.conf" + "nvl" "platform/intel/ptl.conf" +} + +# +# SSP0 DAI (duplex) with loopback mode (LBM) +# +Object.Dai.SSP [ + { + id 0 + dai_index 0 + direction "duplex" + name NoCodec-0 + default_hw_conf_id 0 + sample_bits 32 + quirks "lbm_mode" + io_clk $MCLK + + Object.Base.hw_config.1 { + name "SSP0" + id 0 + fsync_freq 48000 + bclk_freq 3072000 + tdm_slot_width 32 + # TODO: remove this. Needs alsaptlg change. + Object.Base.link_config.1 { + clock_source 1 + } + } + } +] + +# +# Playback: host -> dai (passthrough) +# +Object.Pipeline.host-gateway-playback [ + { + index $SSP0_PLAYBACK_HOST_PIPELINE_ID + + Object.Widget.host-copier.1 { + stream_name 'SSP0 Playback' + pcm_id $SSP0_PLAYBACK_PCM_ID + num_input_audio_formats 2 + Object.Base.input_audio_format [ + { + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_rate $SSP0_RATE + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_rate $SSP0_RATE + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_rate $SSP0_RATE + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } +] + +Object.Pipeline.io-gateway [ + { + index $SSP0_PLAYBACK_DAI_PIPELINE_ID + direction playback + + Object.Widget.dai-copier.1 { + dai_index 0 + dai_type "SSP" + copier_type "SSP" + stream_name "NoCodec-0" + node_type $I2S_LINK_OUTPUT_CLASS + num_input_pins 1 + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate $SSP0_RATE + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate $SSP0_RATE + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } +] + +# +# Capture DAI feeding the Wake-on-Voice branch +# +Object.Pipeline.io-gateway-capture [ + { + index $SSP0_CAPTURE_DAI_PIPELINE_ID + direction capture + + Object.Widget.dai-copier.1 { + dai_index 0 + dai_type "SSP" + type dai_out + copier_type "SSP" + stream_name "NoCodec-0" + node_type $I2S_LINK_INPUT_CLASS + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_channels 2 + in_rate $SSP0_RATE + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_channels 2 + out_rate $SSP0_RATE + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + } +] + +# +# Pipeline 116 — Micsel (stereo -> mono), SRC (48k -> 16k), KPB (Core 0, LL 1ms) +# Splits from SSP0 capture DAI. KPB sel_sink feeds module-copier.111.1 and +# host_sink feeds wov-arbiter.114.1, both cross-pipeline. +# +Object.Pipeline."custom-capture" [ + { + index $WOV_KPB_PIPELINE_ID + format "s16le" + rate 16000 + + Object.Widget.micsel.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name $SSP0_WOV_MICSEL_BYTES_NAME + + } + } + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.src.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.kpb.1 { + history_depth_ms $KPB_BUFF_TIME_MS + num_input_pins 1 + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 2 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 32 + } + ] + Object.Base.output_audio_format [ + # Pin 0: real-time feed to the detector slots + { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + # Pin 1: drain path to the WOV arbiter + { + output_pin_index 1 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "module-copier.$WOV_SLOT0_PIPELINE_ID.1" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "wov-arbiter.$WOV_ARB_PIPELINE_ID.1" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# +# Pipeline 111 — Slot 0 microWakeWord Detector (Core 0, DP 10ms) +# +Object.Pipeline."custom-capture" [ + { + index $WOV_SLOT0_PIPELINE_ID + format "s16le" + rate 16000 + + Object.Widget.module-copier.1 { + # Pass-through 16-bit audio from KPB to MFCC + num_input_audio_formats 1 + num_output_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + ] + } + + Object.Widget.mfcc.1 { + scheduler_domain "DP" + domain_id 0 + core_id $WOV_CORE_ID + stack_bytes_requirement 8192 + heap_bytes_requirement 24576 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name $SSP0_WOV_MFCC_BYTES_NAME + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name $SSP0_WOV_MFCC_VAD_NAME + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + scheduler_domain "DP" + domain_id 0 + core_id $WOV_CORE_ID + stack_bytes_requirement 8192 + heap_bytes_requirement 24576 + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name $SSP0_WOV_MWW_BYTES_NAME + max 65536 + } + bytes."2" { + name $SSP0_WOV_MWW_SCORE_NAME + max 512 + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# +# Pipeline 114 — WOV Arbiter & Host Copier 12 (Core 0, Mono Output) +# +Object.Pipeline."custom-capture" [ + { + index $WOV_ARB_PIPELINE_ID + format $SSP0_WOV_FORMAT + rate 16000 + + Object.Widget.wov-arbiter.1 { + uuid $WOV_ARBITER_UUID + num_input_pins 2 + num_output_pins 1 + num_input_audio_formats 2 + num_output_audio_formats 1 + + Object.Control.enum."1" { + name $SSP0_WOV_PHRASE_DETECT_ID_NAME + } + + Object.Base.input_pin_binding.1 { + input_pin_binding_name "kpb.116.1" + } + Object.Base.input_pin_binding.2 { + input_pin_binding_name "mww.111.1" + } + + Object.Base.input_audio_format [ + # Pin 0: Audio from KPB host_sink (16-bit PCM, 16kHz mono) + { + input_pin_index 0 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 32 + } + # Pin 1: Features from MWW slot 0 (8-bit PCAN, 16kHz mono) + { + input_pin_index 1 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + ] + } + + Object.Widget.host-copier.1 { + stream_name $SSP0_WOV_PCM_CAPS + pcm_id $SSP0_WOV_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + + # IPC4 reads SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 from the + # host-copier widget tuples for low-power D0i3 WoV capture across S0iX + capture_compatible_d0i3 true + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# +# Routes +# +Object.Base.route [ + # Playback: host -> dai + { + source "host-copier.$SSP0_PLAYBACK_PCM_ID.playback" + sink "dai-copier.SSP.NoCodec-0.playback" + } + # Capture: SSP0 DAI -> micsel + { + source "dai-copier.SSP.NoCodec-0.capture" + sink "micsel.$WOV_KPB_PIPELINE_ID.1" + } + { source "micsel.$WOV_KPB_PIPELINE_ID.1" sink "src.$WOV_KPB_PIPELINE_ID.1" } + { source "src.$WOV_KPB_PIPELINE_ID.1" sink "kpb.$WOV_KPB_PIPELINE_ID.1" } + + # KPB Output Pin 0 (16k mono 16-bit) direct to Detector Copier (pipeline 111) + { source "kpb.$WOV_KPB_PIPELINE_ID.1" sink "module-copier.$WOV_SLOT0_PIPELINE_ID.1" } + + # Audio path from KPB host_sink (pin 1) to WOV Arbiter audio input (pin 0) + { source "kpb.$WOV_KPB_PIPELINE_ID.1" sink "wov-arbiter.$WOV_ARB_PIPELINE_ID.1" } + + # Detector slot pipeline 111: copier -> MFCC -> MWW -> WOV Arbiter pin 1 + { source "module-copier.$WOV_SLOT0_PIPELINE_ID.1" sink "mfcc.$WOV_SLOT0_PIPELINE_ID.1" } + { source "mfcc.$WOV_SLOT0_PIPELINE_ID.1" sink "mww.$WOV_SLOT0_PIPELINE_ID.1" } + { source "mww.$WOV_SLOT0_PIPELINE_ID.1" sink "wov-arbiter.$WOV_ARB_PIPELINE_ID.1" } + + # WOV Arbiter output to Host Copier + { source "wov-arbiter.$WOV_ARB_PIPELINE_ID.1" sink "host-copier.$SSP0_WOV_PCM_ID.capture" } +] + +# +# PCM Definitions: +# PCM 0: SSP0 Passthrough Playback (48 kHz) +# PCM 12: WOV Arbiter Mono Capture (16 kHz) +# +Object.PCM.pcm [ + { + name "Port0" + id $SSP0_PLAYBACK_PCM_ID + direction "playback" + + Object.Base.fe_dai.1 { + name "Port0" + } + + Object.PCM.pcm_caps.1 { + name "SSP0 Playback" + formats 'S16_LE,S32_LE' + rates '48000' + channels_min 2 + channels_max 2 + } + } + { + name $SSP0_WOV_PCM_NAME + id $SSP0_WOV_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai.1 { + name "$SSP0_WOV_PCM_CAPS" + } + + Object.PCM.pcm_caps.1 { + name "$SSP0_WOV_PCM_CAPS" + formats "S16_LE" + rates "16000" + channels_min 1 + channels_max 1 + } + } +] diff --git a/tools/topology/topology2/platform/intel/sdw-dmic-wov-single.conf b/tools/topology/topology2/platform/intel/sdw-dmic-wov-single.conf new file mode 100644 index 000000000000..89a2b8a901ab --- /dev/null +++ b/tools/topology/topology2/platform/intel/sdw-dmic-wov-single.conf @@ -0,0 +1,517 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Single-Slot Wake-on-Voice (WoV) feature module for SoundWire DMIC. +# +# SoundWire DMIC module-copier.41 (48kHz stereo 32-bit) -> +# micsel (stereo -> mono 48kHz 32-bit) -> +# SRC (48kHz -> 16kHz mono 32-bit) -> +# KPB (2000ms 16kHz mono 32-bit) -> +# Detector Copier (32-bit -> 16-bit) -> +# MWW detector slot (MFCC + MicroWakeWord) -> +# 2-pin WOV Arbiter (32-bit audio drain + detector trigger) -> +# Host Copier PCM 12 (D0i3-compatible). +# + +Class.Pipeline."custom-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 0 + } + + period 1000 + direction "capture" + time_domain "timer" + dynamic_pipeline 1 +} + +# --------------------------------------------------------------------------- +# Default parameters +# --------------------------------------------------------------------------- +Define { + SDW_DMIC_MODULE_COPIER_ID 41 + + WOV_ARBITER_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + + DMIC_WOV_PCM_NAME "Microphone WoV" + DMIC_WOV_PCM_ID 12 + DMIC_WOV_PCM_CAPS "Gain Capture 12" + DMIC_WOV_FORMAT "s16le" + + # Control names for WoV slot 0 + DMIC_WOV_MFCC_BYTES_NAME "Microphone MFCC bytes" + DMIC_WOV_MFCC_VAD_NAME "Microphone MFCC VAD" + DMIC_WOV_MWW_BYTES_NAME "Microphone MWW bytes" + DMIC_WOV_MWW_SCORE_NAME "Microphone MWW Score" + DMIC_WOV_PHRASE_DETECT_ID_NAME "Microphone Phrase Detect ID" + + KWD_CPC 100000 + WOV_ARB_CPC 20000 + KPB_BUFF_TIME_MS "2000" + + WOV_SLOT0_PIPELINE_ID 111 + WOV_ARB_PIPELINE_ID 114 + WOV_KPB_PIPELINE_ID 116 + + WOV_CORE_ID 0 + MWW_FEATURES "pcan" +} + +IncludeByKey.MWW_FEATURES { + "pcan" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } + "agc8" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } +} + +# --------------------------------------------------------------------------- +# Pipeline 116 — Micsel (stereo -> mono), SRC (48k -> 16k), KPB (Core 0, LL 1ms) +# Splits from module-copier.41.0. KPB sel_sink feeds module-copier.111.1 and +# host_sink feeds wov-arbiter.114.1, both cross-pipeline. +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_KPB_PIPELINE_ID + format "s32le" + rate 16000 + + Object.Widget.micsel.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "SDW DMIC WoV Micsel bytes" + + } + } + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.src.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.kpb.1 { + history_depth_ms $KPB_BUFF_TIME_MS + num_input_pins 1 + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 2 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 64 + } + ] + Object.Base.output_audio_format [ + # Pin 0: real-time feed to the detector slots + { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 64 + } + # Pin 1: drain path to the WOV arbiter and the host PCM + { + output_pin_index 1 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 64 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "module-copier.111.1" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "wov-arbiter.114.1" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 111 — WOV slot 0 (Core 0, 1ch mono) +# KPB.116.1 sel_sink -> module-copier.111.1 (LL 1ms, 32-bit in -> 16-bit out) +# -> MFCC.111.1 (DP) -> MWW.111.1 (DP) -> wov-arbiter.114.1. +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_SLOT0_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.module-copier.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name $DMIC_WOV_MFCC_BYTES_NAME + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name $DMIC_WOV_MFCC_VAD_NAME + invert "true" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name $DMIC_WOV_MWW_BYTES_NAME + max 65536 + } + enum."1" { + name $DMIC_WOV_MWW_SCORE_NAME + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 114 — WOV Arbiter & Host Copier 12 (Core 0, Mono Output) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_ARB_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.wov-arbiter.1 { + uuid $WOV_ARBITER_UUID + num_input_pins 2 + num_output_pins 1 + num_input_audio_formats 2 + num_output_audio_formats 1 + + Object.Control.enum."1" { + name $DMIC_WOV_PHRASE_DETECT_ID_NAME + } + + Object.Base.input_pin_binding.1 { + input_pin_binding_name "kpb.116.1" + } + Object.Base.input_pin_binding.2 { + input_pin_binding_name "mww.111.1" + } + + Object.Base.input_audio_format [ + # Pin 0: Audio from KPB host_sink (32-bit PCM, 16kHz mono) + { + input_pin_index 0 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 64 + } + # Pin 1: Features from MWW slot 0 (8-bit PCAN, 16kHz mono) + { + input_pin_index 1 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 64 + } + ] + } + + Object.Widget.host-copier.1 { + stream_name $DMIC_WOV_PCM_CAPS + pcm_id $DMIC_WOV_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + + # IPC4 reads SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 from the + # host-copier widget tuples for low-power D0i3 WoV capture across S0iX + capture_compatible_d0i3 true + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + + num_output_audio_formats 2 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + # Split audio from SDW DMIC module-copier.41 into micsel + { source "module-copier.$SDW_DMIC_MODULE_COPIER_ID.0" sink "micsel.116.1" } + { source "micsel.116.1" sink "src.116.1" } + { source "src.116.1" sink "kpb.116.1" } + + # KPB Output Pin 0 (16k mono 32-bit) direct to Detector Copier (pipeline 111) + { source "kpb.116.1" sink "module-copier.111.1" } + + # Audio path from KPB host_sink (pin 1) to WOV Arbiter audio input (pin 0) + { source "kpb.116.1" sink "wov-arbiter.114.1" } + + # Detector slot pipeline 111: copier -> MFCC -> MWW -> WOV Arbiter pin 1 + { source "module-copier.111.1" sink "mfcc.111.1" } + { source "mfcc.111.1" sink "mww.111.1" } + { source "mww.111.1" sink "wov-arbiter.114.1" } + + # WOV Arbiter output to Host Copier 12 + { source "wov-arbiter.114.1" sink "host-copier.$DMIC_WOV_PCM_ID.capture" } +] + +# --------------------------------------------------------------------------- +# PCM Definitions: +# PCM 12: WOV Arbiter Mono Capture (16 kHz) +# --------------------------------------------------------------------------- +Object.PCM.pcm [ + { + name $DMIC_WOV_PCM_NAME + id $DMIC_WOV_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai.1 { + name "$DMIC_WOV_PCM_CAPS" + } + + Object.PCM.pcm_caps.1 { + name "$DMIC_WOV_PCM_CAPS" + formats "S16_LE,S32_LE" + rates "16000" + channels_min 1 + channels_max 1 + } + } +] diff --git a/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake b/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake index 8c4ac9b6bcfd..1b13169d975e 100644 --- a/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake +++ b/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake @@ -74,6 +74,9 @@ SDW_AMP_FEEDBACK=false,SDW_ECHO_REF_DAI=true,SDW_SPK_ECHO_REF=true,SDW_SPK_ECHO_ "cavs-sdw\;sof-sdca-jack-ref-dai\;SDW_JACK=false,NUM_HDMIS=0,JACK_RATE=48000,\ SDW_ECHO_REF_DAI=true,SDW_JACK_ECHO_REF=true,SDW_JACK_ECHO_REF_PCM_ID=11" +"cavs-sdw\;sof-sdw-wov\;SDW_JACK=false,SDW_DMIC=0,NUM_HDMIS=0,\ +SDW_DMIC_WOV_SINGLE=true" + # Topology for speaker with 2-way crossover filter in SOF # with channels order L-low, R-low, L-high, R-high "cavs-sdw\;sof-sdca-2amp-id2-xover\;NUM_SDW_AMP_LINKS=2,SDW_JACK=false,\ diff --git a/tools/topology/validator/known-issues.txt b/tools/topology/validator/known-issues.txt index 72aa9550c072..d691c30412ed 100644 --- a/tools/topology/validator/known-issues.txt +++ b/tools/topology/validator/known-issues.txt @@ -21,6 +21,7 @@ sof-sdca-amp-ref G001 # module-copier.21.22 of an amp function topology and sof-sdca-amp-ref-dai G001 # module-copier.21.22 of an amp function topology sof-sdca-jack-compr G001 # mixout.1.1 of sof-sdca-jack-id0 sof-sdca-jack-ref-dai G001 # module-copier.1.12 of sof-sdca-jack-id0 +sof-sdw-wov G001 # module-copier.41.0 of sof-sdca-mic-id4 # UAOL DAI type is not known to the upstream kernel find_dai() table sof-hda-generic*uaol W004 From b0e22a6876bc97970cbf2616474c6831cbe664af Mon Sep 17 00:00:00 2001 From: Naveen Manohar Date: Mon, 16 Nov 2026 12:05:47 +0000 Subject: [PATCH 5/6] topology2: add SoundWire headset ECNS and multi-slot WOV (RT722) Add SoundWire headset jack ECNS and multi-slot WoV pipeline support (sdw-jack-wov-multi.conf) and DMIC default definitions for RT722. Signed-off-by: Naveen Manohar Co-authored-by: Seppo Ingalsuo Signed-off-by: Seppo Ingalsuo Co-authored-by: Liam Girdwood Signed-off-by: Liam Girdwood Co-authored-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi --- .../platform/intel/dmic-default.conf | 12 + .../platform/intel/sdw-jack-wov-multi.conf | 995 ++++++++++++++++++ 2 files changed, 1007 insertions(+) create mode 100644 tools/topology/topology2/platform/intel/sdw-jack-wov-multi.conf diff --git a/tools/topology/topology2/platform/intel/dmic-default.conf b/tools/topology/topology2/platform/intel/dmic-default.conf index 5b09a3c87a0a..b575a9a380c9 100644 --- a/tools/topology/topology2/platform/intel/dmic-default.conf +++ b/tools/topology/topology2/platform/intel/dmic-default.conf @@ -30,6 +30,9 @@ Define { WOV_PIPELINE_SINK 'micsel.20.1' WOV_PIPELINE_VIRTUAL 'virtual.detect_sink' INCLUDE_WOV 'false' + WOV_SLOT_COUNT -1 + # DMIC channels captured by the multi-slot WoV DAI copiers (2 or 4) + DMIC_WOV_DAI_CHANNELS 2 # The UUID corresponds to the test detect component WOV_UUID '1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67' WOV_CPC '360000' @@ -53,3 +56,12 @@ Define { DMIC0_DEEP_BUFFER_PCM_ID 46 DMIC0_DEEP_BUFFER false } + +IncludeByKey.WOV_SLOT_COUNT { + "^0$" { + Define.INCLUDE_WOV "false" + } + "^[1-3]$" { + Define.INCLUDE_WOV "multi" + } +} diff --git a/tools/topology/topology2/platform/intel/sdw-jack-wov-multi.conf b/tools/topology/topology2/platform/intel/sdw-jack-wov-multi.conf new file mode 100644 index 000000000000..a746809331be --- /dev/null +++ b/tools/topology/topology2/platform/intel/sdw-jack-wov-multi.conf @@ -0,0 +1,995 @@ +# +# Multi-Slot Wake-on-Voice (WoV) for the RT722 SoundWire headset microphone. +# +# Second, independent WoV instance that coexists with the DMIC WoV graph in +# dmic-wov-multi.conf (which defines the custom pipeline classes and UUIDs +# used here, so this file must be included from it). +# +# module-copier.11.0 (Jack In, 48 kHz 2ch 32-bit) fans out to: +# -> host-copier.1 (PCM 1 "Jack In", raw, unchanged) +# -> ECNS pin 1 (48 kHz 2ch) +# -> SRC 48k->16k (2ch) -> ECNS pin 0 +# ECNS pin 0 (16 kHz mono) -> KPB -> copier fanout -> 3 x (MFCC + MWW) -> +# WoV arbiter -> host PCM 14 "Headset Multi-WOV" +# ECNS pin 1 (48 kHz 2ch 16-bit) -> host PCM 13 "Headset ECNS Capture" +# +# Enabled with INCLUDE_WOV=multi and INCLUDE_SDW_JACK_WOV=true. +# + +Define { + HS_ECNS_PCM_ID 13 + HS_ECNS_PCM_CAPS "Gain Capture 13" + HS_ECNS_PCM_NAME "Headset ECNS Capture" + HS_WOV_PCM_ID 14 + HS_WOV_PCM_CAPS "Gain Capture 14" + HS_WOV_PCM_NAME "Headset Multi-WOV" + HS_WOV_SOURCE "module-copier.11.0" + SDW_JACK_WOV_D0I3_COMPATIBLE "true" + + HS_WOV_SRC_PIPELINE_ID 140 + HS_WOV_SLOT0_PIPELINE_ID 141 + HS_WOV_SLOT1_PIPELINE_ID 142 + HS_WOV_SLOT2_PIPELINE_ID 143 + HS_WOV_ARB_PIPELINE_ID 144 + HS_WOV_ECNS_PIPELINE_ID 145 + HS_WOV_KPB_PIPELINE_ID 146 + HS_WOV_ECNS_HOST_PIPELINE_ID 147 + HS_WOV_MIXIN_PIPELINE_ID 148 +} + +# --------------------------------------------------------------------------- +# Pipeline 140 — SRC 48 kHz -> 16 kHz (2ch 32-bit) for ECNS pin 0 +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $HS_WOV_SRC_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.src.1 { + rate_in 48000 + rate_out 16000 + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 145 — headset ECNS (DP 20 ms) +# Pin 0 in: 16 kHz 2ch from SRC; pin 1 in: 48 kHz 2ch from the jack copier. +# Pin 0 out: 16 kHz mono -> KPB; pin 1 out: 48 kHz 2ch 16-bit -> PCM 13. +# --------------------------------------------------------------------------- +Object.Pipeline."custom-dp-capture" [ + { + index $HS_WOV_ECNS_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 48000 + + Object.Widget.ecns.1 { + uuid $ECNS_UUID + num_input_pins 2 + num_output_pins 2 + num_input_audio_formats 2 + num_output_audio_formats 2 + + Object.Control.mixer."1" { + name "Jack In ECNS boost" + } + Object.Control.mixer."2" { + name "Jack In ecns_kpb_test_signal" + } + + Object.Base.input_pin_binding.1 { + input_pin_binding_name "src.$HS_WOV_SRC_PIPELINE_ID.1" + } + Object.Base.input_pin_binding.2 { + input_pin_binding_name "$HS_WOV_SOURCE" + } + + Object.Base.input_audio_format [ + { + input_pin_index 0 + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 2560 + } + { + input_pin_index 1 + in_rate 48000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 7680 + } + ] + Object.Base.output_audio_format [ + { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 640 + } + { + output_pin_index 1 + out_rate 48000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 3840 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "kpb.$HS_WOV_KPB_PIPELINE_ID.1" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "host-copier.$HS_ECNS_PCM_ID.capture" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 1 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 147 — headset ECNS host capture (PCM 13, 48 kHz 2ch S16_LE) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $HS_WOV_ECNS_HOST_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 48000 + + Object.Widget.host-copier.1 { + stream_name $HS_ECNS_PCM_CAPS + pcm_id $HS_ECNS_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + capture_compatible_d0i3 $SDW_JACK_WOV_D0I3_COMPATIBLE + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 146 — headset KPB (2000 ms history) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $HS_WOV_KPB_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.kpb.1 { + history_depth_ms $KPB_BUFF_TIME_MS + num_input_pins 1 + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 2 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 32 + } + ] + Object.Base.output_audio_format [ + { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + { + output_pin_index 1 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "module-copier.$HS_WOV_MIXIN_PIPELINE_ID.1" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "wov-arbiter.$HS_WOV_ARB_PIPELINE_ID.1" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 148 — headset detector fanout (own pipeline, see pipeline 118) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $HS_WOV_MIXIN_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.module-copier.1 { + num_input_pins 1 + num_output_pins $WOV_SLOT_COUNT + num_input_audio_formats 1 + num_output_audio_formats $WOV_SLOT_COUNT + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format { + 0 { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + IncludeByKey.WOV_SLOT_COUNT."^[23]$" { + 1 { + output_pin_index 1 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + } + IncludeByKey.WOV_SLOT_COUNT."^3$" { + 2 { + output_pin_index 2 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + } + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 141 — headset WoV slot 0 (MFCC + MWW) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $HS_WOV_SLOT0_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.module-copier.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MFCC 201 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 201 VAD" + invert "true" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MWW 201 bytes" + max 65536 + } + enum."1" { + name "MWW 201 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 142 — headset WoV slot 1 (MFCC + MWW) +# --------------------------------------------------------------------------- +IncludeByKey.WOV_SLOT_COUNT."^[23]$" { + Object.Pipeline."custom-capture" [ { + index $HS_WOV_SLOT1_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.module-copier.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MFCC 202 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 202 VAD" + invert "true" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MWW 202 bytes" + max 65536 + } + enum."1" { + name "MWW 202 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } ] +} + +# --------------------------------------------------------------------------- +# Pipeline 143 — headset WoV slot 2 (MFCC + MWW) +# --------------------------------------------------------------------------- +IncludeByKey.WOV_SLOT_COUNT."^3$" { + Object.Pipeline."custom-capture" [ { + index $HS_WOV_SLOT2_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.module-copier.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MFCC 203 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 203 VAD" + invert "true" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MWW 203 bytes" + max 65536 + } + enum."1" { + name "MWW 203 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_SLOT2_CORE_ID + } + } ] +} + +# --------------------------------------------------------------------------- +# Pipeline 144 — headset WoV arbiter -> host PCM 14 (16 kHz mono) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $HS_WOV_ARB_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.wov-arbiter.1 { + uuid $WOV_ARBITER_UUID + num_input_pins "$[$WOV_SLOT_COUNT + 1]" + num_output_pins 1 + num_input_audio_formats "$[$WOV_SLOT_COUNT + 1]" + num_output_audio_formats 1 + + Object.Control.enum."1" { + name "Jack In Phrase Detect ID" + } + + Object.Base.input_pin_binding.1 { + input_pin_binding_name "kpb.$HS_WOV_KPB_PIPELINE_ID.1" + } + Object.Base.input_pin_binding.2 { + input_pin_binding_name "mww.$HS_WOV_SLOT0_PIPELINE_ID.1" + } + IncludeByKey.WOV_SLOT_COUNT."^[23]$" { + Object.Base.input_pin_binding.3 { + input_pin_binding_name "mww.$HS_WOV_SLOT1_PIPELINE_ID.1" + } + } + IncludeByKey.WOV_SLOT_COUNT."^3$" { + Object.Base.input_pin_binding.4 { + input_pin_binding_name "mww.$HS_WOV_SLOT2_PIPELINE_ID.1" + } + } + + Object.Base.input_audio_format { + 0 { + input_pin_index 0 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 32 + } + 1 { + input_pin_index 1 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + IncludeByKey.WOV_SLOT_COUNT."^[23]$" { + 2 { + input_pin_index 2 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + } + IncludeByKey.WOV_SLOT_COUNT."^3$" { + 3 { + input_pin_index 3 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + } + } + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + ] + } + + Object.Widget.host-copier.1 { + stream_name $HS_WOV_PCM_CAPS + pcm_id $HS_WOV_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + capture_compatible_d0i3 $SDW_JACK_WOV_D0I3_COMPATIBLE + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + # Jack capture copier fans out to both ECNS input rates. Keep the direct + # 48 kHz route BEFORE the SRC route: DAPM walks the most recently added + # sink edge first, and the kernel matches ECNS input params against its + # pin 0 (16 kHz) formats, so ECNS must first be reached through the SRC. + { source "$HS_WOV_SOURCE" sink "ecns.$HS_WOV_ECNS_PIPELINE_ID.1" } + { source "$HS_WOV_SOURCE" sink "src.$HS_WOV_SRC_PIPELINE_ID.1" } + { source "src.$HS_WOV_SRC_PIPELINE_ID.1" sink "ecns.$HS_WOV_ECNS_PIPELINE_ID.1" } + + { source "ecns.$HS_WOV_ECNS_PIPELINE_ID.1" sink "host-copier.$HS_ECNS_PCM_ID.capture" } + { source "ecns.$HS_WOV_ECNS_PIPELINE_ID.1" sink "kpb.$HS_WOV_KPB_PIPELINE_ID.1" } + + { source "kpb.$HS_WOV_KPB_PIPELINE_ID.1" sink "module-copier.$HS_WOV_MIXIN_PIPELINE_ID.1" } + { source "kpb.$HS_WOV_KPB_PIPELINE_ID.1" sink "wov-arbiter.$HS_WOV_ARB_PIPELINE_ID.1" } + + { source "module-copier.$HS_WOV_MIXIN_PIPELINE_ID.1" sink "module-copier.$HS_WOV_SLOT0_PIPELINE_ID.1" } + { source "module-copier.$HS_WOV_SLOT0_PIPELINE_ID.1" sink "mfcc.$HS_WOV_SLOT0_PIPELINE_ID.1" } + { source "mfcc.$HS_WOV_SLOT0_PIPELINE_ID.1" sink "mww.$HS_WOV_SLOT0_PIPELINE_ID.1" } + { source "mww.$HS_WOV_SLOT0_PIPELINE_ID.1" sink "wov-arbiter.$HS_WOV_ARB_PIPELINE_ID.1" } + + { source "wov-arbiter.$HS_WOV_ARB_PIPELINE_ID.1" sink "host-copier.$HS_WOV_PCM_ID.capture" } +] + +IncludeByKey.WOV_SLOT_COUNT { + "^[23]$" { + Object.Base.route [ + { source "module-copier.$HS_WOV_MIXIN_PIPELINE_ID.1" sink "module-copier.$HS_WOV_SLOT1_PIPELINE_ID.1" } + { source "module-copier.$HS_WOV_SLOT1_PIPELINE_ID.1" sink "mfcc.$HS_WOV_SLOT1_PIPELINE_ID.1" } + { source "mfcc.$HS_WOV_SLOT1_PIPELINE_ID.1" sink "mww.$HS_WOV_SLOT1_PIPELINE_ID.1" } + { source "mww.$HS_WOV_SLOT1_PIPELINE_ID.1" sink "wov-arbiter.$HS_WOV_ARB_PIPELINE_ID.1" } + ] + } + "^3$" { + Object.Base.route [ + { source "module-copier.$HS_WOV_MIXIN_PIPELINE_ID.1" sink "module-copier.$HS_WOV_SLOT2_PIPELINE_ID.1" } + { source "module-copier.$HS_WOV_SLOT2_PIPELINE_ID.1" sink "mfcc.$HS_WOV_SLOT2_PIPELINE_ID.1" } + { source "mfcc.$HS_WOV_SLOT2_PIPELINE_ID.1" sink "mww.$HS_WOV_SLOT2_PIPELINE_ID.1" } + { source "mww.$HS_WOV_SLOT2_PIPELINE_ID.1" sink "wov-arbiter.$HS_WOV_ARB_PIPELINE_ID.1" } + ] + } +} + +# --------------------------------------------------------------------------- +# PCMs +# PCM 13: headset ECNS stereo capture (48 kHz S16_LE) +# PCM 14: headset WoV arbiter mono capture (16 kHz S16_LE) +# --------------------------------------------------------------------------- +Object.PCM.pcm [ + { + name $HS_ECNS_PCM_NAME + id $HS_ECNS_PCM_ID + direction "capture" + capture_compatible_d0i3 $SDW_JACK_WOV_D0I3_COMPATIBLE + + Object.Base.fe_dai.1 { + name "$HS_ECNS_PCM_CAPS" + } + + Object.PCM.pcm_caps.1 { + name "$HS_ECNS_PCM_CAPS" + formats "S16_LE" + rates "48000" + channels_min 2 + channels_max 2 + } + } + { + name $HS_WOV_PCM_NAME + id $HS_WOV_PCM_ID + direction "capture" + capture_compatible_d0i3 $SDW_JACK_WOV_D0I3_COMPATIBLE + + Object.Base.fe_dai.1 { + name "$HS_WOV_PCM_CAPS" + } + + Object.PCM.pcm_caps.1 { + name "$HS_WOV_PCM_CAPS" + formats "S16_LE" + rates "16000" + channels_min 1 + channels_max 1 + } + } +] From 3e793185e07c9d4543eb75293727db54cf8e8ac6 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 16 Nov 2026 12:05:47 +0000 Subject: [PATCH 6/6] topology2: add DMIC, SSP, and HDA multi-slot WOV topologies and targets Add dual-rate DMIC, SSP, HDA, and SoundWire RT721/RT722 multi-slot WoV topologies, configurable detector counts, and production/development CMake targets (using PTL symlinks for WCL). Signed-off-by: Liam Girdwood Co-authored-by: Seppo Ingalsuo Signed-off-by: Seppo Ingalsuo Co-authored-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Co-authored-by: Naveen Manohar Signed-off-by: Naveen Manohar --- tools/topology/topology2/cavs-rt5682.conf | 13 + tools/topology/topology2/cavs-sdw.conf | 15 +- .../topology2/development/tplg-targets.cmake | 34 + .../topology2/dmic-dual-regular-manifest.conf | 275 ++++ .../topology2/dmic-regular-manifest.conf | 187 +++ .../topology/topology2/dmic-wov-feature.conf | 160 ++- .../dmic-wov-multi-4ch-manifest.conf | 1107 +++++++++++++++ .../topology2/dmic-wov-multi-manifest.conf | 658 +++++++++ .../dmic-wov-multi-ptl-4ch-manifest.conf | 1208 ++++++++++++++++ .../dmic-wov-multi-ptl-manifest.conf | 665 +++++++++ .../platform/intel/dmic-generic.conf | 57 +- .../platform/intel/dmic-wov-multi.conf | 1245 +++++++++++++++++ .../production/tplg-targets-ace3.cmake | 50 +- .../production/tplg-targets-cavs25.cmake | 3 + .../production/tplg-targets-hda-generic.cmake | 5 + .../sof-hda-generic-wov-manifest.conf | 203 +++ tools/topology/topology2/sof-hda-generic.conf | 18 + .../topology2/ssp0-wov-multi-manifest.conf | 767 ++++++++++ .../topology2/ssp1-wov-multi-manifest.conf | 767 ++++++++++ .../topology2/ssp2-wov-multi-manifest.conf | 767 ++++++++++ 20 files changed, 8197 insertions(+), 7 deletions(-) create mode 100644 tools/topology/topology2/dmic-dual-regular-manifest.conf create mode 100644 tools/topology/topology2/dmic-regular-manifest.conf create mode 100644 tools/topology/topology2/dmic-wov-multi-4ch-manifest.conf create mode 100644 tools/topology/topology2/dmic-wov-multi-manifest.conf create mode 100644 tools/topology/topology2/dmic-wov-multi-ptl-4ch-manifest.conf create mode 100644 tools/topology/topology2/dmic-wov-multi-ptl-manifest.conf create mode 100644 tools/topology/topology2/platform/intel/dmic-wov-multi.conf create mode 100644 tools/topology/topology2/sof-hda-generic-wov-manifest.conf create mode 100644 tools/topology/topology2/ssp0-wov-multi-manifest.conf create mode 100644 tools/topology/topology2/ssp1-wov-multi-manifest.conf create mode 100644 tools/topology/topology2/ssp2-wov-multi-manifest.conf diff --git a/tools/topology/topology2/cavs-rt5682.conf b/tools/topology/topology2/cavs-rt5682.conf index 99ccfbfbef56..d9230f9f496a 100644 --- a/tools/topology/topology2/cavs-rt5682.conf +++ b/tools/topology/topology2/cavs-rt5682.conf @@ -6,6 +6,7 @@ + @@ -53,6 +54,13 @@ + + + + + + + Define { MCLK 24576000 @@ -139,6 +147,11 @@ IncludeByKey.PLATFORM { "ptl" "platform/intel/ptl.conf" } +# dmic1-mfcc.conf includes the mfcc class itself, a second include breaks it +IncludeByKey.INCLUDE_WOV { + "multi" "include/components/mfcc.conf" +} + # include DMIC config if needed. IncludeByKey.NUM_DMICS { "[1-4]" "platform/intel/dmic-generic.conf" diff --git a/tools/topology/topology2/cavs-sdw.conf b/tools/topology/topology2/cavs-sdw.conf index f2b852668d0d..4735879094bc 100644 --- a/tools/topology/topology2/cavs-sdw.conf +++ b/tools/topology/topology2/cavs-sdw.conf @@ -6,6 +6,7 @@ + @@ -66,6 +67,14 @@ + + + + + + + + Define { PLATFORM "none" @@ -82,7 +91,7 @@ Define { DMIC0_NAME 'dmic01' DMIC0_ID 4 DMIC1_ID 5 - DMIC0_PCM_CAPS 'Gain Capture 13' + DMIC0_PCM_CAPS 'Gain Capture 10' DEEP_BUFFER_PIPELINE_ID 15 DEEP_BUFFER_PCM_ID 31 @@ -295,3 +304,7 @@ IncludeByKey.SDW_DMIC_AUDIO_FEATURE_CAPTURE { IncludeByKey.SDW_DMIC_COMPR_AUDIO_FEATURE_CAPTURE { "true" "platform/intel/sdw-dmic-audio-feature-compress.conf" } + +IncludeByKey.SDW_DMIC_WOV_SINGLE { + "true" "platform/intel/sdw-dmic-wov-single.conf" +} diff --git a/tools/topology/topology2/development/tplg-targets.cmake b/tools/topology/topology2/development/tplg-targets.cmake index 9dea5b5e0ceb..b3a97ccfa7be 100644 --- a/tools/topology/topology2/development/tplg-targets.cmake +++ b/tools/topology/topology2/development/tplg-targets.cmake @@ -18,6 +18,10 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec.bin,\ SSP1_PCM_CORE_ID=0,SSP2_PCM_CORE_ID=0,\ SSP0_MIXER_2LEVEL=1,PLATFORM=tgl" +# Lean SSP0 NoCodec WoV topology for TGL +"cavs-nocodec-wov\;sof-tgl-nocodec-wov\;PREPROCESS_PLUGINS=nhlt,\ +NHLT_BIN=nhlt-sof-tgl-nocodec-wov.bin,PLATFORM=tgl" + # multicore disabled due to SOF issue #8942 "cavs-nocodec\;sof-adl-nocodec\;NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ SSP1_PCM_CORE_ID=0,SSP2_PCM_CORE_ID=0,\ @@ -64,6 +68,10 @@ NHLT_BIN=nhlt-sof-lnl-nocodec-fpga-4ch.bin,PASSTHROUGH=true,DMIC_IO_CLK=19200000 "cavs-nocodec\;sof-ptl-nocodec\;PLATFORM=ptl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-nocodec.bin,SRC_DOMAIN=DP" +# Lean SSP0 NoCodec WoV topology for PTL +"cavs-nocodec-wov\;sof-ptl-nocodec-wov\;PREPROCESS_PLUGINS=nhlt,\ +NHLT_BIN=nhlt-sof-ptl-nocodec-wov.bin,PLATFORM=ptl" + # SSP topology for PTL with 96 kHz DMIC "cavs-nocodec\;sof-ptl-nocodec-dmic-4ch-96k\;PLATFORM=ptl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ DMIC0_RATE=96000,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-nocodec-dmic-4ch-96k.bin" @@ -439,6 +447,26 @@ PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,NUM_HDMIS=4,\ NHLT_BIN=nhlt-sof-adl-max98357a-rt5682.bin,SPK_ID=7,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\ INCLUDE_BT_OFFLOAD=false,DEEP_BUF_SPK=true,SPEAKER_CODEC_NAME=SSP2-Codec,SPEAKER_SSP_DAI_INDEX=2" +# Google Brya with raw dmic16k 4ch passthrough capture (no ECNS) for mic diagnostics +"cavs-rt5682\;sof-adl-max98357a-rt5682-dmic16k\;PLATFORM=adl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\ +PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,DMIC1_ENABLE=passthrough,PREPROCESS_PLUGINS=nhlt,NUM_HDMIS=4,\ +NHLT_BIN=nhlt-sof-adl-max98357a-rt5682-dmic16k.bin,SPK_ID=7,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\ +INCLUDE_BT_OFFLOAD=false,DEEP_BUF_SPK=true,SPEAKER_CODEC_NAME=SSP2-Codec,SPEAKER_SSP_DAI_INDEX=2" + +# Google Brya with integrated multi-slot WoV feature on PDM DMICs +"cavs-rt5682\;sof-adl-max98357a-rt5682-wov-multi\;PLATFORM=adl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\ +PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,NUM_HDMIS=4,DMIC_WOV_DAI_CHANNELS=4,\ +NHLT_BIN=nhlt-sof-adl-max98357a-rt5682-wov-multi.bin,SPK_ID=7,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\ +INCLUDE_BT_OFFLOAD=false,DEEP_BUF_SPK=true,SPEAKER_CODEC_NAME=SSP2-Codec,SPEAKER_SSP_DAI_INDEX=2,\ +INCLUDE_WOV=multi" + +# Google Brya with multi-slot WoV feature on PDM0 stereo DMIC only +"cavs-rt5682\;sof-adl-max98357a-rt5682-2ch-wov-multi\;PLATFORM=adl,NUM_DMICS=2,\ +PREPROCESS_PLUGINS=nhlt,NUM_HDMIS=4,DMIC_WOV_DAI_CHANNELS=2,\ +NHLT_BIN=nhlt-sof-adl-max98357a-rt5682-2ch-wov-multi.bin,SPK_ID=7,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\ +INCLUDE_BT_OFFLOAD=false,DEEP_BUF_SPK=true,SPEAKER_CODEC_NAME=SSP2-Codec,SPEAKER_SSP_DAI_INDEX=2,\ +INCLUDE_WOV=multi" + # RT721 eval board with PCH-DMIC, sof_sdw_quirk_table with SOC_SDW_PCH_DMIC # Enable FLOAT_LE and U8 PCM formats "cavs-sdw\;sof-ptl-rt721-4ch-allfmt\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,NUM_DMICS=4,\ @@ -584,4 +612,10 @@ COMPRESSED_1=true,COMPRESSED_2=false" "cavs-sdw\;sof-sdca-amp-compr\;SDW_JACK=false,NUM_HDMIS=0,COMPRESSED=true,\ COMPRESSED_1=false,COMPRESSED_2=true" +# SoundWire WoV topology on PTL (RT713 on L3, RT1320 on L12) +"cavs-sdw\;sof-ptl-rt713-l3-rt1320-l12-wov\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=2,\ +SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ +SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\ +SDW_DMIC_WOV_SINGLE=true" + ) diff --git a/tools/topology/topology2/dmic-dual-regular-manifest.conf b/tools/topology/topology2/dmic-dual-regular-manifest.conf new file mode 100644 index 000000000000..c76c413a3154 --- /dev/null +++ b/tools/topology/topology2/dmic-dual-regular-manifest.conf @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Define { + DMIC0_PCM_ID 10 + DMIC0_PCM_CAPS "Gain Capture 10" + + DMIC1_PCM_ID 11 + DMIC1_PCM_CAPS "Gain Capture 11" + + DMIC_DAI_INDEX 0 + DMIC_NAME "dmic01" + + FORMAT "s32le" +} + +# =========================================================================== +# Host Pipeline 1 -> PCM 10 (DMIC Port 0 / PDM0: Channels 0 & 1) +# =========================================================================== +Object.Pipeline.host-gateway-capture [ + { + format $FORMAT + rate 48000 + rate_min 48000 + rate_max 48000 + index 1 + + Object.Widget.host-copier.1 { + stream_name $DMIC0_PCM_CAPS + pcm_id $DMIC0_PCM_ID + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } +] + +# =========================================================================== +# Host Pipeline 3 -> PCM 11 (DMIC Port 1 / PDM1: Channels 2 & 3) +# =========================================================================== +Object.Pipeline.host-gateway-capture [ + { + format $FORMAT + rate 48000 + rate_min 48000 + rate_max 48000 + index 3 + + Object.Widget.host-copier.1 { + stream_name $DMIC1_PCM_CAPS + pcm_id $DMIC1_PCM_ID + num_input_audio_formats 1 + num_output_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map 0xFFFFFF32 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } +] + +# =========================================================================== +# DAI Copier Pipeline 2 -> Captures 4ch from PDM0 + PDM1 at 48kHz +# Pin 0: Channels 0,1 (Port 0) -> Host Copier 10 +# Pin 1: Channels 2,3 (Port 1) -> Host Copier 11 +# =========================================================================== +Object.Pipeline.dai-copier-be [ + { + direction "capture" + format $FORMAT + rate 48000 + rate_min 48000 + rate_max 48000 + index 2 + + Object.Widget.dai-copier.1 { + dai_index $DMIC_DAI_INDEX + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + stream_name $DMIC_NAME + direction "capture" + node_type $DMIC_LINK_INPUT_CLASS + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 2 + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 32 + } + { + out_rate 48000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map 0xFFFFFF32 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "host-copier.10.capture" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "host-copier.11.capture" + } + } + } +] + +Object.Widget.virtual [ + { name "codec0_in" type input index 1 } + { name "codec1_in" type input index 2 } + { name "codec0_out" type output index 3 } + { name "codec1_out" type output index 4 } + { name "codec2_in" type input index 5 } + { name "codec2_out" type output index 6 } + { name "iDisp1_out" type output index 7 } + { name "iDisp2_out" type output index 8 } + { name "iDisp3_out" type output index 9 } + { name "iDisp3 Tx" type out_drv index 0 } + { name "iDisp2 Tx" type out_drv index 1 } + { name "iDisp1 Tx" type out_drv index 2 } + { name "Analog CPU Playback" type out_drv index 3 } + { name "Digital CPU Playback" type out_drv index 4 } + { name "Alt Analog CPU Playback" type out_drv index 5 } + { name "Analog CPU Capture" type input index 6 } + { name "Digital CPU Capture" type input index 7 } + { name "Alt Analog CPU Capture" type input index 8 } +] + +Object.Base.route [ + { + source "dai-copier.DMIC.$DMIC_NAME.capture" + sink "host-copier.$DMIC0_PCM_ID.capture" + } + { + source "dai-copier.DMIC.$DMIC_NAME.capture" + sink "host-copier.$DMIC1_PCM_ID.capture" + } +] + +Object.Dai.DMIC [ + { + name $DMIC_NAME + dai_index $DMIC_DAI_INDEX + id 6 + driver_version 1 + io_clk 38400000 + sample_rate 48000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC0" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable 1 + mic_b_enable 1 + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable 1 + mic_b_enable 1 + } + } +] + +Object.Base.manifest.1 { + name "sof_manifest" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +} + +Object.PCM.pcm."$DMIC0_PCM_ID" { + name "DMIC0 48k 2ch" + id $DMIC0_PCM_ID + direction "capture" + Object.Base.fe_dai."$DMIC0_PCM_CAPS" {} + Object.PCM.pcm_caps."capture" { + name $DMIC0_PCM_CAPS + formats "S32_LE,S16_LE" + rates "48000" + channels_min 2 + channels_max 2 + } +} + +Object.PCM.pcm."$DMIC1_PCM_ID" { + name "DMIC1 48k 2ch" + id $DMIC1_PCM_ID + direction "capture" + Object.Base.fe_dai."$DMIC1_PCM_CAPS" {} + Object.PCM.pcm_caps."capture" { + name $DMIC1_PCM_CAPS + formats "S32_LE,S16_LE" + rates "48000" + channels_min 2 + channels_max 2 + } +} diff --git a/tools/topology/topology2/dmic-regular-manifest.conf b/tools/topology/topology2/dmic-regular-manifest.conf new file mode 100644 index 000000000000..8ee5585289df --- /dev/null +++ b/tools/topology/topology2/dmic-regular-manifest.conf @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Define { + DMIC_PCM_ID 10 + DMIC_DAI_INDEX 0 + DMIC_NAME "dmic01" + DMIC_PCM_CAPS "Gain Capture 10" + FORMAT "s32le" +} + +Object.Pipeline.host-gateway-capture [ + { + format $FORMAT + rate 48000 + rate_min 48000 + rate_max 48000 + index 1 + + Object.Widget.host-copier.1 { + stream_name $DMIC_PCM_CAPS + pcm_id $DMIC_PCM_ID + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } +] + +Object.Pipeline.dai-copier-be [ + { + direction "capture" + format $FORMAT + rate 48000 + rate_min 48000 + rate_max 48000 + index 2 + + Object.Widget.dai-copier.1 { + dai_index $DMIC_DAI_INDEX + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + stream_name $DMIC_NAME + direction "capture" + node_type $DMIC_LINK_INPUT_CLASS + num_input_audio_formats 1 + num_output_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } +] + +Object.Widget.virtual [ + { name "codec0_in" type input index 1 } + { name "codec1_in" type input index 2 } + { name "codec0_out" type output index 3 } + { name "codec1_out" type output index 4 } + { name "codec2_in" type input index 5 } + { name "codec2_out" type output index 6 } + { name "iDisp1_out" type output index 7 } + { name "iDisp2_out" type output index 8 } + { name "iDisp3_out" type output index 9 } + { name "iDisp3 Tx" type out_drv index 0 } + { name "iDisp2 Tx" type out_drv index 1 } + { name "iDisp1 Tx" type out_drv index 2 } + { name "Analog CPU Playback" type out_drv index 3 } + { name "Digital CPU Playback" type out_drv index 4 } + { name "Alt Analog CPU Playback" type out_drv index 5 } + { name "Analog CPU Capture" type input index 6 } + { name "Digital CPU Capture" type input index 7 } + { name "Alt Analog CPU Capture" type input index 8 } +] + +Object.Base.route [ + { + source "dai-copier.DMIC.$DMIC_NAME.capture" + sink "host-copier.$DMIC_PCM_ID.capture" + } +] + +Object.Dai.DMIC [ + { + name $DMIC_NAME + dai_index $DMIC_DAI_INDEX + id 6 + driver_version 1 + io_clk 38400000 + sample_rate 48000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC0" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable 1 + mic_b_enable 1 + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable 1 + mic_b_enable 1 + } + } +] + +Object.Base.manifest.1 { + name "sof_manifest" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +} + +Object.PCM.pcm."$DMIC_PCM_ID" { + name "DMIC 48k 4ch" + id $DMIC_PCM_ID + direction "capture" + Object.Base.fe_dai."$DMIC_PCM_CAPS" {} + Object.PCM.pcm_caps."capture" { + name $DMIC_PCM_CAPS + formats "S32_LE,S16_LE" + rates "48000" + channels_min 1 + channels_max 4 + } +} diff --git a/tools/topology/topology2/dmic-wov-feature.conf b/tools/topology/topology2/dmic-wov-feature.conf index a260404cf33b..98597314c8cc 100644 --- a/tools/topology/topology2/dmic-wov-feature.conf +++ b/tools/topology/topology2/dmic-wov-feature.conf @@ -4,22 +4,39 @@ + + + + + + + + + - - + - + + + + + + + + + + @@ -28,4 +45,139 @@ - +Object.Base.manifest.1 { + nhlt "true" +} + +Define { + DMIC_DRIVER_VERSION 5 + DMIC0_ID 6 + DMIC1_ID 7 + DMIC0_NAME "dmic01" + DMIC1_NAME "dmic16k" + DMIC0_DAI_INDEX 0 + DMIC1_DAI_INDEX 1 + DMIC_WOV_DAI_INDEX 0 + DMIC_WOV_DAI_NAME "dmic01" + DMIC_WOV_DAI_ID 6 + + DMIC0_PDM0_MIC_A_ENABLE 1 + DMIC0_PDM0_MIC_B_ENABLE 1 + DMIC0_PDM1_MIC_A_ENABLE 0 + DMIC0_PDM1_MIC_B_ENABLE 0 + + DMIC1_PDM0_MIC_A_ENABLE 0 + DMIC1_PDM0_MIC_B_ENABLE 0 + DMIC1_PDM1_MIC_A_ENABLE 1 + DMIC1_PDM1_MIC_B_ENABLE 1 +} + +IncludeByKey.NUM_DMICS { + "4" { + Define { + DMIC0_PDM1_MIC_A_ENABLE 1 + DMIC0_PDM1_MIC_B_ENABLE 1 + DMIC1_PDM0_MIC_A_ENABLE 1 + DMIC1_PDM0_MIC_B_ENABLE 1 + } + } +} + +# Override defaults with platform-specific config +IncludeByKey.PLATFORM { + "tgl" "platform/intel/tgl.conf" + "mtl" "platform/intel/mtl.conf" + "lnl" "platform/intel/lnl.conf" + "ptl" "platform/intel/ptl.conf" +} + +# PDM DMIC DAIs for Wake-on-Voice feature topology: +# DAI 0 (dmic01 @ 48kHz, PDM0) and DAI 1 (dmic16k @ 16kHz, PDM1) +Object.Dai.DMIC [ + { + name $DMIC0_NAME + dai_index $DMIC0_DAI_INDEX + id $DMIC0_ID + driver_version $DMIC_DRIVER_VERSION + io_clk 38400000 + sample_rate 48000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC0" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable $DMIC0_PDM0_MIC_A_ENABLE + mic_b_enable $DMIC0_PDM0_MIC_B_ENABLE + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable $DMIC0_PDM1_MIC_A_ENABLE + mic_b_enable $DMIC0_PDM1_MIC_B_ENABLE + } + } + { + name $DMIC1_NAME + dai_index $DMIC1_DAI_INDEX + id $DMIC1_ID + driver_version $DMIC_DRIVER_VERSION + io_clk 38400000 + sample_rate 16000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC1" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable $DMIC1_PDM0_MIC_A_ENABLE + mic_b_enable $DMIC1_PDM0_MIC_B_ENABLE + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable $DMIC1_PDM1_MIC_A_ENABLE + mic_b_enable $DMIC1_PDM1_MIC_B_ENABLE + } + } +] + +# --------------------------------------------------------------------------- +# Virtual Widgets (required by HDA machine driver for DAPM) +# --------------------------------------------------------------------------- +Object.Widget.virtual [ + { name "codec0_in" type input index 1 } + { name "codec1_in" type input index 2 } + { name "codec0_out" type output index 3 } + { name "codec1_out" type output index 4 } + { name "codec2_in" type input index 5 } + { name "codec2_out" type output index 6 } + { name "iDisp1_out" type output index 7 } + { name "iDisp2_out" type output index 8 } + { name "iDisp3_out" type output index 9 } + { name "iDisp3 Tx" type out_drv index 0 } + { name "iDisp2 Tx" type out_drv index 1 } + { name "iDisp1 Tx" type out_drv index 2 } + { name "Analog CPU Playback" type out_drv index 3 } + { name "Digital CPU Playback" type out_drv index 4 } + { name "Alt Analog CPU Playback" type out_drv index 5 } + { name "Analog CPU Capture" type input index 6 } + { name "Digital CPU Capture" type input index 7 } + { name "Alt Analog CPU Capture" type input index 8 } +] + +# Dispatch based on INCLUDE_WOV: "true" for legacy single detector, "multi" for multi-slot WoV +IncludeByKey.INCLUDE_WOV { + "true" "platform/intel/dmic-wov.conf" + "multi" "platform/intel/dmic-wov-multi.conf" +} diff --git a/tools/topology/topology2/dmic-wov-multi-4ch-manifest.conf b/tools/topology/topology2/dmic-wov-multi-4ch-manifest.conf new file mode 100644 index 000000000000..5a0f7f6afff4 --- /dev/null +++ b/tools/topology/topology2/dmic-wov-multi-4ch-manifest.conf @@ -0,0 +1,1107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# --------------------------------------------------------------------------- +# Custom dynamic pipeline classes +# --------------------------------------------------------------------------- +Class.Pipeline."custom-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 0 + } + + direction "capture" + time_domain "timer" + dynamic_pipeline 1 +} + +Class.Pipeline."custom-dp-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 1 + } + + direction "capture" + time_domain "timer" + dynamic_pipeline 1 +} + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- +Define { + PLATFORM "tgl" + PREPROCESS_PLUGINS "nhlt" + KWD_TEST_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_ARBITER_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + ECNS_UUID "6c:8a:4f:21:3a:49:1e:4b:8b:1e:0d:3b:6f:8a:2c:15" + + DMIC_DAI_INDEX 1 + ECNS_PCM_ID 10 + DMIC_PCM_ID 11 + DMIC_NAME "dmic16k" + ECNS_PCM_CAPS "Gain Capture 10" + DMIC_PCM_CAPS "Gain Capture 11" + FORMAT "s16le" + + KWD_CPC 100000 + KPB_BUFF_TIME_MS "2000" + DMIC_DRIVER_VERSION 1 + MWW_FEATURES "pcan" +} + +IncludeByKey.MWW_FEATURES { + "pcan" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } + "agc8" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } +} + +# Override defaults with platform-specific definitions +IncludeByKey.PLATFORM { + "tgl" "platform/intel/tgl.conf" + "ptl" "platform/intel/ptl.conf" +} + +# --------------------------------------------------------------------------- +# Pipeline 100 — DAI Capture (Core 0, LL 1ms) +# DMIC DAI copier (16k 4ch in -> 16k 4ch out) -> Mixin.100.1 +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 100 + format $FORMAT + rate 16000 + + Object.Widget.dai-copier.1 { + dai_index $DMIC_DAI_INDEX + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + stream_name $DMIC_NAME + direction "capture" + node_type $DMIC_LINK_INPUT_CLASS + + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mixin.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 105 — ECNS DP Pipeline (Core 0, 20ms DP, Static) +# Mixout.105.1 -> ECNS.105.1 +# Output Pin 0: Ch 0 mono (16k) -> KPB.106.1 +# Output Pin 1: Ch 0,1 stereo (16k) -> Host-Copier.10 (ALSA PCM 10) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-dp-capture" [ + { + index 105 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.ecns.1 { + uuid $ECNS_UUID + num_input_pins 1 + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 2 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 2560 + } + ] + Object.Base.output_audio_format [ + # Pin 0: Ch 0 mono clean to KPB mixin + { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 640 + } + # Pin 1: Ch 0,1 stereo clean to Host mixin + { + output_pin_index 1 + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 1280 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "kpb.106.1" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "host-copier.$ECNS_PCM_ID.capture" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 1 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 107 — ECNS Host Capture Pipeline (Core 0, LL 1ms) +# ECNS.105.1 Pin 1 (2ch stereo clean) -> Host-Copier.10 (ALSA PCM 10) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 107 + format $FORMAT + rate 16000 + + Object.Widget.host-copier.1 { + stream_name $ECNS_PCM_CAPS + pcm_id $ECNS_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + + num_output_audio_formats 2 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 106 — KPB & WOV Fanout (Core 0, LL 1ms) +# ECNS.105.1 Pin 0 (1ch mono clean) -> KPB.106.1 (2000ms) -> Mixin.106.1 (fanout 1 -> 3) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 106 + format $FORMAT + rate 16000 + + Object.Widget.kpb.1 { + history_depth_ms 2000 + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + ] + } + + Object.Widget.mixin.1 { + num_input_pins 1 + num_output_pins 3 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 101 — WOV slot 0 (Core 0, 1ch mono) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 101 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MFCC 101 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 101 VAD" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MWW 101 bytes" + max 65536 + } + enum."1" { + name "MWW 101 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 102 — WOV slot 1 (Core 0, 1ch mono) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 102 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MFCC 102 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 102 VAD" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MWW 102 bytes" + max 65536 + } + enum."1" { + name "MWW 102 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 103 — WOV slot 2 (Core 0, 1ch mono) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 103 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MFCC 103 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 103 VAD" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MWW 103 bytes" + max 65536 + } + enum."1" { + name "MWW 103 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 104 — WOV Arbiter & Host Copier 11 (Core 0, Mono Output) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 104 + format $FORMAT + rate 16000 + + Object.Widget.wov-arbiter.1 { + uuid $WOV_ARBITER_UUID + num_input_pins 3 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.host-copier.1 { + stream_name $DMIC_PCM_CAPS + pcm_id $DMIC_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + + num_output_audio_formats 2 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + + +# --------------------------------------------------------------------------- +# Virtual Widgets +# --------------------------------------------------------------------------- +Object.Widget.virtual [ + { name "codec0_in" type input index 1 } + { name "codec1_in" type input index 2 } + { name "codec0_out" type output index 3 } + { name "codec1_out" type output index 4 } + { name "codec2_in" type input index 5 } + { name "codec2_out" type output index 6 } + { name "iDisp1_out" type output index 7 } + { name "iDisp2_out" type output index 8 } + { name "iDisp3_out" type output index 9 } + { name "iDisp3 Tx" type out_drv index 0 } + { name "iDisp2 Tx" type out_drv index 1 } + { name "iDisp1 Tx" type out_drv index 2 } + { name "Analog CPU Playback" type out_drv index 3 } + { name "Digital CPU Playback" type out_drv index 4 } + { name "Alt Analog CPU Playback" type out_drv index 5 } + { name "Analog CPU Capture" type input index 6 } + { name "Digital CPU Capture" type input index 7 } + { name "Alt Analog CPU Capture" type input index 8 } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + # DMIC 4ch capture to ECNS + { source "dai-copier.DMIC.$DMIC_NAME.capture" sink "mixin.100.1" } + { source "mixin.100.1" sink "mixout.105.1" } + { source "mixout.105.1" sink "ecns.105.1" } + + # ECNS Output Pin 0 (mono) direct to KPB + { source "ecns.105.1" sink "kpb.106.1" } + { source "kpb.106.1" sink "mixin.106.1" } + + # ECNS Output Pin 1 (stereo) direct to Host Copier 10 + { source "ecns.105.1" sink "host-copier.$ECNS_PCM_ID.capture" } + + # KPB mixin fanning out to 3 WOV detector slots (MFCC + MWW -> WOV Arbiter) + { source "mixin.106.1" sink "mixout.101.1" } + { source "mixout.101.1" sink "mfcc.101.1" } + { source "mfcc.101.1" sink "mww.101.1" } + { source "mww.101.1" sink "wov-arbiter.104.1" } + + { source "mixin.106.1" sink "mixout.102.1" } + { source "mixout.102.1" sink "mfcc.102.1" } + { source "mfcc.102.1" sink "mww.102.1" } + { source "mww.102.1" sink "wov-arbiter.104.1" } + + { source "mixin.106.1" sink "mixout.103.1" } + { source "mixout.103.1" sink "mfcc.103.1" } + { source "mfcc.103.1" sink "mww.103.1" } + { source "mww.103.1" sink "wov-arbiter.104.1" } + + # WOV Arbiter output to Host Copier 11 + { source "wov-arbiter.104.1" sink "host-copier.$DMIC_PCM_ID.capture" } +] + +# --------------------------------------------------------------------------- +# DMIC DAI (Two Endpoints: Endpoint 0 @ 48kHz, Endpoint 1 @ 16kHz) +# --------------------------------------------------------------------------- +Object.Dai.DMIC [ + { + name "dmic01" + dai_index 0 + id 6 + driver_version $DMIC_DRIVER_VERSION + io_clk 38400000 + sample_rate 48000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC0" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable 1 + mic_b_enable 1 + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable 1 + mic_b_enable 1 + } + } + { + name "dmic16k" + dai_index 1 + id 7 + driver_version $DMIC_DRIVER_VERSION + io_clk 38400000 + sample_rate 16000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC1" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable 1 + mic_b_enable 1 + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable 1 + mic_b_enable 1 + } + } +] + +# --------------------------------------------------------------------------- +# PCM 10 (ECNS Stereo Capture PCM) +# --------------------------------------------------------------------------- +Object.PCM.pcm."$ECNS_PCM_ID" { + name "DMIC ECNS Capture" + id $ECNS_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai."$ECNS_PCM_CAPS" {} + + Object.PCM.pcm_caps."capture" { + name $ECNS_PCM_CAPS + formats "S16_LE,S32_LE" + rates "16000" + channels_min 2 + channels_max 2 + } +} + +# --------------------------------------------------------------------------- +# PCM 11 (WOV Arbiter Mono Capture PCM) +# --------------------------------------------------------------------------- +Object.PCM.pcm."$DMIC_PCM_ID" { + name "DMIC Multi-WOV" + id $DMIC_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai."$DMIC_PCM_CAPS" {} + + Object.PCM.pcm_caps."capture" { + name $DMIC_PCM_CAPS + formats "S16_LE,S32_LE" + rates "16000" + channels_min 1 + channels_max 1 + } +} + +# --------------------------------------------------------------------------- +# Manifest +# --------------------------------------------------------------------------- +Object.Base.manifest.1 { + name "sof_manifest" + nhlt "true" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +} diff --git a/tools/topology/topology2/dmic-wov-multi-manifest.conf b/tools/topology/topology2/dmic-wov-multi-manifest.conf new file mode 100644 index 000000000000..55389c935ded --- /dev/null +++ b/tools/topology/topology2/dmic-wov-multi-manifest.conf @@ -0,0 +1,658 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# --------------------------------------------------------------------------- +# Custom dynamic pipeline class +# --------------------------------------------------------------------------- +Class.Pipeline."custom-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 0 + } + + direction "capture" + time_domain "timer" + dynamic_pipeline 1 +} + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- +Define { + KWD_TEST_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_ARBITER_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + + DMIC_DAI_INDEX 0 + DMIC_PCM_ID 11 + DMIC_NAME "dmic01" + DMIC_PCM_CAPS "Gain Capture 11" + FORMAT "s16le" + + KWD_CPC 100000 + KPB_BUFF_TIME_MS "6000" +} + +# --------------------------------------------------------------------------- +# Pipeline 100 — DAI (Core 0) +# DMIC DAI copier (48k 4ch in -> 48k 1ch out) -> SRC (48k->16k) -> KPB -> Mixin +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 100 + format $FORMAT + rate 16000 + + Object.Widget.dai-copier.1 { + dai_index $DMIC_DAI_INDEX + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + stream_name $DMIC_NAME + direction "capture" + node_type $DMIC_LINK_INPUT_CLASS + + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.src.1 { + rate_in 48000 + rate_out 16000 + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.kpb.1 { + history_depth_ms 6000 + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.mixin.1 { + num_input_pins 1 + num_output_pins 3 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 101 — WOV slot 0 (Core 0) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 101 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $WOV_UUID + cpc $KWD_CPC + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 102 — WOV slot 1 (Core 0) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 102 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $WOV_UUID + cpc $KWD_CPC + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 103 — WOV slot 2 (Core 0) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 103 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $WOV_UUID + cpc $KWD_CPC + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 104 — Host Copier (Core 0) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 104 + format $FORMAT + rate 16000 + + Object.Widget.wov-arbiter.1 { + uuid $WOV_ARBITER_UUID + num_input_pins 3 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.host-copier.1 { + stream_name $DMIC_PCM_CAPS + pcm_id $DMIC_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + + num_output_audio_formats 2 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + + +# --------------------------------------------------------------------------- +# Virtual Widgets +# --------------------------------------------------------------------------- +Object.Widget.virtual [ + { name "codec0_in" type input index 1 } + { name "codec1_in" type input index 2 } + { name "codec0_out" type output index 3 } + { name "codec1_out" type output index 4 } + { name "codec2_in" type input index 5 } + { name "codec2_out" type output index 6 } + { name "iDisp1_out" type output index 7 } + { name "iDisp2_out" type output index 8 } + { name "iDisp3_out" type output index 9 } + { name "iDisp3 Tx" type out_drv index 0 } + { name "iDisp2 Tx" type out_drv index 1 } + { name "iDisp1 Tx" type out_drv index 2 } + { name "Analog CPU Playback" type out_drv index 3 } + { name "Digital CPU Playback" type out_drv index 4 } + { name "Alt Analog CPU Playback" type out_drv index 5 } + { name "Analog CPU Capture" type input index 6 } + { name "Digital CPU Capture" type input index 7 } + { name "Alt Analog CPU Capture" type input index 8 } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + { source "dai-copier.DMIC.$DMIC_NAME.capture" sink "src.100.1" } + { source "src.100.1" sink "kpb.100.1" } + { source "kpb.100.1" sink "mixin.100.1" } + + { source "mixin.100.1" sink "mixout.101.1" } + { source "mixout.101.1" sink "wov.101.1" } + { source "wov.101.1" sink "wov-arbiter.104.1" } + + { source "mixin.100.1" sink "mixout.102.1" } + { source "mixout.102.1" sink "wov.102.1" } + { source "wov.102.1" sink "wov-arbiter.104.1" } + + { source "mixin.100.1" sink "mixout.103.1" } + { source "mixout.103.1" sink "wov.103.1" } + { source "wov.103.1" sink "wov-arbiter.104.1" } + + { source "wov-arbiter.104.1" sink "host-copier.$DMIC_PCM_ID.capture" } +] + +# --------------------------------------------------------------------------- +# DMIC DAI +# --------------------------------------------------------------------------- +Object.Dai.DMIC [ + { + name $DMIC_NAME + dai_index $DMIC_DAI_INDEX + id 6 + driver_version 1 + io_clk 38400000 + sample_rate 48000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC0" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable 1 + mic_b_enable 1 + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable 1 + mic_b_enable 1 + } + } +] + +# --------------------------------------------------------------------------- +# PCM 11 (Regular PCM) +# --------------------------------------------------------------------------- +Object.PCM.pcm."$DMIC_PCM_ID" { + name "DMIC Multi-WOV" + id $DMIC_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai."$DMIC_PCM_CAPS" {} + + Object.PCM.pcm_caps."capture" { + name $DMIC_PCM_CAPS + formats "S16_LE,S32_LE" + rates "16000" + channels_min 2 + channels_max 2 + } +} + +# --------------------------------------------------------------------------- +# Manifest +# --------------------------------------------------------------------------- +Object.Base.manifest.1 { + name "sof_manifest" + nhlt "true" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +} diff --git a/tools/topology/topology2/dmic-wov-multi-ptl-4ch-manifest.conf b/tools/topology/topology2/dmic-wov-multi-ptl-4ch-manifest.conf new file mode 100644 index 000000000000..3122f34f0139 --- /dev/null +++ b/tools/topology/topology2/dmic-wov-multi-ptl-4ch-manifest.conf @@ -0,0 +1,1208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# --------------------------------------------------------------------------- +# Custom dynamic pipeline classes +# --------------------------------------------------------------------------- +Class.Pipeline."custom-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 0 + } + + # Without this no scheduler period token reaches the firmware at all. + # Every stock SOF capture class sets it (see volume-capture.conf). + period 1000 + direction "capture" + time_domain "timer" + dynamic_pipeline 1 +} + +Class.Pipeline."custom-dp-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 1 + } + + # Without this no scheduler period token reaches the firmware at all. + # Every stock SOF capture class sets it (see volume-capture.conf). + period 1000 + direction "capture" + time_domain "timer" + dynamic_pipeline 1 +} + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- +Define { + PLATFORM "ptl" + PREPROCESS_PLUGINS "nhlt" + KWD_TEST_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_ARBITER_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + ECNS_UUID "6c:8a:4f:21:3a:49:1e:4b:8b:1e:0d:3b:6f:8a:2c:15" + + DMIC_DAI_INDEX 1 + ECNS_PCM_ID 10 + DMIC_PCM_ID 11 + DMIC_NAME "dmic16k" + ECNS_PCM_CAPS "Gain Capture 10" + DMIC_PCM_CAPS "Gain Capture 11" + FORMAT "s32le" + + KWD_CPC 100000 + KPB_BUFF_TIME_MS "2000" + MWW_FEATURES "pcan" +} + +IncludeByKey.MWW_FEATURES { + "pcan" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } + "agc8" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } +} + +# Override defaults with platform-specific definitions +IncludeByKey.PLATFORM { + "tgl" "platform/intel/tgl.conf" + "ptl" "platform/intel/ptl.conf" +} + +# --------------------------------------------------------------------------- +# Pipeline 100 — DAI Capture (Core 0, LL 1ms) +# DMIC DAI copier (16k 4ch in -> 16k 4ch out) -> Mixin.100.1 +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 100 + format $FORMAT + rate 16000 + + Object.Widget.dai-copier.1 { + dai_index $DMIC_DAI_INDEX + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + stream_name $DMIC_NAME + direction "capture" + node_type $DMIC_LINK_INPUT_CLASS + + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.mixin.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 105 — ECNS DP Pipeline (Core 0, 20ms DP, Static) +# Mixout.105.1 -> ECNS.105.1 +# Output Pin 0: Ch 0 mono (16k) -> KPB.106.1 +# Output Pin 1: Ch 0,1 stereo (16k) -> Host-Copier.10 (ALSA PCM 10) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-dp-capture" [ + { + index 105 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.ecns.1 { + uuid $ECNS_UUID + num_input_pins 1 + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 2 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 5120 + } + ] + Object.Base.output_audio_format [ + # Pin 0: Ch 0 mono clean to KPB mixin + { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 1280 + } + # Pin 1: Ch 0,1 stereo clean to Host mixin + { + output_pin_index 1 + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 2560 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "kpb.106.1" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "host-copier.$ECNS_PCM_ID.capture" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 1 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 107 — ECNS Host Capture Pipeline (Core 0, LL 1ms) +# ECNS.105.1 Pin 1 (2ch stereo clean) -> Host-Copier.10 (ALSA PCM 10) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 107 + format $FORMAT + rate 16000 + + Object.Widget.host-copier.1 { + stream_name $ECNS_PCM_CAPS + pcm_id $ECNS_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + + num_output_audio_formats 3 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 24 + } + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 106 — KPB & WOV Fanout (Core 0, LL 1ms) +# ECNS.105.1 Pin 0 (1ch mono clean) -> KPB.106.1 (2000ms) -> Mixin.106.1 (fanout 1 -> 3) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 106 + format $FORMAT + rate 16000 + + Object.Widget.kpb.1 { + history_depth_ms 2000 + num_input_pins 1 + # KPB has two sinks by design (kpb.c): buf_id 0 is sel_sink, the + # constant-rate feed to the detectors, and buf_id 1 is host_sink, + # the variable-rate drain that bursts pre-roll to the host after + # a wake word. + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 2 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 64 + } + ] + Object.Base.output_audio_format [ + # Pin 0: real-time feed to the detector slots + { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 64 + } + # Pin 1: drain path to the WOV arbiter and the host PCM + { + output_pin_index 1 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 64 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "mixin.106.1" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "wov-arbiter.104.1" + } + } + + Object.Widget.mixin.1 { + num_input_pins 1 + num_output_pins 3 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 101 — WOV slot 0 (Core 0, 1ch mono) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 101 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MFCC 101 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 101 VAD" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 640 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MWW 101 bytes" + max 65536 + } + enum."1" { + name "MWW 101 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 102 — WOV slot 1 (Core 0, 1ch mono) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 102 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MFCC 102 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 102 VAD" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 640 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MWW 102 bytes" + max 65536 + } + enum."1" { + name "MWW 102 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 103 — WOV slot 2 (Core 0, 1ch mono) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 103 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MFCC 103 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 103 VAD" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 640 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Control { + bytes."1" { + name "MWW 103 bytes" + max 65536 + } + enum."1" { + name "MWW 103 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 104 — WOV Arbiter & Host Copier 11 (Core 0, Mono Output) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 104 + format $FORMAT + rate 16000 + + Object.Widget.wov-arbiter.1 { + uuid $WOV_ARBITER_UUID + num_input_pins 4 + num_output_pins 1 + num_input_audio_formats 4 + num_output_audio_formats 1 + + Object.Base.input_pin_binding.1 { + input_pin_binding_name "kpb.106.1" + } + Object.Base.input_pin_binding.2 { + input_pin_binding_name "mww.101.1" + } + Object.Base.input_pin_binding.3 { + input_pin_binding_name "mww.102.1" + } + Object.Base.input_pin_binding.4 { + input_pin_binding_name "mww.103.1" + } + + Object.Base.input_audio_format [ + # Pin 0: Audio from KPB host_sink (32-bit PCM, 16kHz mono) + { + input_pin_index 0 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 64 + } + # Pin 1: Features from MWW slot 0 (8-bit PCAN, 16kHz mono) + { + input_pin_index 1 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + # Pin 2: Features from MWW slot 1 (8-bit PCAN, 16kHz mono) + { + input_pin_index 2 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + # Pin 3: Features from MWW slot 2 (8-bit PCAN, 16kHz mono) + { + input_pin_index 3 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 64 + } + ] + } + + Object.Widget.host-copier.1 { + stream_name $DMIC_PCM_CAPS + pcm_id $DMIC_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + + # IPC4 reads SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 from the + # host-copier widget tuples, not from the PCM object, so the + # WoV stream must carry it here to stay up across S0iX in D0i3. + capture_compatible_d0i3 true + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + + num_output_audio_formats 3 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 24 + } + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + + +# --------------------------------------------------------------------------- +# Virtual Widgets +# --------------------------------------------------------------------------- +Object.Widget.virtual [ + { name "codec0_in" type input index 1 } + { name "codec1_in" type input index 2 } + { name "codec0_out" type output index 3 } + { name "codec1_out" type output index 4 } + { name "codec2_in" type input index 5 } + { name "codec2_out" type output index 6 } + { name "iDisp1_out" type output index 7 } + { name "iDisp2_out" type output index 8 } + { name "iDisp3_out" type output index 9 } + { name "iDisp3 Tx" type out_drv index 0 } + { name "iDisp2 Tx" type out_drv index 1 } + { name "iDisp1 Tx" type out_drv index 2 } + { name "Analog CPU Playback" type out_drv index 3 } + { name "Digital CPU Playback" type out_drv index 4 } + { name "Alt Analog CPU Playback" type out_drv index 5 } + { name "Analog CPU Capture" type input index 6 } + { name "Digital CPU Capture" type input index 7 } + { name "Alt Analog CPU Capture" type input index 8 } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + # DMIC 4ch capture to ECNS + { source "dai-copier.DMIC.$DMIC_NAME.capture" sink "mixin.100.1" } + { source "mixin.100.1" sink "mixout.105.1" } + { source "mixout.105.1" sink "ecns.105.1" } + + # ECNS Output Pin 0 (mono) direct to KPB + { source "ecns.105.1" sink "kpb.106.1" } + { source "kpb.106.1" sink "mixin.106.1" } + + # ECNS Output Pin 1 (stereo) direct to Host Copier 10 + { source "ecns.105.1" sink "host-copier.$ECNS_PCM_ID.capture" } + + # Audio path from KPB host_sink (pin 1) to WOV Arbiter audio input (pin 0) + { source "kpb.106.1" sink "wov-arbiter.104.1" } + + # KPB mixin fanning out to 3 WOV detector slots (MFCC + MWW -> WOV Arbiter pins 1, 2, 3) + { source "mixin.106.1" sink "mixout.101.1" } + { source "mixout.101.1" sink "mfcc.101.1" } + { source "mfcc.101.1" sink "mww.101.1" } + { source "mww.101.1" sink "wov-arbiter.104.1" } + + { source "mixin.106.1" sink "mixout.102.1" } + { source "mixout.102.1" sink "mfcc.102.1" } + { source "mfcc.102.1" sink "mww.102.1" } + { source "mww.102.1" sink "wov-arbiter.104.1" } + + { source "mixin.106.1" sink "mixout.103.1" } + { source "mixout.103.1" sink "mfcc.103.1" } + { source "mfcc.103.1" sink "mww.103.1" } + { source "mww.103.1" sink "wov-arbiter.104.1" } + + # WOV Arbiter output to Host Copier 11 + { source "wov-arbiter.104.1" sink "host-copier.$DMIC_PCM_ID.capture" } +] + +# --------------------------------------------------------------------------- +# DMIC DAI (Two Endpoints: Endpoint 0 @ 48kHz, Endpoint 1 @ 16kHz) +# --------------------------------------------------------------------------- +Object.Dai.DMIC [ + { + name "dmic01" + dai_index 0 + id 6 + driver_version $DMIC_DRIVER_VERSION + io_clk 38400000 + sample_rate 48000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC0" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable 1 + mic_b_enable 1 + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable 1 + mic_b_enable 1 + } + } + { + name "dmic16k" + dai_index 1 + id 7 + driver_version $DMIC_DRIVER_VERSION + io_clk 38400000 + sample_rate 16000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC1" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable 1 + mic_b_enable 1 + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable 1 + mic_b_enable 1 + } + } +] + +# --------------------------------------------------------------------------- +# PCM 10 (ECNS Stereo Capture PCM) +# --------------------------------------------------------------------------- +Object.PCM.pcm."$ECNS_PCM_ID" { + name "DMIC ECNS Capture" + id $ECNS_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai."$ECNS_PCM_CAPS" {} + + Object.PCM.pcm_caps."capture" { + name $ECNS_PCM_CAPS + formats "S16_LE,S24_LE,S32_LE" + rates "16000" + channels_min 2 + channels_max 2 + } +} + +# --------------------------------------------------------------------------- +# PCM 11 (WOV Arbiter Mono Capture PCM) +# --------------------------------------------------------------------------- +Object.PCM.pcm."$DMIC_PCM_ID" { + name "DMIC Multi-WOV" + id $DMIC_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai."$DMIC_PCM_CAPS" {} + + Object.PCM.pcm_caps."capture" { + name $DMIC_PCM_CAPS + formats "S16_LE,S24_LE,S32_LE" + rates "16000" + channels_min 1 + channels_max 1 + } +} + +# --------------------------------------------------------------------------- +# Manifest +# --------------------------------------------------------------------------- +Object.Base.manifest.1 { + name "sof_manifest" + nhlt "true" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +} diff --git a/tools/topology/topology2/dmic-wov-multi-ptl-manifest.conf b/tools/topology/topology2/dmic-wov-multi-ptl-manifest.conf new file mode 100644 index 000000000000..6b9d9053ec4f --- /dev/null +++ b/tools/topology/topology2/dmic-wov-multi-ptl-manifest.conf @@ -0,0 +1,665 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# --------------------------------------------------------------------------- +# Custom dynamic pipeline class +# --------------------------------------------------------------------------- +Class.Pipeline."custom-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 0 + } + + direction "capture" + time_domain "timer" + dynamic_pipeline 1 +} + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- +Define { + PLATFORM "ptl" + KWD_TEST_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_ARBITER_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + + DMIC_DAI_INDEX 0 + DMIC_PCM_ID 11 + DMIC_NAME "dmic01" + DMIC_PCM_CAPS "Gain Capture 11" + FORMAT "s16le" + + KWD_CPC 100000 + KPB_BUFF_TIME_MS "6000" +} + +# Override defaults with platform-specific definitions +IncludeByKey.PLATFORM { + "tgl" "platform/intel/tgl.conf" + "ptl" "platform/intel/ptl.conf" +} + +# --------------------------------------------------------------------------- +# Pipeline 100 — DAI (Core 0) +# DMIC DAI copier (48k 4ch in -> 48k 1ch out) -> SRC (48k->16k) -> KPB -> Mixin +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 100 + format $FORMAT + rate 16000 + + Object.Widget.dai-copier.1 { + dai_index $DMIC_DAI_INDEX + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + stream_name $DMIC_NAME + direction "capture" + node_type $DMIC_LINK_INPUT_CLASS + + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.src.1 { + rate_in 48000 + rate_out 16000 + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.kpb.1 { + history_depth_ms 6000 + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.mixin.1 { + num_input_pins 1 + num_output_pins 3 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 101 — WOV slot 0 (Core 0) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 101 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $WOV_UUID + cpc $KWD_CPC + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 102 — WOV slot 1 (Core 0) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 102 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $WOV_UUID + cpc $KWD_CPC + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 103 — WOV slot 2 (Core 0) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 103 + format $FORMAT + rate 16000 + + Object.Widget.mixout.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $WOV_UUID + cpc $KWD_CPC + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 104 — Host Copier (Core 0) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index 104 + format $FORMAT + rate 16000 + + Object.Widget.wov-arbiter.1 { + uuid $WOV_ARBITER_UUID + num_input_pins 3 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.host-copier.1 { + stream_name $DMIC_PCM_CAPS + pcm_id $DMIC_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + + num_output_audio_formats 2 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_rate 16000 + out_channels 2 + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + + +# --------------------------------------------------------------------------- +# Virtual Widgets +# --------------------------------------------------------------------------- +Object.Widget.virtual [ + { name "codec0_in" type input index 1 } + { name "codec1_in" type input index 2 } + { name "codec0_out" type output index 3 } + { name "codec1_out" type output index 4 } + { name "codec2_in" type input index 5 } + { name "codec2_out" type output index 6 } + { name "iDisp1_out" type output index 7 } + { name "iDisp2_out" type output index 8 } + { name "iDisp3_out" type output index 9 } + { name "iDisp3 Tx" type out_drv index 0 } + { name "iDisp2 Tx" type out_drv index 1 } + { name "iDisp1 Tx" type out_drv index 2 } + { name "Analog CPU Playback" type out_drv index 3 } + { name "Digital CPU Playback" type out_drv index 4 } + { name "Alt Analog CPU Playback" type out_drv index 5 } + { name "Analog CPU Capture" type input index 6 } + { name "Digital CPU Capture" type input index 7 } + { name "Alt Analog CPU Capture" type input index 8 } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + { source "dai-copier.DMIC.$DMIC_NAME.capture" sink "src.100.1" } + { source "src.100.1" sink "kpb.100.1" } + { source "kpb.100.1" sink "mixin.100.1" } + + { source "mixin.100.1" sink "mixout.101.1" } + { source "mixout.101.1" sink "wov.101.1" } + { source "wov.101.1" sink "wov-arbiter.104.1" } + + { source "mixin.100.1" sink "mixout.102.1" } + { source "mixout.102.1" sink "wov.102.1" } + { source "wov.102.1" sink "wov-arbiter.104.1" } + + { source "mixin.100.1" sink "mixout.103.1" } + { source "mixout.103.1" sink "wov.103.1" } + { source "wov.103.1" sink "wov-arbiter.104.1" } + + { source "wov-arbiter.104.1" sink "host-copier.$DMIC_PCM_ID.capture" } +] + +# --------------------------------------------------------------------------- +# DMIC DAI +# --------------------------------------------------------------------------- +Object.Dai.DMIC [ + { + name $DMIC_NAME + dai_index $DMIC_DAI_INDEX + id 6 + driver_version $DMIC_DRIVER_VERSION + io_clk 38400000 + sample_rate 48000 + clk_min 500000 + clk_max 4800000 + unmute_ramp_time_ms 200 + num_pdm_active 2 + + Object.Base.hw_config.1 { + id 0 + name "DMIC0" + } + + Object.Base.pdm_config.1 { + ctrl_id 0 + mic_a_enable 1 + mic_b_enable 1 + } + Object.Base.pdm_config.2 { + ctrl_id 1 + mic_a_enable 1 + mic_b_enable 1 + } + } +] + +# --------------------------------------------------------------------------- +# PCM 11 (Regular PCM) +# --------------------------------------------------------------------------- +Object.PCM.pcm."$DMIC_PCM_ID" { + name "DMIC Multi-WOV" + id $DMIC_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai."$DMIC_PCM_CAPS" {} + + Object.PCM.pcm_caps."capture" { + name $DMIC_PCM_CAPS + formats "S16_LE,S32_LE" + rates "16000" + channels_min 2 + channels_max 2 + } +} + +# --------------------------------------------------------------------------- +# Manifest +# --------------------------------------------------------------------------- +Object.Base.manifest.1 { + name "sof_manifest" + nhlt "true" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +} diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index c473f1eea470..3e731babc7b7 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -27,6 +27,14 @@ IncludeByKey.DMIC0_PCM_CHANNELS { } } +IncludeByKey.NUM_DMICS { + "4" { + Define { + DMIC_WOV_DAI_CHANNELS 4 + } + } +} + Object.Dai.DMIC [ { dai_index 0 @@ -96,9 +104,12 @@ IncludeByKey.PASSTHROUGH { "false" { IncludeByKey.INCLUDE_WOV { "true" "platform/intel/dmic-wov.conf" + "multi" "platform/intel/dmic-wov-multi.conf" } - Object.Pipeline.host-gateway-capture [ + IncludeByKey.INCLUDE_WOV { + "(false|true)" { + Object.Pipeline.host-gateway-capture [ { format $FORMAT index $DMIC0_HOST_PIPELINE_ID @@ -847,6 +858,8 @@ IncludeByKey.PASSTHROUGH { ] } } + } + } } "true" { Object.Pipeline.host-gateway-capture [ @@ -1005,6 +1018,8 @@ IncludeByKey.PASSTHROUGH { } } +IncludeByKey.INCLUDE_WOV { +"false" { Object.PCM.pcm [ { name "$DMIC0_PCM_NAME" @@ -1040,12 +1055,52 @@ Object.PCM.pcm [ } } ] +} +"true" { +Object.PCM.pcm [ + { + name "$DMIC0_PCM_NAME" + id $DMIC0_PCM_ID + direction "capture" + Object.Base.fe_dai.1 { + name "$DMIC0_PCM_NAME" + } + + Object.PCM.pcm_caps.1 { + name $DMIC0_PCM_CAPS + IncludeByKey.PCM_FORMAT_ALL { + "true" { + formats 'S16_LE,S24_LE,S32_LE,U8,FLOAT_LE' + } + "false" { + formats 'S32_LE' + } + } + channels_min $DMIC0_PCM_CHANNELS + channels_max $DMIC0_PCM_CHANNELS + IncludeByKey.DMIC0_RATE { + "16000" { + rates '16000' + } + "48000" { + rates '48000' + } + "96000" { + rates '96000' + } + } + } + } +] +} +} IncludeByKey.DMIC0_DEEP_BUFFER { "true" "platform/intel/dmic-deep-buffer.conf" } IncludeByKey.DMIC1_ENABLE { + "wov-multi" "platform/intel/dmic-wov-multi.conf" "passthrough" "platform/intel/dmic1-passthrough.conf" "mfcc" "platform/intel/dmic1-mfcc.conf" } diff --git a/tools/topology/topology2/platform/intel/dmic-wov-multi.conf b/tools/topology/topology2/platform/intel/dmic-wov-multi.conf new file mode 100644 index 000000000000..eef47c97a7b3 --- /dev/null +++ b/tools/topology/topology2/platform/intel/dmic-wov-multi.conf @@ -0,0 +1,1245 @@ +# +# Multi-Slot Wake-on-Voice (WoV) feature module with PDM DMIC input. +# +# Hardware PDM DMIC (16kHz 4ch) -> 20ms DP ECNS -> 2000ms dual-sink KPB -> +# Mixin fanout to 3 concurrent MWW detector slots (MFCC + MicroWakeWord) -> +# 4-pin WOV Arbiter -> Host Copier PCM 11 (D0i3-compatible) & ECNS Host PCM 10. +# +# Requires: +# CONFIG_COMP_KPB=y +# CONFIG_COMP_WOV_ARBITER=y +# CONFIG_COMP_MFCC=y +# CONFIG_COMP_MICROWAKEWORD=y +# CONFIG_COMP_ECNS=y +# + +# --------------------------------------------------------------------------- +# Component and control class definitions +# --------------------------------------------------------------------------- + +# --------------------------------------------------------------------------- +# Custom pipeline classes +# --------------------------------------------------------------------------- +Class.Pipeline."custom-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 0 + } + + direction "capture" + time_domain "timer" + dynamic_pipeline 1 +} + +Class.Pipeline."custom-dp-capture" { + + + attributes { + !constructor [ + "index" + ] + unique "instance" + } + + Object.Widget.pipeline."1" { + priority 0 + lp_mode 1 + } + + direction "capture" + time_domain "timer" + period 20000 + dynamic_pipeline 1 +} + +# --------------------------------------------------------------------------- +# Default parameters +# --------------------------------------------------------------------------- +Define { + WOV_SLOT_COUNT 3 + + WOV_ARBITER_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + ECNS_UUID "6c:8a:4f:21:3a:49:1e:4b:8b:1e:0d:3b:6f:8a:2c:15" + + DMIC_WOV_DAI_INDEX 0 + DMIC_WOV_DAI_NAME "dmic01" + DMIC16K_DAI_INDEX 1 + DMIC16K_DAI_NAME "dmic16k" + # DMIC_RAW_PCM_ID 10 + # DMIC_RAW_PCM_CAPS "Gain Capture 10" + DMIC_ECNS_PCM_ID 11 + DMIC_ECNS_PCM_CAPS "Gain Capture 11" + DMIC_WOV_PCM_ID 12 + DMIC_WOV_PCM_CAPS "Gain Capture 12" + DMIC0_PCM_CAPS "Gain Capture 10" + DMIC_WOV_FORMAT "s16le" + + KWD_CPC 100000 + WOV_ARB_CPC 20000 + KPB_BUFF_TIME_MS "2000" + + WOV_DAI_PIPELINE_ID 110 + WOV_SLOT0_PIPELINE_ID 111 + WOV_SLOT1_PIPELINE_ID 112 + WOV_SLOT2_PIPELINE_ID 113 + WOV_ARB_PIPELINE_ID 114 + WOV_ECNS_PIPELINE_ID 115 + WOV_KPB_PIPELINE_ID 116 + WOV_ECNS_HOST_PIPELINE_ID 117 + WOV_MIXIN_PIPELINE_ID 118 + WOV_DAI16K_PIPELINE_ID 119 + + WOV_CORE_ID 0 + WOV_SLOT2_CORE_ID 0 + MWW_FEATURES "pcan" + # Default for non-SoundWire includers (e.g. cavs-rt5682.conf); the + # headset WoV instance is enabled per target with INCLUDE_SDW_JACK_WOV=true. + INCLUDE_SDW_JACK_WOV "false" + + # 16k detection-path channel count into ECNS pin0. Overridden + # to 4ch by IncludeByKey.DMIC_WOV_DAI_CHANNELS below so ECNS can select + # the good mic pair in firmware. Literal channel cfg/map values: $CHANNEL_* + # references resolved to 0 here, making the copier remap from channel 0. + DET16K_CHANNELS 2 + DET16K_CH_CFG 1 + DET16K_CH_MAP 0xFFFFFF10 + ECNS_PIN0_IBS 2560 + + # 48k host-path channel count: dmic01 -> ECNS pin1 -> host PCM 11. + # Overridden to 4ch below to allow raw 4ch capture for mic diagnostics. + WOVHOST_CHANNELS 2 + WOVHOST_CH_CFG 1 + WOVHOST_CH_MAP 0xFFFFFF10 + ECNS_PIN1_IN_IBS 7680 + ECNS_PIN1_IBS 3840 + ECNS_PIN1_OBS 3840 +} + +IncludeByKey.DMIC_WOV_DAI_CHANNELS { + "2" { + Define { + DET16K_CHANNELS 2 + DET16K_CH_CFG 1 + DET16K_CH_MAP 0xFFFFFF10 + ECNS_PIN0_IBS 2560 + WOVHOST_CHANNELS 2 + WOVHOST_CH_CFG 1 + WOVHOST_CH_MAP 0xFFFFFF10 + ECNS_PIN1_IN_IBS 7680 + ECNS_PIN1_IBS 3840 + ECNS_PIN1_OBS 3840 + } + } + "4" { + Define { + DET16K_CHANNELS 4 + DET16K_CH_CFG 4 + DET16K_CH_MAP 0xFFFF3210 + ECNS_PIN0_IBS 5120 + WOVHOST_CHANNELS 4 + WOVHOST_CH_CFG 4 + WOVHOST_CH_MAP 0xFFFF3210 + ECNS_PIN1_IN_IBS 15360 + ECNS_PIN1_IBS 7680 + ECNS_PIN1_OBS 7680 + } + } +} + +IncludeByKey.MWW_FEATURES { + "pcan" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } + "agc8" { + Define { + MFCC_FRAME_BYTES 64 + MWW_INPUT_BYTES 64 + } + } +} + +# --------------------------------------------------------------------------- +# Pipeline 110 — DAI Capture for dmic01 (Core 0, LL 1ms) +# Hardware PDM DMIC Copier (48k) -> ECNS.115.1 Pin 1 +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_DAI_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 48000 + + # dmic01 DAI copier. Only the 4ch/32bit input format is offered: it is + # the sole DMIC NHLT blob, so any pipeline that drags in this copier as a + # dangling branch (e.g. the KPB PCM 12 path) still resolves to a format + # the firmware has a blob for. + Object.Widget.dai-copier.1 { + dai_index $DMIC_WOV_DAI_INDEX + dai_type "DMIC" + copier_type "DMIC" + type dai_out + stream_name $DMIC_WOV_DAI_NAME + node_type $DMIC_LINK_INPUT_CLASS + num_output_pins 1 + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels $WOVHOST_CHANNELS + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $WOVHOST_CH_CFG + in_ch_map $WOVHOST_CH_MAP + } + ] + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels $WOVHOST_CHANNELS + out_bit_depth 32 + out_valid_bit_depth 32 + out_ch_cfg $WOVHOST_CH_CFG + out_ch_map $WOVHOST_CH_MAP + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 119 — DAI Capture for dmic16k (Core 0, LL 1ms) +# Hardware PDM DMIC Copier (16k) -> ECNS.115.1 Pin 0 +# Pipeline 119 feeds ECNS directly, like pipeline 110: a source widget in +# pipeline 115 besides ECNS would never be copied, the LL walk only starts from +# one source per pipeline. +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_DAI16K_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.dai-copier.1 { + dai_index $DMIC16K_DAI_INDEX + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + stream_name $DMIC16K_DAI_NAME + direction "capture" + node_type $DMIC_LINK_INPUT_CLASS + + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + # 4ch DMIC is remapped to stereo by the copier + IncludeByKey.DMIC_WOV_DAI_CHANNELS { + "2" { + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + } + ] + } + "4" { + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + } + ] + } + } + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels $DET16K_CHANNELS + out_ch_cfg $DET16K_CH_CFG + out_ch_map $DET16K_CH_MAP + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 115 — ECNS DP Pipeline (Core 0, 20ms DP, lp_mode 1) +# DAI-Copier dmic01 (pipeline 110, 48k) -> ECNS.115.1 Pin 1 +# DAI-Copier dmic16k (pipeline 119, 16k dmic16k) -> ECNS.115.1 Pin 0 +# Pin 0: averaged mono clean (16k) -> KPB.116.1 +# Pin 1: Ch 0,1 stereo clean (48k) -> Host-Copier.11 (ALSA PCM 11) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-dp-capture" [ + { + index $WOV_ECNS_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 48000 + + Object.Widget.ecns.1 { + uuid $ECNS_UUID + num_input_pins 2 + num_output_pins 2 + num_input_audio_formats 2 + num_output_audio_formats 2 + + Object.Control.mixer."1" { + name "DMIC ECNS boost" + } + Object.Control.mixer."2" { + name "DMIC ecns_kpb_test_signal" + } + + Object.Base.input_pin_binding.1 { + input_pin_binding_name "dai-copier.DMIC.$DMIC16K_DAI_NAME.capture" + } + Object.Base.input_pin_binding.2 { + input_pin_binding_name "dai-copier.DMIC.$DMIC_WOV_DAI_NAME.capture" + } + + Object.Base.input_audio_format [ + # Pin 0: 16 kHz detection path from dmic16k (2 or 4ch per Kconfig) + { + input_pin_index 0 + in_rate 16000 + in_channels $DET16K_CHANNELS + in_ch_cfg $DET16K_CH_CFG + in_ch_map $DET16K_CH_MAP + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $ECNS_PIN0_IBS + } + # Pin 1: 48 kHz from dmic01 (2 or 4ch per DMIC_WOV_DAI_CHANNELS) + { + input_pin_index 1 + in_rate 48000 + in_channels $WOVHOST_CHANNELS + in_ch_cfg $WOVHOST_CH_CFG + in_ch_map $WOVHOST_CH_MAP + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $ECNS_PIN1_IN_IBS + } + ] + Object.Base.output_audio_format [ + # Pin 0: averaged mono clean to KPB mixin (16 kHz mono) + { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 640 + } + # Pin 1: clean to Host mixin (48 kHz, 2 or 4ch per DMIC_WOV_DAI_CHANNELS) + { + output_pin_index 1 + out_rate 48000 + out_channels $WOVHOST_CHANNELS + out_ch_cfg $WOVHOST_CH_CFG + out_ch_map $WOVHOST_CH_MAP + out_bit_depth 16 + out_valid_bit_depth 16 + obs $ECNS_PIN1_OBS + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "kpb.116.1" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "host-copier.$DMIC_ECNS_PCM_ID.capture" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 1 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 117 — ECNS Host Capture Pipeline (Core 0, LL 1ms) +# ECNS.115.1 Pin 1 (2ch stereo clean) -> Host-Copier.11 (ALSA PCM 11) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_ECNS_HOST_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 48000 + + Object.Widget.host-copier.1 { + stream_name $DMIC_ECNS_PCM_CAPS + pcm_id $DMIC_ECNS_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + capture_compatible_d0i3 true + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 48000 + in_channels $WOVHOST_CHANNELS + in_ch_cfg $WOVHOST_CH_CFG + in_ch_map $WOVHOST_CH_MAP + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 48000 + out_channels $WOVHOST_CHANNELS + out_ch_cfg $WOVHOST_CH_CFG + out_ch_map $WOVHOST_CH_MAP + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + + +# --------------------------------------------------------------------------- +# Pipeline 116 — KPB (Core 0, LL 1ms) +# ECNS.115.1 Pin 0 (1ch mono clean) -> KPB.116.1 (2000ms). KPB sel_sink feeds +# module-copier.118.1 and host_sink feed wov-arbiter.114.1, both cross-pipeline. +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_KPB_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.kpb.1 { + history_depth_ms $KPB_BUFF_TIME_MS + num_input_pins 1 + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 2 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 32 + } + ] + Object.Base.output_audio_format [ + # Pin 0: real-time feed to the detector slots + { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + # Pin 1: drain path to the WOV arbiter and the host PCM + { + output_pin_index 1 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "module-copier.118.1" + } + Object.Base.output_pin_binding.2 { + output_pin_binding_name "wov-arbiter.114.1" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 118 — WOV Copier Fanout (Core 0, LL 1ms) +# KPB.116.1 sel_sink -> module-copier.118.1 (fanout 1 -> 3 detector slots). +# The copier must live in its OWN pipeline, not KPB's: kpb_copy() returns +# PPL_STATUS_PATH_STOP which ends pipeline 116's walk, so a fanout widget +# placed in 116 downstream of KPB would never be scheduled. As an +# independently-triggered pipeline (like wov-arbiter.114), copier.118's own +# LL walk drains KPB's sel_sink cross-pipeline buffer each tick. +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_MIXIN_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.module-copier.1 { + num_input_pins 1 + num_output_pins $WOV_SLOT_COUNT + num_input_audio_formats 1 + num_output_audio_formats $WOV_SLOT_COUNT + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format { + 0 { + output_pin_index 0 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + IncludeByKey.WOV_SLOT_COUNT."^[23]$" { + 1 { + output_pin_index 1 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + } + IncludeByKey.WOV_SLOT_COUNT."^3$" { + 2 { + output_pin_index 2 + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + } + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 111 — WOV slot 0 (Core 0, 1ch mono) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_SLOT0_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.module-copier.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MFCC 101 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 101 VAD" + invert "true" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MWW 101 bytes" + max 65536 + } + enum."1" { + name "MWW 101 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 112 — WOV slot 1 (Core 0, 1ch mono) +# --------------------------------------------------------------------------- +IncludeByKey.WOV_SLOT_COUNT."^[23]$" { + Object.Pipeline."custom-capture" [ { + index $WOV_SLOT1_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.module-copier.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MFCC 102 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 102 VAD" + invert "true" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MWW 102 bytes" + max 65536 + } + enum."1" { + name "MWW 102 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } ] +} + +# --------------------------------------------------------------------------- +# Pipeline 113 — WOV slot 2 (Core 0/1, 1ch mono) +# --------------------------------------------------------------------------- +IncludeByKey.WOV_SLOT_COUNT."^3$" { + Object.Pipeline."custom-capture" [ { + index $WOV_SLOT2_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.module-copier.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.mfcc.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MFCC 103 bytes" + IncludeByKey.MWW_FEATURES { + "pcan" "include/components/mfcc/mel40_10ms_pcan_compress.conf" + "agc8" "include/components/mfcc/mel40_10ms_agc8_compress.conf" + } + } + mixer."1" { + name "MFCC 103 VAD" + invert "true" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 320 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MFCC_FRAME_BYTES + } + ] + } + + Object.Widget.mww.1 { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + scheduler_domain "DP" + + Object.Control { + bytes."1" { + name "MWW 103 bytes" + max 65536 + } + enum."1" { + name "MWW 103 Score" + + } + mixer."1" { + name "wovdebug_$index" + } + } + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs $MWW_INPUT_BYTES + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_SLOT2_CORE_ID + } + } ] +} + +# --------------------------------------------------------------------------- +# Pipeline 114 — WOV Arbiter & Host Copier 11 (Core 0, Mono Output) +# --------------------------------------------------------------------------- +Object.Pipeline."custom-capture" [ + { + index $WOV_ARB_PIPELINE_ID + format $DMIC_WOV_FORMAT + rate 16000 + + Object.Widget.wov-arbiter.1 { + uuid $WOV_ARBITER_UUID + num_input_pins "$[$WOV_SLOT_COUNT + 1]" + num_output_pins 1 + num_input_audio_formats "$[$WOV_SLOT_COUNT + 1]" + num_output_audio_formats 1 + + Object.Control.enum."1" { + name "DMIC Phrase Detect ID" + } + + Object.Base.input_pin_binding.1 { + input_pin_binding_name "kpb.116.1" + } + Object.Base.input_pin_binding.2 { + input_pin_binding_name "mww.111.1" + } + IncludeByKey.WOV_SLOT_COUNT."^[23]$" { + Object.Base.input_pin_binding.3 { + input_pin_binding_name "mww.112.1" + } + } + IncludeByKey.WOV_SLOT_COUNT."^3$" { + Object.Base.input_pin_binding.4 { + input_pin_binding_name "mww.113.1" + } + } + + Object.Base.input_audio_format { + # Pin 0: Audio from KPB host_sink (16-bit PCM, 16kHz mono) + 0 { + input_pin_index 0 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 32 + } + # Pin 1: Features from MWW slot 0 (8-bit PCAN, 16kHz mono) + 1 { + input_pin_index 1 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + # Pin 2: Features from MWW slot 1 (8-bit PCAN, 16kHz mono) + IncludeByKey.WOV_SLOT_COUNT."^[23]$" { + 2 { + input_pin_index 2 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + } + # Pin 3: Features from MWW slot 2 (8-bit PCAN, 16kHz mono) + IncludeByKey.WOV_SLOT_COUNT."^3$" { + 3 { + input_pin_index 3 + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs $MWW_INPUT_BYTES + } + } + } + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 32 + } + ] + } + + Object.Widget.host-copier.1 { + stream_name $DMIC_WOV_PCM_CAPS + pcm_id $DMIC_WOV_PCM_ID + node_type $HDA_HOST_INPUT_CLASS + direction "capture" + type "aif_out" + num_input_pins 1 + + # IPC4 reads SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 from the + # host-copier widget tuples for low-power D0i3 WoV capture across S0iX + capture_compatible_d0i3 true + + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id $WOV_CORE_ID + } + } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + # DMIC 48k (dmic01) capture to ECNS Pin 1 (48k) + { source "dai-copier.DMIC.$DMIC_WOV_DAI_NAME.capture" sink "ecns.115.1" } + + # DMIC 16k (dmic16k) capture to ECNS Pin 0 (16k) + { source "dai-copier.DMIC.$DMIC16K_DAI_NAME.capture" sink "ecns.115.1" } + + # ECNS Output Pin 0 (16k mono) direct to KPB + { source "ecns.115.1" sink "kpb.116.1" } + { source "kpb.116.1" sink "module-copier.118.1" } + + # ECNS Output Pin 1 (48k stereo) direct to Host Copier 11 + { source "ecns.115.1" sink "host-copier.$DMIC_ECNS_PCM_ID.capture" } + + # Audio path from KPB host_sink (pin 1) to WOV Arbiter audio input (pin 0) + { source "kpb.116.1" sink "wov-arbiter.114.1" } + + # Module-copier (pipeline 118) fans out directly to the three MFCC detector inputs. + { source "module-copier.118.1" sink "module-copier.111.1" } + { source "module-copier.111.1" sink "mfcc.111.1" } + { source "mfcc.111.1" sink "mww.111.1" } + { source "mww.111.1" sink "wov-arbiter.114.1" } + + # WOV Arbiter output to Host Copier 12 + { source "wov-arbiter.114.1" sink "host-copier.$DMIC_WOV_PCM_ID.capture" } +] + +IncludeByKey.WOV_SLOT_COUNT { + "^[23]$" { + Object.Base.route [ + { source "module-copier.118.1" sink "module-copier.112.1" } + { source "module-copier.112.1" sink "mfcc.112.1" } + { source "mfcc.112.1" sink "mww.112.1" } + { source "mww.112.1" sink "wov-arbiter.114.1" } + ] + } + "^3$" { + Object.Base.route [ + { source "module-copier.118.1" sink "module-copier.113.1" } + { source "module-copier.113.1" sink "mfcc.113.1" } + { source "mfcc.113.1" sink "mww.113.1" } + { source "mww.113.1" sink "wov-arbiter.114.1" } + ] + } +} + +# --------------------------------------------------------------------------- +# PCM Definitions: +# PCM 10: DMIC Raw 4ch Capture (48 kHz) +# PCM 11: ECNS Stereo Capture (48 kHz) +# PCM 12: WOV Arbiter Mono Capture (16 kHz) +# --------------------------------------------------------------------------- +Object.PCM.pcm [ + { + name "DMIC ECNS Capture" + id $DMIC_ECNS_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai.1 { + name "$DMIC_ECNS_PCM_CAPS" + } + + Object.PCM.pcm_caps.1 { + name "$DMIC_ECNS_PCM_CAPS" + formats "S16_LE" + rates "48000" + channels_min $WOVHOST_CHANNELS + channels_max $WOVHOST_CHANNELS + } + } + { + name "DMIC Multi-WOV" + id $DMIC_WOV_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai.1 { + name "$DMIC_WOV_PCM_CAPS" + } + + Object.PCM.pcm_caps.1 { + name "$DMIC_WOV_PCM_CAPS" + formats "S16_LE" + rates "16000" + channels_min 1 + channels_max 1 + } + } +] + +# Optional second WoV instance on the SoundWire headset mic (PCMs 13/14). +# Included here because it reuses the pipeline classes and UUIDs above. +IncludeByKey.INCLUDE_SDW_JACK_WOV { + "true" "platform/intel/sdw-jack-wov-multi.conf" +} diff --git a/tools/topology/topology2/production/tplg-targets-ace3.cmake b/tools/topology/topology2/production/tplg-targets-ace3.cmake index 3990f668b9d6..8ec1728efaff 100644 --- a/tools/topology/topology2/production/tplg-targets-ace3.cmake +++ b/tools/topology/topology2/production/tplg-targets-ace3.cmake @@ -367,10 +367,51 @@ BT_CP_HOST_PIPELINE_ID=201,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-ssp2-bt "cavs-sdw\;sof-ptl-ssp2-bt-id10\;PLATFORM=ptl,ADD_BT=true,SDW_JACK=false,NUM_HDMIS=0,\ HEADSET_CODEC=false,HDMI_IN_CAPTURE=false,BT_ID=10,BT_PCM_ID=20,BT_PCM_NAME=Bluetooth,\ BT_CP_HOST_PIPELINE_ID=201,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-ssp2-bt-id10.bin" + +# Multi-slot WOV topologies for PTL and WCL +"dmic-wov-multi-ptl-manifest\;sof-ptl-dmic-wov-multi\;" +"dmic-wov-multi-ptl-4ch-manifest\;sof-ptl-dmic-wov-multi-4ch\;" + +# DMIC multi-slot WoV feature topologies (always uses PDM DMICs for input) +"dmic-wov-feature\;sof-dmic-4ch-wov-multi\;PLATFORM=none,NUM_DMICS=4,DMIC0_ID=5,DMIC1_ID=6,DMIC1_ENABLE=false,DMIC1_RATE=16000,DMIC_WOV_DAI_CHANNELS=4,WOV_SLOT_COUNT=3" +"dmic-wov-feature\;sof-ptl-dmic-4ch-wov-multi\;PLATFORM=ptl,NUM_DMICS=4,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-dmic-4ch-wov-multi.bin,DMIC_WOV_DAI_CHANNELS=4,WOV_SLOT_COUNT=3" + +# Functional SoundWire topologies with integrated multi-slot WoV feature +"cavs-sdw\;sof-ptl-rt721-4ch-wov-multi\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,NUM_DMICS=4,\ +PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=5,DMIC1_ID=6,HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9,\ +SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ +SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\ +DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,DMIC_WOV_DAI_CHANNELS=4,WOV_SLOT_COUNT=3" + +"cavs-sdw\;sof-ptl-rt722-4ch-wov-multi\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,NUM_DMICS=4,\ +PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=5,DMIC1_ID=6,HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt722-4ch-wov-multi.bin,\ +SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ +SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\ +DMIC_WOV_DAI_CHANNELS=4,INCLUDE_SDW_JACK_WOV=true,WOV_SLOT_COUNT=3" + +# Same wov-multi as above but 2ch, and also have NHLT embedded for all +# cavs-sdw enables PDM1 by default, so 2ch needs explicit +# PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,DMIC_WOV_DAI_CHANNELS=2 +"cavs-sdw\;sof-ptl-rt721-2ch-wov-multi\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,NUM_DMICS=2,\ +PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,DMIC_WOV_DAI_CHANNELS=2,\ +DMIC0_ID=5,DMIC1_ID=6,HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt721-2ch-wov-multi.bin,\ +SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ +SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\ +DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,WOV_SLOT_COUNT=3" + +"cavs-sdw\;sof-ptl-rt722-2ch-wov-multi\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,NUM_DMICS=2,\ +PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,DMIC_WOV_DAI_CHANNELS=2,\ +DMIC0_ID=5,DMIC1_ID=6,HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt722-2ch-wov-multi.bin,\ +SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ +SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\ +INCLUDE_SDW_JACK_WOV=true,WOV_SLOT_COUNT=3" ) list(APPEND SYMLINKS -# WCL DMIC function topologies are identical to the PTL ones +# WCL DMIC and WoV function topologies are identical to the PTL ones "sof-wcl-dmic-2ch-id2\;sof-ptl-dmic-2ch-id2" "sof-wcl-dmic-2ch-id3\;sof-ptl-dmic-2ch-id3" "sof-wcl-dmic-2ch-id4\;sof-ptl-dmic-2ch-id4" @@ -380,4 +421,11 @@ list(APPEND SYMLINKS "sof-wcl-dmic-4ch-id4\;sof-ptl-dmic-4ch-id4" "sof-wcl-dmic-4ch-id5\;sof-ptl-dmic-4ch-id5" "sof-wcl-rt722-4ch-bt\;sof-ptl-rt722-4ch-bt" +"sof-wcl-dmic-wov-multi\;sof-ptl-dmic-wov-multi" +"sof-wcl-dmic-wov-multi-4ch\;sof-ptl-dmic-wov-multi-4ch" +"sof-wcl-dmic-4ch-wov-multi\;sof-ptl-dmic-4ch-wov-multi" +"sof-wcl-rt721-4ch-wov-multi\;sof-ptl-rt721-4ch-wov-multi" +"sof-wcl-rt721-2ch-wov-multi\;sof-ptl-rt721-2ch-wov-multi" +"sof-wcl-rt722-4ch-wov-multi\;sof-ptl-rt722-4ch-wov-multi" +"sof-wcl-rt722-2ch-wov-multi\;sof-ptl-rt722-2ch-wov-multi" ) diff --git a/tools/topology/topology2/production/tplg-targets-cavs25.cmake b/tools/topology/topology2/production/tplg-targets-cavs25.cmake index 977cc29846f1..1a37af1d77b8 100644 --- a/tools/topology/topology2/production/tplg-targets-cavs25.cmake +++ b/tools/topology/topology2/production/tplg-targets-cavs25.cmake @@ -53,4 +53,7 @@ NUM_SDW_AMP_LINKS=1,SDW_AMP_FEEDBACK=false,SDW_DMIC=1,SDW_DMIC_STREAM=Capture-Sm PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-adl-rt711-4ch.bin,\ HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6" + +# 4-Channel 16kHz Multi-slot WOV topology for TGL +"dmic-wov-multi-4ch-manifest\;sof-tgl-dmic-wov-multi-4ch\;" ) diff --git a/tools/topology/topology2/production/tplg-targets-hda-generic.cmake b/tools/topology/topology2/production/tplg-targets-hda-generic.cmake index 65f14c4f2bc9..cbcc36cb8ff1 100644 --- a/tools/topology/topology2/production/tplg-targets-hda-generic.cmake +++ b/tools/topology/topology2/production/tplg-targets-hda-generic.cmake @@ -150,4 +150,9 @@ BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\ BT_PB_HOST_PIPELINE_ID=200,BT_PB_DAI_PIPELINE_ID=201,BT_CP_HOST_PIPELINE_ID=202,BT_CP_DAI_PIPELINE_ID=203,\ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-ace3-4ch-bt.bin,DMIC0_ENHANCED_CAPTURE=true,\ EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default" + +# HDA generic with multi-slot WoV feature for ACE3 (PTL and WCL) +"sof-hda-generic\;sof-hda-generic-ace3-4ch-wov-multi\;PLATFORM=ptl,HDA_CONFIG=mix,NUM_DMICS=4,\ +PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC_WOV_DAI_CHANNELS=4,INCLUDE_WOV=multi,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-ace3-4ch.bin" ) diff --git a/tools/topology/topology2/sof-hda-generic-wov-manifest.conf b/tools/topology/topology2/sof-hda-generic-wov-manifest.conf new file mode 100644 index 000000000000..5c86a5e1b694 --- /dev/null +++ b/tools/topology/topology2/sof-hda-generic-wov-manifest.conf @@ -0,0 +1,203 @@ +Object.Base.manifest.1 { + name "sof_manifest" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Define { + HDA_CONFIG "none" + PLATFORM "none" + NUM_DMICS 0 +# doesn't it need to define DMIC0_HOST_PIPELINE_SINK and DMIC0_DAI_PIPELINE_SRC? + DMIC0_HOST_PIPELINE_SINK 'host-copier.6.capture' + DMIC0_DAI_PIPELINE_SRC 'module-copier.12.2' + DMIC0_DAI_COPIER 'dai-copier.DMIC.dmic01.capture' + DMIC0_DAI_EQIIR "highpass_40hz_20db" + DMIC0_PCM_CAPS 'Gain Capture 11' + KPB_BUFF_TIME_MS "2100" +} + +# override defaults with platform-specific config +IncludeByKey.PLATFORM { + "mtl" "platform/intel/mtl.conf" + "lnl" "platform/intel/lnl.conf" + "ptl" "platform/intel/ptl.conf" +} + +# include HDA config if needed. +IncludeByKey.HDA_CONFIG { + "mix" "cavs-mixin-mixout-hda.conf" + "efx" "cavs-mixin-mixout-efx-hda.conf" + "src" "cavs-src-mixin-mixout-hda.conf" + "dax" "cavs-mixin-mixout-dax-hda.conf" + "passthrough" "cavs-passthrough-hda.conf" +} + +# include DMIC config if needed. +IncludeByKey.NUM_DMICS { + "[1-4]" "platform/intel/dmic-generic.conf" +} + +Define { + NUM_HDMIS 3 + HDMI1_ID 1 + HDMI2_ID 2 + HDMI3_ID 3 + HDMI1_PCM_ID 3 + HDMI2_PCM_ID 4 + HDMI3_PCM_ID 5 + DMIC0_PCM_ID 6 +} + +IncludeByKey.NUM_HDMIS { +"[3-4]" "platform/intel/hdmi-generic.conf" +} + +Object.Widget.virtual [ + { + name 'codec0_in' + type input + index 1 + } + { + name 'codec1_in' + type input + index 2 + } + { + name 'codec0_out' + type output + index 3 + } + { + name 'codec1_out' + type output + index 4 + } + { + name 'codec2_in' + type input + index 5 + } + { + name 'codec2_out' + type output + index 6 + } + { + name 'iDisp1_out' + type output + index 7 + } + { + name 'iDisp2_out' + type output + index 8 + } + { + name 'iDisp3_out' + type output + index 9 + } + { + name 'iDisp3 Tx' + type out_drv + index 0 + } + { + name 'iDisp2 Tx' + type out_drv + index 1 + } + { + name 'iDisp1 Tx' + type out_drv + index 2 + } + { + name 'Analog CPU Playback' + type out_drv + index 3 + } + { + name 'Digital CPU Playback' + type out_drv + index 4 + } + { + name 'Alt Analog CPU Playback' + type out_drv + index 5 + } + { + name 'Analog CPU Capture' + type input + index 6 + } + { + name 'Digital CPU Capture' + type input + index 7 + } + { + name 'Alt Analog CPU Capture' + type input + index 8 + } +] diff --git a/tools/topology/topology2/sof-hda-generic.conf b/tools/topology/topology2/sof-hda-generic.conf index 492b10e87f30..d55fe4e857fe 100644 --- a/tools/topology/topology2/sof-hda-generic.conf +++ b/tools/topology/topology2/sof-hda-generic.conf @@ -6,6 +6,7 @@ + @@ -53,6 +54,18 @@ + + + + + + + + + + + + Define { HDA_CONFIG "none" @@ -87,6 +100,11 @@ IncludeByKey.HDA_CONFIG { "passthrough" "cavs-passthrough-hda.conf" } +# dmic1-mfcc.conf includes the mfcc class itself, a second include breaks it +IncludeByKey.INCLUDE_WOV { + "multi" "include/components/mfcc.conf" +} + # include DMIC config if needed. IncludeByKey.NUM_DMICS { "[1-4]" "platform/intel/dmic-generic.conf" diff --git a/tools/topology/topology2/ssp0-wov-multi-manifest.conf b/tools/topology/topology2/ssp0-wov-multi-manifest.conf new file mode 100644 index 000000000000..02945acdbdec --- /dev/null +++ b/tools/topology/topology2/ssp0-wov-multi-manifest.conf @@ -0,0 +1,767 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# +# Multi-KPB Wake-on-Voice topology +# +# Captures from one DMIC; audio passes through a shared KPB +# before being fanned out to three WOV detector pipelines. A single 192 KB +# KPB buffer (vs 3 × 192 KB = 576 KB in the per-slot design) serves all +# three detect_test instances. When any detector fires, the WOV arbiter +# activates that slot, pauses the other two via the SOF notifier, and drains +# audio to the single host regular PCM stream. +# +# Core assignments +# Core 0 : DMIC copier + KPB + Mixin + WOV 0 & 1 +# Core 1 : WOV 2 +# Core 0 : WOV Arbiter + Host copier +# +# Pipeline IDs used +# 100 DAI pipeline : DMIC DAI copier → KPB → Mixin +# 101 WOV pipeline : Mixout_0 → WOV_0 (Core 0) +# 102 WOV pipeline : Mixout_1 → WOV_1 (Core 0) +# 103 WOV pipeline : Mixout_2 → WOV_2 (Core 1) +# 104 Host pipeline : WOV Arbiter → Host copier (Core 0) +# +# Requires +# CONFIG_COMP_KPB=y +# CONFIG_COMP_WOV_ARBITER=y +# CONFIG_COMP_MIXIN_MIXOUT=y +# CONFIG_AMS=y +# CONFIG_COMP_KWD_DETECT (detect_test sample) + + + + + + + + + + + + +# +# detect_test UUID (keyword energy detector — fires on a hand clap in the lab) +# This matches the 'keyword' UUID registered in uuid-registry.txt. +# +Define { + KWD_TEST_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + + # WOV arbiter UUID (registered in uuid-registry.txt as 'wov_arbiter') + WOV_ARB_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + + # DMIC DAI configuration — adjust for target hardware + DMIC_DAI_INDEX 1 + DMIC_PCM_ID 11 + DMIC_NAME "dmic16k" + DMIC_PCM_CAPS "Gain Capture 11" + FORMAT "s32le" + + # Detector cycle budget — clap test requires very little compute + KWD_CPC 100000 + WOV_ARB_CPC 20000 +} + +# KPB history ring-buffer depth: 6000 ms for TGL/CAVS2.5 (6 s pre-roll). +# Omit or set to 0 to fall back to CONFIG_KPB_MAX_BUFF_TIME. +Define { + KPB_BUFF_TIME_MS "6000" +} + +# --------------------------------------------------------------------------- +# Pipeline 100: DAI BE capture pipeline (Core 0) +# DMIC DAI copier → KPB → Mixin (fan-out to 3 Mixouts in 101/102/103) +# --------------------------------------------------------------------------- +Object.Pipeline.dai-mixin-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 100 + + Object.Widget.dai-copier.1 { + dai_index 0 + type "dai_out" + dai_type "SSP" + copier_type "SSP" + stream_name "SSP0-WOV" + direction "capture" + node_type $I2S_LINK_INPUT_CLASS + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.mixin.1 { + type "mixer" + mix_type "mix_in" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.kpb.1 { + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 128 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 128 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "mixin.100.1" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 101 — WOV slot 0 (Core 0) +# Mixout_0 → WOV_0 (detect_test slot 0) → WOV Arbiter input 0 +# --------------------------------------------------------------------------- +Object.Pipeline.wov-kpb-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 101 + + Object.Widget.mixout.1 { + type "mixer" + mix_type "mix_out" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $KWD_TEST_UUID + cpc $KWD_CPC + num_output_pins 1 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 102 — WOV slot 1 (Core 0) +# Mixout_1 → WOV_1 (detect_test slot 1) → WOV Arbiter input 1 +# --------------------------------------------------------------------------- +Object.Pipeline.wov-kpb-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 102 + + Object.Widget.mixout.1 { + type "mixer" + mix_type "mix_out" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $KWD_TEST_UUID + cpc $KWD_CPC + num_output_pins 1 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 103 — WOV slot 2 (Core 1) +# Mixout_2 → WOV_2 (detect_test slot 2) → WOV Arbiter input 2 +# --------------------------------------------------------------------------- +Object.Pipeline.wov-kpb-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 103 + + Object.Widget.mixout.1 { + type "mixer" + mix_type "mix_out" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $KWD_TEST_UUID + cpc $KWD_CPC + num_output_pins 1 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + # This pipeline runs on Core 1 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 104 — Host PCM (Core 0) +# WOV Arbiter (3 inputs from KPB host sinks) → Host copier → PCM to host +# --------------------------------------------------------------------------- +Object.Pipeline.host-gateway-capture [ + { + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 104 + + Object.Widget.host-copier.1 { + stream_name $DMIC_PCM_CAPS + pcm_id $DMIC_PCM_ID + capture_compatible_d0i3 true + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget."wov-arbiter".1 { + uuid $WOV_ARB_UUID + cpc $WOV_ARB_CPC + num_input_pins 3 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.pipeline.1 { + + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +Object.Widget.virtual [ + { + name "wov0_out" + type output + index 101 + } + { + name "wov1_out" + type output + index 102 + } + { + name "wov2_out" + type output + index 103 + } + { + name "codec0_in" + type input + index 1 + } + { + name "codec1_in" + type input + index 2 + } + { + name "codec0_out" + type output + index 3 + } + { + name "codec1_out" + type output + index 4 + } + { + name "codec2_in" + type input + index 5 + } + { + name "codec2_out" + type output + index 6 + } + { + name "iDisp1_out" + type output + index 7 + } + { + name "iDisp2_out" + type output + index 8 + } + { + name "iDisp3_out" + type output + index 9 + } + { + name "iDisp3 Tx" + type out_drv + index 0 + } + { + name "iDisp2 Tx" + type out_drv + index 1 + } + { + name "iDisp1 Tx" + type out_drv + index 2 + } + { + name "Analog CPU Playback" + type out_drv + index 3 + } + { + name "Digital CPU Playback" + type out_drv + index 4 + } + { + name "Alt Analog CPU Playback" + type out_drv + index 5 + } + { + name "Analog CPU Capture" + type input + index 6 + } + { + name "Digital CPU Capture" + type input + index 7 + } + { + name "Alt Analog CPU Capture" + type input + index 8 + } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + + # DAI copier → KPB → Mixin (pipeline 100 internal) + { + source "dai-copier.SSP.SSP0-WOV.capture" + sink "kpb.100.1" + } + { + source "kpb.100.1" + sink "mixin.100.1" + } + + # Mixin fan-out → three Mixouts (one per KPB pipeline) + { + source "mixin.100.1" + sink "mixout.101.1" + } + { + source "mixin.100.1" + sink "mixout.102.1" + } + { + source "mixin.100.1" + sink "mixout.103.1" + } + + # Mixout → WOV (slot 0, no per-slot KPB; shared KPB is in pipeline 100) + { + source "mixout.101.1" + sink "wov.101.1" + } + + # WOV_0 → WOV Arbiter input 0 + { + source "wov.101.1" + sink "wov-arbiter.104.1" + } + + + + # Mixout → WOV (slot 1) + { + source "mixout.102.1" + sink "wov.102.1" + } + + # WOV_1 → WOV Arbiter input 1 + { + source "wov.102.1" + sink "wov-arbiter.104.1" + } + + + + # Mixout → WOV (slot 2) + { + source "mixout.103.1" + sink "wov.103.1" + } + + # WOV_2 → WOV Arbiter input 2 + { + source "wov.103.1" + sink "wov-arbiter.104.1" + } + + + + # WOV Arbiter → Host copier + { + source "wov-arbiter.104.1" + sink "host-copier.$DMIC_PCM_ID.capture" + } + +] + +# --------------------------------------------------------------------------- +# PCM (ALSA card definition for the single WOV capture stream) +# --------------------------------------------------------------------------- +Object.PCM.pcm."$DMIC_PCM_ID" { + name "DMIC Multi-WOV" + id $DMIC_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai."$DMIC_PCM_CAPS" {} + + Object.PCM.pcm_caps."capture" { + name $DMIC_PCM_CAPS + formats "S16_LE,S24_LE,S32_LE" + rates "16000" + channels_min 1 + channels_max 2 + } +} + + +Define { + SSP_BLOB_VERSION 0x100 +} + +Object.Dai.SSP [ + { + name "SSP0-WOV" + dai_index 0 + id 0 + direction "capture" + default_hw_conf_id 0 + sample_bits 16 + mclk_id 0 + io_clk 24576000 + + Object.Base.hw_config.1 { + id 0 + name "SSP0-WOV-HW" + mclk_freq 12288000 + bclk_freq 512000 + fsync_freq 16000 + format "I2S" + bclk "codec_consumer" + fsync "codec_consumer" + tdm_slots 2 + tdm_slot_width 16 + tx_slots 0 + rx_slots 3 + Object.Base.link_config.1 { + clock_source 1 + } + } + } +] + +Object.Base.manifest.1 { + name "sof_manifest" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +} diff --git a/tools/topology/topology2/ssp1-wov-multi-manifest.conf b/tools/topology/topology2/ssp1-wov-multi-manifest.conf new file mode 100644 index 000000000000..63b4a70053f8 --- /dev/null +++ b/tools/topology/topology2/ssp1-wov-multi-manifest.conf @@ -0,0 +1,767 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# +# Multi-KPB Wake-on-Voice topology +# +# Captures from one DMIC; audio passes through a shared KPB +# before being fanned out to three WOV detector pipelines. A single 192 KB +# KPB buffer (vs 3 × 192 KB = 576 KB in the per-slot design) serves all +# three detect_test instances. When any detector fires, the WOV arbiter +# activates that slot, pauses the other two via the SOF notifier, and drains +# audio to the single host regular PCM stream. +# +# Core assignments +# Core 0 : DMIC copier + KPB + Mixin + WOV 0 & 1 +# Core 1 : WOV 2 +# Core 0 : WOV Arbiter + Host copier +# +# Pipeline IDs used +# 100 DAI pipeline : DMIC DAI copier → KPB → Mixin +# 101 WOV pipeline : Mixout_0 → WOV_0 (Core 0) +# 102 WOV pipeline : Mixout_1 → WOV_1 (Core 0) +# 103 WOV pipeline : Mixout_2 → WOV_2 (Core 1) +# 104 Host pipeline : WOV Arbiter → Host copier (Core 0) +# +# Requires +# CONFIG_COMP_KPB=y +# CONFIG_COMP_WOV_ARBITER=y +# CONFIG_COMP_MIXIN_MIXOUT=y +# CONFIG_AMS=y +# CONFIG_COMP_KWD_DETECT (detect_test sample) + + + + + + + + + + + + +# +# detect_test UUID (keyword energy detector — fires on a hand clap in the lab) +# This matches the 'keyword' UUID registered in uuid-registry.txt. +# +Define { + KWD_TEST_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + + # WOV arbiter UUID (registered in uuid-registry.txt as 'wov_arbiter') + WOV_ARB_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + + # DMIC DAI configuration — adjust for target hardware + DMIC_DAI_INDEX 1 + DMIC_PCM_ID 11 + DMIC_NAME "dmic16k" + DMIC_PCM_CAPS "Gain Capture 11" + FORMAT "s32le" + + # Detector cycle budget — clap test requires very little compute + KWD_CPC 100000 + WOV_ARB_CPC 20000 +} + +# KPB history ring-buffer depth: 6000 ms for TGL/CAVS2.5 (6 s pre-roll). +# Omit or set to 0 to fall back to CONFIG_KPB_MAX_BUFF_TIME. +Define { + KPB_BUFF_TIME_MS "6000" +} + +# --------------------------------------------------------------------------- +# Pipeline 100: DAI BE capture pipeline (Core 0) +# DMIC DAI copier → KPB → Mixin (fan-out to 3 Mixouts in 101/102/103) +# --------------------------------------------------------------------------- +Object.Pipeline.dai-mixin-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 100 + + Object.Widget.dai-copier.1 { + dai_index 1 + type "dai_out" + dai_type "SSP" + copier_type "SSP" + stream_name "SSP1-WOV" + direction "capture" + node_type $I2S_LINK_INPUT_CLASS + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.mixin.1 { + type "mixer" + mix_type "mix_in" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.kpb.1 { + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 128 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 128 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "mixin.100.1" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 101 — WOV slot 0 (Core 0) +# Mixout_0 → WOV_0 (detect_test slot 0) → WOV Arbiter input 0 +# --------------------------------------------------------------------------- +Object.Pipeline.wov-kpb-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 101 + + Object.Widget.mixout.1 { + type "mixer" + mix_type "mix_out" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $KWD_TEST_UUID + cpc $KWD_CPC + num_output_pins 1 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 102 — WOV slot 1 (Core 0) +# Mixout_1 → WOV_1 (detect_test slot 1) → WOV Arbiter input 1 +# --------------------------------------------------------------------------- +Object.Pipeline.wov-kpb-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 102 + + Object.Widget.mixout.1 { + type "mixer" + mix_type "mix_out" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $KWD_TEST_UUID + cpc $KWD_CPC + num_output_pins 1 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 103 — WOV slot 2 (Core 1) +# Mixout_2 → WOV_2 (detect_test slot 2) → WOV Arbiter input 2 +# --------------------------------------------------------------------------- +Object.Pipeline.wov-kpb-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 103 + + Object.Widget.mixout.1 { + type "mixer" + mix_type "mix_out" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $KWD_TEST_UUID + cpc $KWD_CPC + num_output_pins 1 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + # This pipeline runs on Core 1 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 104 — Host PCM (Core 0) +# WOV Arbiter (3 inputs from KPB host sinks) → Host copier → PCM to host +# --------------------------------------------------------------------------- +Object.Pipeline.host-gateway-capture [ + { + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 104 + + Object.Widget.host-copier.1 { + stream_name $DMIC_PCM_CAPS + pcm_id $DMIC_PCM_ID + capture_compatible_d0i3 true + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget."wov-arbiter".1 { + uuid $WOV_ARB_UUID + cpc $WOV_ARB_CPC + num_input_pins 3 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.pipeline.1 { + + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +Object.Widget.virtual [ + { + name "wov0_out" + type output + index 101 + } + { + name "wov1_out" + type output + index 102 + } + { + name "wov2_out" + type output + index 103 + } + { + name "codec0_in" + type input + index 1 + } + { + name "codec1_in" + type input + index 2 + } + { + name "codec0_out" + type output + index 3 + } + { + name "codec1_out" + type output + index 4 + } + { + name "codec2_in" + type input + index 5 + } + { + name "codec2_out" + type output + index 6 + } + { + name "iDisp1_out" + type output + index 7 + } + { + name "iDisp2_out" + type output + index 8 + } + { + name "iDisp3_out" + type output + index 9 + } + { + name "iDisp3 Tx" + type out_drv + index 0 + } + { + name "iDisp2 Tx" + type out_drv + index 1 + } + { + name "iDisp1 Tx" + type out_drv + index 2 + } + { + name "Analog CPU Playback" + type out_drv + index 3 + } + { + name "Digital CPU Playback" + type out_drv + index 4 + } + { + name "Alt Analog CPU Playback" + type out_drv + index 5 + } + { + name "Analog CPU Capture" + type input + index 6 + } + { + name "Digital CPU Capture" + type input + index 7 + } + { + name "Alt Analog CPU Capture" + type input + index 8 + } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + + # DAI copier → KPB → Mixin (pipeline 100 internal) + { + source "dai-copier.SSP.SSP1-WOV.capture" + sink "kpb.100.1" + } + { + source "kpb.100.1" + sink "mixin.100.1" + } + + # Mixin fan-out → three Mixouts (one per KPB pipeline) + { + source "mixin.100.1" + sink "mixout.101.1" + } + { + source "mixin.100.1" + sink "mixout.102.1" + } + { + source "mixin.100.1" + sink "mixout.103.1" + } + + # Mixout → WOV (slot 0, no per-slot KPB; shared KPB is in pipeline 100) + { + source "mixout.101.1" + sink "wov.101.1" + } + + # WOV_0 → WOV Arbiter input 0 + { + source "wov.101.1" + sink "wov-arbiter.104.1" + } + + + + # Mixout → WOV (slot 1) + { + source "mixout.102.1" + sink "wov.102.1" + } + + # WOV_1 → WOV Arbiter input 1 + { + source "wov.102.1" + sink "wov-arbiter.104.1" + } + + + + # Mixout → WOV (slot 2) + { + source "mixout.103.1" + sink "wov.103.1" + } + + # WOV_2 → WOV Arbiter input 2 + { + source "wov.103.1" + sink "wov-arbiter.104.1" + } + + + + # WOV Arbiter → Host copier + { + source "wov-arbiter.104.1" + sink "host-copier.$DMIC_PCM_ID.capture" + } + +] + +# --------------------------------------------------------------------------- +# PCM (ALSA card definition for the single WOV capture stream) +# --------------------------------------------------------------------------- +Object.PCM.pcm."$DMIC_PCM_ID" { + name "DMIC Multi-WOV" + id $DMIC_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai."$DMIC_PCM_CAPS" {} + + Object.PCM.pcm_caps."capture" { + name $DMIC_PCM_CAPS + formats "S16_LE,S24_LE,S32_LE" + rates "16000" + channels_min 1 + channels_max 2 + } +} + + +Define { + SSP_BLOB_VERSION 0x100 +} + +Object.Dai.SSP [ + { + name "SSP1-WOV" + dai_index 1 + id 1 + direction "capture" + default_hw_conf_id 0 + sample_bits 16 + mclk_id 0 + io_clk 24576000 + + Object.Base.hw_config.1 { + id 0 + name "SSP1-WOV-HW" + mclk_freq 12288000 + bclk_freq 512000 + fsync_freq 16000 + format "I2S" + bclk "codec_consumer" + fsync "codec_consumer" + tdm_slots 2 + tdm_slot_width 16 + tx_slots 0 + rx_slots 3 + Object.Base.link_config.1 { + clock_source 1 + } + } + } +] + +Object.Base.manifest.1 { + name "sof_manifest" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +} diff --git a/tools/topology/topology2/ssp2-wov-multi-manifest.conf b/tools/topology/topology2/ssp2-wov-multi-manifest.conf new file mode 100644 index 000000000000..64ceda83bc2b --- /dev/null +++ b/tools/topology/topology2/ssp2-wov-multi-manifest.conf @@ -0,0 +1,767 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# +# Multi-KPB Wake-on-Voice topology +# +# Captures from one DMIC; audio passes through a shared KPB +# before being fanned out to three WOV detector pipelines. A single 192 KB +# KPB buffer (vs 3 × 192 KB = 576 KB in the per-slot design) serves all +# three detect_test instances. When any detector fires, the WOV arbiter +# activates that slot, pauses the other two via the SOF notifier, and drains +# audio to the single host regular PCM stream. +# +# Core assignments +# Core 0 : DMIC copier + KPB + Mixin + WOV 0 & 1 +# Core 1 : WOV 2 +# Core 0 : WOV Arbiter + Host copier +# +# Pipeline IDs used +# 100 DAI pipeline : DMIC DAI copier → KPB → Mixin +# 101 WOV pipeline : Mixout_0 → WOV_0 (Core 0) +# 102 WOV pipeline : Mixout_1 → WOV_1 (Core 0) +# 103 WOV pipeline : Mixout_2 → WOV_2 (Core 1) +# 104 Host pipeline : WOV Arbiter → Host copier (Core 0) +# +# Requires +# CONFIG_COMP_KPB=y +# CONFIG_COMP_WOV_ARBITER=y +# CONFIG_COMP_MIXIN_MIXOUT=y +# CONFIG_AMS=y +# CONFIG_COMP_KWD_DETECT (detect_test sample) + + + + + + + + + + + + +# +# detect_test UUID (keyword energy detector — fires on a hand clap in the lab) +# This matches the 'keyword' UUID registered in uuid-registry.txt. +# +Define { + KWD_TEST_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + WOV_UUID "1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67" + + # WOV arbiter UUID (registered in uuid-registry.txt as 'wov_arbiter') + WOV_ARB_UUID "7d:6c:5b:4a:9f:8e:1b:4a:2c:3d:4e:5f:60:71:82:93" + + # DMIC DAI configuration — adjust for target hardware + DMIC_DAI_INDEX 1 + DMIC_PCM_ID 11 + DMIC_NAME "dmic16k" + DMIC_PCM_CAPS "Gain Capture 11" + FORMAT "s32le" + + # Detector cycle budget — clap test requires very little compute + KWD_CPC 100000 + WOV_ARB_CPC 20000 +} + +# KPB history ring-buffer depth: 6000 ms for TGL/CAVS2.5 (6 s pre-roll). +# Omit or set to 0 to fall back to CONFIG_KPB_MAX_BUFF_TIME. +Define { + KPB_BUFF_TIME_MS "6000" +} + +# --------------------------------------------------------------------------- +# Pipeline 100: DAI BE capture pipeline (Core 0) +# DMIC DAI copier → KPB → Mixin (fan-out to 3 Mixouts in 101/102/103) +# --------------------------------------------------------------------------- +Object.Pipeline.dai-mixin-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 100 + + Object.Widget.dai-copier.1 { + dai_index 2 + type "dai_out" + dai_type "SSP" + copier_type "SSP" + stream_name "SSP2-WOV" + direction "capture" + node_type $I2S_LINK_INPUT_CLASS + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 2 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.mixin.1 { + type "mixer" + mix_type "mix_in" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Widget.kpb.1 { + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 32 + in_valid_bit_depth 32 + ibs 128 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 32 + out_valid_bit_depth 32 + obs 128 + } + ] + + Object.Base.output_pin_binding.1 { + output_pin_binding_name "mixin.100.1" + } + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 101 — WOV slot 0 (Core 0) +# Mixout_0 → WOV_0 (detect_test slot 0) → WOV Arbiter input 0 +# --------------------------------------------------------------------------- +Object.Pipeline.wov-kpb-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 101 + + Object.Widget.mixout.1 { + type "mixer" + mix_type "mix_out" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $KWD_TEST_UUID + cpc $KWD_CPC + num_output_pins 1 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 102 — WOV slot 1 (Core 0) +# Mixout_1 → WOV_1 (detect_test slot 1) → WOV Arbiter input 1 +# --------------------------------------------------------------------------- +Object.Pipeline.wov-kpb-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 102 + + Object.Widget.mixout.1 { + type "mixer" + mix_type "mix_out" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $KWD_TEST_UUID + cpc $KWD_CPC + num_output_pins 1 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 103 — WOV slot 2 (Core 1) +# Mixout_2 → WOV_2 (detect_test slot 2) → WOV Arbiter input 2 +# --------------------------------------------------------------------------- +Object.Pipeline.wov-kpb-be [ + { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 103 + + Object.Widget.mixout.1 { + type "mixer" + mix_type "mix_out" + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.wov.1 { + uuid $KWD_TEST_UUID + cpc $KWD_CPC + num_output_pins 1 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_bit_depth 16 + in_valid_bit_depth 16 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget.pipeline.1 { + priority 0 + lp_mode 0 + # This pipeline runs on Core 1 + core_id 0 + } + } +] + +# --------------------------------------------------------------------------- +# Pipeline 104 — Host PCM (Core 0) +# WOV Arbiter (3 inputs from KPB host sinks) → Host copier → PCM to host +# --------------------------------------------------------------------------- +Object.Pipeline.host-gateway-capture [ + { + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index 104 + + Object.Widget.host-copier.1 { + stream_name $DMIC_PCM_CAPS + pcm_id $DMIC_PCM_ID + capture_compatible_d0i3 true + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] + } + + Object.Widget."wov-arbiter".1 { + uuid $WOV_ARB_UUID + cpc $WOV_ARB_CPC + num_input_pins 3 + + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_rate 16000 + in_channels 1 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + in_bit_depth 16 + in_valid_bit_depth 16 + ibs 64 + } + ] + Object.Base.output_audio_format [ + { + out_rate 16000 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + out_bit_depth 16 + out_valid_bit_depth 16 + obs 64 + } + ] + } + + Object.Widget.pipeline.1 { + + priority 0 + lp_mode 0 + core_id 0 + } + } +] + +Object.Widget.virtual [ + { + name "wov0_out" + type output + index 101 + } + { + name "wov1_out" + type output + index 102 + } + { + name "wov2_out" + type output + index 103 + } + { + name "codec0_in" + type input + index 1 + } + { + name "codec1_in" + type input + index 2 + } + { + name "codec0_out" + type output + index 3 + } + { + name "codec1_out" + type output + index 4 + } + { + name "codec2_in" + type input + index 5 + } + { + name "codec2_out" + type output + index 6 + } + { + name "iDisp1_out" + type output + index 7 + } + { + name "iDisp2_out" + type output + index 8 + } + { + name "iDisp3_out" + type output + index 9 + } + { + name "iDisp3 Tx" + type out_drv + index 0 + } + { + name "iDisp2 Tx" + type out_drv + index 1 + } + { + name "iDisp1 Tx" + type out_drv + index 2 + } + { + name "Analog CPU Playback" + type out_drv + index 3 + } + { + name "Digital CPU Playback" + type out_drv + index 4 + } + { + name "Alt Analog CPU Playback" + type out_drv + index 5 + } + { + name "Analog CPU Capture" + type input + index 6 + } + { + name "Digital CPU Capture" + type input + index 7 + } + { + name "Alt Analog CPU Capture" + type input + index 8 + } +] + +# --------------------------------------------------------------------------- +# Routes +# --------------------------------------------------------------------------- +Object.Base.route [ + + # DAI copier → KPB → Mixin (pipeline 100 internal) + { + source "dai-copier.SSP.SSP2-WOV.capture" + sink "kpb.100.1" + } + { + source "kpb.100.1" + sink "mixin.100.1" + } + + # Mixin fan-out → three Mixouts (one per KPB pipeline) + { + source "mixin.100.1" + sink "mixout.101.1" + } + { + source "mixin.100.1" + sink "mixout.102.1" + } + { + source "mixin.100.1" + sink "mixout.103.1" + } + + # Mixout → WOV (slot 0, no per-slot KPB; shared KPB is in pipeline 100) + { + source "mixout.101.1" + sink "wov.101.1" + } + + # WOV_0 → WOV Arbiter input 0 + { + source "wov.101.1" + sink "wov-arbiter.104.1" + } + + + + # Mixout → WOV (slot 1) + { + source "mixout.102.1" + sink "wov.102.1" + } + + # WOV_1 → WOV Arbiter input 1 + { + source "wov.102.1" + sink "wov-arbiter.104.1" + } + + + + # Mixout → WOV (slot 2) + { + source "mixout.103.1" + sink "wov.103.1" + } + + # WOV_2 → WOV Arbiter input 2 + { + source "wov.103.1" + sink "wov-arbiter.104.1" + } + + + + # WOV Arbiter → Host copier + { + source "wov-arbiter.104.1" + sink "host-copier.$DMIC_PCM_ID.capture" + } + +] + +# --------------------------------------------------------------------------- +# PCM (ALSA card definition for the single WOV capture stream) +# --------------------------------------------------------------------------- +Object.PCM.pcm."$DMIC_PCM_ID" { + name "DMIC Multi-WOV" + id $DMIC_PCM_ID + direction "capture" + capture_compatible_d0i3 true + + Object.Base.fe_dai."$DMIC_PCM_CAPS" {} + + Object.PCM.pcm_caps."capture" { + name $DMIC_PCM_CAPS + formats "S16_LE,S24_LE,S32_LE" + rates "16000" + channels_min 1 + channels_max 2 + } +} + + +Define { + SSP_BLOB_VERSION 0x100 +} + +Object.Dai.SSP [ + { + name "SSP2-WOV" + dai_index 2 + id 2 + direction "capture" + default_hw_conf_id 0 + sample_bits 16 + mclk_id 0 + io_clk 24576000 + + Object.Base.hw_config.1 { + id 0 + name "SSP2-WOV-HW" + mclk_freq 12288000 + bclk_freq 512000 + fsync_freq 16000 + format "I2S" + bclk "codec_consumer" + fsync "codec_consumer" + tdm_slots 2 + tdm_slot_width 16 + tx_slots 0 + rx_slots 3 + Object.Base.link_config.1 { + clock_source 1 + } + } + } +] + +Object.Base.manifest.1 { + name "sof_manifest" + Object.Base.data.1 { + name "SOF ABI" + bytes "0x03,0x00,0x1d,0x00,0x01,0x00" + } +}