Skip to content

Commit eb13080

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 32f2928 commit eb13080

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
@@ -664,6 +664,10 @@ impl platform::Driver for SndSocAopDriver {
664664
.ok_or(EIO)?
665665
.get_child_by_name(c_str!("audio"))
666666
.ok_or(EIO)?;
667+
let audio = *module_parameters::mic_check_123.get() != 0;
668+
if !audio && of.property_present(c_str!("apple,no-beamforming")) {
669+
return Err(ENODEV);
670+
}
667671
let data = SndSocAopData::new(dev, adata, svc, of)?;
668672
for dev in [AUDIO_DEV_PDM0, AUDIO_DEV_HPAI, AUDIO_DEV_LPAI] {
669673
data.audio_attach_device(dev)?;
@@ -680,4 +684,10 @@ module_platform_driver! {
680684
name: "snd_soc_apple_aop",
681685
license: "Dual MIT/GPL",
682686
alias: ["platform:snd_soc_apple_aop"],
687+
params: {
688+
mic_check_123: u8 {
689+
default: 0,
690+
description: "Enable mics without user space handling",
691+
},
692+
},
683693
}

0 commit comments

Comments
 (0)