Skip to content

Commit a020741

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 8722340 commit a020741

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

sound/soc/apple/aop_audio.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,14 @@ 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
669+
&& pdev
670+
.as_ref()
671+
.property_present(c_str!("apple,no-beamforming"))
672+
{
673+
return Err(ENODEV);
674+
}
667675
let data = SndSocAopData::new(dev, adata, svc, of)?;
668676
for dev in [AUDIO_DEV_PDM0, AUDIO_DEV_HPAI, AUDIO_DEV_LPAI] {
669677
data.audio_attach_device(dev)?;
@@ -680,4 +688,10 @@ module_platform_driver! {
680688
name: "snd_soc_apple_aop",
681689
license: "Dual MIT/GPL",
682690
alias: ["platform:snd_soc_apple_aop"],
691+
params: {
692+
mic_check_123: u8 {
693+
default: 0,
694+
description: "Enable mics without user space handling",
695+
},
696+
},
683697
}

0 commit comments

Comments
 (0)