From b779dc6b34610030461aa01bbcf6aa6e82836216 Mon Sep 17 00:00:00 2001 From: Maximilian Attems Date: Wed, 23 Jul 2008 22:22:58 +0000 Subject: [PATCH] backport two alsa hda fixes concerns intel boards so presumed important enough svn path=/dists/trunk/linux-2.6/; revision=11889 --- debian/changelog | 2 + .../patches/bugfix/all/sound_hda_ich9.patch | 23 +++ .../bugfix/all/sound_hda_intel_dg33.patch | 172 ++++++++++++++++++ debian/patches/series/1~experimental.1 | 2 + 4 files changed, 199 insertions(+) create mode 100644 debian/patches/bugfix/all/sound_hda_ich9.patch create mode 100644 debian/patches/bugfix/all/sound_hda_intel_dg33.patch diff --git a/debian/changelog b/debian/changelog index d62f92665..087926725 100644 --- a/debian/changelog +++ b/debian/changelog @@ -72,6 +72,8 @@ linux-2.6 (2.6.26-1~experimental.1) UNRELEASED; urgency=low * topconfig: Enable PATA_SIS instead of SATA_SIS. (closes: #485609) * Add OpenVZ countainer flavour for amd64, i386. (closes: #392015) * atl1e driver for Atheros(R) L1e Fast Ethernet. (closes: #492029) + * [ALSA] hda - Add ICH9 controller support (8086:2911) + * [ALSA] hda - support intel DG33 motherboards [ Martin Michlmayr ] * [arm/orion5x] Update the config to reflect upstream renaming this diff --git a/debian/patches/bugfix/all/sound_hda_ich9.patch b/debian/patches/bugfix/all/sound_hda_ich9.patch new file mode 100644 index 000000000..2c0bf1a65 --- /dev/null +++ b/debian/patches/bugfix/all/sound_hda_ich9.patch @@ -0,0 +1,23 @@ +commit abbc9d1b25637b1948a4718fa8f7b257233136bc +Author: Kailang Yang +Date: Tue May 27 11:48:01 2008 +0200 + + [ALSA] hda - Add ICH9 controller support (8086:2911) + + Added the missing PCI ID for ICH9 controller (8086:2911) + + Signed-off-by: Kailang Yang + Signed-off-by: Takashi Iwai + +diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c +index 7f62196..6e2dc4f 100644 +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -2184,6 +2184,7 @@ static struct pci_device_id azx_ids[] = { + { PCI_DEVICE(0x8086, 0x27d8), .driver_data = AZX_DRIVER_ICH }, + { PCI_DEVICE(0x8086, 0x269a), .driver_data = AZX_DRIVER_ICH }, + { PCI_DEVICE(0x8086, 0x284b), .driver_data = AZX_DRIVER_ICH }, ++ { PCI_DEVICE(0x8086, 0x2911), .driver_data = AZX_DRIVER_ICH }, + { PCI_DEVICE(0x8086, 0x293e), .driver_data = AZX_DRIVER_ICH }, + { PCI_DEVICE(0x8086, 0x293f), .driver_data = AZX_DRIVER_ICH }, + { PCI_DEVICE(0x8086, 0x3a3e), .driver_data = AZX_DRIVER_ICH }, diff --git a/debian/patches/bugfix/all/sound_hda_intel_dg33.patch b/debian/patches/bugfix/all/sound_hda_intel_dg33.patch new file mode 100644 index 000000000..15269bebe --- /dev/null +++ b/debian/patches/bugfix/all/sound_hda_intel_dg33.patch @@ -0,0 +1,172 @@ +commit 17bba1b72d190742c99a140154f0abac9c1996c3 +Author: Jiang zhe +Date: Wed Jun 4 12:11:07 2008 +0200 + + [ALSA] hda - support intel DG33 motherboards + + These two motherboards's pin configuration are not covered by driver. + I wrote a new model to support them. + + Signed-off-by: Jiang zhe + Signed-off-by: Takashi Iwai + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index cb3e028..048cb84 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -209,6 +209,7 @@ enum { + ALC883_MITAC, + ALC883_CLEVO_M720, + ALC883_FUJITSU_PI2515, ++ ALC883_3ST_6ch_INTEL, + ALC883_AUTO, + ALC883_MODEL_LAST, + }; +@@ -6603,6 +6604,16 @@ static struct hda_input_mux alc883_capture_source = { + }, + }; + ++static struct hda_input_mux alc883_3stack_6ch_intel = { ++ .num_items = 4, ++ .items = { ++ { "Mic", 0x1 }, ++ { "Front Mic", 0x0 }, ++ { "Line", 0x2 }, ++ { "CD", 0x4 }, ++ }, ++}; ++ + static struct hda_input_mux alc883_lenovo_101e_capture_source = { + .num_items = 2, + .items = { +@@ -6684,6 +6695,48 @@ static struct hda_channel_mode alc883_3ST_6ch_modes[3] = { + }; + + /* ++ * 2ch mode ++ */ ++static struct hda_verb alc883_3ST_ch2_intel_init[] = { ++ { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, ++ { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, ++ { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, ++ { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, ++ { } /* end */ ++}; ++ ++/* ++ * 4ch mode ++ */ ++static struct hda_verb alc883_3ST_ch4_intel_init[] = { ++ { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, ++ { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, ++ { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, ++ { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, ++ { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, ++ { } /* end */ ++}; ++ ++/* ++ * 6ch mode ++ */ ++static struct hda_verb alc883_3ST_ch6_intel_init[] = { ++ { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, ++ { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, ++ { 0x19, AC_VERB_SET_CONNECT_SEL, 0x02 }, ++ { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, ++ { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, ++ { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, ++ { } /* end */ ++}; ++ ++static struct hda_channel_mode alc883_3ST_6ch_intel_modes[3] = { ++ { 2, alc883_3ST_ch2_intel_init }, ++ { 4, alc883_3ST_ch4_intel_init }, ++ { 6, alc883_3ST_ch6_intel_init }, ++}; ++ ++/* + * 6ch mode + */ + static struct hda_verb alc883_sixstack_ch6_init[] = { +@@ -6915,6 +6968,45 @@ static struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = { + { } /* end */ + }; + ++static struct snd_kcontrol_new alc883_3ST_6ch_intel_mixer[] = { ++ HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), ++ HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), ++ HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), ++ HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), ++ HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, ++ HDA_OUTPUT), ++ HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), ++ HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), ++ HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), ++ HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), ++ HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), ++ HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), ++ HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), ++ HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), ++ HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), ++ HDA_CODEC_VOLUME("Mic Boost", 0x19, 0, HDA_INPUT), ++ HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), ++ HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), ++ HDA_CODEC_VOLUME("Front Mic Boost", 0x18, 0, HDA_INPUT), ++ HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), ++ HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), ++ HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), ++ HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), ++ HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), ++ HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), ++ HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ++ /* .name = "Capture Source", */ ++ .name = "Input Source", ++ .count = 2, ++ .info = alc883_mux_enum_info, ++ .get = alc883_mux_enum_get, ++ .put = alc883_mux_enum_put, ++ }, ++ { } /* end */ ++}; ++ + static struct snd_kcontrol_new alc883_fivestack_mixer[] = { + HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), +@@ -7763,6 +7855,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = { + [ALC883_MITAC] = "mitac", + [ALC883_CLEVO_M720] = "clevo-m720", + [ALC883_FUJITSU_PI2515] = "fujitsu-pi2515", ++ [ALC883_3ST_6ch_INTEL] = "3stack-6ch-intel", + [ALC883_AUTO] = "auto", + }; + +@@ -7820,6 +7913,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { + SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), + SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG), + SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), ++ SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), ++ SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), + SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), + {} + }; +@@ -7858,6 +7953,18 @@ static struct alc_config_preset alc883_presets[] = { + .need_dac_fix = 1, + .input_mux = &alc883_capture_source, + }, ++ [ALC883_3ST_6ch_INTEL] = { ++ .mixers = { alc883_3ST_6ch_intel_mixer, alc883_chmode_mixer }, ++ .init_verbs = { alc883_init_verbs }, ++ .num_dacs = ARRAY_SIZE(alc883_dac_nids), ++ .dac_nids = alc883_dac_nids, ++ .dig_out_nid = ALC883_DIGOUT_NID, ++ .dig_in_nid = ALC883_DIGIN_NID, ++ .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_intel_modes), ++ .channel_mode = alc883_3ST_6ch_intel_modes, ++ .need_dac_fix = 1, ++ .input_mux = &alc883_3stack_6ch_intel, ++ }, + [ALC883_6ST_DIG] = { + .mixers = { alc883_base_mixer, alc883_chmode_mixer }, + .init_verbs = { alc883_init_verbs }, diff --git a/debian/patches/series/1~experimental.1 b/debian/patches/series/1~experimental.1 index ffd8ef1e6..f5bf6a666 100644 --- a/debian/patches/series/1~experimental.1 +++ b/debian/patches/series/1~experimental.1 @@ -57,3 +57,5 @@ + bugfix/all/x86-acpi-sleep-x61s.patch + bugfix/powerpc/mm-mol.patch + features/all/drivers-net-atl1e.patch ++ bugfix/all/sound_hda_ich9.patch ++ bugfix/all/sound_hda_intel_dg33.patch