@@ -6580,6 +6580,37 @@ static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_
6580
6580
}
6581
6581
}
6582
6582
6583
+ static void cs35l41_generic_fixup (struct hda_codec * cdc , int action , const char * bus ,
6584
+ const char * hid , int count )
6585
+ {
6586
+ struct device * dev = hda_codec_dev (cdc );
6587
+ struct alc_spec * spec = cdc -> spec ;
6588
+ char * name ;
6589
+ int ret , i ;
6590
+
6591
+ switch (action ) {
6592
+ case HDA_FIXUP_ACT_PRE_PROBE :
6593
+ for (i = 0 ; i < count ; i ++ ) {
6594
+ name = devm_kasprintf (dev , GFP_KERNEL ,
6595
+ "%s-%s:00-cs35l41-hda.%d" , bus , hid , i );
6596
+ if (!name )
6597
+ return ;
6598
+ component_match_add (dev , & spec -> match , comp_match_dev_name , name );
6599
+ }
6600
+ ret = component_master_add_with_match (dev , & comp_master_ops , spec -> match );
6601
+ if (ret )
6602
+ codec_err (cdc , "Fail to register component aggregator %d\n" , ret );
6603
+ else
6604
+ spec -> gen .pcm_playback_hook = comp_generic_playback_hook ;
6605
+ break ;
6606
+ }
6607
+ }
6608
+
6609
+ static void cs35l41_fixup_i2c_two (struct hda_codec * cdc , const struct hda_fixup * fix , int action )
6610
+ {
6611
+ cs35l41_generic_fixup (cdc , action , "i2c" , "CSC3551" , 2 );
6612
+ }
6613
+
6583
6614
static void alc287_legion_16achg6_playback_hook (struct hda_pcm_stream * hinfo , struct hda_codec * cdc ,
6584
6615
struct snd_pcm_substream * sub , int action )
6585
6616
{
@@ -6916,6 +6947,7 @@ enum {
6916
6947
ALC285_FIXUP_LEGION_Y9000X_SPEAKERS ,
6917
6948
ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE ,
6918
6949
ALC287_FIXUP_LEGION_16ACHG6 ,
6950
+ ALC287_FIXUP_CS35L41_I2C_2 ,
6919
6951
};
6920
6952
6921
6953
static const struct hda_fixup alc269_fixups [] = {
@@ -8662,6 +8694,10 @@ static const struct hda_fixup alc269_fixups[] = {
8662
8694
.type = HDA_FIXUP_FUNC ,
8663
8695
.v .func = alc287_fixup_legion_16achg6_speakers ,
8664
8696
},
8697
+ [ALC287_FIXUP_CS35L41_I2C_2 ] = {
8698
+ .type = HDA_FIXUP_FUNC ,
8699
+ .v .func = cs35l41_fixup_i2c_two ,
8700
+ },
8665
8701
};
8666
8702
8667
8703
static const struct snd_pci_quirk alc269_fixup_tbl [] = {
@@ -9059,6 +9095,9 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
9059
9095
SND_PCI_QUIRK (0x17aa , 0x22be , "Thinkpad X1 Carbon 8th" , ALC285_FIXUP_THINKPAD_HEADSET_JACK ),
9060
9096
SND_PCI_QUIRK (0x17aa , 0x22c1 , "Thinkpad P1 Gen 3" , ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK ),
9061
9097
SND_PCI_QUIRK (0x17aa , 0x22c2 , "Thinkpad X1 Extreme Gen 3" , ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK ),
9098
+ SND_PCI_QUIRK (0x17aa , 0x22f1 , "Thinkpad" , ALC287_FIXUP_CS35L41_I2C_2 ),
9099
+ SND_PCI_QUIRK (0x17aa , 0x22f2 , "Thinkpad" , ALC287_FIXUP_CS35L41_I2C_2 ),
9100
+ SND_PCI_QUIRK (0x17aa , 0x22f3 , "Thinkpad" , ALC287_FIXUP_CS35L41_I2C_2 ),
9062
9101
SND_PCI_QUIRK (0x17aa , 0x30bb , "ThinkCentre AIO" , ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY ),
9063
9102
SND_PCI_QUIRK (0x17aa , 0x30e2 , "ThinkCentre AIO" , ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY ),
9064
9103
SND_PCI_QUIRK (0x17aa , 0x310c , "ThinkCentre Station" , ALC294_FIXUP_LENOVO_MIC_LOCATION ),
0 commit comments