File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -551,18 +551,34 @@ static int acp6x_probe(struct platform_device *pdev)
551
551
struct acp6x_pdm * machine = NULL ;
552
552
struct snd_soc_card * card ;
553
553
struct acpi_device * adev ;
554
+ acpi_handle handle ;
555
+ acpi_integer dmic_status ;
554
556
int ret ;
557
+ bool is_dmic_enable , wov_en ;
555
558
559
+ /* IF WOV entry not found, enable dmic based on AcpDmicConnected entry*/
560
+ is_dmic_enable = false;
561
+ wov_en = true;
556
562
/* check the parent device's firmware node has _DSD or not */
557
563
adev = ACPI_COMPANION (pdev -> dev .parent );
558
564
if (adev ) {
559
565
const union acpi_object * obj ;
560
566
561
567
if (!acpi_dev_get_property (adev , "AcpDmicConnected" , ACPI_TYPE_INTEGER , & obj ) &&
562
568
obj -> integer .value == 1 )
563
- platform_set_drvdata ( pdev , & acp6x_card ) ;
569
+ is_dmic_enable = true ;
564
570
}
565
571
572
+ handle = ACPI_HANDLE (pdev -> dev .parent );
573
+ ret = acpi_evaluate_integer (handle , "_WOV" , NULL , & dmic_status );
574
+ if (!ACPI_FAILURE (ret ))
575
+ wov_en = dmic_status ;
576
+
577
+ if (is_dmic_enable && wov_en )
578
+ platform_set_drvdata (pdev , & acp6x_card );
579
+ else
580
+ return 0 ;
581
+
566
582
/* check for any DMI overrides */
567
583
dmi_id = dmi_first_match (yc_acp_quirk_table );
568
584
if (dmi_id )
You can’t perform that action at this time.
0 commit comments