Skip to content

Commit 45d943f

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 740aaaf commit 45d943f

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
@@ -681,6 +681,10 @@ impl platform::Driver for SndSocAopDriver {
681681
let fwnode = parent_fwnode
682682
.get_child_by_name(c_str!("audio"))
683683
.ok_or(EIO)?;
684+
let audio = *module_parameters::mic_check_123.value() != 0;
685+
if !audio && parent_fwnode.property_present(c_str!("apple,no-beamforming")) {
686+
return Err(ENODEV);
687+
}
684688
let data = SndSocAopData::new(dev, adata, svc, fwnode)?;
685689
for dev in [AUDIO_DEV_PDM0, AUDIO_DEV_HPAI, AUDIO_DEV_LPAI] {
686690
data.audio_attach_device(dev)?;
@@ -698,4 +702,10 @@ module_platform_driver! {
698702
description: "AOP microphone capture driver",
699703
license: "Dual MIT/GPL",
700704
alias: ["platform:snd_soc_apple_aop"],
705+
params: {
706+
mic_check_123: u8 {
707+
default: 0,
708+
description: "Enable mics without user space handling",
709+
},
710+
},
701711
}

0 commit comments

Comments
 (0)