File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -796,6 +796,28 @@ static int avs_component_probe(struct snd_soc_component *component)
796
796
797
797
ret = avs_load_topology (component , filename );
798
798
kfree (filename );
799
+ if (ret == - ENOENT && !strncmp (mach -> tplg_filename , "hda-" , 4 )) {
800
+ unsigned int vendor_id ;
801
+
802
+ if (sscanf (mach -> tplg_filename , "hda-%08x-tplg.bin" , & vendor_id ) != 1 )
803
+ return ret ;
804
+
805
+ if (((vendor_id >> 16 ) & 0xFFFF ) == 0x8086 )
806
+ mach -> tplg_filename = devm_kasprintf (adev -> dev , GFP_KERNEL ,
807
+ "hda-8086-generic-tplg.bin" );
808
+ else
809
+ mach -> tplg_filename = devm_kasprintf (adev -> dev , GFP_KERNEL ,
810
+ "hda-generic-tplg.bin" );
811
+
812
+ filename = kasprintf (GFP_KERNEL , "%s/%s" , component -> driver -> topology_name_prefix ,
813
+ mach -> tplg_filename );
814
+ if (!filename )
815
+ return - ENOMEM ;
816
+
817
+ dev_info (card -> dev , "trying to load fallback topology %s\n" , mach -> tplg_filename );
818
+ ret = avs_load_topology (component , filename );
819
+ kfree (filename );
820
+ }
799
821
if (ret < 0 )
800
822
return ret ;
801
823
You can’t perform that action at this time.
0 commit comments