diff options
author | Jiang zhe <zhe.jiang@intel.com> | 2008-03-06 05:09:09 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:21 -0400 |
commit | 2de3c232a0050ee247ae6e97b055f39e15a08ee3 (patch) | |
tree | f39d552055d702cc480e3bc8ef6631f148a22cf9 /sound/pci/hda/patch_conexant.c | |
parent | fb97dc67397c1ee63eb0094c28fc9a5dcc0a83a6 (diff) |
[ALSA] hda-codec - model for cx20549 to support laptop HP530
Currently the model laptop-hpsense use the 0x12 as ExtMic,
and use 0x14 as Internal IntMic.
But the hp530 only have one ExtMic, the Pin widget is 0x14.
In this patch, I changed the mixer item for them.
I still reserved the IntMic item, it will be helpful if
other machine may use this model.
ALSA bug#3821.
Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index e4fa9a35848f..c67613ff842d 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -519,6 +519,14 @@ static struct hda_input_mux cxt5045_capture_source_benq = { | |||
519 | } | 519 | } |
520 | }; | 520 | }; |
521 | 521 | ||
522 | static struct hda_input_mux cxt5045_capture_source_hp530 = { | ||
523 | .num_items = 2, | ||
524 | .items = { | ||
525 | { "ExtMic", 0x1 }, | ||
526 | { "IntMic", 0x2 }, | ||
527 | } | ||
528 | }; | ||
529 | |||
522 | /* turn on/off EAPD (+ mute HP) as a master switch */ | 530 | /* turn on/off EAPD (+ mute HP) as a master switch */ |
523 | static int cxt5045_hp_master_sw_put(struct snd_kcontrol *kcontrol, | 531 | static int cxt5045_hp_master_sw_put(struct snd_kcontrol *kcontrol, |
524 | struct snd_ctl_elem_value *ucontrol) | 532 | struct snd_ctl_elem_value *ucontrol) |
@@ -647,6 +655,37 @@ static struct snd_kcontrol_new cxt5045_benq_mixers[] = { | |||
647 | {} | 655 | {} |
648 | }; | 656 | }; |
649 | 657 | ||
658 | static struct snd_kcontrol_new cxt5045_mixers_hp530[] = { | ||
659 | { | ||
660 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
661 | .name = "Capture Source", | ||
662 | .info = conexant_mux_enum_info, | ||
663 | .get = conexant_mux_enum_get, | ||
664 | .put = conexant_mux_enum_put | ||
665 | }, | ||
666 | HDA_CODEC_VOLUME("Int Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), | ||
667 | HDA_CODEC_MUTE("Int Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), | ||
668 | HDA_CODEC_VOLUME("Ext Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), | ||
669 | HDA_CODEC_MUTE("Ext Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), | ||
670 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), | ||
671 | HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), | ||
672 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x17, 0x2, HDA_INPUT), | ||
673 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x17, 0x2, HDA_INPUT), | ||
674 | HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x17, 0x1, HDA_INPUT), | ||
675 | HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x17, 0x1, HDA_INPUT), | ||
676 | HDA_BIND_VOL("Master Playback Volume", &cxt5045_hp_bind_master_vol), | ||
677 | { | ||
678 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
679 | .name = "Master Playback Switch", | ||
680 | .info = cxt_eapd_info, | ||
681 | .get = cxt_eapd_get, | ||
682 | .put = cxt5045_hp_master_sw_put, | ||
683 | .private_value = 0x10, | ||
684 | }, | ||
685 | |||
686 | {} | ||
687 | }; | ||
688 | |||
650 | static struct hda_verb cxt5045_init_verbs[] = { | 689 | static struct hda_verb cxt5045_init_verbs[] = { |
651 | /* Line in, Mic */ | 690 | /* Line in, Mic */ |
652 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | 691 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, |
@@ -841,6 +880,7 @@ enum { | |||
841 | CXT5045_LAPTOP_MICSENSE, | 880 | CXT5045_LAPTOP_MICSENSE, |
842 | CXT5045_LAPTOP_HPMICSENSE, | 881 | CXT5045_LAPTOP_HPMICSENSE, |
843 | CXT5045_BENQ, | 882 | CXT5045_BENQ, |
883 | CXT5045_LAPTOP_HP530, | ||
844 | #ifdef CONFIG_SND_DEBUG | 884 | #ifdef CONFIG_SND_DEBUG |
845 | CXT5045_TEST, | 885 | CXT5045_TEST, |
846 | #endif | 886 | #endif |
@@ -852,6 +892,7 @@ static const char *cxt5045_models[CXT5045_MODELS] = { | |||
852 | [CXT5045_LAPTOP_MICSENSE] = "laptop-micsense", | 892 | [CXT5045_LAPTOP_MICSENSE] = "laptop-micsense", |
853 | [CXT5045_LAPTOP_HPMICSENSE] = "laptop-hpmicsense", | 893 | [CXT5045_LAPTOP_HPMICSENSE] = "laptop-hpmicsense", |
854 | [CXT5045_BENQ] = "benq", | 894 | [CXT5045_BENQ] = "benq", |
895 | [CXT5045_LAPTOP_HP530] = "laptop-hp530", | ||
855 | #ifdef CONFIG_SND_DEBUG | 896 | #ifdef CONFIG_SND_DEBUG |
856 | [CXT5045_TEST] = "test", | 897 | [CXT5045_TEST] = "test", |
857 | #endif | 898 | #endif |
@@ -865,7 +906,7 @@ static struct snd_pci_quirk cxt5045_cfg_tbl[] = { | |||
865 | SND_PCI_QUIRK(0x103c, 0x30bb, "HP DV8000", CXT5045_LAPTOP_HPSENSE), | 906 | SND_PCI_QUIRK(0x103c, 0x30bb, "HP DV8000", CXT5045_LAPTOP_HPSENSE), |
866 | SND_PCI_QUIRK(0x103c, 0x30cd, "HP DV Series", CXT5045_LAPTOP_HPSENSE), | 907 | SND_PCI_QUIRK(0x103c, 0x30cd, "HP DV Series", CXT5045_LAPTOP_HPSENSE), |
867 | SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV9533EG", CXT5045_LAPTOP_HPSENSE), | 908 | SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV9533EG", CXT5045_LAPTOP_HPSENSE), |
868 | SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP_HPSENSE), | 909 | SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP_HP530), |
869 | SND_PCI_QUIRK(0x103c, 0x30d9, "HP Spartan", CXT5045_LAPTOP_HPSENSE), | 910 | SND_PCI_QUIRK(0x103c, 0x30d9, "HP Spartan", CXT5045_LAPTOP_HPSENSE), |
870 | SND_PCI_QUIRK(0x152d, 0x0753, "Benq R55E", CXT5045_BENQ), | 911 | SND_PCI_QUIRK(0x152d, 0x0753, "Benq R55E", CXT5045_BENQ), |
871 | SND_PCI_QUIRK(0x1734, 0x10ad, "Fujitsu Si1520", CXT5045_LAPTOP_MICSENSE), | 912 | SND_PCI_QUIRK(0x1734, 0x10ad, "Fujitsu Si1520", CXT5045_LAPTOP_MICSENSE), |
@@ -949,6 +990,14 @@ static int patch_cxt5045(struct hda_codec *codec) | |||
949 | spec->num_mixers = 2; | 990 | spec->num_mixers = 2; |
950 | codec->patch_ops.init = cxt5045_init; | 991 | codec->patch_ops.init = cxt5045_init; |
951 | break; | 992 | break; |
993 | case CXT5045_LAPTOP_HP530: | ||
994 | codec->patch_ops.unsol_event = cxt5045_hp_unsol_event; | ||
995 | spec->input_mux = &cxt5045_capture_source_hp530; | ||
996 | spec->num_init_verbs = 2; | ||
997 | spec->init_verbs[1] = cxt5045_hp_sense_init_verbs; | ||
998 | spec->mixers[0] = cxt5045_mixers_hp530; | ||
999 | codec->patch_ops.init = cxt5045_init; | ||
1000 | break; | ||
952 | #ifdef CONFIG_SND_DEBUG | 1001 | #ifdef CONFIG_SND_DEBUG |
953 | case CXT5045_TEST: | 1002 | case CXT5045_TEST: |
954 | spec->input_mux = &cxt5045_test_capture_source; | 1003 | spec->input_mux = &cxt5045_test_capture_source; |