Skip to content

Commit 658f055

Browse files
committed
audio: microwakeword: swap hi intel and orange default slots
With IPC4 the kernel assigns its own pipeline IDs, so the MWW slot is derived from the module instance ID. A topology with a single detector gets instance 0 and slot 2, which selected the orange model. The single-slot SoundWire and NoCodec WoV topologies are meant to detect "hi intel". For SOF v2.15.1, swap the default models of slots 1 and 2 so that slot 2 uses hi intel and slot 1 uses orange. The three-slot DMIC topology still loads all three models, but the Phrase Detect ID control now reports Slot 2 for orange and Slot 3 for hi intel. A proper fix is to select the model from topology data instead of the instance ID. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent a2a2271 commit 658f055

5 files changed

Lines changed: 24 additions & 19 deletions

File tree

‎doc/developer_guides/wov_ecns_integration_guide.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ The `wov_arbiter` component synchronizes multi-slot pipelines and multiplexes de
305305
sequenceDiagram
306306
autonumber
307307
participant WOV0 as WOV Slot 0 (Strawberry)
308-
participant WOV1 as WOV Slot 1 (Hi Intel)
308+
participant WOV1 as WOV Slot 1 (Orange)
309309
participant KPB as KPB (Pipeline 106)
310310
participant ARB as WOV Arbiter (Pipeline 104)
311311
participant HOST as Linux ALSA Driver (PCM 11)

‎src/audio/microwakeword/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ config COMP_MWW_MODEL_PIPELINE_ID
6060
bool "Select model via pipeline ID"
6161
help
6262
Select model dynamically based on pipeline/slot ID (slot 0: strawberry,
63-
slot 1: hi_intel, slot 2: orange). All default models from available
63+
slot 1: orange, slot 2: hi_intel). All default models from available
6464
header files are built into the firmware image.
6565

6666
config COMP_MWW_MODEL_HI_INTEL

‎src/audio/microwakeword/README.md‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ outputting a single sigmoid wake-word probability per keyword model.
1111

1212
In this architecture, **one unified codebase** supports **three concurrent keyword spotter instances**:
1313
- **Slot 0** (Pipeline 101): `"strawberry"`
14-
- **Slot 1** (Pipeline 102): `"hi intel"`
15-
- **Slot 2** (Pipeline 103): `"orange"`
14+
- **Slot 1** (Pipeline 102): `"orange"`
15+
- **Slot 2** (Pipeline 103): `"hi intel"`
1616

1717
---
1818

@@ -47,17 +47,17 @@ graph TD
4747
MO101 --> MFCC0 --> MWW0
4848
end
4949
50-
subgraph P102["Pipeline 102 — Slot 1: 'hi intel' (Core 0, DP 10ms)"]
50+
subgraph P102["Pipeline 102 — Slot 1: 'orange' (Core 0, DP 10ms)"]
5151
MO102["mixout 102.1"]
5252
MFCC1["mfcc.102.1\n(Mel-40 10ms PCAN Compress)\nIBS: 320B | OBS: 64B"]
53-
MWW1["mww.102.1\n(microWakeWord)\nModel: 'hi intel'"]
53+
MWW1["mww.102.1\n(microWakeWord)\nModel: 'orange'"]
5454
MO102 --> MFCC1 --> MWW1
5555
end
5656
57-
subgraph P103["Pipeline 103 — Slot 2: 'orange' (Core 0, DP 10ms)"]
57+
subgraph P103["Pipeline 103 — Slot 2: 'hi intel' (Core 0, DP 10ms)"]
5858
MO103["mixout 103.1"]
5959
MFCC2["mfcc.103.1\n(Mel-40 10ms PCAN Compress)\nIBS: 320B | OBS: 64B"]
60-
MWW2["mww.103.1\n(microWakeWord)\nModel: 'orange'"]
60+
MWW2["mww.103.1\n(microWakeWord)\nModel: 'hi intel'"]
6161
MO103 --> MFCC2 --> MWW2
6262
end
6363
@@ -150,8 +150,12 @@ This guarantees deterministic execution, avoids heap fragmentation, and ensures
150150
### 3. Keyword Model Dispatch
151151
Default built-in models are bound automatically by slot/pipeline index when using `CONFIG_COMP_MWW_MODEL_PIPELINE_ID` (default):
152152
- **Slot 0** (`pipeline_id == 101`): `mww_model_data_strawberry`
153-
- **Slot 1** (`pipeline_id == 102`): `mww_model_data_hi_intel`
154-
- **Slot 2** (`pipeline_id == 103`): `mww_model_data_orange`
153+
- **Slot 1** (`pipeline_id == 102`): `mww_model_data_orange`
154+
- **Slot 2** (`pipeline_id == 103`): `mww_model_data_hi_intel`
155+
156+
With IPC4 the kernel assigns its own pipeline IDs, so the slot is derived from
157+
the MWW instance ID instead. A topology with a single detector gets slot 2 and
158+
the "hi intel" model.
155159

