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)
551551 struct acp6x_pdm * machine = NULL ;
552552 struct snd_soc_card * card ;
553553 struct acpi_device * adev ;
554+ acpi_handle handle ;
555+ acpi_integer dmic_status ;
554556 int ret ;
557+ bool is_dmic_enable , wov_en ;
555558
559+ /* IF WOV entry not found, enable dmic based on AcpDmicConnected entry*/
560+ is_dmic_enable = false;
561+ wov_en = true;
556562 /* check the parent device's firmware node has _DSD or not */
557563 adev = ACPI_COMPANION (pdev -> dev .parent );
558564 if (adev ) {
559565 const union acpi_object * obj ;
560566
561567 if (!acpi_dev_get_property (adev , "AcpDmicConnected" , ACPI_TYPE_INTEGER , & obj ) &&
562568 obj -> integer .value == 1 )
563- platform_set_drvdata ( pdev , & acp6x_card ) ;
569+ is_dmic_enable = true ;
564570 }
565571
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+
566582 /* check for any DMI overrides */
567583 dmi_id = dmi_first_match (yc_acp_quirk_table );
568584 if (dmi_id )
You can’t perform that action at this time.
0 commit comments