Skip to content

Commit ec0ec0d

Browse files
committed
ASoC: apple: aop: Add module parameter to check mics without beamforming
Keep this parameter only until all devices have user-space bits in place. Enable mics despite of this via `snd_soc_aop.mic_check_123=1` at module load time, for example bey specifying it in the kernel command line. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent c2718ba commit ec0ec0d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

sound/soc/apple/aop_audio.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,10 @@ impl platform::Driver for SndSocAopDriver {
678678
let fwnode = parent_fwnode
679679
.get_child_by_name(c_str!("audio"))
680680
.ok_or(EIO)?;
681+
let audio = *module_parameters::mic_check_123.value() != 0;
682+
if !audio && parent_fwnode.property_present(c_str!("apple,no-beamforming")) {
683+
return Err(ENODEV);
684+
}
681685
let data = SndSocAopData::new(dev, adata, svc, fwnode)?;
682686
for dev in [AUDIO_DEV_PDM0, AUDIO_DEV_HPAI, AUDIO_DEV_LPAI] {
683687
data.audio_attach_device(dev)?;
@@ -695,4 +699,10 @@ module_platform_driver! {
695699
description: "AOP microphone capture driver",
696700
license: "Dual MIT/GPL",
697701
alias: ["platform:snd_soc_apple_aop"],
702+
params: {
703+
mic_check_123: u8 {
704+
default: 0,
705+
description: "Enable mics without user space handling",
706+
},
707+
},
698708
}

0 commit comments

Comments
 (0)