ALC260 patch for Packard Bell Easy Note v7900
Please see if you can accept this patch that fixes sound/headphones/mic on Packard Bell EN v7900 notebook (ALC260 chipset).
The code is not mine, I diff'ed using pshou's
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2189) but since it works perfectly it would be nice to see it in the next alsa release.
Andrea
pci/hda/patch_realtek.c +46 -0
@@ -74,6 +74,7 @@ALC260_HP_3013 ,ALC260_FUJITSU_S702X ,ALC260_ACER , +ALC260_PB7900 , #ifdef CONFIG_SND_DEBUG ALC260_TEST, #endif
@@ -3349,6 +3350,25 @@ { }/* end */ }; +/* Packard Bell EN V7900 ALC260 pin usage: Mic jack = 0x12, +* Line In jack = 0x14, CD audio = 0x16, speaker = 0x0f. +*/ +static struct snd_kcontrol_new alc260_pbv7900_mixer[] = { +HDA_CODEC_VOLUME ("Front Playback Volume" ,0x08 ,0x0 ,HDA_OUTPUT ), +HDA_CODEC_MUTE ("Front Playback Switch" ,0x0f ,0x0 ,HDA_OUTPUT ), +HDA_CODEC_VOLUME ("Mic Playback Volume" ,0x07 ,0x0 ,HDA_INPUT ), +HDA_CODEC_MUTE ("Mic Playback Switch" ,0x07 ,0x0 ,HDA_INPUT ), +ALC_PIN_MODE ("Mic Jack Mode" ,0x12 ,ALC_PIN_DIR_IN ), +HDA_CODEC_VOLUME ("Line Playback Volume" ,0x07 ,0x02 ,HDA_INPUT ), +HDA_CODEC_MUTE ("Line Playback Switch" ,0x07 ,0x02 ,HDA_INPUT ), +ALC_PIN_MODE ("Line Jack Mode" ,0x14 ,ALC_PIN_DIR_INOUT ), +HDA_CODEC_VOLUME ("CD Playback Volume" ,0x07 ,0x04 ,HDA_INPUT ), +HDA_CODEC_MUTE ("CD Playback Switch" ,0x07 ,0x04 ,HDA_INPUT ), +HDA_CODEC_VOLUME ("Beep Playback Volume" ,0x07 ,0x05 ,HDA_INPUT ), +HDA_CODEC_MUTE ("Beep Playback Switch" ,0x07 ,0x05 ,HDA_INPUT ), + { }/* end */ +}; +/* capture mixer elements */ static struct snd_kcontrol_new alc260_capture_mixer[] = {HDA_CODEC_VOLUME ("Capture Volume" ,0x04 ,0x0 ,HDA_INPUT ),
@@ -3719,6 +3739,18 @@ { } }; +static struct hda_verb alc260_pbv7900_verbs[] = { + {0x08 ,AC_VERB_SET_AMP_GAIN_MUTE ,AMP_IN_UNMUTE (0 )}, + {0x08 ,AC_VERB_SET_AMP_GAIN_MUTE ,AMP_IN_UNMUTE (1 )}, + {0x0f ,AC_VERB_SET_PIN_WIDGET_CONTROL ,PIN_HP }, + {0x0f ,AC_VERB_SET_EAPD_BTLENABLE ,0x02 }, + {0x0b ,AC_VERB_SET_CONNECT_SEL ,0x00 }, + {0x0d ,AC_VERB_SET_CONNECT_SEL ,0x00 }, + {0x1a ,AC_VERB_SET_COEF_INDEX ,0x07 }, + {0x1a ,AC_VERB_SET_PROC_COEF ,0x3040 }, + { } +}; +/* Test configuration for debugging, modelled after the ALC880 test * configuration. */
@@ -4177,6 +4209,7 @@ [ALC260_HP_3013] = "hp-3013", [ALC260_FUJITSU_S702X] = "fujitsu", [ALC260_ACER] = "acer", + [ALC260_PBV7900 ] ="pbv7900" , #ifdef CONFIG_SND_DEBUG [ALC260_TEST] = "test", #endif
@@ -4198,6 +4231,7 @@SND_PCI_QUIRK (0x104d ,0x81cd ,"Sony VAIO" ,ALC260_BASIC ),SND_PCI_QUIRK (0x10cf ,0x1326 ,"Fujitsu S702X" ,ALC260_FUJITSU_S702X ),SND_PCI_QUIRK (0x152d ,0x0729 ,"CTL U553W" ,ALC260_BASIC ), + SND_PCI_QUIRK(0x1631, 0xc017, "Packard Bell EN V7900", ALC260_PBV7900), {} };
@@ -4268,6 +4302,18 @@ .num_mux_defs = ARRAY_SIZE(alc260_acer_capture_sources), .input_mux = alc260_acer_capture_sources, }, + [ALC260_PBV7900] = { + .mixers = { alc260_pbv7900_mixer, + alc260_capture_mixer }, + .init_verbs = { alc260_init_verbs, alc260_pbv7900_verbs }, + .num_dacs = ARRAY_SIZE(alc260_dac_nids), + .dac_nids = alc260_dac_nids, + .num_adc_nids = ARRAY_SIZE(alc260_adc_nids), + .adc_nids = alc260_adc_nids, + .num_channel_mode = ARRAY_SIZE(alc260_modes), + .channel_mode = alc260_modes, + .input_mux = &alc260_capture_source, + }, #ifdef CONFIG_SND_DEBUG [ALC260_TEST] = { .mixers = { alc260_test_mixer,
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Sat, 28 Apr 2007 10:28:43 +0200,
Quoted 7 lines · Andrea Gozzi
Please see if you can accept this patch that fixes
sound/headphones/micon Packard Bell EN v7900 notebook (ALC260 chipset).The code is not mine, I diff'ed using pshou's
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2189) but since it works perfectly it would be nice to see it in the next alsa release.
The change looks fine to me (as long as it works), but the patch can't be applied to the latest tree cleanly. Could you rebase the patch? Also, don't forget your sign-off, which is required for merging to the upstream kernel tree, together with a short summary of the patch.
thanks,
Takashi