156160
Alternatively, a single built-in model can be forced via Kconfig (`CONFIG_COMP_MWW_MODEL_HI_INTEL`, `CONFIG_COMP_MWW_MODEL_HEY_JARVIS`, `CONFIG_COMP_MWW_MODEL_STRAWBERRY`, `CONFIG_COMP_MWW_MODEL_ORANGE`, or `CONFIG_COMP_MWW_MODEL_BANANA`), omitting all other models from the build to reduce firmware image size.
157161

@@ -191,7 +195,7 @@ The arbiter exposes a volatile read-only ALSA enum kcontrol:
191195
amixer -c 0 cget name='DMIC Phrase Detect ID'
192196
# For SDW Headset WoV:
193197
amixer -c 0 cget name='Jack In Phrase Detect ID'
194-
# Values: 0 = Listening, 1 = Slot 1 ("strawberry"), 2 = Slot 2 ("hi intel"), 3 = Slot 3 ("orange")
198+
# Values: 0 = Listening, 1 = Slot 1 ("strawberry"), 2 = Slot 2 ("orange"), 3 = Slot 3 ("hi intel")
195199
```
196200

197201
### 2. Audio Capture Endpoints

‎src/audio/microwakeword/mww_model.cc‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,14 @@ const unsigned char *MWW_GetDefaultModel(uint8_t slot_id, size_t *size)
201201
return mww_model_data_strawberry;
202202
case 1:
203203
if (size)
204-
*size = mww_model_data_hi_intel_size;
205-
return mww_model_data_hi_intel;
204+
*size = mww_model_data_orange_size;
205+
return mww_model_data_orange;
206206
case 2:
207207
default:
208+
/* a lone detector gets slot 2 from its IPC4 instance ID 0 */
208209
if (size)
209-
*size = mww_model_data_orange_size;
210-
return mww_model_data_orange;
210+
*size = mww_model_data_hi_intel_size;
211+
return mww_model_data_hi_intel;
211212
}
212213
#endif
213214
}

‎tools/topology/topology2/README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,17 +544,17 @@ graph TD
544544
MO101 --> MFCC0 --> MWW0
545545
end
546546
547-
subgraph P102["Pipeline 102 — Slot 1: 'hi intel' (Core 0, DP 10ms)"]
547+
subgraph P102["Pipeline 102 — Slot 1: 'orange' (Core 0, DP 10ms)"]
548548
MO102["mixout 102.1"]
549549
MFCC1["mfcc.102.1\n(Mel-40 10ms Compress)\nIBS: 320B | OBS: 184B"]
550-
MWW1["mww.102.1\n(microWakeWord)\nModel: 'hi intel'"]
550+
MWW1["mww.102.1\n(microWakeWord)\nModel: 'orange'"]
551551
MO102 --> MFCC1 --> MWW1
552552
end
553553
554-
subgraph P103["Pipeline 103 — Slot 2: 'orange' (Core 0, DP 10ms)"]
554+
subgraph P103["Pipeline 103 — Slot 2: 'hi intel' (Core 0, DP 10ms)"]
555555
MO103["mixout 103.1"]
556556
MFCC2["mfcc.103.1\n(Mel-40 10ms Compress)\nIBS: 320B | OBS: 184B"]
557-
MWW2["mww.103.1\n(microWakeWord)\nModel: 'orange'"]
557+
MWW2["mww.103.1\n(microWakeWord)\nModel: 'hi intel'"]
558558
MO103 --> MFCC2 --> MWW2
559559
end
560560

0 commit comments

Comments
 (0)