@@ -727,6 +727,7 @@ struct ca0132_spec {
727
727
hda_nid_t shared_mic_nid ;
728
728
hda_nid_t shared_out_nid ;
729
729
hda_nid_t unsol_tag_hp ;
730
+ hda_nid_t unsol_tag_front_hp ; /* for desktop ca0132 codecs */
730
731
hda_nid_t unsol_tag_amic1 ;
731
732
732
733
/* chip access */
@@ -789,6 +790,36 @@ static const struct hda_pintbl alienware_pincfgs[] = {
789
790
{}
790
791
};
791
792
793
+ /* Sound Blaster Z pin configs taken from Windows Driver */
794
+ static const struct hda_pintbl sbz_pincfgs [] = {
795
+ { 0x0b , 0x01017010 }, /* Port G -- Lineout FRONT L/R */
796
+ { 0x0c , 0x014510f0 }, /* SPDIF Out 1 */
797
+ { 0x0d , 0x014510f0 }, /* Digital Out */
798
+ { 0x0e , 0x01c510f0 }, /* SPDIF In */
799
+ { 0x0f , 0x0221701f }, /* Port A -- BackPanel HP */
800
+ { 0x10 , 0x01017012 }, /* Port D -- Center/LFE or FP Hp */
801
+ { 0x11 , 0x01017014 }, /* Port B -- LineMicIn2 / Rear L/R */
802
+ { 0x12 , 0x01a170f0 }, /* Port C -- LineIn1 */
803
+ { 0x13 , 0x908700f0 }, /* What U Hear In*/
804
+ { 0x18 , 0x50d000f0 }, /* N/A */
805
+ {}
806
+ };
807
+
808
+ /* Recon3D integrated pin configs taken from Windows Driver */
809
+ static const struct hda_pintbl r3di_pincfgs [] = {
810
+ { 0x0b , 0x01014110 }, /* Port G -- Lineout FRONT L/R */
811
+ { 0x0c , 0x014510f0 }, /* SPDIF Out 1 */
812
+ { 0x0d , 0x014510f0 }, /* Digital Out */
813
+ { 0x0e , 0x41c520f0 }, /* SPDIF In */
814
+ { 0x0f , 0x0221401f }, /* Port A -- BackPanel HP */
815
+ { 0x10 , 0x01016011 }, /* Port D -- Center/LFE or FP Hp */
816
+ { 0x11 , 0x01011014 }, /* Port B -- LineMicIn2 / Rear L/R */
817
+ { 0x12 , 0x02a090f0 }, /* Port C -- LineIn1 */
818
+ { 0x13 , 0x908700f0 }, /* What U Hear In*/
819
+ { 0x18 , 0x500000f0 }, /* N/A */
820
+ {}
821
+ };
822
+
792
823
static const struct snd_pci_quirk ca0132_quirks [] = {
793
824
SND_PCI_QUIRK (0x1028 , 0x0685 , "Alienware 15 2015" , QUIRK_ALIENWARE ),
794
825
SND_PCI_QUIRK (0x1028 , 0x0688 , "Alienware 17 2015" , QUIRK_ALIENWARE ),
@@ -4507,6 +4538,10 @@ static void ca0132_init_unsol(struct hda_codec *codec)
4507
4538
amic_callback );
4508
4539
snd_hda_jack_detect_enable_callback (codec , UNSOL_TAG_DSP ,
4509
4540
ca0132_process_dsp_response );
4541
+ /* Front headphone jack detection */
4542
+ if (spec -> quirk == QUIRK_SBZ || spec -> quirk == QUIRK_R3DI )
4543
+ snd_hda_jack_detect_enable_callback (codec ,
4544
+ spec -> unsol_tag_front_hp , hp_callback );
4510
4545
}
4511
4546
4512
4547
/*
@@ -4688,9 +4723,14 @@ static void ca0132_config(struct hda_codec *codec)
4688
4723
4689
4724
spec -> multiout .dac_nids = spec -> dacs ;
4690
4725
spec -> multiout .num_dacs = 3 ;
4691
- spec -> multiout .max_channels = 2 ;
4692
4726
4693
- if (spec -> quirk == QUIRK_ALIENWARE ) {
4727
+ if (spec -> quirk == QUIRK_NONE || spec -> quirk == QUIRK_ALIENWARE )
4728
+ spec -> multiout .max_channels = 2 ;
4729
+ else
4730
+ spec -> multiout .max_channels = 6 ;
4731
+
4732
+ switch (spec -> quirk ) {
4733
+ case QUIRK_ALIENWARE :
4694
4734
codec_dbg (codec , "ca0132_config: QUIRK_ALIENWARE applied.\n" );
4695
4735
snd_hda_apply_pincfgs (codec , alienware_pincfgs );
4696
4736
@@ -4710,7 +4750,71 @@ static void ca0132_config(struct hda_codec *codec)
4710
4750
spec -> input_pins [2 ] = 0x13 ;
4711
4751
spec -> shared_mic_nid = 0x7 ;
4712
4752
spec -> unsol_tag_amic1 = 0x11 ;
4713
- } else {
4753
+ break ;
4754
+ case QUIRK_SBZ :
4755
+ codec_dbg (codec , "%s: QUIRK_SBZ applied.\n" , __func__ );
4756
+ snd_hda_apply_pincfgs (codec , sbz_pincfgs );
4757
+
4758
+ spec -> num_outputs = 2 ;
4759
+ spec -> out_pins [0 ] = 0x0B ; /* Line out */
4760
+ spec -> out_pins [1 ] = 0x0F ; /* Rear headphone out */
4761
+ spec -> out_pins [2 ] = 0x10 ; /* Front Headphone / Center/LFE*/
4762
+ spec -> out_pins [3 ] = 0x11 ; /* Rear surround */
4763
+ spec -> shared_out_nid = 0x2 ;
4764
+ spec -> unsol_tag_hp = spec -> out_pins [1 ];
4765
+ spec -> unsol_tag_front_hp = spec -> out_pins [2 ];
4766
+
4767
+ spec -> adcs [0 ] = 0x7 ; /* Rear Mic / Line-in */
4768
+ spec -> adcs [1 ] = 0x8 ; /* Front Mic, but only if no DSP */
4769
+ spec -> adcs [2 ] = 0xa ; /* what u hear */
4770
+
4771
+ spec -> num_inputs = 2 ;
4772
+ spec -> input_pins [0 ] = 0x12 ; /* Rear Mic / Line-in */
4773
+ spec -> input_pins [1 ] = 0x13 ; /* What U Hear */
4774
+ spec -> shared_mic_nid = 0x7 ;
4775
+ spec -> unsol_tag_amic1 = spec -> input_pins [0 ];
4776
+
4777
+ /* SPDIF I/O */
4778
+ spec -> dig_out = 0x05 ;
4779
+ spec -> multiout .dig_out_nid = spec -> dig_out ;
4780
+ cfg -> dig_out_pins [0 ] = 0x0c ;
4781
+ cfg -> dig_outs = 1 ;
4782
+ cfg -> dig_out_type [0 ] = HDA_PCM_TYPE_SPDIF ;
4783
+ spec -> dig_in = 0x09 ;
4784
+ cfg -> dig_in_pin = 0x0e ;
4785
+ cfg -> dig_in_type = HDA_PCM_TYPE_SPDIF ;
4786
+ break ;
4787
+ case QUIRK_R3DI :
4788
+ codec_dbg (codec , "%s: QUIRK_R3DI applied.\n" , __func__ );
4789
+ snd_hda_apply_pincfgs (codec , r3di_pincfgs );
4790
+
4791
+ spec -> num_outputs = 2 ;
4792
+ spec -> out_pins [0 ] = 0x0B ; /* Line out */
4793
+ spec -> out_pins [1 ] = 0x0F ; /* Rear headphone out */
4794
+ spec -> out_pins [2 ] = 0x10 ; /* Front Headphone / Center/LFE*/
4795
+ spec -> out_pins [3 ] = 0x11 ; /* Rear surround */
4796
+ spec -> shared_out_nid = 0x2 ;
4797
+ spec -> unsol_tag_hp = spec -> out_pins [1 ];
4798
+ spec -> unsol_tag_front_hp = spec -> out_pins [2 ];
4799
+
4800
+ spec -> adcs [0 ] = 0x07 ; /* Rear Mic / Line-in */
4801
+ spec -> adcs [1 ] = 0x08 ; /* Front Mic, but only if no DSP */
4802
+ spec -> adcs [2 ] = 0x0a ; /* what u hear */
4803
+
4804
+ spec -> num_inputs = 2 ;
4805
+ spec -> input_pins [0 ] = 0x12 ; /* Rear Mic / Line-in */
4806
+ spec -> input_pins [1 ] = 0x13 ; /* What U Hear */
4807
+ spec -> shared_mic_nid = 0x7 ;
4808
+ spec -> unsol_tag_amic1 = spec -> input_pins [0 ];
4809
+
4810
+ /* SPDIF I/O */
4811
+ spec -> dig_out = 0x05 ;
4812
+ spec -> multiout .dig_out_nid = spec -> dig_out ;
4813
+ cfg -> dig_out_pins [0 ] = 0x0c ;
4814
+ cfg -> dig_outs = 1 ;
4815
+ cfg -> dig_out_type [0 ] = HDA_PCM_TYPE_SPDIF ;
4816
+ break ;
4817
+ default :
4714
4818
spec -> num_outputs = 2 ;
4715
4819
spec -> out_pins [0 ] = 0x0b ; /* speaker out */
4716
4820
spec -> out_pins [1 ] = 0x10 ; /* headphone out */
@@ -4737,6 +4841,7 @@ static void ca0132_config(struct hda_codec *codec)
4737
4841
spec -> dig_in = 0x09 ;
4738
4842
cfg -> dig_in_pin = 0x0e ;
4739
4843
cfg -> dig_in_type = HDA_PCM_TYPE_SPDIF ;
4844
+ break ;
4740
4845
}
4741
4846
}
4742
4847
0 commit comments