Re: [PATCH] ASoC: amd: add logic to check dmic hardware runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 23. 06. 20 v 22:27 Vijendar Mukunda napsal(a):
Add logic to check DMIC hardware exists or not on
the platform at runtime.

Add module param for overriding DMIC hardware check
at runtime.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
---
  sound/soc/amd/renoir/rn-pci-acp3x.c | 29 +++++++++++++++++++++++++++++
  sound/soc/amd/renoir/rn_acp3x.h     |  2 ++
  2 files changed, 31 insertions(+)

diff --git a/sound/soc/amd/renoir/rn-pci-acp3x.c b/sound/soc/amd/renoir/rn-pci-acp3x.c
index 859ed67..faa7566 100644
--- a/sound/soc/amd/renoir/rn-pci-acp3x.c
+++ b/sound/soc/amd/renoir/rn-pci-acp3x.c
@@ -5,6 +5,7 @@
  //Copyright 2020 Advanced Micro Devices, Inc.
#include <linux/pci.h>
+#include <linux/acpi.h>
  #include <linux/module.h>
  #include <linux/io.h>
  #include <linux/delay.h>
@@ -18,6 +19,16 @@ static int acp_power_gating;
  module_param(acp_power_gating, int, 0644);
  MODULE_PARM_DESC(acp_power_gating, "Enable acp power gating");
+/**
+ * dmic_acpi_check = -1 - Checks ACPI method to know DMIC hardware status runtime
+ *                 = 0 - Skips the DMIC device creation and returns probe failure
+ *                 = 1 - Assumes that platform has DMIC support and skips ACPI
+ *                       method check
+ */
+static int dmic_acpi_check = ACP_DMIC_AUTO;
+module_param(dmic_acpi_check, int, 0644);

I think that Takashi suggested the bint (boolean/integer type here):

  module_param(dmic_acpi_check, bint, 0644);

					Jaroslav

--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux