Skip to content

Commit ae3ffb2

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 <[email protected]>
1 parent 92b3951 commit ae3ffb2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sound/soc/apple/aop_audio.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,10 @@ impl platform::Driver for SndSocAopDriver {
674674
.ok_or(EIO)?
675675
.get_child_by_name(c_str!("audio"))
676676
.ok_or(EIO)?;
677+
let audio = *module_parameters::mic_check_123.get() != 0;
678+
if !audio && of.property_present(c_str!("apple,no-beamforming")) {
679+
return Err(ENODEV);
680+
}
677681
let data = SndSocAopData::new(dev, adata, svc, of)?;
678682
for dev in [AUDIO_DEV_PDM0, AUDIO_DEV_HPAI, AUDIO_DEV_LPAI] {
679683
data.audio_attach_device(dev)?;
@@ -690,4 +694,10 @@ module_platform_driver! {
690694
name: "snd_soc_apple_aop",
691695
license: "Dual MIT/GPL",
692696
alias: ["platform:snd_soc_apple_aop"],
697+
params: {
698+
mic_check_123: u8 {
699+
default: 0,
700+
description: "Enable mics without user space handling",
701+
},
702+
},
693703
}

0 commit comments

Comments
 (0)