13
13
#include <linux/soundwire/sdw.h>
14
14
#include <linux/soundwire/sdw_type.h>
15
15
#include <linux/soundwire/sdw_intel.h>
16
+ #include <sound/core.h>
16
17
#include <sound/soc-acpi.h>
17
18
#include "sof_sdw_common.h"
18
19
#include "../../codecs/rt711.h"
@@ -748,9 +749,36 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
748
749
},
749
750
.driver_data = (void * )(SOC_SDW_PCH_DMIC ),
750
751
},
752
+ {
753
+ .callback = sof_sdw_quirk_cb ,
754
+ .matches = {
755
+ DMI_MATCH (DMI_SYS_VENDOR , "Google" ),
756
+ DMI_MATCH (DMI_PRODUCT_NAME , "Fatcat" ),
757
+ },
758
+ .driver_data = (void * )(SOC_SDW_PCH_DMIC |
759
+ SOF_BT_OFFLOAD_SSP (2 ) |
760
+ SOF_SSP_BT_OFFLOAD_PRESENT ),
761
+ },
762
+ {}
763
+ };
764
+
765
+ static const struct snd_pci_quirk sof_sdw_ssid_quirk_table [] = {
766
+ SND_PCI_QUIRK (0x1043 , 0x1e13 , "ASUS Zenbook S14" , SOC_SDW_CODEC_MIC ),
751
767
{}
752
768
};
753
769
770
+ static void sof_sdw_check_ssid_quirk (const struct snd_soc_acpi_mach * mach )
771
+ {
772
+ const struct snd_pci_quirk * quirk_entry ;
773
+
774
+ quirk_entry = snd_pci_quirk_lookup_id (mach -> mach_params .subsystem_vendor ,
775
+ mach -> mach_params .subsystem_device ,
776
+ sof_sdw_ssid_quirk_table );
777
+
778
+ if (quirk_entry )
779
+ sof_sdw_quirk = quirk_entry -> value ;
780
+ }
781
+
754
782
static struct snd_soc_dai_link_component platform_component [] = {
755
783
{
756
784
/* name might be overridden during probe */
@@ -1278,6 +1306,13 @@ static int mc_probe(struct platform_device *pdev)
1278
1306
1279
1307
snd_soc_card_set_drvdata (card , ctx );
1280
1308
1309
+ if (mach -> mach_params .subsystem_id_set ) {
1310
+ snd_soc_card_set_pci_ssid (card ,
1311
+ mach -> mach_params .subsystem_vendor ,
1312
+ mach -> mach_params .subsystem_device );
1313
+ sof_sdw_check_ssid_quirk (mach );
1314
+ }
1315
+
1281
1316
dmi_check_system (sof_sdw_quirk_table );
1282
1317
1283
1318
if (quirk_override != -1 ) {
@@ -1293,12 +1328,6 @@ static int mc_probe(struct platform_device *pdev)
1293
1328
for (i = 0 ; i < ctx -> codec_info_list_count ; i ++ )
1294
1329
codec_info_list [i ].amp_num = 0 ;
1295
1330
1296
- if (mach -> mach_params .subsystem_id_set ) {
1297
- snd_soc_card_set_pci_ssid (card ,
1298
- mach -> mach_params .subsystem_vendor ,
1299
- mach -> mach_params .subsystem_device );
1300
- }
1301
-
1302
1331
ret = sof_card_dai_links_create (card );
1303
1332
if (ret < 0 )
1304
1333
return ret ;
0 commit comments