aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorKailang Yang <kailang@realtek.com.tw>2007-01-26 12:33:17 -0500
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:03:12 -0500
commitcd7509a43c3047a6339484e5009c2db7ee4c7a51 (patch)
tree64cd9e0d61658eed0e2a22b14955b7b6da7fd57d /sound/pci
parent757e119bf52b014b3181eed97b01f87a245b8ff9 (diff)
[ALSA] hda-codec - Add HP BPC-D7000 support
Add HP BPC-D7000 support. Signed-off-by: Kailang Yang <kailang@realtek.com.tw> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c153
1 files changed, 151 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a29862509032..d01895515e0d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -87,6 +87,8 @@ enum {
87 ALC262_HIPPO_1, 87 ALC262_HIPPO_1,
88 ALC262_FUJITSU, 88 ALC262_FUJITSU,
89 ALC262_HP_BPC, 89 ALC262_HP_BPC,
90 ALC262_HP_BPC_D7000_WL,
91 ALC262_HP_BPC_D7000_WF,
90 ALC262_BENQ_ED8, 92 ALC262_BENQ_ED8,
91 ALC262_AUTO, 93 ALC262_AUTO,
92 ALC262_MODEL_LAST /* last tag */ 94 ALC262_MODEL_LAST /* last tag */
@@ -5919,6 +5921,30 @@ static struct snd_kcontrol_new alc262_HP_BPC_mixer[] = {
5919 { } /* end */ 5921 { } /* end */
5920}; 5922};
5921 5923
5924static struct snd_kcontrol_new alc262_HP_BPC_WildWest_mixer[] = {
5925 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
5926 HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
5927 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
5928 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
5929 HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
5930 HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT),
5931 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x02, HDA_INPUT),
5932 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x02, HDA_INPUT),
5933 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT),
5934 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT),
5935 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
5936 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
5937 HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT),
5938 HDA_CODEC_MUTE("PC Beep Playback Switch", 0x0b, 0x05, HDA_INPUT),
5939 { } /* end */
5940};
5941
5942static struct snd_kcontrol_new alc262_HP_BPC_WildWest_option_mixer[] = {
5943 HDA_CODEC_VOLUME("Rear Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
5944 HDA_CODEC_MUTE("Rear Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
5945 { } /* end */
5946};
5947
5922#define alc262_capture_mixer alc882_capture_mixer 5948#define alc262_capture_mixer alc882_capture_mixer
5923#define alc262_capture_alt_mixer alc882_capture_alt_mixer 5949#define alc262_capture_alt_mixer alc882_capture_alt_mixer
5924 5950
@@ -6448,6 +6474,100 @@ static struct hda_verb alc262_HP_BPC_init_verbs[] = {
6448 { } 6474 { }
6449}; 6475};
6450 6476
6477static struct hda_verb alc262_HP_BPC_WildWest_init_verbs[] = {
6478 /*
6479 * Unmute ADC0-2 and set the default input to mic-in
6480 */
6481 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
6482 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6483 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
6484 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6485 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
6486 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6487
6488 /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
6489 * mixer widget
6490 * Note: PASD motherboards uses the Line In 2 as the input for front
6491 * panel mic (mic 2)
6492 */
6493 /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
6494 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6495 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
6496 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
6497 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},
6498 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
6499 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5)},
6500 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(6)},
6501 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(7)},
6502 /*
6503 * Set up output mixers (0x0c - 0x0e)
6504 */
6505 /* set vol=0 to output mixers */
6506 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
6507 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
6508 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
6509
6510 /* set up input amps for analog loopback */
6511 /* Amp Indices: DAC = 0, mixer = 1 */
6512 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6513 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
6514 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6515 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
6516 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
6517 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
6518
6519
6520 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, /* HP */
6521 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, /* Mono */
6522 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* rear MIC */
6523 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, /* Line in */
6524 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Front MIC */
6525 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, /* Line out */
6526 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, /* CD in */
6527
6528 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
6529 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
6530
6531 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
6532 {0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
6533
6534 /* {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7023 }, */
6535 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000 },
6536 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000 },
6537 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0x7023 },
6538 {0x1c, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000 },
6539 {0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000 },
6540
6541 /* FIXME: use matrix-type input source selection */
6542 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
6543 /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
6544 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, /*rear MIC*/
6545 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, /*Line in*/
6546 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))}, /*F MIC*/
6547 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x03 << 8))}, /*Front*/
6548 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))}, /*CD*/
6549 /* {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x06 << 8))}, */
6550 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x07 << 8))}, /*HP*/
6551 /* Input mixer2 */
6552 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
6553 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
6554 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))},
6555 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x03 << 8))},
6556 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))},
6557 /* {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x06 << 8))}, */
6558 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x07 << 8))},
6559 /* Input mixer3 */
6560 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
6561 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
6562 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))},
6563 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x03 << 8))},
6564 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))},
6565 /* {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x06 << 8))}, */
6566 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x07 << 8))},
6567
6568 { }
6569};
6570
6451/* pcm configuration: identiacal with ALC880 */ 6571/* pcm configuration: identiacal with ALC880 */
6452#define alc262_pcm_analog_playback alc880_pcm_analog_playback 6572#define alc262_pcm_analog_playback alc880_pcm_analog_playback
6453#define alc262_pcm_analog_capture alc880_pcm_analog_capture 6573#define alc262_pcm_analog_capture alc880_pcm_analog_capture
@@ -6511,6 +6631,7 @@ static const char *alc262_models[ALC262_MODEL_LAST] = {
6511 [ALC262_HIPPO_1] = "hippo_1", 6631 [ALC262_HIPPO_1] = "hippo_1",
6512 [ALC262_FUJITSU] = "fujitsu", 6632 [ALC262_FUJITSU] = "fujitsu",
6513 [ALC262_HP_BPC] = "hp-bpc", 6633 [ALC262_HP_BPC] = "hp-bpc",
6634 [ALC262_HP_BPC_D7000_WL]= "hp-bpc-d7000",
6514 [ALC262_BENQ_ED8] = "benq", 6635 [ALC262_BENQ_ED8] = "benq",
6515 [ALC262_AUTO] = "auto", 6636 [ALC262_AUTO] = "auto",
6516}; 6637};
@@ -6519,9 +6640,16 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
6519 SND_PCI_QUIRK(0x1002, 0x437b, "Hippo", ALC262_HIPPO), 6640 SND_PCI_QUIRK(0x1002, 0x437b, "Hippo", ALC262_HIPPO),
6520 SND_PCI_QUIRK(0x103c, 0x12fe, "HP xw9400", ALC262_HP_BPC), 6641 SND_PCI_QUIRK(0x103c, 0x12fe, "HP xw9400", ALC262_HP_BPC),
6521 SND_PCI_QUIRK(0x103c, 0x280c, "HP xw4400", ALC262_HP_BPC), 6642 SND_PCI_QUIRK(0x103c, 0x280c, "HP xw4400", ALC262_HP_BPC),
6522 SND_PCI_QUIRK(0x103c, 0x2801, "HP q954", ALC262_HP_BPC),
6523 SND_PCI_QUIRK(0x103c, 0x3014, "HP xw6400", ALC262_HP_BPC), 6643 SND_PCI_QUIRK(0x103c, 0x3014, "HP xw6400", ALC262_HP_BPC),
6524 SND_PCI_QUIRK(0x103c, 0x3015, "HP xw8400", ALC262_HP_BPC), 6644 SND_PCI_QUIRK(0x103c, 0x3015, "HP xw8400", ALC262_HP_BPC),
6645 SND_PCI_QUIRK(0x103c, 0x2800, "HP D7000", ALC262_HP_BPC_D7000_WL),
6646 SND_PCI_QUIRK(0x103c, 0x2802, "HP D7000", ALC262_HP_BPC_D7000_WL),
6647 SND_PCI_QUIRK(0x103c, 0x2804, "HP D7000", ALC262_HP_BPC_D7000_WL),
6648 SND_PCI_QUIRK(0x103c, 0x2806, "HP D7000", ALC262_HP_BPC_D7000_WL),
6649 SND_PCI_QUIRK(0x103c, 0x2801, "HP D7000", ALC262_HP_BPC_D7000_WF),
6650 SND_PCI_QUIRK(0x103c, 0x2803, "HP D7000", ALC262_HP_BPC_D7000_WF),
6651 SND_PCI_QUIRK(0x103c, 0x2805, "HP D7000", ALC262_HP_BPC_D7000_WF),
6652 SND_PCI_QUIRK(0x103c, 0x2807, "HP D7000", ALC262_HP_BPC_D7000_WF),
6525 SND_PCI_QUIRK(0x104d, 0x8203, "Sony UX-90", ALC262_HIPPO), 6653 SND_PCI_QUIRK(0x104d, 0x8203, "Sony UX-90", ALC262_HIPPO),
6526 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), 6654 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
6527 SND_PCI_QUIRK(0x17ff, 0x058f, "Benq Hippo", ALC262_HIPPO_1), 6655 SND_PCI_QUIRK(0x17ff, 0x058f, "Benq Hippo", ALC262_HIPPO_1),
@@ -6586,6 +6714,27 @@ static struct alc_config_preset alc262_presets[] = {
6586 .channel_mode = alc262_modes, 6714 .channel_mode = alc262_modes,
6587 .input_mux = &alc262_HP_capture_source, 6715 .input_mux = &alc262_HP_capture_source,
6588 }, 6716 },
6717 [ALC262_HP_BPC_D7000_WF] = {
6718 .mixers = { alc262_HP_BPC_WildWest_mixer },
6719 .init_verbs = { alc262_HP_BPC_WildWest_init_verbs },
6720 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
6721 .dac_nids = alc262_dac_nids,
6722 .hp_nid = 0x03,
6723 .num_channel_mode = ARRAY_SIZE(alc262_modes),
6724 .channel_mode = alc262_modes,
6725 .input_mux = &alc262_HP_capture_source,
6726 },
6727 [ALC262_HP_BPC_D7000_WL] = {
6728 .mixers = { alc262_HP_BPC_WildWest_mixer,
6729 alc262_HP_BPC_WildWest_option_mixer },
6730 .init_verbs = { alc262_HP_BPC_WildWest_init_verbs },
6731 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
6732 .dac_nids = alc262_dac_nids,
6733 .hp_nid = 0x03,
6734 .num_channel_mode = ARRAY_SIZE(alc262_modes),
6735 .channel_mode = alc262_modes,
6736 .input_mux = &alc262_HP_capture_source,
6737 },
6589 [ALC262_BENQ_ED8] = { 6738 [ALC262_BENQ_ED8] = {
6590 .mixers = { alc262_base_mixer }, 6739 .mixers = { alc262_base_mixer },
6591 .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs }, 6740 .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs },
@@ -6623,7 +6772,7 @@ static int patch_alc262(struct hda_codec *codec)
6623 board_config = snd_hda_check_board_config(codec, ALC262_MODEL_LAST, 6772 board_config = snd_hda_check_board_config(codec, ALC262_MODEL_LAST,
6624 alc262_models, 6773 alc262_models,
6625 alc262_cfg_tbl); 6774 alc262_cfg_tbl);
6626 6775
6627 if (board_config < 0) { 6776 if (board_config < 0) {
6628 printk(KERN_INFO "hda_codec: Unknown model for ALC262, " 6777 printk(KERN_INFO "hda_codec: Unknown model for ALC262, "
6629 "trying auto-probe from BIOS...\n"); 6778 "trying auto-probe from BIOS...\n");