[kernel] r7260 - in dists/sid/linux-2.6/debian: patches
patches/series
Dann Frazier
dannf at costa.debian.org
Tue Aug 29 06:18:12 UTC 2006
Author: dannf
Date: Tue Aug 29 06:18:09 2006
New Revision: 7260
Added:
dists/sid/linux-2.6/debian/patches/series/8
dists/sid/linux-2.6/debian/patches/sound-pci-hda-intel-d965.diff
dists/sid/linux-2.6/debian/patches/sound-pci-hda-mac-mini-intel945.diff
dists/sid/linux-2.6/debian/patches/sound-pci-hda-mac-mini-quirks.diff
Modified:
dists/sid/linux-2.6/debian/changelog
Log:
* sound-pci-hda-mac-mini-quirks.diff, sound-pci-hda-intel-d965.diff
sound-pci-hda-mac-mini-intel945.diff:
Updates to patch_sigmatel.c to add x86 mac-mini sound support
Thanks to Matt Kraai. (closes: #384972)
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog (original)
+++ dists/sid/linux-2.6/debian/changelog Tue Aug 29 06:18:09 2006
@@ -3,7 +3,13 @@
[ Martin Michlmayr ]
* arm/ixp4xx: Enable CONFIG_W1.
- -- Martin Michlmayr <tbm at cyrius.com> Sun, 27 Aug 2006 20:48:53 +0200
+ [ dann frazier ]
+ * sound-pci-hda-mac-mini-quirks.diff, sound-pci-hda-intel-d965.diff
+ sound-pci-hda-mac-mini-intel945.diff:
+ Updates to patch_sigmatel.c to add x86 mac-mini sound support
+ Thanks to Matt Kraai. (closes: #384972)
+
+ -- dann frazier <dannf at debian.org> Tue, 29 Aug 2006 00:06:48 -0600
linux-2.6 (2.6.17-7) unstable; urgency=low
Added: dists/sid/linux-2.6/debian/patches/series/8
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/series/8 Tue Aug 29 06:18:09 2006
@@ -0,0 +1,3 @@
++ sound-pci-hda-mac-mini-quirks.diff
++ sound-pci-hda-intel-d965.diff
++ sound-pci-hda-mac-mini-intel945.diff
Added: dists/sid/linux-2.6/debian/patches/sound-pci-hda-intel-d965.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/sound-pci-hda-intel-d965.diff Tue Aug 29 06:18:09 2006
@@ -0,0 +1,211 @@
+From: Takashi Iwai <tiwai at suse.de>
+Date: Wed, 28 Jun 2006 13:52:16 +0000 (+0200)
+Subject: [ALSA] Add Intel D965 board support
+X-Git-Tag: v2.6.18-rc1
+X-Git-Url: http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=19039bd0079f282b1023e61212285b5653e3a8ad
+
+[ALSA] Add Intel D965 board support
+
+Added the support for Intel D965 boards with STAC9227 codec.
+
+Signed-off-by: Takashi Iwai <tiwai at suse.de>
+Signed-off-by: Jaroslav Kysela <perex at suse.cz>
+---
+
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -42,6 +42,9 @@
+ #define STAC_D945GTP3 1
+ #define STAC_D945GTP5 2
+ #define STAC_MACMINI 3
++#define STAC_D965_2112 4
++#define STAC_D965_284B 5
++#define STAC_922X_MODELS 6 /* number of 922x models */
+
+ struct sigmatel_spec {
+ struct snd_kcontrol_new *mixers[4];
+@@ -107,10 +110,24 @@ static hda_nid_t stac922x_adc_nids[2] =
+ 0x06, 0x07,
+ };
+
++static hda_nid_t stac9227_adc_nids[2] = {
++ 0x07, 0x08,
++};
++
++#if 0
++static hda_nid_t d965_2112_dac_nids[3] = {
++ 0x02, 0x03, 0x05,
++};
++#endif
++
+ static hda_nid_t stac922x_mux_nids[2] = {
+ 0x12, 0x13,
+ };
+
++static hda_nid_t stac9227_mux_nids[2] = {
++ 0x15, 0x16,
++};
++
+ static hda_nid_t stac927x_adc_nids[3] = {
+ 0x07, 0x08, 0x09
+ };
+@@ -173,6 +190,24 @@ static struct hda_verb stac922x_core_ini
+ {}
+ };
+
++static struct hda_verb stac9227_core_init[] = {
++ /* set master volume and direct control */
++ { 0x16, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
++ /* unmute node 0x1b */
++ { 0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
++ {}
++};
++
++static struct hda_verb d965_2112_core_init[] = {
++ /* set master volume and direct control */
++ { 0x16, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
++ /* unmute node 0x1b */
++ { 0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
++ /* select node 0x03 as DAC */
++ { 0x0b, AC_VERB_SET_CONNECT_SEL, 0x01},
++ {}
++};
++
+ static struct hda_verb stac927x_core_init[] = {
+ /* set master volume and direct control */
+ { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
+@@ -212,6 +247,21 @@ static struct snd_kcontrol_new stac922x_
+ { } /* end */
+ };
+
++/* This needs to be generated dynamically based on sequence */
++static struct snd_kcontrol_new stac9227_mixer[] = {
++ {
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ .name = "Input Source",
++ .count = 1,
++ .info = stac92xx_mux_enum_info,
++ .get = stac92xx_mux_enum_get,
++ .put = stac92xx_mux_enum_put,
++ },
++ HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT),
++ HDA_CODEC_MUTE("Capture Switch", 0x1b, 0x0, HDA_OUTPUT),
++ { } /* end */
++};
++
+ static snd_kcontrol_new_t stac927x_mixer[] = {
+ {
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+@@ -291,11 +341,17 @@ static unsigned int d945gtp5_pin_configs
+ 0x02a19320, 0x40000100,
+ };
+
+-static unsigned int *stac922x_brd_tbl[] = {
+- ref922x_pin_configs,
+- d945gtp3_pin_configs,
+- d945gtp5_pin_configs,
+- NULL, /* STAC_MACMINI */
++static unsigned int d965_2112_pin_configs[10] = {
++ 0x0221401f, 0x40000100, 0x40000100, 0x01014011,
++ 0x01a19021, 0x01813024, 0x01452130, 0x40000100,
++ 0x02a19320, 0x40000100,
++};
++
++static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
++ [STAC_REF] = ref922x_pin_configs,
++ [STAC_D945GTP3] = d945gtp3_pin_configs,
++ [STAC_D945GTP5] = d945gtp5_pin_configs,
++ [STAC_D965_2112] = d965_2112_pin_configs,
+ };
+
+ static struct hda_board_config stac922x_cfg_tbl[] = {
+@@ -330,6 +386,12 @@ static struct hda_board_config stac922x_
+ { .pci_subvendor = 0x8384,
+ .pci_subdevice = 0x7680,
+ .config = STAC_MACMINI }, /* Apple Mac Mini (early 2006) */
++ { .pci_subvendor = PCI_VENDOR_ID_INTEL,
++ .pci_subdevice = 0x2112,
++ .config = STAC_D965_2112 },
++ { .pci_subvendor = PCI_VENDOR_ID_INTEL,
++ .pci_subdevice = 0x284b,
++ .config = STAC_D965_284B },
+ {} /* terminator */
+ };
+
+@@ -713,7 +775,8 @@ static int stac92xx_add_dyn_out_pins(str
+ * A and B is not supported.
+ */
+ /* fill in the dac_nids table from the parsed pin configuration */
+-static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct auto_pin_cfg *cfg)
++static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec,
++ const struct auto_pin_cfg *cfg)
+ {
+ struct sigmatel_spec *spec = codec->spec;
+ hda_nid_t nid;
+@@ -732,10 +795,13 @@ static int stac92xx_auto_fill_dac_nids(s
+ }
+
+ /* add playback controls from the parsed DAC table */
+-static int stac92xx_auto_create_multi_out_ctls(struct sigmatel_spec *spec, const struct auto_pin_cfg *cfg)
++static int stac92xx_auto_create_multi_out_ctls(struct sigmatel_spec *spec,
++ const struct auto_pin_cfg *cfg)
+ {
+ char name[32];
+- static const char *chname[4] = { "Front", "Surround", NULL /*CLFE*/, "Side" };
++ static const char *chname[4] = {
++ "Front", "Surround", NULL /*CLFE*/, "Side"
++ };
+ hda_nid_t nid;
+ int i, err;
+
+@@ -893,10 +959,12 @@ static int stac92xx_parse_auto_config(st
+ return err;
+ if (! spec->autocfg.line_outs)
+ return 0; /* can't find valid pin config */
++
+ if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0)
+ return err;
+- if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0)
+- return err;
++ if (spec->multiout.num_dacs == 0)
++ if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0)
++ return err;
+
+ if ((err = stac92xx_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 ||
+ (err = stac92xx_auto_create_hp_ctls(codec, &spec->autocfg)) < 0 ||
+@@ -1194,7 +1262,8 @@ static int patch_stac922x(struct hda_cod
+ codec->spec = spec;
+ spec->board_config = snd_hda_check_board_config(codec, stac922x_cfg_tbl);
+ if (spec->board_config < 0)
+- snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, using BIOS defaults\n");
++ snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, "
++ "using BIOS defaults\n");
+ else if (stac922x_brd_tbl[spec->board_config] != NULL) {
+ spec->num_pins = 10;
+ spec->pin_nids = stac922x_pin_nids;
+@@ -1210,6 +1279,25 @@ static int patch_stac922x(struct hda_cod
+ spec->mixer = stac922x_mixer;
+
+ spec->multiout.dac_nids = spec->dac_nids;
++
++ switch (spec->board_config) {
++ case STAC_D965_2112:
++ spec->adc_nids = stac9227_adc_nids;
++ spec->mux_nids = stac9227_mux_nids;
++#if 0
++ spec->multiout.dac_nids = d965_2112_dac_nids;
++ spec->multiout.num_dacs = ARRAY_SIZE(d965_2112_dac_nids);
++#endif
++ spec->init = d965_2112_core_init;
++ spec->mixer = stac9227_mixer;
++ break;
++ case STAC_D965_284B:
++ spec->adc_nids = stac9227_adc_nids;
++ spec->mux_nids = stac9227_mux_nids;
++ spec->init = stac9227_core_init;
++ spec->mixer = stac9227_mixer;
++ break;
++ }
+
+ err = stac92xx_parse_auto_config(codec, 0x08, 0x09);
+ if (err < 0) {
Added: dists/sid/linux-2.6/debian/patches/sound-pci-hda-mac-mini-intel945.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/sound-pci-hda-mac-mini-intel945.diff Tue Aug 29 06:18:09 2006
@@ -0,0 +1,24 @@
+From: Linus Torvalds <torvalds at macmini.osdl.org>
+Date: Tue, 11 Jul 2006 05:21:43 +0000 (-0700)
+Subject: x86 MacMini: make built-in speaker sound actually work
+X-Git-Tag: v2.6.18-rc2
+X-Git-Url: http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7c3dec0679c66ce177726802adbe2f403942fc27
+
+x86 MacMini: make built-in speaker sound actually work
+
+The MacMini board table seems to largely look like any bog-standard
+Intel 945 board.
+
+Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+---
+
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -351,6 +351,7 @@ static unsigned int *stac922x_brd_tbl[ST
+ [STAC_REF] = ref922x_pin_configs,
+ [STAC_D945GTP3] = d945gtp3_pin_configs,
+ [STAC_D945GTP5] = d945gtp5_pin_configs,
++ [STAC_MACMINI] = d945gtp5_pin_configs,
+ [STAC_D965_2112] = d965_2112_pin_configs,
+ };
+
Added: dists/sid/linux-2.6/debian/patches/sound-pci-hda-mac-mini-quirks.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/sound-pci-hda-mac-mini-quirks.diff Tue Aug 29 06:18:09 2006
@@ -0,0 +1,147 @@
+From: Sam Revitch <samr7 at cs.washington.edu>
+Date: Wed, 10 May 2006 13:09:17 +0000 (+0200)
+Subject: [ALSA] hda-codec - Add support for Apple Mac Mini (early 2006)
+X-Git-Tag: v2.6.12-rc2
+X-Git-Url: http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=62fe78e90dc25b269362034487dc450cd8453e8
+
+[ALSA] hda-codec - Add support for Apple Mac Mini (early 2006)
+
+Add support for some audio quirks of the Apple Mac Mini (early 2006)
+
+Signed-off-by: Sam Revitch <samr7 at cs.washington.edu>
+Signed-off-by: Takashi Iwai <tiwai at suse.de>
+---
+
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -41,6 +41,7 @@
+ #define STAC_REF 0
+ #define STAC_D945GTP3 1
+ #define STAC_D945GTP5 2
++#define STAC_MACMINI 3
+
+ struct sigmatel_spec {
+ struct snd_kcontrol_new *mixers[4];
+@@ -52,6 +53,7 @@ struct sigmatel_spec {
+ unsigned int mic_switch: 1;
+ unsigned int alt_switch: 1;
+ unsigned int hp_detect: 1;
++ unsigned int gpio_mute: 1;
+
+ /* playback */
+ struct hda_multi_out multiout;
+@@ -293,6 +295,7 @@ static unsigned int *stac922x_brd_tbl[]
+ ref922x_pin_configs,
+ d945gtp3_pin_configs,
+ d945gtp5_pin_configs,
++ NULL, /* STAC_MACMINI */
+ };
+
+ static struct hda_board_config stac922x_cfg_tbl[] = {
+@@ -324,6 +327,9 @@ static struct hda_board_config stac922x_
+ { .pci_subvendor = PCI_VENDOR_ID_INTEL,
+ .pci_subdevice = 0x0417,
+ .config = STAC_D945GTP5 }, /* Intel D975XBK - 5 Stack */
++ { .pci_subvendor = 0x8384,
++ .pci_subdevice = 0x7680,
++ .config = STAC_MACMINI }, /* Apple Mac Mini (early 2006) */
+ {} /* terminator */
+ };
+
+@@ -841,6 +847,19 @@ static int stac92xx_auto_create_analog_i
+ }
+ }
+
++ if (imux->num_items == 1) {
++ /*
++ * Set the current input for the muxes.
++ * The STAC9221 has two input muxes with identical source
++ * NID lists. Hopefully this won't get confused.
++ */
++ for (i = 0; i < spec->num_muxes; i++) {
++ snd_hda_codec_write(codec, spec->mux_nids[i], 0,
++ AC_VERB_SET_CONNECT_SEL,
++ imux->items[0].index);
++ }
++ }
++
+ return 0;
+ }
+
+@@ -946,6 +965,45 @@ static int stac9200_parse_auto_config(st
+ return 1;
+ }
+
++/*
++ * Early 2006 Intel Macintoshes with STAC9220X5 codecs seem to have a
++ * funky external mute control using GPIO pins.
++ */
++
++static void stac922x_gpio_mute(struct hda_codec *codec, int pin, int muted)
++{
++ unsigned int gpiostate, gpiomask, gpiodir;
++
++ gpiostate = snd_hda_codec_read(codec, codec->afg, 0,
++ AC_VERB_GET_GPIO_DATA, 0);
++
++ if (!muted)
++ gpiostate |= (1 << pin);
++ else
++ gpiostate &= ~(1 << pin);
++
++ gpiomask = snd_hda_codec_read(codec, codec->afg, 0,
++ AC_VERB_GET_GPIO_MASK, 0);
++ gpiomask |= (1 << pin);
++
++ gpiodir = snd_hda_codec_read(codec, codec->afg, 0,
++ AC_VERB_GET_GPIO_DIRECTION, 0);
++ gpiodir |= (1 << pin);
++
++ /* AppleHDA seems to do this -- WTF is this verb?? */
++ snd_hda_codec_write(codec, codec->afg, 0, 0x7e7, 0);
++
++ snd_hda_codec_write(codec, codec->afg, 0,
++ AC_VERB_SET_GPIO_MASK, gpiomask);
++ snd_hda_codec_write(codec, codec->afg, 0,
++ AC_VERB_SET_GPIO_DIRECTION, gpiodir);
++
++ msleep(1);
++
++ snd_hda_codec_write(codec, codec->afg, 0,
++ AC_VERB_SET_GPIO_DATA, gpiostate);
++}
++
+ static int stac92xx_init(struct hda_codec *codec)
+ {
+ struct sigmatel_spec *spec = codec->spec;
+@@ -982,6 +1040,11 @@ static int stac92xx_init(struct hda_code
+ stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin,
+ AC_PINCTL_IN_EN);
+
++ if (spec->gpio_mute) {
++ stac922x_gpio_mute(codec, 0, 0);
++ stac922x_gpio_mute(codec, 1, 0);
++ }
++
+ return 0;
+ }
+
+@@ -1132,7 +1195,7 @@ static int patch_stac922x(struct hda_cod
+ spec->board_config = snd_hda_check_board_config(codec, stac922x_cfg_tbl);
+ if (spec->board_config < 0)
+ snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, using BIOS defaults\n");
+- else {
++ else if (stac922x_brd_tbl[spec->board_config] != NULL) {
+ spec->num_pins = 10;
+ spec->pin_nids = stac922x_pin_nids;
+ spec->pin_configs = stac922x_brd_tbl[spec->board_config];
+@@ -1154,6 +1217,9 @@ static int patch_stac922x(struct hda_cod
+ return err;
+ }
+
++ if (spec->board_config == STAC_MACMINI)
++ spec->gpio_mute = 1;
++
+ codec->patch_ops = stac92xx_patch_ops;
+
+ return 0;
More information about the Kernel-svn-changes
mailing list