diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 169b3837af52..abddabc1efa8 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -78,6 +78,7 @@ enum { | |||
78 | ALC260_ACER, | 78 | ALC260_ACER, |
79 | ALC260_WILL, | 79 | ALC260_WILL, |
80 | ALC260_REPLACER_672V, | 80 | ALC260_REPLACER_672V, |
81 | ALC260_FAVORIT100, | ||
81 | #ifdef CONFIG_SND_DEBUG | 82 | #ifdef CONFIG_SND_DEBUG |
82 | ALC260_TEST, | 83 | ALC260_TEST, |
83 | #endif | 84 | #endif |
@@ -4537,6 +4538,26 @@ static struct hda_input_mux alc260_acer_capture_sources[2] = { | |||
4537 | }, | 4538 | }, |
4538 | }, | 4539 | }, |
4539 | }; | 4540 | }; |
4541 | |||
4542 | /* Maxdata Favorit 100XS */ | ||
4543 | static struct hda_input_mux alc260_favorit100_capture_sources[2] = { | ||
4544 | { | ||
4545 | .num_items = 2, | ||
4546 | .items = { | ||
4547 | { "Line/Mic", 0x0 }, | ||
4548 | { "CD", 0x4 }, | ||
4549 | }, | ||
4550 | }, | ||
4551 | { | ||
4552 | .num_items = 3, | ||
4553 | .items = { | ||
4554 | { "Line/Mic", 0x0 }, | ||
4555 | { "CD", 0x4 }, | ||
4556 | { "Mixer", 0x5 }, | ||
4557 | }, | ||
4558 | }, | ||
4559 | }; | ||
4560 | |||
4540 | /* | 4561 | /* |
4541 | * This is just place-holder, so there's something for alc_build_pcms to look | 4562 | * This is just place-holder, so there's something for alc_build_pcms to look |
4542 | * at when it calculates the maximum number of channels. ALC260 has no mixer | 4563 | * at when it calculates the maximum number of channels. ALC260 has no mixer |
@@ -4817,6 +4838,18 @@ static struct snd_kcontrol_new alc260_acer_mixer[] = { | |||
4817 | { } /* end */ | 4838 | { } /* end */ |
4818 | }; | 4839 | }; |
4819 | 4840 | ||
4841 | /* Maxdata Favorit 100XS: one output and one input (0x12) jack | ||
4842 | */ | ||
4843 | static struct snd_kcontrol_new alc260_favorit100_mixer[] = { | ||
4844 | HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT), | ||
4845 | HDA_BIND_MUTE("Master Playback Switch", 0x08, 2, HDA_INPUT), | ||
4846 | ALC_PIN_MODE("Output Jack Mode", 0x0f, ALC_PIN_DIR_INOUT), | ||
4847 | HDA_CODEC_VOLUME("Line/Mic Playback Volume", 0x07, 0x0, HDA_INPUT), | ||
4848 | HDA_CODEC_MUTE("Line/Mic Playback Switch", 0x07, 0x0, HDA_INPUT), | ||
4849 | ALC_PIN_MODE("Line/Mic Jack Mode", 0x12, ALC_PIN_DIR_IN), | ||
4850 | { } /* end */ | ||
4851 | }; | ||
4852 | |||
4820 | /* Packard bell V7900 ALC260 pin usage: HP = 0x0f, Mic jack = 0x12, | 4853 | /* Packard bell V7900 ALC260 pin usage: HP = 0x0f, Mic jack = 0x12, |
4821 | * Line In jack = 0x14, CD audio = 0x16, pc beep = 0x17. | 4854 | * Line In jack = 0x14, CD audio = 0x16, pc beep = 0x17. |
4822 | */ | 4855 | */ |
@@ -5188,6 +5221,89 @@ static struct hda_verb alc260_acer_init_verbs[] = { | |||
5188 | { } | 5221 | { } |
5189 | }; | 5222 | }; |
5190 | 5223 | ||
5224 | /* Initialisation sequence for Maxdata Favorit 100XS | ||
5225 | * (adapted from Acer init verbs). | ||
5226 | */ | ||
5227 | static struct hda_verb alc260_favorit100_init_verbs[] = { | ||
5228 | /* GPIO 0 enables the output jack. | ||
5229 | * Turn this on and rely on the standard mute | ||
5230 | * methods whenever the user wants to turn these outputs off. | ||
5231 | */ | ||
5232 | {0x01, AC_VERB_SET_GPIO_MASK, 0x01}, | ||
5233 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01}, | ||
5234 | {0x01, AC_VERB_SET_GPIO_DATA, 0x01}, | ||
5235 | /* Line/Mic input jack is connected to Mic1 pin */ | ||
5236 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50}, | ||
5237 | /* Ensure all other unused pins are disabled and muted. */ | ||
5238 | {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, | ||
5239 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5240 | {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, | ||
5241 | {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5242 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, | ||
5243 | {0x13, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5244 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, | ||
5245 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5246 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, | ||
5247 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5248 | /* Disable digital (SPDIF) pins */ | ||
5249 | {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0}, | ||
5250 | {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0}, | ||
5251 | |||
5252 | /* Ensure Mic1 and Line1 pin widgets take input from the OUT1 sum | ||
5253 | * bus when acting as outputs. | ||
5254 | */ | ||
5255 | {0x0b, AC_VERB_SET_CONNECT_SEL, 0}, | ||
5256 | {0x0d, AC_VERB_SET_CONNECT_SEL, 0}, | ||
5257 | |||
5258 | /* Start with output sum widgets muted and their output gains at min */ | ||
5259 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5260 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
5261 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
5262 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5263 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
5264 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
5265 | {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5266 | {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
5267 | {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
5268 | |||
5269 | /* Unmute Line-out pin widget amp left and right | ||
5270 | * (no equiv mixer ctrl) | ||
5271 | */ | ||
5272 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
5273 | /* Unmute Mic1 and Line1 pin widget input buffers since they start as | ||
5274 | * inputs. If the pin mode is changed by the user the pin mode control | ||
5275 | * will take care of enabling the pin's input/output buffers as needed. | ||
5276 | * Therefore there's no need to enable the input buffer at this | ||
5277 | * stage. | ||
5278 | */ | ||
5279 | {0x12, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
5280 | |||
5281 | /* Mute capture amp left and right */ | ||
5282 | {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5283 | /* Set ADC connection select to match default mixer setting - mic | ||
5284 | * (on mic1 pin) | ||
5285 | */ | ||
5286 | {0x04, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
5287 | |||
5288 | /* Do similar with the second ADC: mute capture input amp and | ||
5289 | * set ADC connection to mic to match ALSA's default state. | ||
5290 | */ | ||
5291 | {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
5292 | {0x05, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
5293 | |||
5294 | /* Mute all inputs to mixer widget (even unconnected ones) */ | ||
5295 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* mic1 pin */ | ||
5296 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* mic2 pin */ | ||
5297 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* line1 pin */ | ||
5298 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* line2 pin */ | ||
5299 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, /* CD pin */ | ||
5300 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)}, /* Beep-gen pin */ | ||
5301 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)}, /* Line-out pin */ | ||
5302 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, /* HP-pin pin */ | ||
5303 | |||
5304 | { } | ||
5305 | }; | ||
5306 | |||
5191 | static struct hda_verb alc260_will_verbs[] = { | 5307 | static struct hda_verb alc260_will_verbs[] = { |
5192 | {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | 5308 | {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, |
5193 | {0x0b, AC_VERB_SET_CONNECT_SEL, 0x00}, | 5309 | {0x0b, AC_VERB_SET_CONNECT_SEL, 0x00}, |
@@ -5730,6 +5846,7 @@ static const char *alc260_models[ALC260_MODEL_LAST] = { | |||
5730 | [ALC260_ACER] = "acer", | 5846 | [ALC260_ACER] = "acer", |
5731 | [ALC260_WILL] = "will", | 5847 | [ALC260_WILL] = "will", |
5732 | [ALC260_REPLACER_672V] = "replacer", | 5848 | [ALC260_REPLACER_672V] = "replacer", |
5849 | [ALC260_FAVORIT100] = "favorit100", | ||
5733 | #ifdef CONFIG_SND_DEBUG | 5850 | #ifdef CONFIG_SND_DEBUG |
5734 | [ALC260_TEST] = "test", | 5851 | [ALC260_TEST] = "test", |
5735 | #endif | 5852 | #endif |
@@ -5739,6 +5856,7 @@ static const char *alc260_models[ALC260_MODEL_LAST] = { | |||
5739 | static struct snd_pci_quirk alc260_cfg_tbl[] = { | 5856 | static struct snd_pci_quirk alc260_cfg_tbl[] = { |
5740 | SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER), | 5857 | SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER), |
5741 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), | 5858 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), |
5859 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), | ||
5742 | SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), | 5860 | SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), |
5743 | SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_HP_3013), | 5861 | SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_HP_3013), |
5744 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), | 5862 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), |
@@ -5840,6 +5958,18 @@ static struct alc_config_preset alc260_presets[] = { | |||
5840 | .num_mux_defs = ARRAY_SIZE(alc260_acer_capture_sources), | 5958 | .num_mux_defs = ARRAY_SIZE(alc260_acer_capture_sources), |
5841 | .input_mux = alc260_acer_capture_sources, | 5959 | .input_mux = alc260_acer_capture_sources, |
5842 | }, | 5960 | }, |
5961 | [ALC260_FAVORIT100] = { | ||
5962 | .mixers = { alc260_favorit100_mixer }, | ||
5963 | .init_verbs = { alc260_favorit100_init_verbs }, | ||
5964 | .num_dacs = ARRAY_SIZE(alc260_dac_nids), | ||
5965 | .dac_nids = alc260_dac_nids, | ||
5966 | .num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids), | ||
5967 | .adc_nids = alc260_dual_adc_nids, | ||
5968 | .num_channel_mode = ARRAY_SIZE(alc260_modes), | ||
5969 | .channel_mode = alc260_modes, | ||
5970 | .num_mux_defs = ARRAY_SIZE(alc260_favorit100_capture_sources), | ||
5971 | .input_mux = alc260_favorit100_capture_sources, | ||
5972 | }, | ||
5843 | [ALC260_WILL] = { | 5973 | [ALC260_WILL] = { |
5844 | .mixers = { alc260_will_mixer }, | 5974 | .mixers = { alc260_will_mixer }, |
5845 | .init_verbs = { alc260_init_verbs, alc260_will_verbs }, | 5975 | .init_verbs = { alc260_init_verbs, alc260_will_verbs }, |